Incremental variable in ansible azure

Any ideas on how to make the variable increment every time I play my playbook so I can reuse my playbook for multiple projects? For example, I want my resource group name to be called “rg1”. The next time I play my playbook after the existence of “rg1”, I want the newly created resource group to be called “rg2”.

e.g.

first play:

rg=rg1

second play:

rg= rg2

Thank you!

Nginx proxy header variable not working

I’m trying to setup a load balancer with nginx.

The problem i’m having for some reason the variable $ host not working for me when i try to use proxy_set_header

When i tried to go to http://proxy.domain.com give me an 404 error, when i check logs give me this.

server: proxy.domain.com, request: "GET / HTTP/1.0", upstream: "http://1.2.3.4:80/", host: "proxy.domain.com" 

The IP 1.2.3.4 is the real IP of ss.domain.com if fine here but why give me this http://1.2.3.4:80/ instead of my domain name, because of that give me error 404 and not looking right vhost.

I configured my proxy settings like this:

upstream s3 {     server ss.domain.com weight=2;     server vv.domain.com; } 
server {     listen 80;     listen [::]:80;     server_name proxy.domain.com;     root /var/www/proxy.domain.com/html;      location / {         proxy_pass http://s3;         proxy_set_header    Host               $  host;         proxy_set_header    X-Real-IP          $  remote_addr;         proxy_set_header    X-Forwarded-For    $  proxy_add_x_forwarded_for;         proxy_set_header    X-Forwarded-Host   $  host;         proxy_set_header    X-Forwarded-Server $  host;         proxy_set_header    X-Forwarded-Port   $  server_port;         proxy_set_header    X-Forwarded-Proto  $  scheme;     } }    

Windows batch for loop refer to array with global variable as counter

I have problem with this for loop:

@echo off setlocal enableDelayedExpansion  set /a ID=1  for /f "delims=" %%G in ('dir *.jpg /b') do (     set filename[!ID!]=%%~G     set /a ID+=1 )  set /a ID-=1  set /a NEXT=2  FOR /L %%G IN (1,1,%ID%) DO (      echo "convert !filename[%%G]! !filename[!NEXT!]! -delay 20 -morph 10 %%G_morph.jpg"     set /a NEXT+=1  )   endlocal 

Question is how may I get array with global variable ( which is increasing ) working?

I tried lots of configurations like %%filename[%%NEXT%%]%% etc…

First one !filename[%%G]! works great but how may I get next array value?

Notice: Undefined variable: from_time1 in C:\xampp\htdocs\cronometro02\response.php on line 6 00:00:00 Aviso: Variável indefinida: from_time1

<?php     session_start();     $  host = "localhost";     $  usuario = "root";     $  senha = "";     $  banco = "tempo";     $  dbcon = new MySQLi("$  host","$  usuario","$  senha","$  banco");     $  duration = "";     $  res = $  dbcon->query("SELECT * FROM timer");     while ($  row = mysqli_fetch_array($  res)){         $  duration = $  row["duration"];     }     $  _SESSION["duration"] = $  duration;     $  _SESSION["start_time"] = date("Y-m-d H:i:s");      $  end_time = $  end_time = date('Y-m-d', strtotime('+'.$  _SESSION["duration"].'minutes', strtotime($  _SESSION["start_time"])));     $  _SESSION["end_time"] = $  end_time;       $  from_time1 = date('Y-m-d H:i:s');     $  to_time1 = $  _SESSION["end_time"];      $  timefirst = strtotime($  from_time1);     $  timesecond = strtotime($  to_time1);      $  differenceinseconds = $  timesecond = $  timefirst;      echo gmdate("H:i:s", $  differenceinseconds); ?>  <div id="response"></div>  <script type="text/javascript">     setInterval(function(){         var xmlhttp = new XMLHttpRequest();         xmlhttp.open("GET","response.php", false);         xmlhttp.send(null);         document.getElementById("response").innerHTML = xmlhttp.responseText;     }, 1000); </script> 

obg: a conexão com banco de dados está funcionando!!

A Versatile Algebraic Variable Class Template with full operator support

I’ve been working on this concept for the past few days where a variable_t is of any type T; assuming that it is at least arithmetic, and that all of the available C++ language operators that perform arithmetic, comparison, pre&postincrement&decrement, and bitwise operations makes sense.

I have expressed my intentions within the source code throughout the comments, please refer to them to have an understanding of why I chose to do things a certain way. My class is currently header only to keep things as simple as possible. Due to having all of the operators supported, there are two flavors of most operators one that will take a variable_t<T> as a rhs value that may or may not be the same type as the lhs type, and the other version will accept a plain value of any T type for its rhsand again it may or may not be the same type as the lhs type.

This does create a lot of boilerplate code. So forgive me if this class appears to be long to analyze, but I believe that it is performing the calculations and conversions in the way that I have intended them to. Again you can refer to the comment sections for my intentions of how this class template is supposed to behave.

I also have support for std::ostream and std::istream to insert and extract it’s member data to and from stream objects. There are also two versions of function templates that will generate a variable_t<T> based on the parameter value or type that is passed into the function to construct that type, this comes in handy with the use of auto when declaring a type variable_t<T> to create its instantiation.

#pragma once  #include <iostream>  namespace math {      /**************************************************************************       * NOTES:       *      * The design of variable_t<T> has the following properties:      * the LHS always has precedence over RHS and this is intentional.      *      * Type conversion will always be based on the type of the left hand side.      * Memory width(size) and precision will not always be preserved as truncation       * and or narrowing is to be expected.       *      * If widening or higher precission needs to be preserved, this will automatically      * be done with the use of the key word auto and the variable_t<Ty> creation functions.      *      * ----------------------------------------//      * Example: - Truncation expected          //      * ----------------------------------------//      *      *    // This will result in f1 as still being a float type.      *    variable_t<float> f1(5.2f);      *    variable_t<double> d1(7.9)      *    variable_t<std::uint64_t> ui64(100);      *    f1 += d1 / ui64;      *       *    f1 == 5.279      * ----------------------------------------//      *          * If the keyword auto is used as such:      * auto x = d1 + f1;       * then in this case x should end up being a variable_t<double>      * and widening and precision will be reserved      *      * This type of design is intentional as I believe that it gives      * the user more flexibility to have the choice to either truncate      * data when the extra bits are not needed or to preserve data when      * it is necessary.      *      * This allows the library to be versatile and prevents any user      * from having to be forced to some specific conformance or policy      * giving them the flexibility they need.      *      * -------------------------------------------------------------------      *      * Any division by 0 will result in the LHS being 0.      * no excpetions are thrown. This is something the user      * must be aware of, and this is intentional!      *      * Example:      *                             // Generates      * auto t1 = variable( 3.5 );  variable_t<double> t1( 3.5 );      * auto t2 = variable( 4 );    variable_t<int>    t2( 4 );      *       *      * auto t3 /= (t1 + 0.5 - t2);      *      *  t3 /= (3.5 + 0.5 - 4)         *  t3 /= (0)               variable_t<double> t3(0.0);      *      * -------------------------------------------------------------------      *      * For all of the Bitwise operators, typically doing bitwise calculations      * requires that both arguments are of an integral type. In order for this      * class to support all of the bitwise operators it is legal to do bitwise      * operations on floating point types, however the user must be aware of the      * fact that both the LHS and RHS are implicilty converted or casted to int type      * then the bitwise calculation is performed and then the resulting value is      * used to assign the lhs's value being casted back to lhs's type.      *      * Example:      *      * ----------------------------------------//      *      *     variable_t<float> f1{ 5.2 };      *     variable_t<double> d1{ 7.9 };      *     variable_t<std::uint64_t> ui64{ 0 };      *      *     ui64 = f1 & d1;      *      *     // ui64 will have a value of 5.      *      *     // Let's check to see the conversions      *     // f1 converted to int = 5;      *     // d1 converted to int = 7;      *     // 5 & 7 = 5;      *     // then 5 is casted back to uint64_t and is assigned      *     // to ui64      */      template<typename Ty>     class variable_t {         Ty t;     public:         // -----------------------------------------------         // Constructors & Access Operators          // Default Constructor         inline variable_t() : t{ 0 } {}         // Explicit Constructor         explicit inline variable_t(Ty val) : t{ val } {}          // Copy Constructor with both types being the same         inline variable_t(const variable_t<Ty>& rhs) { this->t = rhs(); }          // Copy Constructor with both types being different          template<typename T>         inline variable_t(const variable_t<T>& rhs) { this->t = static_cast<Ty>(rhs()); }          // Basic operator() returns internal private member          // instead of having or using an accessor function         Ty operator()() const { return t; }         // Same as above: any value passed has no effect as it just returns member         // this isn't necessary but just another way to access the internal member         Ty operator[](unsigned n) const { return t; }          // Overloaded operator() that takes a value of type Ty and will changes it's state or value         variable_t<Ty>& operator()(const Ty t) {             variable_t<Ty> v{ t };             *this = v;             return *this;         }          // ---------------------         // Assignment Operators            // Assignment: both types are the same: variable_t<Ty> = variable_t<Ty>         inline variable_t<Ty>& operator=(const variable_t<Ty>& rhs) {             this->t = rhs();             return *this;         }          // Assignment: both types are different: variable_t<Ty> = variable_t<T> - rhs is casted to lhs         template<typename T>         inline variable_t<Ty>& operator=(const variable_t<T>& rhs) {             this->t = static_cast<Ty>(rhs());             return *this;         }          // Assignment: both types are the same: variable_t<Ty> = Ty         inline variable_t<Ty>& operator=(const Ty& rhs) {             this->t = rhs;             return *this;         }          // Assignment: both types are different: variable_t<Ty> = T - rhs is casted to lhs         template<typename T>         inline variable_t<Ty>& operator=(const T& rhs) {             this->t = static_cast<Ty>(rhs);             return *this;         }          // Compound Assignment          // Addition         template<typename T>         inline variable_t<Ty>& operator+=(const variable_t<T>& rhs) {             this->t += static_cast<Ty>(rhs());             return *this;         }         template<typename T>         inline variable_t<Ty>& operator+=(const T& rhs) {             this->t += static_cast<Ty>(rhs);             return *this;         }          // Subtraction         template<typename T>         inline variable_t<Ty>& operator-=(const variable_t<T>& rhs) {             this->t -= static_cast<Ty>(rhs());             return *this;         }         template<typename T>         inline variable_t<Ty>& operator-=(const T& rhs) {             this->t -= static_cast<Ty>(rhs);             return *this;         }          // Multiplication         template<typename T>         inline variable_t<Ty>& operator*=(const variable_t<T>& rhs) {             this->t *= static_cast<Ty>(rhs());             return *this;         }         template<typename T>         inline variable_t<Ty>& operator*=(const T& rhs) {             this->t *= static_cast<Ty>(rhs);             return *this;         }          // Division         template<typename T>         inline variable_t<Ty>& operator/=(const variable_t<T>& rhs) {             if (rhs() == 0) {                 this->t = 0;             }             else {                 Ty inv = 1 / static_cast<Ty>(rhs());                 this->t *= inv;             }             return *this;         }         template<typename T>         inline variable_t<Ty>& operator/=(const T& rhs) {             if (rhs == 0) {                 this->t = 0;             }             else {                 Ty inv = 1 / static_cast<Ty>(rhs);                 this->t *= inv;             }             return *this;         }          // Modulus         template<typename T>         inline variable_t<Ty>& operator%=(const variable_t<T>& rhs) {             this->t %= static_cast<Ty>(rhs());             return *this;         }         template<typename T>         inline variable_t<Ty>& operator%=(const T& rhs) {             this->t %= static_cast<Ty>(rhs);             return *this;         }          // Bitwise &         template<typename T>         inline variable_t<Ty>& operator&=(const variable_t<T>& rhs) {                        int val = static_cast<int>( this->t );             val &= static_cast<int>(rhs());             variable_t<Ty> v{ static_cast<Ty>( val ) };             *this = v;             return *this;         }         template<typename T>         inline variable_t<Ty>& operator&=(const T& rhs) {             int val = static_cast<int>(this->t);             val &= static_cast<int>(rhs);             variable_t<Ty> v{ static_cast<Ty>(val) };             *this = v;             return *this;         }          // Bitwise |         template<typename T>         inline variable_t<Ty>& operator|=(const variable_t<T>& rhs) {             int val = static_cast<int>(this->t);             val |= static_cast<int>(rhs());             variable_t<Ty> v{ static_cast<Ty>(val) };             *this = v;             return *this;         }         template<typename T>         inline variable_t<Ty>& operator|=(const T& rhs) {             int val = static_cast<int>(this->t);             val |= static_cast<int>(rhs);             variable_t<Ty> v{ static_cast<Ty>(val) };             *this = v;             return *this;         }          // Bitwise ^         template<typename T>         inline variable_t<Ty>& operator^=(const variable_t<T>& rhs) {             int val = static_cast<int>(this->t);             val ^= static_cast<int>(rhs());             variable_t<Ty> v{ static_cast<Ty>(val) };             *this = v;             return *this;         }         template<typename T>         inline variable_t<Ty>& operator^=(const T& rhs) {             int val = static_cast<int>(this->t);             val ^= static_cast<int>(rhs);             variable_t<Ty> v{ static_cast<Ty>(val) };             *this = v;             return *this;         }          // Bitwise <<         template<typename T>         inline variable_t<Ty>& operator<<=(const variable_t<T>& rhs) {             int val = static_cast<int>(this->t);             val <<= static_cast<int>(rhs());             variable_t<Ty> v{ static_cast<Ty>(val) };             *this = v;             return *this;         }         template<typename T>         inline variable_t<Ty>& operator<<=(const T& rhs) {             int val = static_cast<int>(this->t);             val <<= static_cast<int>(rhs);             variable_t<Ty> v{ static_cast<Ty>(val) };             *this = v;             return *this;         }          // Bitwise >>         template<typename T>         inline variable_t<Ty>& operator>>=(const variable_t<T>& rhs) {             int val = static_cast<int>(this->t);             val >>= static_cast<int>(rhs());             variable_t<Ty> v{ static_cast<Ty>(val) };             *this = v;             return *this;         }         template<typename T>         inline variable_t<Ty>& operator>>=(const T& rhs) {             int val = static_cast<int>(this->t);             val >>= static_cast<int>(rhs);             variable_t<Ty> v{ static_cast<Ty>(val) };             *this = v;             return *this;         }          // ------------------------------------         // Arithmetic Operators          // Unary - Addition         inline variable_t<Ty> operator+() const {             return variable_t<Ty>(+this->t);         }          // Unary - Negation         inline variable_t<Ty> operator-() const {             return variable_t<Ty>(-this->t);         }          // Compliment         inline variable_t<Ty>& operator~() {             this->t = ~this->t;                      return *this;         }          // Binary           // Addition         template<typename T>         inline variable_t<Ty> operator+(const variable_t<T>& rhs) const {             return variable_t<Ty>(this->t + static_cast<Ty>(rhs()));         }         template<typename T>         inline variable_t<Ty> operator+(const T& rhs) const {             return variable_t<Ty>(this->t + static_cast<Ty>(rhs));         }          // Subtraction         template<typename T>         inline variable_t<Ty> operator-(const variable_t<T>& rhs) const {             return variable_t<Ty>(this->t - static_cast<Ty>(rhs()));         }         template<typename T>         inline variable_t<Ty> operator-(const T& rhs) const {             return variable_t<Ty>(this->t + static_cast<Ty>(rhs));         }          // Multiplication         template<typename T>         inline variable_t<Ty> operator*(const variable_t<T>& rhs) const {             return variable_t<Ty>(this->t * static_cast<Ty>(rhs()));         }         template<typename T>         inline variable_t<Ty> operator*(const T& rhs) const {             return variable_t<Ty>(this->t * static_cast<Ty>(rhs));         }          // Division         template<typename T>         inline variable_t<Ty> operator/(const variable_t<T>& rhs) const {             variable_t<Ty> var(*this);             if (rhs() != 0) {                  Ty inv = 1 / static_cast<Ty>(rhs());                 var.t = var.t * inv;             }             else {                 var = variable_t<Ty>(0);             }              return var;         }         template<typename T>         inline variable_t<Ty> operator/(const T& rhs) const {             variable_t<Ty> var( *this );             if (rhs != 0) {                 Ty inv = 1 / static_cast<Ty>(rhs);                 var.t = var.t * inv;             }             else {                 var = variable_t<Ty>(0);             }             return var;         }          // Modulus         template<typename T>         inline variable_t<Ty> operator%(const variable_t<T>& rhs) const {             return variable_t<Ty>(this->t % static_cast<Ty>(rhs()));         }         template<typename T>         inline variable_t<Ty> operator%(const T& rhs) const {             return variable_t<Ty>(this->t % static_cast<Ty>(rhs));         }           // Bitwise &         template<typename T>         inline variable_t<Ty> operator&(const variable_t<T>& rhs) const {             int lhs = static_cast<int>(this->t);             int val = lhs & static_cast<int>( rhs() );             return variable_t<Ty>(static_cast<Ty>(val));         }         template<typename T>          inline variable_t<Ty> operator&(const T& rhs) const {             int lhs = static_cast<int>(this->t);             int val = lhs & static_cast<int>(rhs);             return variable_t<Ty>(static_cast<Ty>(val));         }          // Bitwise |         template<typename T>         inline variable_t<Ty> operator|(const variable_t<T>& rhs) const {             int lhs = static_cast<int>(this->t);             int val = lhs | static_cast<int>(rhs());             return variable_t<Ty>(static_cast<Ty>(val));         }         template<typename T>         inline variable_t<Ty> operator|(const T& rhs) const {             int lhs = static_cast<int>(this->t);             int val = lhs | static_cast<int>(rhs);             return variable_t<Ty>(static_cast<Ty>(val));         }          // Bitwise ^         template<typename T>         inline variable_t<Ty> operator^(const variable_t<T>& rhs) const {             int lhs = static_cast<int>(this->t);             int val = lhs ^ static_cast<int>(rhs());             return variable_t<Ty>(static_cast<Ty>(val));         }         template<typename T>         inline variable_t<Ty> operator^(const T& rhs) const {             int lhs = static_cast<int>(this->t);             int val = lhs ^ static_cast<int>(rhs);             return variable_t<Ty>(static_cast<Ty>(val));         }          // Bitwise <<         template<typename T>         inline variable_t<Ty> operator<<(const variable_t<T>& rhs) const {             int lhs = static_cast<int>(this->t);             int val = lhs << static_cast<int>(rhs());             return variable_t<Ty>(static_cast<Ty>(val));         }         template<typename T>         inline variable_t<Ty> operator<<(const T& rhs) const {             int lhs = static_cast<int>(this->t);             int val = lhs << static_cast<int>(rhs);             return variable_t<Ty>(static_cast<Ty>(val));         }          // Bitwise >>         template<typename T>         inline variable_t<Ty> operator>>(const variable_t<T>& rhs) const {             int lhs = static_cast<int>(this->t);             int val = lhs >> static_cast<int>(rhs());             return variable_t<Ty>(static_cast<Ty>(val));         }         template<typename T>         inline variable_t<Ty> operator>>(const T& rhs) const {             int lhs = static_cast<int>(this->t);             int val = lhs >> static_cast<int>(rhs);             return variable_t<Ty>(static_cast<Ty>(val));         }          // -------------------------------------------------         // Increment - Decrement Operators         variable_t<Ty>& operator++() {             this->t++;             return *this;         }          variable_t<Ty> operator++(int) {             auto v(*this); // copy             operator++(); // pre-increment             return v; // return old value         }          variable_t<Ty>& operator--() {             this->t--;             return *this;         }          variable_t<Ty>& operator--(int) {             auto v(*this); // copy             operator--(); // pre-decrement             return v; // return old value         }           // ------------------------------------------------         // Comparison operators         template<typename T>         inline bool operator==(const variable_t<T>& rhs) const{             return (this->t == static_cast<Ty>(rhs()));         }          template<typename T>         inline bool operator==(const T& rhs) const {             return (this->t == static_cast<Ty>(rhs));         }          template<typename T>         inline bool operator!=(const variable_t<T>& rhs) const {             return !(*this == rhs);         }          template<typename T>         inline bool operator!=(const T& rhs) const {             return !(this == rhs);         }          template<typename T>         inline bool operator<(const variable_t<T>& rhs) const {             return (this->t < static_cast<Ty>(rhs()));         }          template<typename T>         inline bool operator<(const T& rhs) const {             return (this->t < static_cast<Ty>(rhs));         }          template<typename T>         inline bool operator<=(const variable_t<T>& rhs) const {             return (this->t <= static_cast<Ty>(rhs()));         }          template<typename T>         inline bool operator<=(const T& rhs) const {             return (this->t <= static_cast<Ty>(rhs));         }          template<typename T>         inline bool operator>(const variable_t<T>& rhs) const {             return (this->t > static_cast<Ty>(rhs()));         }          template<typename T>         inline bool operator>(const T& rhs) const {             return (this->t > static_cast<Ty>(rhs));         }          template<typename T>         inline bool operator>=(const variable_t<T>& rhs) const {             return (this->t >= static_cast<Ty>(rhs()));         }          template<typename T>         inline bool operator>=(const T& rhs) const {             return (this->t >= static_cast<Ty>(rhs));         }      };      template<typename T>     auto variable(const T& t) {         return variable_t<T>(t);     }      template<typename T>     auto variable(T& t) {         return variable_t<T>(t);     }      template<typename T>     inline std::ostream& operator<<(std::ostream& os, const variable_t<T>& v) {         return os << v();     }      template<typename T>     inline std::istream& operator>>(std::istream& is, variable_t<T>& v) {         T val;         is >> val;         v = variable_t<T>(val);         return is;     }     } 

In order to keep this short I did not include any use case application code; only the header file itself. I have tested most of the operators and so far they appear to be behaving as expected. Feel free to experiment with this class.

The idea here is that you can easily mix different types and perform any kind of calculation that you normally couldn’t easily do as this class handles all of the type conversions. However there are some underlying aspects about this class that the user has to be aware of before using it and they are described in the comment sections.


How I plan on using this class:

  • It will be used within other classes that I’m working on not shown here
    • term_t<T> – a single term of an algebraic expression such as 2x^2 + 3x where 2x^2 is a term and 3x is another term. Here the variable_t<T> class would be used in place of the x in those terms.
    • template<typename... Args> class expression_t; – The full rhs or lhs algebraic expression.

What I would like to know:

  • What are your general thoughts about this overall design?
  • Are there any possible improvements that can be made?
  • Are there any corner cases or gotcha’s that I may have missed or overlooked?
  • Would this be considered following modern c++ practices?
    • I do not have support for c++20 so the proposed <=> operator is not available to me. I am currently bound to c++17
  • Are there any other operators that should be included, or excluded?
  • What could I do to keep or make this as generic, portable, readable and reusable as possible?

Tasker, how to append a string to a variable

Tasker is making this simple task complicated.

I am doing a “Send Intent” action within a task and I need the extra 1 and extra 2 to be a string concatenated to a number variable concatenated to another string.

In most languages it’d be something like

extra1 = "str1:" + integer + "str2" 

It’d be easier if there were spaces between the strings; it’d just be str1 %integer str2, but there are no spaces to separate things out.

How do I accomplish this?

compare two variable with user input in php

I’m making a verification page that compares two variables .. the first one is a random code that have been generated previously and send to the user via email ($ code)… the second one is the user input ($ verf) … when the user clicks submit $ code and $ verf should be compared if it is true then transfer to other page if not then he should try again. I have tried a lot of ways but it always shows one input either yes for all conditions or no for all conditions below is my code

tried to make a compare function with php and bash it didn’t work

<?php session_start();  echo "E-mail has been sent to " ; echo $  _SESSION['email']; echo $  email , "   "; echo $  _SESSION['code']; $  email = escapeshellarg($  _SESSION['email']); $  code = escapeshellarg($  _SESSION['code']); $  addr = shell_exec("./test.sh $  email $  code"); $  var = print_r($  addr, true); ?> <!DOCTYPE HTML>   <html> <body>   <h2>E-mail Verfication</h2> <form method="post" action="<?php echo htmlspecialchars($  _SERVER["PHP_SELF"]);?>">     Name: <input type="text" name="name1" value="<?php echo $  name1;?>">   <br><br>   <input type="submit" name="submit2" value="Submit">   </form> <?php   session_start();  echo $  _SESSION['code']; if (isset($  _POST['submit2'])){   if ($  name1 != $  code) {     echo "No";     } else {        echo "yes";       header('Location: otherpage.php');             }   } else {  print ("please input the code that you have received ");  }  ?> </body> </html> 

obtener valor de xml a variable en oracle

trato de obtener el valor de un xml que esta almacenado en una variable tipo XMLTYPE y guardarlo en otra variable tipo varchar, pero al tratar de usar la función exctract, me genera el siguiente error, ORA-31011: Fallo en el análisis de XML, me podrían ayudar por favor. —-codigo utilizado—

P_FOLIOUNICO—variable varchar para almacenar dato a extraer

V_XMLTYPE — variable que contiene el XML

/entry/content/d:properties/d:FolioUnico — ruta de donde extraer el valor

P_FOLIOUNICO:=V_XMLTYPE.extract(‘/entry/content/d:properties/d:FolioUnico’).getStringVal();

gracias.

Choose suitable variable type at compile time

I know it’s possible to query maximum and minimum values for variable types in C++ using numeric_limits, but I want to do the opposite. I would like to have C++ choose a suitable variable type for me, given a requested maximum variable value.

For example, I would love to be able to do something like the following:

// Choose a variable type big enough to store values up to 1024 std::MAGICALLY_CHOOSE_VARIABLE_TYPE<1024>; 

It seems to me that I’ve seen something like this before, but, for the life of me, my Google-Fu has so far failed to find it. Is this possible or am I just imagining it?

Using NumberRangeFilterBuilder for a slider controlled variable input?

I’ve been looking for a slider control in sheets where I can play with a variable input by moving the slider left or right. Within the following example:

A1 = Value | B1 = VAR | C1 = A1*B1 

I want the B1 cell to be occupied by a number given by a slider that moves between 100 and 1000, with increments of 100. The slider itself preferably in another cell. I know this is possible, by documentation about NumberRangeFilterBuilder

Can you give me an example of the script and calling it with a specified range? I cannot seem to find any other documentation on the implementation nor can I make it work.