问:
How to enable and disable next button in vue-form-generator based on user selections in a multi step form
We are using vue-form-generator and implemented a multi steps screen to post an Ad/Trade for users to buy or sell items. Here is the code for the 2nd screen when users get to select different subscription packages(plans). That means users can use 6 Free Trades as a free plan and once they consume all the Free Trades plan, they will be able to buy a paid plan(package):

```

        <tab-content v-if="step === 2">

Post Trade

                {% comment %} {% if plan_expires == 'expired' %}

Your current month plan is expired. please renew to new plan.

                {% endif %} {% endcomment %}

Free Trades:

                    {% if planValue == "6" or freePackage == "True" %}

                            <input type="radio" id="consumer" name="flag"
                                 class="classnameee" value="6 Free Trades" disabled   >
                            {% if freePackage == "True" and consumed_ads_free == 6 %}
                                 All 6 free trades are consumed.
                                {% comment %} class="postad_p" Please select a paid subscription below if you want to post additional Trades {% endcomment %}
                            {% elif freePackage == "True" %}
                                6 Free Trades

                            {% endif %}

                    {% elif planValue != "6" %}

                            <input type="radio" id="consumer" name="flag"
                                v-model="subscribe" value="6 Free Trades">
                            6 Free Trades

                    {% endif %}

                        {% if cust_package %}
                        {% comment %} {% if freePackage == '6 Free Trades' %} {% endcomment %}

* You consumed {{consumed_ads_free}} trades and left with {{package_value}} trades.

                                                        {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}

                        {% comment %} {% endif %} {% endcomment %}
                        {% endif %}

                    {% if cust_package == '6 Free Trades'  %}

Subscribe for more Trades options will be enabled once you consume all 6 free trades

                           {% comment %} {% elif cust_package == " "  %}

 {% endcomment %}
                            {% elif cust_package == "" %}

Subscribe for more Trades options will be enabled once you consume all 6 free trades

                            {% endif %}

 Subscribe for more Trades:

                {% if cust_package and package_value != 0%}

                        <input style="position: relative;width: 4%;left: 1px;"
                               type="radio" id="business"
                               name="flag" value="15 Trades for $6.99" v-model="subscribe" disabled>
                        15 Trades for $6.99

                        {% if cust_package %}
                        {% if cust_package == '15 Trades for $6.99' %}
                            {% if  package_value == 0 and cust_package == '15 Trades for $6.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif  package_value != 0 and cust_package == '15 Trades for $6.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

                                {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 15 trades.

                        {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                        {% endif %}
                        {% endif %}

                        <input style="position: relative;width: 4%;left: 1px;"
                               type="radio" id="business"
                               name="flag" value="30 Trades for $12.99" v-model="subscribe" disabled>
                        30 Trades for $12.99

                        {% if cust_package %}
                        {% if cust_package == '30 Trades for $12.99' %}
                            {% if  package_value == 0 and cust_package == '30 Trades for $12.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif  package_value != 0 and cust_package == '30 Trades for $12.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

                            {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 30 trades.

                        {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                        {% endif %}
                        {% endif %}

                        <input style="position: relative;width: 4%;left: 1px;"
                               type="radio" id="business"
                               name="flag" value="120 Trades for $24.99" v-model="subscribe" disabled>
                        120 Trades for $24.99

                        {% if cust_package %}
                        {% if cust_package == '120 Trades for $24.99' %}
                            {% if package_value == 0 and cust_package == '120 Trades for $24.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 0 and cust_package == '120 Trades for $24.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

                                {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 120 trades.

                        {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                        {% endif %}
                        {% endif %}

                {% elif cust_package and package_value == 0 %}

                        <input style="position: relative;width: 4%;left: 1px;"
                            type="radio" id="business"
                            name="flag" value="15 Trades for $6.99" v-model="subscribe">
                        15 Trades for $6.99

                        {% if cust_package %}
                        {% if cust_package == '15 Trades for $6.99' %}
                            {% if package_value == 1 or package_value == 0 and cust_package == '15 Trades for $6.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 1 or package_value != 0 and cust_package == '15 Trades for $6.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

                                {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 15 trades.

                        {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                        {% endif %}
                        {% endif %}

                        <input style="position: relative;width: 4%;left: 1px;"
                            type="radio" id="business"
                            name="flag" value="30 Trades for $12.99" v-model="subscribe">
                        30 Trades for $12.99

                        {% if cust_package %}
                        {% if cust_package == '30 Trades for $12.99' %}
                            {% if package_value == 1 or package_value == 0 and cust_package == '30 Trades for $12.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 1 or package_value != 1 and cust_package == '30 Trades for $12.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

* Want more trades, please upgrade higher package

                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 30 trades.

* Want more trades, please upgrade higher package

                        {% endif %}
                        {% endif %}

                        <input style="position: relative;width: 4%;left: 1px;"
                            type="radio" id="business"
                            name="flag" value="120 Trades for $24.99" v-model="subscribe">
                        120 Trades for $12.99

                        {% if cust_package %}
                        {% if cust_package == '120 Trades for $24.99' %}
                            {% if package_value == 1 or package_value == 0 and cust_package == '120 Trades for $24.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 1 or package_value != 0 and cust_package == '120 Trades for $24.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

* Want more trades in this month, please upgrade higher package

                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 120 trades.

                        {% comment %}
* Want more trades, please upgrade higher package
 {% endcomment %}
                        {% endif %}
                        {% endif %}

                {% else %}

                        <input style="position: relative;width: 4%;left: 1px;"
                            type="radio" id="business"
                            name="flag" value="15 Trades for $6.99" v-model="subscribe" disabled>
                        15 Trades for $6.99

                        {% if cust_package %}
                        {% if cust_package == '15 Trades for $6.99' %}
                            {% if package_value == 1 or package_value == 0 and cust_package == '15 Trades for $6.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 1 or package_value != 0 and cust_package == '15 Trades for $6.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

* Want more trades in this month, please upgrade higher package

                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 15 trades.

* Want more trades in this month, please upgrade higher package

                        {% endif %}
                        {% endif %}

                        <input style="position: relative;width: 4%;left: 1px;"
                            type="radio" id="business"
                            name="flag" value="30 Trades for $12.99" v-model="subscribe" disabled>
                        30 Trades for $12.99

                        {% if cust_package %}
                        {% if cust_package == '30 Trades for $12.99' %}
                            {% if package_value == 1 or package_value == 0 and cust_package == '30 Trades for $12.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 1 or package_value != 1 and cust_package == '30 Trades for $12.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

* Want more trades in this month, please upgrade higher package

                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 30 trades.

* Want more trades in this month, please upgrade higher package

                        {% endif %}
                        {% endif %}

                        <input style="position: relative;width: 4%;left: 1px;"
                            type="radio" id="business"
                            name="flag" value="120 Trades for $24.99" v-model="subscribe" disabled>
                        120 Trades for $12.99

                        {% if cust_package %}
                        {% if cust_package == '120 Trades for $24.99' %}
                            {% if package_value == 1 or package_value == 0 and cust_package == '120 Trades for $24.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 1 or package_value != 0 and cust_package == '120 Trades for $24.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

* Want more trades in this month, please upgrade higher package

                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 120 trades.

* Want more trades in this month, please upgrade higher package

                        {% endif %}
                        {% endif %}

                {% endif %}

                    {% comment %}

                        <input style="position: relative;width: 4%;left: 1px;"
                               type="radio"
                               id="business" name="flag"
                               value="Unlimited for $99.00" v-model="subscribe">
                        Unlimited for $99.00

 {% endcomment %}
                    {% comment %}

                        {% if cust_package %}
                        {% if cust_package == 'Unlimited for $99.00' %}

* You consumed {{consumed_ads}} ads and left with {{package_value}} ads.

* Want more ads in this month, please upgrade higher package

                        {% else %}

* You consumed 0 ads and left with Unlimited ads.

* Want more ads in this month, please upgrade higher package

                        {% endif %}
                        {% endif %}

 {% endcomment %}

                            <button class="prev_next_btn" @click.prevent="prev_first()">Previous</button>

                            <button  class="step1_next"  style="position: relative; left: 0px;
                                                              top: 0px;"
                                    @click.prevent="next_first()"
                                    :disabled="isdisabled" id="buttonDisabled">
                                    Next
                            </button>

        </tab-content>
```

As a next step, we need to add new logic or condition here:
When the User consumed all 6 Free Trades, package_value becomes 0 (zero) and
then the Next button is disabled. So the User is supposed to select paid plan(package) then ´Next´ button should be enabled, but we are stuck
in this screen to enable and disable ´Next´ button for selecting a paid plan(package).

I´m new to vue-form-generator because the source code is inherited from the previous developer. I appreciate it if someone can review the above code and help us?

Thanks in advance

Body:
We are using vue-form-generator and implemented a multi steps screen to post an Ad/Trade for users to buy or sell items. Here is the code for the 2nd screen when users get to select different subscription packages(plans). That means users can use 6 Free Trades as a free plan and once they consume all the Free Trades plan, they will be able to buy a paid plan(package):

        <tab-content v-if="step === 2">

Post Trade

                {% comment %} {% if plan_expires == 'expired' %}

Your current month plan is expired. please renew to new plan.

                {% endif %} {% endcomment %}

Free Trades:

                    {% if planValue == "6" or freePackage == "True" %}

                            <input type="radio" id="consumer" name="flag"
                                 class="classnameee" value="6 Free Trades" disabled   >
                            {% if freePackage == "True" and consumed_ads_free == 6 %}
                                 All 6 free trades are consumed.
                                {% comment %} class="postad_p" Please select a paid subscription below if you want to post additional Trades {% endcomment %}
                            {% elif freePackage == "True" %}
                                6 Free Trades

                            {% endif %}

                    {% elif planValue != "6" %}

                            <input type="radio" id="consumer" name="flag"
                                v-model="subscribe" value="6 Free Trades">
                            6 Free Trades

                    {% endif %}

                        {% if cust_package %}
                        {% comment %} {% if freePackage == '6 Free Trades' %} {% endcomment %}

* You consumed {{consumed_ads_free}} trades and left with {{package_value}} trades.

                                                        {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}

                        {% comment %} {% endif %} {% endcomment %}
                        {% endif %}

                    {% if cust_package == '6 Free Trades'  %}

Subscribe for more Trades options will be enabled once you consume all 6 free trades

                           {% comment %} {% elif cust_package == " "  %}

 {% endcomment %}
                            {% elif cust_package == "" %}

Subscribe for more Trades options will be enabled once you consume all 6 free trades

                            {% endif %}

 Subscribe for more Trades:

                {% if cust_package and package_value != 0%}

                        <input style="position: relative;width: 4%;left: 1px;"
                               type="radio" id="business"
                               name="flag" value="15 Trades for $6.99" v-model="subscribe" disabled>
                        15 Trades for $6.99

                        {% if cust_package %}
                        {% if cust_package == '15 Trades for $6.99' %}
                            {% if  package_value == 0 and cust_package == '15 Trades for $6.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif  package_value != 0 and cust_package == '15 Trades for $6.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

                                {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 15 trades.

                        {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                        {% endif %}
                        {% endif %}

                        <input style="position: relative;width: 4%;left: 1px;"
                               type="radio" id="business"
                               name="flag" value="30 Trades for $12.99" v-model="subscribe" disabled>
                        30 Trades for $12.99

                        {% if cust_package %}
                        {% if cust_package == '30 Trades for $12.99' %}
                            {% if  package_value == 0 and cust_package == '30 Trades for $12.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif  package_value != 0 and cust_package == '30 Trades for $12.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

                            {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 30 trades.

                        {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                        {% endif %}
                        {% endif %}

                        <input style="position: relative;width: 4%;left: 1px;"
                               type="radio" id="business"
                               name="flag" value="120 Trades for $24.99" v-model="subscribe" disabled>
                        120 Trades for $24.99

                        {% if cust_package %}
                        {% if cust_package == '120 Trades for $24.99' %}
                            {% if package_value == 0 and cust_package == '120 Trades for $24.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 0 and cust_package == '120 Trades for $24.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

                                {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 120 trades.

                        {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                        {% endif %}
                        {% endif %}

                {% elif cust_package and package_value == 0 %}

                        <input style="position: relative;width: 4%;left: 1px;"
                            type="radio" id="business"
                            name="flag" value="15 Trades for $6.99" v-model="subscribe">
                        15 Trades for $6.99

                        {% if cust_package %}
                        {% if cust_package == '15 Trades for $6.99' %}
                            {% if package_value == 1 or package_value == 0 and cust_package == '15 Trades for $6.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 1 or package_value != 0 and cust_package == '15 Trades for $6.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

                                {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 15 trades.

                        {% comment %}
* Want more ads in this month, please upgrade higher package
 {% endcomment %}
                        {% endif %}
                        {% endif %}

                        <input style="position: relative;width: 4%;left: 1px;"
                            type="radio" id="business"
                            name="flag" value="30 Trades for $12.99" v-model="subscribe">
                        30 Trades for $12.99

                        {% if cust_package %}
                        {% if cust_package == '30 Trades for $12.99' %}
                            {% if package_value == 1 or package_value == 0 and cust_package == '30 Trades for $12.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 1 or package_value != 1 and cust_package == '30 Trades for $12.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

* Want more trades, please upgrade higher package

                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 30 trades.

* Want more trades, please upgrade higher package

                        {% endif %}
                        {% endif %}

                        <input style="position: relative;width: 4%;left: 1px;"
                            type="radio" id="business"
                            name="flag" value="120 Trades for $24.99" v-model="subscribe">
                        120 Trades for $12.99

                        {% if cust_package %}
                        {% if cust_package == '120 Trades for $24.99' %}
                            {% if package_value == 1 or package_value == 0 and cust_package == '120 Trades for $24.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 1 or package_value != 0 and cust_package == '120 Trades for $24.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

* Want more trades in this month, please upgrade higher package

                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 120 trades.

                        {% comment %}
* Want more trades, please upgrade higher package
 {% endcomment %}
                        {% endif %}
                        {% endif %}

                {% else %}

                        <input style="position: relative;width: 4%;left: 1px;"
                            type="radio" id="business"
                            name="flag" value="15 Trades for $6.99" v-model="subscribe" disabled>
                        15 Trades for $6.99

                        {% if cust_package %}
                        {% if cust_package == '15 Trades for $6.99' %}
                            {% if package_value == 1 or package_value == 0 and cust_package == '15 Trades for $6.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 1 or package_value != 0 and cust_package == '15 Trades for $6.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

* Want more trades in this month, please upgrade higher package

                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 15 trades.

* Want more trades in this month, please upgrade higher package

                        {% endif %}
                        {% endif %}

                        <input style="position: relative;width: 4%;left: 1px;"
                            type="radio" id="business"
                            name="flag" value="30 Trades for $12.99" v-model="subscribe" disabled>
                        30 Trades for $12.99

                        {% if cust_package %}
                        {% if cust_package == '30 Trades for $12.99' %}
                            {% if package_value == 1 or package_value == 0 and cust_package == '30 Trades for $12.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 1 or package_value != 1 and cust_package == '30 Trades for $12.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

* Want more trades in this month, please upgrade higher package

                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 30 trades.

* Want more trades in this month, please upgrade higher package

                        {% endif %}
                        {% endif %}

                        <input style="position: relative;width: 4%;left: 1px;"
                            type="radio" id="business"
                            name="flag" value="120 Trades for $24.99" v-model="subscribe" disabled>
                        120 Trades for $12.99

                        {% if cust_package %}
                        {% if cust_package == '120 Trades for $24.99' %}
                            {% if package_value == 1 or package_value == 0 and cust_package == '120 Trades for $24.99' %}

* You consumed {{consumed_ads}} Trades and left with {{package_value}} Trade  * Please upgrade higher subscription if you want more Trades to post

                            {% elif package_value != 1 or package_value != 0 and cust_package == '120 Trades for $24.99' %}

* You consumed {{consumed_ads}} trades and left with {{package_value}} trades.

* Want more trades in this month, please upgrade higher package

                            {% endif %}

                        {% else %}

* You consumed 0 trades and left with 120 trades.

* Want more trades in this month, please upgrade higher package

                        {% endif %}
                        {% endif %}

                {% endif %}

                    {% comment %}

                        <input style="position: relative;width: 4%;left: 1px;"
                               type="radio"
                               id="business" name="flag"
                               value="Unlimited for $99.00" v-model="subscribe">
                        Unlimited for $99.00

 {% endcomment %}
                    {% comment %}

                        {% if cust_package %}
                        {% if cust_package == 'Unlimited for $99.00' %}

* You consumed {{consumed_ads}} ads and left with {{package_value}} ads.

* Want more ads in this month, please upgrade higher package

                        {% else %}

* You consumed 0 ads and left with Unlimited ads.

* Want more ads in this month, please upgrade higher package

                        {% endif %}
                        {% endif %}

 {% endcomment %}

                            <button class="prev_next_btn" @click.prevent="prev_first()">Previous</button>

                            <button  class="step1_next"  style="position: relative; left: 0px;
                                                              top: 0px;"
                                    @click.prevent="next_first()"
                                    :disabled="isdisabled" id="buttonDisabled">
                                    Next
                            </button>

        </tab-content>

As a next step, we need to add new logic or condition here:
When the User consumed all 6 Free Trades, package_value becomes 0 (zero) and
then the Next button is disabled. So the User is supposed to select paid plan(package) then ´Next´ button should be enabled, but we are stuck
in this screen to enable and disable ´Next´ button for selecting a paid plan(package).

I´m new to vue-form-generator because the source code is inherited from the previous developer. I appreciate it if someone can review the above code and help us?

Thanks in advance


来源: stackexchange

问:
CMD + V in excel causing extra blank spaces at end of text
When attempting to paste data from one cell in a sheet, to another sheet/cell I find that some text has leading extra white space at the end of the cell. For instance, if I am pasting the text 'ABC' from one cell to another, Im finding an extra white space at the end so it looks like: 'ABC '. Why does this happen?

I've tried using the TRIM func, but it's not resolving the issue. Id really like to resolve this issue

Thank you,

I've tried using the =TRIM(A1). The issue remains where at the end of the text there's an extra white space for some, but not all text.

ContentLicense: CC BY-SA 4.0


问:
ubereats order notification webhook not firing

```<code>app.post('/webhook',(req,res)=>{
   var data=req.body
   console.log((data));
   res.send(true)
})
</code>```

i dont what goes in redirect url . I have given a given base url with an undefined endpoint "redirect". webhook url is a ngrok one. but no response is seen in the terminal when an order is placed. Should we add any authorization with the api.

written a post api and a get api with my code . but no response is seen with it

Body:
app.post('/webhook',(req,res)=>{
   var data=req.body
   console.log((data));
   res.send(true)
})

i dont what goes in redirect url . I have given a given base url with an undefined endpoint "redirect". webhook url is a ngrok one. but no response is seen in the terminal when an order is placed. Should we add any authorization with the api.

written a post api and a get api with my code . but no response is seen with it


问:
Not able to absolute import in React Native project using babel-plugin-module-resolver
The file structure of my project is:

```<code>|--node_modules
|--src
|--App.js
|--Splash.js
</code>```

I want to import Splash.js in App.js using absolute import.
So, I added babel-plugin-module-resolver and set up a babel.config.js with the following contents (followed How to enable jsconfig.json in react-native project):

```<code>module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
    ["module-resolver", {
      "root": ["./"]
    }]
  ]
};

</code>```

and App.js

```<code>import Splash from 'Splash.js';
</code>```

Error in my console:

```<code>error: Error: Unable to resolve module Splash.js from C:\Users\<userName>\Desktop\<AppName>\App.js: Splash.js could not be found within the project or in these directories:
  node_modules
</code>```

Can anyone explain what is actually happening? How does baseUrl actually work? I am using it in a wrong way?

Body:
The file structure of my project is:

|--node_modules
|--src
|--App.js
|--Splash.js

I want to import Splash.js in App.js using absolute import.
So, I added babel-plugin-module-resolver and set up a babel.config.js with the following contents (followed How to enable jsconfig.json in react-native project):

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
    ["module-resolver", {
      "root": ["./"]
    }]
  ]
};

and App.js

import Splash from 'Splash.js';

Error in my console:

error: Error: Unable to resolve module Splash.js from C:\Users\<userName>\Desktop\<AppName>\App.js: Splash.js could not be found within the project or in these directories:
  node_modules

Can anyone explain what is actually happening? How does baseUrl actually work? I am using it in a wrong way?


问:
Whatsapp Cloud - Product Catalog - Batch APIs not working
We need to create, update or delete product(s) from our catalog.

For doing this programatically we are following Meta's Product Catalog Batch API documentation in which there is an endpoint mentioned as "<product_catalog_id>/batch". We are trying to make request at this endpoint by passing the payload as mentioned in the official documentation.

But I am getting "403 forbidden" error every time. On digging deeper I found that the access token which is making this API call must have 2 permission i.e. "catalog_management" and "business_management".

I have checked the access permission for my access token and it indeed has there 2 permissions.

Can anybody please help here?

I am attaching some links below, which I am using to make the batch API calls for product catalogs.

Using this link to understand the API structure = https://developers.facebook.com/docs/marketing-api/catalog-batch/guides/send-item-updates/

Using this link to make the required payload = https://developers.facebook.com/docs/marketing-api/catalog-batch/reference/

I tried generating new access tokens 2 or 3 times. I also tried changing the payload to check whether the documentation may be outdated but nothing helped me to solve this issue.

I am expecting that the product catalog batch API works, so that we can update the products from our side.


问:
Preferred caching strategy for data-driven applications on mobile devices
What is the preferred strategy for creating a mobile application that relies on data to be moved to/from a cloud-based service (thus requiring connectivity)?

What mechanisms are typically employed to ensure synchronization while connectivity can be less than stable?

Are all potential write operations queued locally and recover gracefully from terminated uploads?

Are most downloads/data queries just re-executed when applications are brought back in scope or regain connectivity after losing it for a while?

Specific guidance as well as training materials/study resources are acceptable!

ContentLicense: CC BY-SA 3.0


问:
IIS folder permission issues
edit1:
I upgraded my windows to an enterprise version and try to remove IIS by turning of the IIS feature from this post https://superuser.com/questions/704850/how-to-restore-iis-settings-and-default-web-site, deleted the inetpub folder, restarted and reinstall IIS but still having same problem.

edit2:
The folder issue also happened when I tried to use Visual Studio to publish a project to folder, but later I found out it is something related to OneDrive, I unlink OneDrive from my pc and I can see and select all folders from my machine. I still having issues with Authorization but its duplicated with many other posts so please keep this one closed

I am using windows 11 home with IIS 10

Just having some problems with my IIS, when I try to create a new site, it only allow me to select or create folder under desktop

and if I test the settings of the default website, it has the Authorization issue like this

I tried a few solutions like adding permissions for IUSR, IIS_IUSRS, NETWORK SERVICE, DefaultAppPool,and even Everyone to allow full access to the wwwroot folder and also enable form authenctions and anonymouse authentication and tried to change the user to both IUSR or applicationpool, non of this work

Title: IIS folder permission issues


问:
Pine script messing up CPR pivot points
I am using pine script to calculate and plot CPR pivots using the following formula:

```<code>prevdayopen = security(syminfo.tickerid, pivottimeframe, open[1], barmerge.gaps_off, barmerge.lookahead_on)
prevdayhigh = security(syminfo.tickerid, pivottimeframe, high[1], barmerge.gaps_off, barmerge.lookahead_on)
prevdaylow = security(syminfo.tickerid, pivottimeframe, low[1], barmerge.gaps_off, barmerge.lookahead_on)
prevdayclose = security(syminfo.tickerid, pivottimeframe, close[1], barmerge.gaps_off, barmerge.lookahead_on)

pivot = (prevdayhigh + prevdaylow + prevdayclose) / 3.0
bc = (prevdayhigh + prevdaylow) / 2.0
tc = pivot - bc + pivot
</code>```

Here pivot is the central pivot point, tc is the top CPR and bc is bottom CPR.
But when I see the data window in TradingView, the tc and bc are getting interchanged every day. bc being bottom pivot should have the lowest value but it shows highest among the three. tc and bc show correctly one day and next day they get interchanged. They show correctly only on alternate days. This is obviously causing issues in trading.
Has anybody faced this issue? Any idea on how to fix this?

I calculated CPR using the standard formula and expected it show the pivots correctly.

Title: Pine script messing up CPR pivot points

Body:
I am using pine script to calculate and plot CPR pivots using the following formula:

prevdayopen = security(syminfo.tickerid, pivottimeframe, open[1], barmerge.gaps_off, barmerge.lookahead_on)
prevdayhigh = security(syminfo.tickerid, pivottimeframe, high[1], barmerge.gaps_off, barmerge.lookahead_on)
prevdaylow = security(syminfo.tickerid, pivottimeframe, low[1], barmerge.gaps_off, barmerge.lookahead_on)
prevdayclose = security(syminfo.tickerid, pivottimeframe, close[1], barmerge.gaps_off, barmerge.lookahead_on)

pivot = (prevdayhigh + prevdaylow + prevdayclose) / 3.0
bc = (prevdayhigh + prevdaylow) / 2.0
tc = pivot - bc + pivot

Here pivot is the central pivot point, tc is the top CPR and bc is bottom CPR.
But when I see the data window in TradingView, the tc and bc are getting interchanged every day. bc being bottom pivot should have the lowest value but it shows highest among the three. tc and bc show correctly one day and next day they get interchanged. They show correctly only on alternate days. This is obviously causing issues in trading.
Has anybody faced this issue? Any idea on how to fix this?

I calculated CPR using the standard formula and expected it show the pivots correctly.


问:
How do I resolve this error when unpacking git pack files?

Objective

I have a small git repository with a pack file, that I'd like to unpack into "loose" objects.

Details

In the .git/objects/pack directory, I have the following files:

```<code>pack-aa859b3dd2044fe91120430f017fa39fe176ee73.idx
pack-aa859b3dd2044fe91120430f017fa39fe176ee73.pack
</code>```

According to a different post on StackOverflow, I should be able to:

Copy these files into my project root (outside .git directory)

Pipe the file contents into the git unpack-objects command

Actual Result

When I run the steps above, I receive the following error:

```<code>PS > Get-Content -Raw -Path pack-aa859b3dd2044fe91120430f017fa39fe176ee73.pack | git unpack-objects
fatal: offset value out of bound for delta base object
</code>```

Environment

Windows 11 Developer Preview

Git CLI git version 2.39.0.windows.2 installed via Scoop package manager

Question: What can I do to resolve this problem and properly unpack the git pack files into loose objects?

Body:
Objective

I have a small git repository with a pack file, that I'd like to unpack into "loose" objects.

Details

In the .git/objects/pack directory, I have the following files:

pack-aa859b3dd2044fe91120430f017fa39fe176ee73.idx
pack-aa859b3dd2044fe91120430f017fa39fe176ee73.pack

According to a different post on StackOverflow, I should be able to:

Copy these files into my project root (outside .git directory)

Pipe the file contents into the git unpack-objects command

Actual Result

When I run the steps above, I receive the following error:

PS > Get-Content -Raw -Path pack-aa859b3dd2044fe91120430f017fa39fe176ee73.pack | git unpack-objects
fatal: offset value out of bound for delta base object

Environment

Windows 11 Developer Preview

Git CLI git version 2.39.0.windows.2 installed via Scoop package manager

Question: What can I do to resolve this problem and properly unpack the git pack files into loose objects?


问:
The treeview item separator line gets vanished after applying the configured style
This is the style I implied

```<code>style_add_wear = ttk.Style()
style_add_wear.configure("add.Treeview", background="white", foreground="black", fieldbackground="white",font=('calibre', 12), sheight=10, rowheight=20)
style_add_wear.configure('add.Treeview.Heading', background="white", font=('calibre', 12),)
style_add_wear.map('add.Treeview', background=[('selected', '#1E90FF')], foreground=[('selected', 'white')])
tree01 = ttk.Treeview(firsttreeframe, show='headings', height=0,column=("c1", "c2","c3", "c4","c5", "c6","c7", "c8","c9","c10"),style="add.Treeview")
</code>```

and it looks like
but I want it show like this

Please help me in this:
Since there are many treeview in my application so I cannot imply following stylini method:

```<code>style_measurement = ttk.Style(secondframe)
style_measurement.configure("Treeview.Heading", font=(None, 13))
style_measurement.configure("Treeview", font=(None, 12))
</code>```

Please suggest any edits in the following method of styling:

```<code>style_add_wear = ttk.Style()
style_add_wear.configure("add.Treeview", background="white", foreground="black", fieldbackground="white",font=('calibre', 12), sheight=10, rowheight=20)
style_add_wear.configure('add.Treeview.Heading', background="white", font=('calibre', 12),)
style_add_wear.map('add.Treeview', background=[('selected', '#1E90FF')], foreground=[('selected', 'white')])
tree01 = ttk.Treeview(firsttreeframe, show='headings', height=0,column=("c1", "c2","c3", "c4","c5", "c6","c7", "c8","c9","c10"),style="add.Treeview")
</code>```

Body:
This is the style I implied

style_add_wear = ttk.Style()
style_add_wear.configure("add.Treeview", background="white", foreground="black", fieldbackground="white",font=('calibre', 12), sheight=10, rowheight=20)
style_add_wear.configure('add.Treeview.Heading', background="white", font=('calibre', 12),)
style_add_wear.map('add.Treeview', background=[('selected', '#1E90FF')], foreground=[('selected', 'white')])
tree01 = ttk.Treeview(firsttreeframe, show='headings', height=0,column=("c1", "c2","c3", "c4","c5", "c6","c7", "c8","c9","c10"),style="add.Treeview")

and it looks like
but I want it show like this

Please help me in this:
Since there are many treeview in my application so I cannot imply following stylini method:

style_measurement = ttk.Style(secondframe)
style_measurement.configure("Treeview.Heading", font=(None, 13))
style_measurement.configure("Treeview", font=(None, 12))

Please suggest any edits in the following method of styling:

style_add_wear = ttk.Style()
style_add_wear.configure("add.Treeview", background="white", foreground="black", fieldbackground="white",font=('calibre', 12), sheight=10, rowheight=20)
style_add_wear.configure('add.Treeview.Heading', background="white", font=('calibre', 12),)
style_add_wear.map('add.Treeview', background=[('selected', '#1E90FF')], foreground=[('selected', 'white')])
tree01 = ttk.Treeview(firsttreeframe, show='headings', height=0,column=("c1", "c2","c3", "c4","c5", "c6","c7", "c8","c9","c10"),style="add.Treeview")


问:
How to access same variable in two test cases in cypress?
Take one example in that i have declare one variable in global scope,how can i access in two test cases.

describe('variable Access', () => {

```<code>let name = 'Abhijit'

it('TC_01 Access same variable in two test cases', () => {

    cy.log(name)
})
it('TC_02 Access same variable in two test cases', () => {

    cy.log(name)
})
</code>```

})

i tried with this one is it write or wrong?

Body:
Take one example in that i have declare one variable in global scope,how can i access in two test cases.

describe('variable Access', () => {

let name = 'Abhijit'

it('TC_01 Access same variable in two test cases', () => {

    cy.log(name)
})
it('TC_02 Access same variable in two test cases', () => {

    cy.log(name)
})

})

i tried with this one is it write or wrong?


问:
Can I implement ble GATT server setup in my custom Android app without ble device?
I'm trying to implement GATT server setup in my Android app so that I can use both server and client functionality in same Android app independently of any ble device. I want to remove dependency on ble device in my Android app.

I tried doing server setup on nrf desktop application and use that in my custom Android app. But I'm not able to share server setup with my custom Android app


问:
Display PDF file from Laravel to React dynamically by clicking Title
So right now I am having a hard time trying to figure out how to solve my problem when a user clicks on a Title. Currently, I can display the pdf by accessing it in web thru http://127.0.0.1:8000/download/?file= + file name.

Here is my controller:

`   public function download(Request $request){

```<code>    if (Storage::disk('local')->exists("apiFile/$request->file")){
        $path = Storage::disk('local')->path("apiFile/$request->file");
        $content = file_get_contents($path);
        return response($content)->withHeaders([
            'Content-Type'=>mime_content_type($path)
        ]);
    }
    return redirect('/404');
}`
</code>```

This is my route:

Route::get('/download', [PdfViewer::class,'download']);

and this is where I want the click event to happen:

<Box sx={{ width: "100%", backgroundColor: "#94949466", minHeight: 36, textAlign: "center", alignItems: "center", fontSize: 18, }} > {data.map((item, index) => { if (item.category === datas) { return <Typography>{item.title}</Typography>; } })} </Box>

I am new to laravel and react and I don't know how to solve it yet. Thank you.

I tried to put an href link but It doesn't work because there should be a connection between backend and frontend.

Body:
So right now I am having a hard time trying to figure out how to solve my problem when a user clicks on a Title. Currently, I can display the pdf by accessing it in web thru http://127.0.0.1:8000/download/?file= + file name.

Here is my controller:

`   public function download(Request $request){

    if (Storage::disk('local')->exists("apiFile/$request->file")){
        $path = Storage::disk('local')->path("apiFile/$request->file");
        $content = file_get_contents($path);
        return response($content)->withHeaders([
            'Content-Type'=>mime_content_type($path)
        ]);
    }
    return redirect('/404');
}`

This is my route:

Route::get('/download', [PdfViewer::class,'download']);

and this is where I want the click event to happen:

<Box sx={{ width: "100%", backgroundColor: "#94949466", minHeight: 36, textAlign: "center", alignItems: "center", fontSize: 18, }} > {data.map((item, index) => { if (item.category === datas) { return <Typography>{item.title}</Typography>; } })} </Box>

I am new to laravel and react and I don't know how to solve it yet. Thank you.

I tried to put an href link but It doesn't work because there should be a connection between backend and frontend.


问:
How to Send Screen Share stream to Newly Joined Users in webRtc?
I am able to send  screen share stream to already joined users using webRTC and peerjs. If new users joins then new user unable to receive stream.

i tried by adding  newly joined peerId to existing peerslist.


问:
Service ‘memcached’ exited with status 139. Restarting. Messages (Couchbase)
I am facing below error most of time and at same time bucket appear down(1 node pending). This error facing just after setting up and Couchbase server even not accessed yet.

```<code>Service 'memcached' exited with status 139. Restarting. Messages:
2023-01-11T04:44:44.735996+00:00 CRITICAL     /opt/couchbase/bin/memcached(_ZN15google_breakpad16ExceptionHandler12GenerateDumpEPNS0_12CrashContextE+0x3ce) [0x400000+0x14fc5e]
2023-01-11T04:44:44.736000+00:00 CRITICAL     /opt/couchbase/bin/memcached(_ZN15google_breakpad16ExceptionHandler13SignalHandlerEiP9siginfo_tPv+0x94) [0x400000+0x14ff74]
2023-01-11T04:44:44.736009+00:00 CRITICAL     /lib64/libpthread.so.0() [0x7f67cce7e000+0x12b20]
2023-01-11T04:44:44.736015+00:00 CRITICAL     /opt/couchbase/bin/memcached() [0x400000+0xd3e93]
2023-01-11T04:44:44.736019+00:00 CRITICAL     /opt/couchbase/bin/memcached() [0x400000+0xa3e8c]
2023-01-11T04:44:44.736024+00:00 CRITICAL     /opt/couchbase/bin/../lib/libplatform_so.so.0.1.0(_ZN9Couchbase6Thread12thread_entryEv+0xf) [0x7f67cf6f2000+0x14e7f]
2023-01-11T04:44:44.736027+00:00 CRITICAL     /opt/couchbase/bin/../lib/libplatform_so.so.0.1.0() [0x7f67cf6f2000+0x95d7]
2023-01-11T04:44:44.736031+00:00 CRITICAL     /lib64/libpthread.so.0() [0x7f67cce7e000+0x814a]
2023-01-11T04:44:44.736061+00:00 CRITICAL     /lib64/libc.so.6(clone+0x43) [0x7f67ccabb000+0xfcf23] hide
</code>```

coubchbase bucket snapshot

couchbase server details:

Couchbase-server-community-6.6.0-7909

Single Couchbase instance(no other cluster node)

Installed on Operating System: CentOS Linux 8 (Core) ( Kernel: Linux 4.18.0-348.7.1.el8_5.x86_64)

Provided 10GB memory while setup the cluster (assigned 100MB to created bucket of type ephemeral)

Tried restart but not working and no such specific cause found in logs

Body:
I am facing below error most of time and at same time bucket appear down(1 node pending). This error facing just after setting up and Couchbase server even not accessed yet.

Service 'memcached' exited with status 139. Restarting. Messages:
2023-01-11T04:44:44.735996+00:00 CRITICAL     /opt/couchbase/bin/memcached(_ZN15google_breakpad16ExceptionHandler12GenerateDumpEPNS0_12CrashContextE+0x3ce) [0x400000+0x14fc5e]
2023-01-11T04:44:44.736000+00:00 CRITICAL     /opt/couchbase/bin/memcached(_ZN15google_breakpad16ExceptionHandler13SignalHandlerEiP9siginfo_tPv+0x94) [0x400000+0x14ff74]
2023-01-11T04:44:44.736009+00:00 CRITICAL     /lib64/libpthread.so.0() [0x7f67cce7e000+0x12b20]
2023-01-11T04:44:44.736015+00:00 CRITICAL     /opt/couchbase/bin/memcached() [0x400000+0xd3e93]
2023-01-11T04:44:44.736019+00:00 CRITICAL     /opt/couchbase/bin/memcached() [0x400000+0xa3e8c]
2023-01-11T04:44:44.736024+00:00 CRITICAL     /opt/couchbase/bin/../lib/libplatform_so.so.0.1.0(_ZN9Couchbase6Thread12thread_entryEv+0xf) [0x7f67cf6f2000+0x14e7f]
2023-01-11T04:44:44.736027+00:00 CRITICAL     /opt/couchbase/bin/../lib/libplatform_so.so.0.1.0() [0x7f67cf6f2000+0x95d7]
2023-01-11T04:44:44.736031+00:00 CRITICAL     /lib64/libpthread.so.0() [0x7f67cce7e000+0x814a]
2023-01-11T04:44:44.736061+00:00 CRITICAL     /lib64/libc.so.6(clone+0x43) [0x7f67ccabb000+0xfcf23] hide

coubchbase bucket snapshot

couchbase server details:

Couchbase-server-community-6.6.0-7909

Single Couchbase instance(no other cluster node)

Installed on Operating System: CentOS Linux 8 (Core) ( Kernel: Linux 4.18.0-348.7.1.el8_5.x86_64)

Provided 10GB memory while setup the cluster (assigned 100MB to created bucket of type ephemeral)

Tried restart but not working and no such specific cause found in logs


问:
How Can I hide Menu option with calling view.officeapps.live.com from an iframe?
I want to preview pptx,docs,pdf by calling view.officeapps.live.com from an iframe. Now I want to modify it. I don't need menu option in iframe or if I can hide some option from menu than its better.

How Can I remove menu option where my code is like below.

```<code><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

  </head>
  <body>
    <iframe
      src="https://view.officeapps.live.com/op/embed.aspx?src=https://teachers.gov.bd/contents/2022/August/2/presentation/file_3391_1659433179.pptx&embedded=true&toolbar=0&navpanes=0"
      style="height:500px; margin:auto; display:block; width:100%;"></iframe>
  </body>
</html>
</code>```

Expected Result: hide menu option or hide submenu from menu option.

Body:
I want to preview pptx,docs,pdf by calling view.officeapps.live.com from an iframe. Now I want to modify it. I don't need menu option in iframe or if I can hide some option from menu than its better.

How Can I remove menu option where my code is like below.

<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

Expected Result: hide menu option or hide submenu from menu option.


问:
mapbox addSource data type
While using mapbox.I tried to load layer from variable geojson . but they occurred 404 error.
addSource data always regards data as url.
Is there any way regard data as variables?</p>
```<code>this.map.on('load', () => {
  const layers = this.map!.getStyle().layers;
  const labelLayerId = layers.find(
    (layer) => layer.type === 'symbol' && layer.layout!['text-field']
  )!.id;
  const geojson = '{"type": "FeatureCollection","features": [...some data]}';
  this.map!.addSource('chungbuk-data-source', {
    type: 'geojson',
    data: geojson
  });
</code>```

Title: mapbox addSource data type

Body:
While using mapbox.I tried to load layer from variable geojson . but they occurred 404 error.
addSource data always regards data as url.
Is there any way regard data as variables?

this.map.on('load', () => {
  const layers = this.map!.getStyle().layers;
  const labelLayerId = layers.find(
    (layer) => layer.type === 'symbol' && layer.layout!['text-field']
  )!.id;
  const geojson = '{"type": "FeatureCollection","features": [...some data]}';
  this.map!.addSource('chungbuk-data-source', {
    type: 'geojson',
    data: geojson
  });


问:
react-big-scheduler spacing issue between summary text and event Item
here we create bookings(Project 2, Project 7, Project 6..) as events and show holiday name (New Year's..) as summary text.
enter image description here

I'm trying to remove the space between summary text and bookings by using eventItemLineHeight that removes the space but overlap the other bookings.

enter image description here

Showing holiday name using getSummaryFunc.

Also if there is no holiday eg, Tue 1/3, how to remove the above booking space.

```<code>Here's the code that shows users, bookings and holiday text on calendar.

  /* shows users list in calendar */
  useEffect(() => {
    requestAllUsers("get", `plan/users/all?userId=${userId}&today=${today}`);
    getAll();
  }, []);

  useEffect(() => {
    if (responseAllUsers && responseAllUsers.status && responseAllUsers.data) {
      let sd = new SchedulerData(
        new Date(),
        ViewTypes.Custom1,
        false,
        false,
        {
          schedulerWidth: "100%",
          besidesWidth: 20,
          schedulerMaxHeight: height - 270,
          agendaResourceTableWidth: 160,
          agendaMaxEventWidth: 100,
          eventItemHeight: 5,
          eventItemLineHeight: 75,
          nonWorkingTimeHeadBgColor: "#f7f7f7",
          nonWorkingTimeBodyBgColor: "#f7f7f7",
          resourceName: "People",
          weekCellWidth: 180,
          monthCellWidth: 180,
          yearCellWidth: 180,
          quarterCellWidth: 180,
          nonAgendaSlotMinHeight: 90,
          dayResourceTableWidth: 200,
          weekResourceTableWidth: 200,
          monthResourceTableWidth: 200,
          quarterResourceTableWidth: 200,
          yearResourceTableWidth: 240,
          customResourceTableWidth: 200,
          views: [],
        },

        {
          isNonWorkingTimeFunc: isNonWorkingTime,
          getCustomDateFunc: getCustomDate,
          getSummaryFunc: getSummary,
          getScrollSpecialMomentFunc: getScrollSpecialMoment,
        }
      );

      let resources = [];

      if (responseAllUsers.data && responseAllUsers.data.length > 0) {
        let allUser = [];
        for (var k = 0; k < responseAllUsers.data.length; k++) {
          const option = {
            value: responseAllUsers.data[k].id,
            label: responseAllUsers.data[k].name,
          };

          const resource = {
            id: "r" + k,
            userId: responseAllUsers.data[k].id? responseAllUsers.data[k].id: "",
            name: "Resource" + k,
            username: responseAllUsers.data[k].name? responseAllUsers.data[k].name: "",
            access_role: responseAllUsers.data[k].access_role? responseAllUsers.data[k].access_role: "",
            department: responseAllUsers.data[k].department? responseAllUsers.data[k].department: "",
            job_role: responseAllUsers.data[k].job_role? responseAllUsers.data[k].job_role: "",
            avatar: responseAllUsers.data[k].avatar? responseAllUsers.data[k].avatar: "",
            email: responseAllUsers.data[k].email? responseAllUsers.data[k].email: "",
            holidays: responseAllUsers.data[k].holidays? responseAllUsers.data[k].holidays : [],
            daysOff: responseAllUsers.data[k].workDays,
            can_edit_all_bookings: responseAllUsers.data[k].can_edit_all_bookings? responseAllUsers.data[k].can_edit_all_bookings: 0,
            can_edit_project_bookings: responseAllUsers.data[k].can_edit_project_bookings? responseAllUsers.data[k].can_edit_project_bookings: 0,
            can_edit_department_bookings: responseAllUsers.data[k].can_edit_department_bookings? responseAllUsers.data[k].can_edit_department_bookings: 0,
            can_edit_own_bookings: responseAllUsers.data[k].can_edit_own_bookings? responseAllUsers.data[k].can_edit_own_bookings: 0,
            holidayLanguage: responseAllUsers.data[k].holidayLanguage? responseAllUsers.data[k].holidayLanguage: "",
          };

          allUser.push(option);
          resources.push(resource);
        }
        setBySearchPerson(allUser);
        let filteredData = [];
        if (searchBy == "People" && searchValue != "" && searchValue != null) {
          if (allUser && allUser.length > 0) {
            filteredData = allUser.filter(
              (person) =>
                person.label.toLowerCase() == searchValue.toLowerCase()
            );
            let pSearch = [];
            if (filteredData && filteredData.length > 0) {
              for (var i = 0; i < filteredData.length; i++) {
                pSearch.push(filteredData[i].value);
              }
            }
            setPersonSearch(pSearch);
            setSelectedSearchPersonOption(filteredData);
            getFilteredData("","","","","","","",pSearch,"","","","","","");
          }
        } else {
          setPersonSearch();
          setSelectedSearchPersonOption([]);
        }
      }

      sd.setResources(resources);
      setSchedulerData(sd);
      setViewModel(sd);
    }
  }, [responseAllUsers, searchBy, searchValue]);

  /* holiday text in calendar */

  const getSummary = (
    schedulerData,
    headerEvents,
    slotId,
    slotName,
    headerStart,
    headerEnd
  ) => {
    const date = moment(headerStart).format("YYYY-MM-DD");
    const data = schedulerData.getSlotById(slotId);

    schedulerData.config.summaryPos = 2;

    if (eventHolidayContentRef && eventHolidayContentRef.current && eventHolidayContentRef.current[date]) {
      const isHoliday = eventHolidayContentRef.current[date].find((i) => i.id == data.id);

      if (isHoliday && isHoliday.name) {
        return {
          text: (
            <>
              <div
                title={
                  data.holidayLanguage == "english"
                    ? isHoliday.name + " (" + isHoliday.types + " holiday)"
                    : isHoliday.localName + " (" + isHoliday.types + " holiday)"
                }
                className="planHolidayName"
              >
                {data.holidayLanguage == "english"
                  ? stringLimit2(isHoliday.name)
                  : stringLimit2(isHoliday.localName)}
              </div>
            </>
          ),
          fontSize: "10px",
          marginRight: "200px",
        };
      } else {
        return {};
      }
    } else {
      return {};
    }
};

/* Bookings on calendar */

const eventItemTemplateResolver = (
    schedulerData,
    event,
    bgColor,
    isStart,
    isEnd,
    mustAddCssClass,
    mustBeHeight,
    agendaMaxEventWidth
  ) => {

    let divStyle = {
      backgroundColor: bgColor,
      height: 70,
    };

    if (
      ["Tentative", "Needs Approval"].includes(event.bookingStatus) ||
      event.leaveType
    ) {

      divStyle.background = `repeating-linear-gradient(135deg,
        ${bgColor},
        white 1px)`;
    }

    if (!!agendaMaxEventWidth)
      divStyle = {
        ...divStyle,
        maxWidth: agendaMaxEventWidth,
      };

    return (
      <div
        key={event.id}
        id={event.id}
        className={mustAddCssClass}
        style={divStyle}
      >
        {event.type == "booking" ? (
          <div className="cellbox">
            <div className="cellbox-header">
              <span className="cellbox-proname">{event.project}</span>
              <span className="cellbox-cusname">{event.customer}</span>
            </div>
            <div className="cellbox-footer">
              <div className="row g-1 align-items-center">
                <div className="col-auto">
                  <span className="cellbox-hour">
                    {convertHoursToComma(event.bookingHours) + "h"}
                  </span>
                </div>
                {event.bookingType == "Billable" ? (
                  <div className="col-auto">
                    <i
                      className="bi bi-currency-dollar text-black fs-6"
                      data-bs-custom-class="tooltip-dark"
                      data-bs-toggle="tooltip"
                      data-bs-placement="top"
                      title="Billable"
                    ></i>
                  </div>
                ) : event.bookingType == "Non-billable" ? (
                  <div className="col-auto">
                    <i
                      className="bi bi-currency-dollar fs-6 text-danger"
                      data-bs-custom-class="tooltip-dark"
                      data-bs-toggle="tooltip"
                      data-bs-placement="top"
                      title="Non-billable"
                    ></i>
                  </div>
                ) : event.bookingType == "Internal" ? (
                  <div className="col-auto">
                    <i
                      className="bi bi-info fs-7 fs-6 text-white"
                      data-bs-custom-class="tooltip-dark"
                      data-bs-toggle="tooltip"
                      data-bs-placement="top"
                      title="Internal"
                    ></i>
                  </div>
                ) : (
                  ""
                )}
                {event.bookingStatus == "Confirmed" ? (
                  <div className="col-auto">
                    <i
                      className="bi bi-check-circle fs-7 text-white"
                      data-bs-custom-class="tooltip-dark"
                      data-bs-toggle="tooltip"
                      data-bs-placement="top"
                      title="Confirmed"
                    ></i>
                  </div>
                ) : event.bookingStatus == "Needs Approval" ? (
                  <div className="col-auto">
                    <i class="bi_icons" title="Needs Approval">
                      <svg
                        width="18"
                        height="18"
                        viewBox="0 0 18 18"
                        fill="none"
                        xmlns="http://www.w3.org/2000/svg"
                      >
                        <path
                          d="M5.26303 7.05528L7.19613 8.98838L10.418 5.12218"
                          stroke="#ffffff"
                          stroke-width="2"
                          stroke-linecap="round"
                          stroke-linejoin="round"
                        />
                        <path
                          d="M9.375 17C13.5862 17 17 13.5862 17 9.375C17 5.16383 13.5862 1.75 9.375 1.75C5.16383 1.75 1.75 5.16383 1.75 9.375C1.75 13.5862 5.16383 17 9.375 17Z"
                          stroke="#ffffff"
                          stroke-width="2"
                        />
                        <path
                          d="M13 13L10 10M13 10L10 13"
                          stroke="#ffffff"
                          stroke-width="2"
                          stroke-linecap="round"
                        />
                      </svg>
                    </i>
                  </div>
                ) : event.bookingStatus == "Tentative" ? (
                  <div className="col-auto">
                    <i
                      className="bi bi-question-circle fs-7 text-white"
                      data-bs-custom-class="tooltip-dark"
                      data-bs-toggle="tooltip"
                      data-bs-placement="top"
                      title="Tentative"
                    ></i>
                  </div>
                ) : (
                  ""
                )}

                {event.isRepeatable == 1 && (
                  <div className="col-auto">
                    <i
                      className="bi bi-arrow-repeat fs-4 text-white"
                      data-bs-custom-class="tooltip-dark"
                      data-bs-toggle="tooltip"
                      data-bs-placement="top"
                      title="Repeated Booking"
                    ></i>
                  </div>
                )}
              </div>
            </div>
          </div>
        ) : event.type == "timeOff" ? (
          <div className="cellbox">
            <div className="cellbox-header">
              <span className="cellbox-proname">{event.leaveType}</span>
            </div>
            <div className="cellbox-footer">
              <div className="row g-1 align-items-center">
                <div className="col-auto">
                  <span className="cellbox-hour">
                    {convertHoursToComma(event.timeOffHour) + "h"}
                  </span>
                </div>
              </div>
            </div>
          </div>
        ) : (
          ""
        )}
      </div>
    );
  };

</code>```

If anyone has any input it would be helpful.

Trying to remove space between summary text and event item in react-big-scheduler

Body:
here we create bookings(Project 2, Project 7, Project 6..) as events and show holiday name (New Year's..) as summary text.
enter image description here

I'm trying to remove the space between summary text and bookings by using eventItemLineHeight that removes the space but overlap the other bookings.

enter image description here

Showing holiday name using getSummaryFunc.

Also if there is no holiday eg, Tue 1/3, how to remove the above booking space.

Here's the code that shows users, bookings and holiday text on calendar.

  /* shows users list in calendar */
  useEffect(() => {
    requestAllUsers("get", `plan/users/all?userId=${userId}&today=${today}`);
    getAll();
  }, []);

  useEffect(() => {
    if (responseAllUsers && responseAllUsers.status && responseAllUsers.data) {
      let sd = new SchedulerData(
        new Date(),
        ViewTypes.Custom1,
        false,
        false,
        {
          schedulerWidth: "100%",
          besidesWidth: 20,
          schedulerMaxHeight: height - 270,
          agendaResourceTableWidth: 160,
          agendaMaxEventWidth: 100,
          eventItemHeight: 5,
          eventItemLineHeight: 75,
          nonWorkingTimeHeadBgColor: "#f7f7f7",
          nonWorkingTimeBodyBgColor: "#f7f7f7",
          resourceName: "People",
          weekCellWidth: 180,
          monthCellWidth: 180,
          yearCellWidth: 180,
          quarterCellWidth: 180,
          nonAgendaSlotMinHeight: 90,
          dayResourceTableWidth: 200,
          weekResourceTableWidth: 200,
          monthResourceTableWidth: 200,
          quarterResourceTableWidth: 200,
          yearResourceTableWidth: 240,
          customResourceTableWidth: 200,
          views: [],
        },

        {
          isNonWorkingTimeFunc: isNonWorkingTime,
          getCustomDateFunc: getCustomDate,
          getSummaryFunc: getSummary,
          getScrollSpecialMomentFunc: getScrollSpecialMoment,
        }
      );

      let resources = [];

      if (responseAllUsers.data && responseAllUsers.data.length > 0) {
        let allUser = [];
        for (var k = 0; k < responseAllUsers.data.length; k++) {
          const option = {
            value: responseAllUsers.data[k].id,
            label: responseAllUsers.data[k].name,
          };

          const resource = {
            id: "r" + k,
            userId: responseAllUsers.data[k].id? responseAllUsers.data[k].id: "",
            name: "Resource" + k,
            username: responseAllUsers.data[k].name? responseAllUsers.data[k].name: "",
            access_role: responseAllUsers.data[k].access_role? responseAllUsers.data[k].access_role: "",
            department: responseAllUsers.data[k].department? responseAllUsers.data[k].department: "",
            job_role: responseAllUsers.data[k].job_role? responseAllUsers.data[k].job_role: "",
            avatar: responseAllUsers.data[k].avatar? responseAllUsers.data[k].avatar: "",
            email: responseAllUsers.data[k].email? responseAllUsers.data[k].email: "",
            holidays: responseAllUsers.data[k].holidays? responseAllUsers.data[k].holidays : [],
            daysOff: responseAllUsers.data[k].workDays,
            can_edit_all_bookings: responseAllUsers.data[k].can_edit_all_bookings? responseAllUsers.data[k].can_edit_all_bookings: 0,
            can_edit_project_bookings: responseAllUsers.data[k].can_edit_project_bookings? responseAllUsers.data[k].can_edit_project_bookings: 0,
            can_edit_department_bookings: responseAllUsers.data[k].can_edit_department_bookings? responseAllUsers.data[k].can_edit_department_bookings: 0,
            can_edit_own_bookings: responseAllUsers.data[k].can_edit_own_bookings? responseAllUsers.data[k].can_edit_own_bookings: 0,
            holidayLanguage: responseAllUsers.data[k].holidayLanguage? responseAllUsers.data[k].holidayLanguage: "",
          };

          allUser.push(option);
          resources.push(resource);
        }
        setBySearchPerson(allUser);
        let filteredData = [];
        if (searchBy == "People" && searchValue != "" && searchValue != null) {
          if (allUser && allUser.length > 0) {
            filteredData = allUser.filter(
              (person) =>
                person.label.toLowerCase() == searchValue.toLowerCase()
            );
            let pSearch = [];
            if (filteredData && filteredData.length > 0) {
              for (var i = 0; i < filteredData.length; i++) {
                pSearch.push(filteredData[i].value);
              }
            }
            setPersonSearch(pSearch);
            setSelectedSearchPersonOption(filteredData);
            getFilteredData("","","","","","","",pSearch,"","","","","","");
          }
        } else {
          setPersonSearch();
          setSelectedSearchPersonOption([]);
        }
      }

      sd.setResources(resources);
      setSchedulerData(sd);
      setViewModel(sd);
    }
  }, [responseAllUsers, searchBy, searchValue]);

  /* holiday text in calendar */

  const getSummary = (
    schedulerData,
    headerEvents,
    slotId,
    slotName,
    headerStart,
    headerEnd
  ) => {
    const date = moment(headerStart).format("YYYY-MM-DD");
    const data = schedulerData.getSlotById(slotId);

    schedulerData.config.summaryPos = 2;

    if (eventHolidayContentRef && eventHolidayContentRef.current && eventHolidayContentRef.current[date]) {
      const isHoliday = eventHolidayContentRef.current[date].find((i) => i.id == data.id);

      if (isHoliday && isHoliday.name) {
        return {
          text: (
            <>

                {data.holidayLanguage == "english"
                  ? stringLimit2(isHoliday.name)
                  : stringLimit2(isHoliday.localName)}

            </>
          ),
          fontSize: "10px",
          marginRight: "200px",
        };
      } else {
        return {};
      }
    } else {
      return {};
    }
};

/* Bookings on calendar */

const eventItemTemplateResolver = (
    schedulerData,
    event,
    bgColor,
    isStart,
    isEnd,
    mustAddCssClass,
    mustBeHeight,
    agendaMaxEventWidth
  ) => {

    let divStyle = {
      backgroundColor: bgColor,
      height: 70,
    };

    if (
      ["Tentative", "Needs Approval"].includes(event.bookingStatus) ||
      event.leaveType
    ) {

      divStyle.background = `repeating-linear-gradient(135deg,
        ${bgColor},
        white 1px)`;
    }

    if (!!agendaMaxEventWidth)
      divStyle = {
        ...divStyle,
        maxWidth: agendaMaxEventWidth,
      };

    return (

        {event.type == "booking" ? (

              {event.project}
              {event.customer}

                    {convertHoursToComma(event.bookingHours) + "h"}

                {event.bookingType == "Billable" ? (

                ) : event.bookingType == "Non-billable" ? (

                ) : event.bookingType == "Internal" ? (

                ) : (
                  ""
                )}
                {event.bookingStatus == "Confirmed" ? (

                ) : event.bookingStatus == "Needs Approval" ? (

                      <svg
                        width="18"
                        height="18"
                        viewBox="0 0 18 18"
                        fill="none"
                        xmlns="http://www.w3.org/2000/svg"
                      >
                        <path
                          d="M5.26303 7.05528L7.19613 8.98838L10.418 5.12218"
                          stroke="#ffffff"
                          stroke-width="2"
                          stroke-linecap="round"
                          stroke-linejoin="round"
                        />
                        <path
                          d="M9.375 17C13.5862 17 17 13.5862 17 9.375C17 5.16383 13.5862 1.75 9.375 1.75C5.16383 1.75 1.75 5.16383 1.75 9.375C1.75 13.5862 5.16383 17 9.375 17Z"
                          stroke="#ffffff"
                          stroke-width="2"
                        />
                        <path
                          d="M13 13L10 10M13 10L10 13"
                          stroke="#ffffff"
                          stroke-width="2"
                          stroke-linecap="round"
                        />
                      </svg>

                ) : event.bookingStatus == "Tentative" ? (

                ) : (
                  ""
                )}

                {event.isRepeatable == 1 && (

                )}

        ) : event.type == "timeOff" ? (

              {event.leaveType}

                    {convertHoursToComma(event.timeOffHour) + "h"}

        ) : (
          ""
        )}

    );
  };

If anyone has any input it would be helpful.

Trying to remove space between summary text and event item in react-big-scheduler


问:
Click action not working and resulting in error saying could not find active page when trying to locate elements in Robot Framework
I'm trying to automate a webpage which has various fields.

Some of the fields among them are Check-in and Check-out dates

Though they have the Html locator of id
//input[@id='checkInDate'] and //input[@id='checkOutDate'], im not able to locate them and the click operation fails with the error saying "No active page"

And these fields are not inside any Frames

I have tried using Waits also checking if its visible and enabled
Wait until keyword succeeds  20x  strict: 2s  Check for the presence of elements on the page
Element state should be  [Locator]  contains  visible  enabled

But none of them are working.

Has anyone come across this issue?


问:
pulling session attribute from url into webpage
From the URL of a page I want the "name" attribute to be displayed on the HTML page like let's say, Welcome ${name}

For example, localhost:8080/index?name=dave, then in the HTML page it should display as mentioned above.

Main question is what is the syntax to pull it onto an HTML page? As in JSP, it is ${name} but I don't know for HTML.

package com.example.demo;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;

@Controller
public class IndexController {

    @RequestMapping("index")
    public String index(HttpServletRequest req) {

        HttpSession session = req.getSession();
        String name = req.getParameter("name");
        if (name != null) {
            System.out.println("Hi! " + name);
        } else {
            System.out.println("Hi");
        }
        session.setAttribute("name", name);
        return "index";
    }

}
```

The console displays the text name="Dave", but in the page with URL localhost:8080/index?name=Dave, I have typed Welcome ${name}, but the name doesn't show up.

Body:
From the URL of a page I want the "name" attribute to be displayed on the HTML page like let's say, Welcome ${name}

For example, localhost:8080/index?name=dave, then in the HTML page it should display as mentioned above.

Main question is what is the syntax to pull it onto an HTML page? As in JSP, it is ${name} but I don't know for HTML.

package com.example.demo;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;

@Controller
public class IndexController {

    @RequestMapping("index")
    public String index(HttpServletRequest req) {

        HttpSession session = req.getSession();
        String name = req.getParameter("name");
        if (name != null) {
            System.out.println("Hi! " + name);
        } else {
            System.out.println("Hi");
        }
        session.setAttribute("name", name);
        return "index";
    }

}

The console displays the text name="Dave", but in the page with URL localhost:8080/index?name=Dave, I have typed Welcome ${name}, but the name doesn't show up.


问:
IDEA plugin development:how to execute some custom actions while editing live templates?
I am developing a plugin to enhance the live template function of IDEA.

Consider the editing box when refactoring the name of a variable:

While typing code in such a replacement box, I want to get the text after finising inputting and do something, or get the variable name (like $value$ in the template text) of this replacement box.
Does anyone know how to do it?


问:
How to build Thunderbird from the archive?
I need to build Thunderbird from this archive: archive.mozilla.org/pub/thunderbird/releases/102.5.1 (I don't need the latest version!).

I put the code from the archive in my own git repository.

It was possible to build for Linux.
But I can't build for Windows, it crashes with this error (mach bootstrap):

```<code>checking for a shell... C:/mozilla-build/msys2/usr/bin/sh.exe
checking for host system type... x86_64-pc-mingw32
Installing bootstrapped toolchain in C:/Users/r/.mozbuild/node
ERROR!!!!!! Could not find artifacts for a toolchain build named `toolchain-win64-node`. Local commits, dirty/stale files, and other changes in your checkout may cause this error. Make sure you are on a fresh, current checkout of mozilla-central. Beware that commands like `mach bootstrap` and `mach artifact` are unlikely to work on any versions of the code besides recent revisions of mozilla-central.
Hint: consider reverting your local changes to the following files: ['python/mach/mach/site.py', 'python/mozboot/mozboot/bootstrap.py', 'python/mozversioncontrol/mozversioncontrol/__init__.py']
ERROR: Command '['C:\\Users\\r\\.mozbuild\\srcdirs\\desktopmail-f3ac63904a51\\_virtualenvs\\mach\\Scripts\\python.exe', 'C:/Users//Desktop/DesktopMail/mach', '--log-no-times', 'artifact', 'toolchain', '--from-build', 'toolchain-win64-node']' returned non-zero exit status 1.
ERROR: If you can't fix the above, retry with --disable-bootstrap.
</code>```

Full log output (pastebin)

Is it possible to disable checking for the latest changes in the repository?

To check the functionality of the assembly, I downloaded the original repository hg.mozilla.org/mozilla-central. It was successfully built on Windows. But why can't the version from the archive be assembled?

I tried to fix the python assembly script to remove the check for recent changes. But this mechanism is strongly integrated into the entire assembly, cutting it out is very long and meaningless.

Body:
I need to build Thunderbird from this archive: archive.mozilla.org/pub/thunderbird/releases/102.5.1 (I don't need the latest version!).

I put the code from the archive in my own git repository.

It was possible to build for Linux.
But I can't build for Windows, it crashes with this error (mach bootstrap):

checking for a shell... C:/mozilla-build/msys2/usr/bin/sh.exe
checking for host system type... x86_64-pc-mingw32
Installing bootstrapped toolchain in C:/Users/r/.mozbuild/node
ERROR!!!!!! Could not find artifacts for a toolchain build named `toolchain-win64-node`. Local commits, dirty/stale files, and other changes in your checkout may cause this error. Make sure you are on a fresh, current checkout of mozilla-central. Beware that commands like `mach bootstrap` and `mach artifact` are unlikely to work on any versions of the code besides recent revisions of mozilla-central.
Hint: consider reverting your local changes to the following files: ['python/mach/mach/site.py', 'python/mozboot/mozboot/bootstrap.py', 'python/mozversioncontrol/mozversioncontrol/__init__.py']
ERROR: Command '['C:\\Users\\r\\.mozbuild\\srcdirs\\desktopmail-f3ac63904a51\\_virtualenvs\\mach\\Scripts\\python.exe', 'C:/Users//Desktop/DesktopMail/mach', '--log-no-times', 'artifact', 'toolchain', '--from-build', 'toolchain-win64-node']' returned non-zero exit status 1.
ERROR: If you can't fix the above, retry with --disable-bootstrap.

Full log output (pastebin)

Is it possible to disable checking for the latest changes in the repository?

To check the functionality of the assembly, I downloaded the original repository hg.mozilla.org/mozilla-central. It was successfully built on Windows. But why can't the version from the archive be assembled?

I tried to fix the python assembly script to remove the check for recent changes. But this mechanism is strongly integrated into the entire assembly, cutting it out is very long and meaningless.


问:
Flip clock not working after deploying on netlify
I am facing some issue with a jQuery plugin which I have used in my project to show countdown. Locally it is working fine but when I deploy it on Netlify others things works except the countdown. I am giving the code for your better understanding.
(Note: It is a basic index file & I have used the plugin by downloading.)

Index.html

```<code><!-- Countdown attachments-->
    <link rel="stylesheet" href="Assets/flipclock.css" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script src="Assets/flipclock.min.js"></script>
    <!-- ------ -->

<div class="clock"></div>

<script>
        var clock;

        $(document).ready(function () {

            // Grab the current date
            var currentDate = new Date();

            // Set some date in the future. In this case, it's always Jan 1
            var futureDate = new Date(currentDate.getFullYear() + 1, 0); /* yyyy,mm,dd formate*/

            // Calculate the difference in seconds between the future and current date
            var diff = futureDate.getTime() / 1000 - currentDate.getTime() / 1000;

            // Instantiate a coutdown FlipClock
            clock = $('.clock').FlipClock(diff, {
                clockFace: 'DailyCounter',
                countdown: true
            });
        });
    </script>
</code>```

It looks like this:
click here

But it should look like this:
click here

Body:
I am facing some issue with a jQuery plugin which I have used in my project to show countdown. Locally it is working fine but when I deploy it on Netlify others things works except the countdown. I am giving the code for your better understanding.
(Note: It is a basic index file & I have used the plugin by downloading.)

Index.html

    <link rel="stylesheet" href="Assets/flipclock.css" />

It looks like this:
click here

But it should look like this:
click here


问:
Website Login Not Accepting POST Method Python Script Login
I am trying to login to a site with POST method, then navigate to another page and scrape the HTML data from that second page.

However, the website is not accepting the package I am pushing to it, and the script is returning the data for a non-member landing page instead of the member page I want.

Below is the current code that does not run.

```<code>#Import Packages

import requests
from bs4 import BeautifulSoup

# Login Data

url = "https://WEBSITE.com/ajax/ajax.login.php"

data ={'username':'NAME%40MAIL.com','password':'PASSWORD%23','token':'ea83a09716ffea1a3a34a1a2195af96d2e91f4a32e4b00544db3962c33d82c40'}

# note that in HTML have encoded '@' like NAME%40MAIL.com
# note that in HTML have encoded '#' like %23

headers = {'user-agent': "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36"}

# Post data package and log in

session = requests.Session()
r = session.post(url, headers=headers, data=data)

# Navigate to the next page and scrape the data

s = session.get('https://WEBSITE.com/page/93/EXAMPLE-PAGE')

soup = BeautifulSoup(s.text, 'html.parser')

print(soup)
</code>```

I have inspected the Elements on the login page and the AJAX URL for the login action is correct and there are 3 forms that need to be filled as seen in the image below. I pulled the hidden token value from the inspect element panel and passed it along with the username/e-mail and password:

Inspect Element Panel

I really have no clue what the issue might be, but there is a BOOLEAN variable for IS_GUEST returning TRUE in the HTML return that tells me I have done something wrong and the script has not been granted access.

This is also puzzling to troubleshoot since there is a redirect landing page and no server error codes to analyze or give me a hint.

I am using a different header than my actual machine, but that has never stopped me before from more simple logins.

I have encoded the string passed in the login data email with '%40' instead of '@' and the special character required in the password was encoded as '%23' for '#' (i.e. NAME@MAIL.COM = 'NAME%40MAIL.COM' and PASSWORD# = 'PASSWORD%23') Whenever I change the e-mail to use the '@' I get a garbage response, and I tried putting the '#' back in the password, but that changed nothing either.

Body:
I am trying to login to a site with POST method, then navigate to another page and scrape the HTML data from that second page.

However, the website is not accepting the package I am pushing to it, and the script is returning the data for a non-member landing page instead of the member page I want.

Below is the current code that does not run.

#Import Packages

import requests
from bs4 import BeautifulSoup

# Login Data

url = "https://WEBSITE.com/ajax/ajax.login.php"

data ={'username':'NAME%40MAIL.com','password':'PASSWORD%23','token':'ea83a09716ffea1a3a34a1a2195af96d2e91f4a32e4b00544db3962c33d82c40'}

# note that in HTML have encoded '@' like NAME%40MAIL.com
# note that in HTML have encoded '#' like %23

headers = {'user-agent': "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36"}

# Post data package and log in

session = requests.Session()
r = session.post(url, headers=headers, data=data)

# Navigate to the next page and scrape the data

s = session.get('https://WEBSITE.com/page/93/EXAMPLE-PAGE')

soup = BeautifulSoup(s.text, 'html.parser')

print(soup)

I have inspected the Elements on the login page and the AJAX URL for the login action is correct and there are 3 forms that need to be filled as seen in the image below. I pulled the hidden token value from the inspect element panel and passed it along with the username/e-mail and password:

Inspect Element Panel

I really have no clue what the issue might be, but there is a BOOLEAN variable for IS_GUEST returning TRUE in the HTML return that tells me I have done something wrong and the script has not been granted access.

This is also puzzling to troubleshoot since there is a redirect landing page and no server error codes to analyze or give me a hint.

I am using a different header than my actual machine, but that has never stopped me before from more simple logins.

I have encoded the string passed in the login data email with '%40' instead of '@' and the special character required in the password was encoded as '%23' for '#' (i.e. NAME@MAIL.COM = 'NAME%40MAIL.COM' and PASSWORD# = 'PASSWORD%23') Whenever I change the e-mail to use the '@' I get a garbage response, and I tried putting the '#' back in the password, but that changed nothing either.


问:
How to get all pages and fans count from user facebook account throght facebook graph api?
I want to get all the Facebook pages and their fan count of user accounts using Facebook graph API, I also create one app in Facebook developer account, but then after don't know what to do to get page list?

So, can someone help me to write the correct PHP code to retrieve the page list?

I had some code as below :

```<code>     $json_url ='https://graph.facebook.com/'.$page_id.'?access_token='.$fb_api_key.'|'.$fb_api_secret.'&fields=fan_count';
$json = @file_get_contents($json_url);

    $json_output = json_decode($json);

    //Extract the likes count from the JSON object
    if($json_output->fan_count){
      echo $fan_count = $json_output->fan_count;
    }else{
      echo 0;
    }`
</code>```

Body:
I want to get all the Facebook pages and their fan count of user accounts using Facebook graph API, I also create one app in Facebook developer account, but then after don't know what to do to get page list?

So, can someone help me to write the correct PHP code to retrieve the page list?

I had some code as below :

     $json_url ='https://graph.facebook.com/'.$page_id.'?access_token='.$fb_api_key.'|'.$fb_api_secret.'&fields=fan_count';
$json = @file_get_contents($json_url);

    $json_output = json_decode($json);

    //Extract the likes count from the JSON object
    if($json_output->fan_count){
      echo $fan_count = $json_output->fan_count;
    }else{
      echo 0;
    }`


问:
How to remove moment-locale from main bundle
I am using webpack-analyzer to check the main bundle size and what are in that. As I can see there is moment which is included in main bundle, and there is locale also included in the bundle unnecessarily. I am using moment/locale/fr , but all the other locale is also part of it. How can I remove all the non-required packages from moment.js

I tried this tsconfig.json

```<code>"compilerOptions": {
   "paths": {
      "moment": [
        "./node_modules/moment/min/moment.min.js",
        "./node_modules/moment/locale/fr.js",
      ]
    }
}
</code>```

I am also using moment-timezone.

But when I am doing ng build --prod I am getting an error:

```<code>This module can only be referenced with ECMAScript imports/exports by turning on the 'allowSyntheticDefaultImports' flag and referencing its default export.

5 import * as moment from 'moment-timezone';
</code>```

Body:
I am using webpack-analyzer to check the main bundle size and what are in that. As I can see there is moment which is included in main bundle, and there is locale also included in the bundle unnecessarily. I am using moment/locale/fr , but all the other locale is also part of it. How can I remove all the non-required packages from moment.js

I tried this tsconfig.json

"compilerOptions": {
   "paths": {
      "moment": [
        "./node_modules/moment/min/moment.min.js",
        "./node_modules/moment/locale/fr.js",
      ]
    }
}

I am also using moment-timezone.

But when I am doing ng build --prod I am getting an error:

This module can only be referenced with ECMAScript imports/exports by turning on the 'allowSyntheticDefaultImports' flag and referencing its default export.

5 import * as moment from 'moment-timezone';


问:
VS Code git samba, file outside repository
Im facing a strange issue with VS Code and a got repository on a samba share.

Im working on windows and shared a raspberry pies folder (docker compose samba).

When I try to stage a file by pressing + inside the git addon I get following error:

Git: fatal: X:/.gitignore: 'X:/.gitignore' is outside repository at
'//IP/openhab_docker'

The repository is within the root folder of the share (X drive).

Strange thing is that when I use git add in the terminal it's working without any issues.

Any ideas? It's my first git setup

Update:
looks like when i add the git repository into a subfolder its all working fine, except git push. But moving the whole system to another subfolder is a lot of work.


问:
How to relate INSERTED and DELETED columns in INSTEAD OF INSERT, UPDATE trigger?
We have an INSTEAD OF INSERT, UPDATE trigger on a view migrating it from Oracle. It inserts or updates data in underlying table of the view instead of the view. Furthermore, for any insert on the view it updates rather than insert if an id in the table matches with the insert id. So, if multiple entries are thrown at table some will have new entries while matching ids will have an update. The trigger also uses an cursor on an inserted tables to mimic Oracle's FOR EACH ROW.

Now the problem, we want to update some values in the inserting/updating rows based on new values (inserting/updating), old values (deleting) or assign a value if both of these values do not satisfy. Underlying table does not have any PK. How can we join INSERTED and DELETED tables so that we can refer NEW and OLD values for each column in each updating row ?

```<code>CREATE TRIGGER INSTEAD_OF_TRG ON VIEW V
INSTEAD OF INSERT, UPDATE AS
BEGIN

DECLARE INSERTED_CUR CURSOR LOCAL FOR SELECT ID, NAME, VALUE, MODIFIEDDATE

DECLARE @ID VARCHAR(6), NAME VARCHAR(50), VALUE VARCHAR(10), MODIFIEDDATE DATETIME2

FETCH NEXT FROM INSERTED_CUR INTO @ID, @NAME, @VALUE, @MODIFIEDDATE

WHILE @@FETCH_STATUS = 0

BEGIN

DECLARE @LVALUE VARCHAR(10)

-- HERE WE WANT TO CHECK FOR NEW AND UPDATED VALUES OF COLUMN VALUE

IF @VALUE IS NOT NULL --- VALUE FROM INSERTED IS NOT NULL
SET @LVALUE = @VALUE
ELSE
**IF @OLDVALUE IS NOT NULL
SET @LVALUE = @OLDVALUE**
-- HOW CAN WE REFER OLD VALUE HERE IN CASE OF UPDATES. IN ORACLE THEY ARE DOING IT LIKE :NEW.VALUE IN FIRST IF AND :OLD.VALUE IN ELSE IF FOR EACH ROW.

SET @LVALUE = @OLDVALUE
ELSE
SET @LVALUE = 'DEFAULT'

-- UPDATE AND INSERT CODE CONTINUES WHERE WE USE @LVALUE--

</code>```

Body:
We have an INSTEAD OF INSERT, UPDATE trigger on a view migrating it from Oracle. It inserts or updates data in underlying table of the view instead of the view. Furthermore, for any insert on the view it updates rather than insert if an id in the table matches with the insert id. So, if multiple entries are thrown at table some will have new entries while matching ids will have an update. The trigger also uses an cursor on an inserted tables to mimic Oracle's FOR EACH ROW.

Now the problem, we want to update some values in the inserting/updating rows based on new values (inserting/updating), old values (deleting) or assign a value if both of these values do not satisfy. Underlying table does not have any PK. How can we join INSERTED and DELETED tables so that we can refer NEW and OLD values for each column in each updating row ?

CREATE TRIGGER INSTEAD_OF_TRG ON VIEW V
INSTEAD OF INSERT, UPDATE AS
BEGIN

DECLARE INSERTED_CUR CURSOR LOCAL FOR SELECT ID, NAME, VALUE, MODIFIEDDATE

DECLARE @ID VARCHAR(6), NAME VARCHAR(50), VALUE VARCHAR(10), MODIFIEDDATE DATETIME2

FETCH NEXT FROM INSERTED_CUR INTO @ID, @NAME, @VALUE, @MODIFIEDDATE

WHILE @@FETCH_STATUS = 0

BEGIN

DECLARE @LVALUE VARCHAR(10)

-- HERE WE WANT TO CHECK FOR NEW AND UPDATED VALUES OF COLUMN VALUE

IF @VALUE IS NOT NULL --- VALUE FROM INSERTED IS NOT NULL
SET @LVALUE = @VALUE
ELSE
**IF @OLDVALUE IS NOT NULL
SET @LVALUE = @OLDVALUE**
-- HOW CAN WE REFER OLD VALUE HERE IN CASE OF UPDATES. IN ORACLE THEY ARE DOING IT LIKE :NEW.VALUE IN FIRST IF AND :OLD.VALUE IN ELSE IF FOR EACH ROW.

SET @LVALUE = @OLDVALUE
ELSE
SET @LVALUE = 'DEFAULT'

-- UPDATE AND INSERT CODE CONTINUES WHERE WE USE @LVALUE--