text:
Q: Solving equation in Python 3.3 So to figure out the day of the week from any date since 15 of october you can use a simple piece of arithmetic my problem is that i have read from a file the date (for e.g. 2009-06-12) and i have put the equation in:
w = (d + [2.6 * m - 0.2] + Y + [Y / 4] + 5 * C + [C / 4] ) % 7

The dates are in the format yyyy-mm-dd and my code looks like this:
count = 5
f = open('/Users/student/Desktop/Harry.txt').readlines()[count]
Y = f[2:4]
C = f[:2]
m = f[5:7]
d = f[8:10]
w = (d + [2.6 * m - 0.2] + Y + [Y / 4] + 5 * C + [C / 4] ) % 7
if w == 0:
    print (f, "is a Sunday")
elif w == 1:
    print (f, "is a Monday")
elif w == 2:
    print (f, "is a Tuesday")
elif w == 3:
    print (f, "is a Wednesday")
elif w == 4:
    print (f, "is a Thursday")
elif w == 5:
    print (f, "is a Friday")
elif w == 6:
    print (f, "is a Saturday")

to clarify:
w = day of the week counting from Sunday = 0 Monday = 1
d = the day of the month (for e.g. 28th 13th)
m = month number where March = 1 etc.
Y = last 2 digits of year
C = first 2 digits of year

Yet i get this error
Traceback (most recent call last):
  File "/Users/student/Documents/workspace/Tutorial Challenges/src/Day_Of_The_Week.py", line 7, in <module>
    w = (d + [2.6 * m - 0.2] + Y + [Y / 4] + 5 * C + [C / 4] ) % 7
TypeError: can't multiply sequence by non-int of type 'float'

Help would be greatly appreciated.

A: Y, C, m, and d are all strings. You want to convert them into ints first:
Y = int(f[2:4])
C = int(f[:2])
...

Are you sure that equation even works, though? It looks like it'd produce a lot of non-integer weekdays. You might've miscopied it. Also, brackets aren't a grouping operator in Python; they're the list construction syntax. You'll want to replace those brackets with parentheses in the expression for w. (Or were those brackets supposed to be the floor operator? If so, you'll want math.floor, from the math module, or just int if truncation is fine.)

A: As the above user has said, you want to convert from string to int. However, this is the ideal place to use the datetime module. You can use this to specify that your datetime is of the format: yyyy-mm-dd, and use the module to load up the info as datetime.
http://docs.python.org/2/library/datetime.html


text:
Q: Responsive Tetris board in pure HTML/CSS I'm trying to make a tetris board in html. I want to light the block each time you over it.
So I made two div (1 block), the first div lights the two of them but I'm not able to make the second one light the first one. How can I make it work ?
CSS :
div{
    width: 200px;
    height: 200px;
    background-color: 0000ff;
    margin: 0px;
}

#div1{
    float:left;
    height:600px;
}

#div2{
    float:left;
    width:200px;
}

#div1:hover + #div2{
    background-color: #0082ff;
}

#div1:hover{
    background-color: #0082ff;
}

#div2:hover - #div1{
    background-color: #0082ff;
}

#div2:hover{
    background-color: #0082ff;
}

HTML :

        <link href="style.css" type="text/css" rel="stylesheet">
        <title>hover test</title>

A: This is due to the nature of CSS - in that selectors can only identify either child or subsequent sibling elements. As such, you can select the second div when hovering the first because it is a (subsequent) adjacent sibling, this you have done using the + selector.
However, in CSS you are not able to 'go the other way' and select the first div when hovering the second, there is no - supported selector to identify preceding elements.
Perhaps the easiest way to look at this is that in CSS, you can only select items that appear after the start tag of the item in question in your HTML.
In order to accomplish what you need, you can either use Javascript (e.g. jQuery .prev(), .next(), sliblings() etc) or group the elements within a parent and detect the :hover state of it, the issue with this is that as the children are different sizes, the parent block will exceed their outer irregular boundaries. This will mean that you will have instances of hovering within the parent area but not on one of the child blocks triggering the hover state. As such, I would recommend a Javscript solution (below is indicative only).

$('div').on('mouseover', function() {
  $(this).addClass('hover');
  $(this).siblings('div').addClass('hover');
});
$('div').on('mouseout', function() {
  $('.hover').removeClass('hover');
});
div {
  width: 200px;
  height: 200px;
  background-color: 0000ff;
  margin: 0px;
  border: 1px solid grey;
}
#div1 {
  float: left;
  height: 600px;
}
#div2 {
  float: left;
  width: 200px;
}
.hover {
  background-color: #0082ff;
}

A: Don't know if this messes the positioning up for you, but one way of doing it is to put the two divs in a parent div. And in the css select all child elements.
html:

css:
div.filled{
    width: 200px;
    height: 200px;
    background-color: #0000ff;
    margin: 0px;
}

div#div1{
    float:left;
    height:600px;
}

div#div2{
    float:left;
    width:200px;
}

div.tile:hover > .filled{
    background-color: #0082ff;
}

redpajama_set_name: RedPajamaStackExchange


text:
Q: Match Function Without Ordered Data The syntax for the Match function in Excel is:
=MATCH(Value, Range, Match Type)

where the Match Type is 1 for values less than or equal to the specified value, 0 for an exact match, and -1 for greater than or equal to.
My problem is that for the match type to work, the data needs to be ordered in ascending or descending order (for exact matches, this is not the case). But how can I work around this for data that isn't and can't be ordered? Note that it can't be ordered by values because it's ordered by date; the whole point of me looking for the row number is quantify how long it takes something to double or recover, etc. etc.
For example, from cells A1:A5 there are the following values: c(1,3,5,2,4). I want to find the first instance of a value greater than 2. The formula I use is:=MATCH(2,A1:A5,-1).The return I get is of course #N/A since the data is not ordered by value. The return I want to get is 2, since the 2nd row (3) is greater than the value 2.

A: Give this a try:
=MATCH(TRUE,INDEX(C1:C5>2,0),)

(don't forget that final comma)
EDIT#1:
As Ron Rosenfeld points out:
=MATCH(TRUE,C1:C5>2,0)

also works


text:
Q: Clang compiler error when using boost::hana Y-combinator I have the following implementation of an AST, built using C++17's std::variant type, on which I would like to apply a visitor recursively. I have done this with the help of some utilities from Boost's Hana library.
#include <iostream>
#include <memory>
#include <variant>

#include <boost/hana.hpp>

namespace hana = boost::hana;

struct AddExpr;
struct SubExpr;
struct MulExpr;
struct DivExpr;

using Expr = std::variant<int, AddExpr, SubExpr, MulExpr, DivExpr>;

struct BinaryExpr
{
    BinaryExpr(std::unique_ptr<Expr> lhs, std::unique_ptr<Expr> rhs) noexcept
        : lhs{ std::move(lhs) }, rhs{ std::move(rhs) } { }

    std::unique_ptr<Expr> lhs;
    std::unique_ptr<Expr> rhs;
};

struct AddExpr : BinaryExpr { using BinaryExpr::BinaryExpr; };
struct SubExpr : BinaryExpr { using BinaryExpr::BinaryExpr; };
struct MulExpr : BinaryExpr { using BinaryExpr::BinaryExpr; };
struct DivExpr : BinaryExpr { using BinaryExpr::BinaryExpr; };

int main()
{
    Expr root {
        MulExpr{
            std::make_unique<Expr>(AddExpr{
                std::make_unique<Expr>(1),
                std::make_unique<Expr>(2),
            }),
            std::make_unique<Expr>(SubExpr{
                std::make_unique<Expr>(3),
                std::make_unique<Expr>(4),
            }),
        }
    };

    constexpr auto printer = hana::fix([](auto visitor, auto const& arg) -> void {
        hana::overload(
            [&](int val) {
                std::cout << val;
            },
            [&](AddExpr const& exp) {
                std::cout << "(";
                std::visit(visitor, *exp.lhs);
                std::cout << "+";
                std::visit(visitor, *exp.rhs);
                std::cout << ")";
            },
            [&](SubExpr const& exp) {
                std::cout << "(";
                std::visit(visitor, *exp.lhs);
                std::cout << "-";
                std::visit(visitor, *exp.rhs);
                std::cout << ")";
            },
            [&](MulExpr const& exp) {
                std::cout << "(";
                std::visit(visitor, *exp.lhs);
                std::cout << "*";
                std::visit(visitor, *exp.rhs);
                std::cout << ")";
            },
            [&](DivExpr const& exp) {
                std::cout << "(";
                std::visit(visitor, *exp.lhs);
                std::cout << "/";
                std::visit(visitor, *exp.rhs);
                std::cout << ")";
            }
        )(arg);
    });

    std::visit(printer, root);

    std::cout << "\n";

    return 0;
}

The code compiles without any warnings when using GCC 7.1+, but Clang does not seem to be able to compile it, issuing the following error instead.
<source>:54:22: error: function 'visit<boost::hana::fix_t<(lambda at <source>:47:40)> &, std::variant<int, AddExpr, SubExpr, MulExpr, DivExpr> &>' with deduced return type cannot be used before it is defined
                std::visit(visitor, *exp.lhs);
...

Is this a bug in Clang? Or am I doing something wrong, and, if so, why does this work for GCC?
Also, is there an elegant way to do what I want in Clang? Particularly, I would prefer to be able to create the printer visitor from some overloaded lambdas, rather than having to create a PrinterVisitor class with operator() overloaded for each type. However, if that's not possible, I am open to other suggestions.

A: Your exact code doesn't work on GCC trunk either: Compiler
Explorero, which is funny since the releases
did work: Compiler Explorer.
My local messages are very similar: GCC
/home/sehe/custom/boost_1_75_0/boost/hana/functional/fix.hpp|74 col 19| error: use of 'main()::<lambda(auto:39, const auto:40&)> [with auto:39 = boost::hana::fix_t<main()::<lambda(auto:39, const auto:40&)> >; auto:40 = int]' before deduction of 'auto'
||    74 |         { return f(fix(f), static_cast<X&&>(x)...); }

Clang:
/home/sehe/custom/boost_1_75_0/boost/hana/functional/fix.hpp|74 col 18| error: function 'operator()<boost::hana::fix_t<(lambda at /home/sehe/Projects/stackoverflow/test.cpp:44:40)>, int>' with deduced return type cannot be used before it is defined
||         { return f(fix(f), static_cast<X&&>(x)...); }

I remember when I wrote my own combinators that I couldn't get around having an implementation helper, like:
struct F {
    template <typename Self, typename T>
    void operator()(Self const& self, T const& arg) const {
        auto bin = [&](char op, BinaryExpr const& exp) {
            std::cout << "("; std::visit(self, *exp.lhs); std::cout << op; std::visit(self, *exp.rhs); std::cout << ")";
        };
        hana::overload(
            [&](int val) { std::cout << val; },
            [&](AddExpr const& exp) { bin('+', exp); },
            [&](SubExpr const& exp) { bin('-', exp); },
            [&](MulExpr const& exp) { bin('*', exp); },
            [&](DivExpr const& exp) { bin('/', exp); }
        )(arg);
    }
};

See it Live On Compiler Explorer
Explanation
I think it merely requires default constructible lambdas, which are new to C++20: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0624r2.pdf
Source: https://www.bfilipek.com/2019/03/lambdas-story-part2.html

With C++20 we'll get the following features:

*

*Allow [=, this] as a lambda capture - P0409R2 and Deprecate implicit capture of this via [=] - P0806

*Pack expansion in lambda init-capture: ...args = std::move(args)](){} - P0780

*static, thread_local, and lambda capture for structured bindings - P1091

*template lambdas (also with concepts) - P0428R2

*Simplifying implicit lambda capture - P0588R1

*Default constructible and assignable stateless lambdas - P0624R2

*Lambdas in unevaluated contexts - P0315R4

This leads me to believe that it can work in c++20.
Counter-Offer
I have some simplifications and my preferred pattern for recursive visitors. with some benefits like

*

*encapsulating the [recursive] visitation

*making it easier to bind extra arguments (std::cout in this example)

I find the maintainabiliity outweighs the convenience of declaring the visitor on the call site.

EDIT I found a more compelling solution so I'll just put a link to this in case you're interested: Live On Compiler Explorer

HAVE YOUR CAKE AND EAT IT, Without Boost
I realized you can have your cake and eat it, without requiring any Boost at all:
template <typename... F>
struct RecursiveVisitor : F... {
    template <typename... Ts>
    void operator()(std::variant<Ts...> const& v) const {
        std::visit( std::bind(*this, std::cref(*this), std::placeholders::_1), v );
    }

    using F::operator()...;
};

template <typename... F>
    RecursiveVisitor(F...) -> RecursiveVisitor<F...>;

Now you can pull off your mission with e.g.:
RecursiveVisitor const printer {
    [](auto const&, int const& v) { std::cout << v; },
    [](auto const& self, AddExpr const& exp) { self(self, '+', exp); },
    [](auto const& self, SubExpr const& exp) { self(self, '-', exp); },
    [](auto const& self, MulExpr const& exp) { self(self, '*', exp); },
    [](auto const& self, DivExpr const& exp) { self(self, '/', exp); },
    [](auto const& self, char op, BinaryExpr const& exp) {
        std::cout << "(";
        self(*exp.lhs);
        std::cout << op;
        self(*exp.rhs);
        std::cout << ")";
    }
};

Which does work across the board:
Live On Compiler Explorer
#include <iostream>
#include <memory>
#include <variant>
#include <functional>

struct AddExpr;
struct SubExpr;
struct MulExpr;
struct DivExpr;

using Expr = std::variant<int, AddExpr, SubExpr, MulExpr, DivExpr>;

struct BinaryExpr
{
    BinaryExpr(Expr l, Expr r);
    BinaryExpr(BinaryExpr const& o);
    std::unique_ptr<Expr> lhs, rhs;
};

struct AddExpr : BinaryExpr { using BinaryExpr::BinaryExpr; };
struct SubExpr : BinaryExpr { using BinaryExpr::BinaryExpr; };
struct MulExpr : BinaryExpr { using BinaryExpr::BinaryExpr; };
struct DivExpr : BinaryExpr { using BinaryExpr::BinaryExpr; };

BinaryExpr::BinaryExpr(Expr l, Expr r)
: lhs{ std::make_unique<Expr>(l) }, rhs{ std::make_unique<Expr>(r) } { }

BinaryExpr::BinaryExpr(BinaryExpr const& o)
: lhs{ std::make_unique<Expr>(*o.lhs) }, rhs{ std::make_unique<Expr>(*o.rhs) } { }

template <typename... F>
struct RecursiveVisitor : F... {
    template <typename... Ts>
    void operator()(std::variant<Ts...> const& v) const {
        std::visit( std::bind(*this, std::cref(*this), std::placeholders::_1), v );
    }

    using F::operator()...;
};

template <typename... F>
    RecursiveVisitor(F...) -> RecursiveVisitor<F...>;

int main()
{
    RecursiveVisitor const printer {
        [](auto const&, int const& v) { std::cout << v; },
        [](auto const& self, AddExpr const& exp) { self(self, '+', exp); },
        [](auto const& self, SubExpr const& exp) { self(self, '-', exp); },
        [](auto const& self, MulExpr const& exp) { self(self, '*', exp); },
        [](auto const& self, DivExpr const& exp) { self(self, '/', exp); },
        [](auto const& self, char op, BinaryExpr const& exp) {
            std::cout << "(";
            self(*exp.lhs);
            std::cout << op;
            self(*exp.rhs);
            std::cout << ")";
        }
    };

    for (Expr root : { Expr
            { MulExpr{ AddExpr{ 1, 2 }, SubExpr{ 3, 4 } } },
            { DivExpr{ 1, MulExpr{ 7, SubExpr{ 3, 4 } } } },
        })
    {
        printer(root);
        std::cout << "\n";
    }
}

Printing
((1+2)*(3-4))
(1/(7*(3-4)))

I realize this puts duplicates the Y-combinator pattern manually, but at least it removes all bottlenecks. Also, not how the shared char, BinExpr& overload is elegantly "just another overload".

A: The final example in the solution posted by @sehe is almost perfect, except that the number of memory allocations increases exponentially with the depth of the expression tree. This is because the copy constructor is called 2^l + 2^r times, where l and r are the depths of the left and right expression trees, respectively, passed to the constructor of BinaryExpr.
Thus, to construct the following expression tree, I found that it would take 68 allocations.
Expr root {
    AddExpr {
        MulExpr{ AddExpr{ 1, 2 }, SubExpr{ 3, 4 } },
        DivExpr{ SubExpr{ 5, 6 }, AddExpr{ 7, 8 } },
    }
};

However, we can easily avoid these memory allocations by moving (rather than copying) the expression trees like so.
struct AddExpr;
struct SubExpr;
struct MulExpr;
struct DivExpr;

using Expr = std::variant<int, AddExpr, SubExpr, MulExpr, DivExpr>;

struct BinaryExpr
{
    BinaryExpr(Expr lhs, Expr rhs) noexcept;
    BinaryExpr(BinaryExpr&&) = default; // Require the default move-constructor.
    BinaryExpr(BinaryExpr const&);

    std::unique_ptr<Expr> lhs;
    std::unique_ptr<Expr> rhs;
};

struct AddExpr : BinaryExpr { using BinaryExpr::BinaryExpr; };
struct SubExpr : BinaryExpr { using BinaryExpr::BinaryExpr; };
struct MulExpr : BinaryExpr { using BinaryExpr::BinaryExpr; };
struct DivExpr : BinaryExpr { using BinaryExpr::BinaryExpr; };

BinaryExpr::BinaryExpr(Expr lhs, Expr rhs) noexcept
    : lhs{ std::make_unique<Expr>(std::move(lhs)) }, // Call std::move() here.
      rhs{ std::make_unique<Expr>(std::move(rhs)) }  // Call std::move() here.
{ }

BinaryExpr::BinaryExpr(BinaryExpr const& exp)
    : lhs{ std::make_unique<Expr>(*exp.lhs) },
      rhs{ std::make_unique<Expr>(*exp.rhs) }
{ }

With this modification, constructing the example expression tree, shown above, only takes 14 allocations, instead of 68.


text:
Q: Deactivate toggle function if an  gets clicked Here is my code:

var workshops = document.querySelector('#workshops');
var cross_one = document.querySelector('#cross_one');
var workshops_navigation = document.querySelector('#workshops_navigation');
workshops.addEventListener('click', function (event) {
      if (cross_one.style.display == "") {
          cross_one.style.display = "none";
        workshops_navigation.style.display = "block";
      } else {
          cross_one.style.display = "";
          workshops_navigation.style.display = "none";
      }
    }
  );

var works = document.querySelector('#works');
var cross_two = document.querySelector('#cross_two');
var works_navigation = document.querySelector('#works_navigation');
works.addEventListener('click', function (event) {
      if (cross_two.style.display == "") {
          cross_two.style.display = "none";
        works_navigation.style.display = "block";
      } else {
          cross_two.style.display = "";
          works_navigation.style.display = "none";
      }
    }
  );

var projects = document.querySelector('#projects');
var cross_three = document.querySelector('#cross_three');
var projects_navigation = document.querySelector('#projects_navigation');
projects.addEventListener('click', function (event) {
      if (cross_three.style.display == "") {
          cross_three.style.display = "none";
        projects_navigation.style.display = "block";
      } else {
          cross_three.style.display = "";
          projects_navigation.style.display = "none";
      }
    }
  );
#workshops {
  left: 4vw;
  top: 32vh;
  position: absolute;
}

#works {
  right: 10vw;
  top: 5vh;
  position: absolute;
}

#projects {
  right: 5vw;
  top: 20vh;
  position: absolute;
}

#workshops_icon, #works_icon, #projects_icon {
  cursor: pointer;
  width: 354px;
}

#workshops_navigation, #works_navigation, #projects_navigation {
  font-size: 30px;
  top: 10px;
  margin-left: 15px;
  position: absolute;
  display: none;
  line-height: 100%
}

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  viewBox="0 0 235.1 299.4" style="enable-background:new 0 0 235.1 299.4;" xml:space="preserve">
<polygon fill="white" points="0.8,298.5 234.3,298.5 234.3,0.8 0.8,0.8 0.8,298.5 "/>
<polygon id="cross_one"  points="233.6,299.1 117.6,151 1.5,299.1 0.2,298 116.5,149.7 0.2,1.3 1.5,0.3 117.6,148.3 233.6,0.3
 234.9,1.3 118.6,149.7 234.9,298 "/>
<path d="M235.1,299.4v-1.7V1.7V0h-1.7H1.7H0v1.7v296v1.7h1.7h231.8H235.1L235.1,299.4z M233.5,297.7H1.7V1.7h231.8
 V297.7L233.5,297.7z"/>
</svg>

Workshops

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  viewBox="0 0 235.1 299.4" style="enable-background:new 0 0 235.1 299.4;" xml:space="preserve">
<polygon fill="white" points="0.8,298.5 234.3,298.5 234.3,0.8 0.8,0.8 0.8,298.5 "/>
<polygon id="cross_two"  points="233.6,299.1 117.6,151 1.5,299.1 0.2,298 116.5,149.7 0.2,1.3 1.5,0.3 117.6,148.3 233.6,0.3
 234.9,1.3 118.6,149.7 234.9,298 "/>
<path class="st1" d="M235.1,299.4v-1.7V1.7V0h-1.7H1.7H0v1.7v296v1.7h1.7h231.8H235.1L235.1,299.4z M233.5,297.7H1.7V1.7h231.8
 V297.7L233.5,297.7z"/>
</svg>

Works

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  viewBox="0 0 235.1 299.4" style="enable-background:new 0 0 235.1 299.4;" xml:space="preserve">
<polygon fill="white" points="0.8,298.5 234.3,298.5 234.3,0.8 0.8,0.8 0.8,298.5 "/>
<polygon id="cross_three"  points="233.6,299.1 117.6,151 1.5,299.1 0.2,298 116.5,149.7 0.2,1.3 1.5,0.3 117.6,148.3 233.6,0.3
 234.9,1.3 118.6,149.7 234.9,298 "/>
<path d="M235.1,299.4v-1.7V1.7V0h-1.7H1.7H0v1.7v296v1.7h1.7h231.8H235.1L235.1,299.4z M233.5,297.7H1.7V1.7h231.8
 V297.7L233.5,297.7z"/>
</svg>

Link A

Link B

Link C

Currently, there is a toggle function, if an icon gets clicked. That works fine. But: If a link gets clicked, it should not toggle for this action.
Sorry for the weird code.
It would be so great if someone could post here a solution! I would really appreciate it.
Thaaaaanks! Wish you all a very nice day!

A: Check this jsfiddle
https://jsfiddle.net/hd1c493a/1/
HTML:

    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 235.1 299.4" style="enable-background:new 0 0 235.1 299.4;" xml:space="preserve">
<polygon fill="white" points="0.8,298.5 234.3,298.5 234.3,0.8 0.8,0.8 0.8,298.5 "/>
<polygon id="cross_one"  points="233.6,299.1 117.6,151 1.5,299.1 0.2,298 116.5,149.7 0.2,1.3 1.5,0.3 117.6,148.3 233.6,0.3
    234.9,1.3 118.6,149.7 234.9,298 "/>
<path d="M235.1,299.4v-1.7V1.7V0h-1.7H1.7H0v1.7v296v1.7h1.7h231.8H235.1L235.1,299.4z M233.5,297.7H1.7V1.7h231.8
    V297.7L233.5,297.7z"/>
</svg>

       My Link 1

       My Link 2

       My Link 3

JS:
  var works = document.querySelector('#works');
var cross_one = document.querySelector('#cross_one');
var works_navigation = document.querySelector('#works_navigation');
works.addEventListener('click', function (event) {
      if (cross_one.style.display == "") {
          cross_one.style.display = "none";
        works_navigation.style.display = "block";
      } else {
          cross_one.style.display = "";
          works_navigation.style.display = "none";
      }
    }
  );
document.querySelectorAll('.link').forEach(function(link) {
  link.addEventListener('click', function (event) {
     event.stopPropagation();
})
})
;


text:
Q: How to write a Procedure with multiple operations like select and update Table
Id
Count

I want to write a procedure to find 'Count' in the table with 'Id' as key.After getting 'count' i have to increment it and update back in the table for that 'Id'.How can I write this with procedure without using cursors.
I want a simple procedure like below, BUT ITS NOT EXECUTING.IT SAYS PROCEDURE SUCCESSFUL WITH COMPILATION ERRORS.Help me out.
create or replace PROCEDURE newpro( inId IN NUMBER, outcount OUT NUMBER) is
select COUNT into outcount from Table1 WHERE ID= inId ;
BEGIN
outcount := outcount +1;
update Table1 set COUNT = outcount WHERE ID = inId ;
END;

A: UPDATE tableName
SET "Count" = "Count" + 1
WHERE ID = valueHere

*

*SEE SQLFiddle Demo

A: try this one
create or replace Procedure Newpro
(
  Inid     in number,
  Outcount out number
) is
begin
  select count + 1
    into Outcount
    from Table1
   where Id = Inid;

  update Table1
     set count = Outcount
   where Id = Inid;
end;


text:
Q: Construct AND query if parameter is empty I'm allowing my user to search by 10 different criteria. I'm picking that from url. But problem is if some of that criteria is/are empty. Then it will search record in database where is empty record.
$pretrazi_drzava=quote_smart($_GET["pretrazi_drzava"]);
$pretrazi_broj=quote_smart($_GET["pretrazi_broj"]);
$pretrazi_spol=quote_smart($_GET["pretrazi_spol"]);
$pretrazi_boja=quote_smart($_GET["pretrazi_boja"]);
$pretrazi_rasa=quote_smart($_GET["pretrazi_rasa"]);
$pretrazi_ime=quote_smart($_GET["pretrazi_ime"]);
$pretrazi_godina=quote_smart($_GET["pretrazi_godina"]);
$pretrazi_status=quote_smart($_GET["pretrazi_status"]);
$pretrazi_otac=quote_smart($_GET["pretrazi_otac"]);
$pretrazi_majka=quote_smart($_GET["pretrazi_majka"]);

It is easy to do with OR
...AND (mg_drzava.drzava='$pretrazi_drzava'
                        OR mg_golub.brojgoluba='$pretrazi_broj'
                        OR mg_golub.spol='$pretrazi_spol'
                        OR mg_golub.boja='$pretrazi_boja'
                        OR mg_golub.rasa='$pretrazi_rasa'
                        OR mg_golub.ime='$pretrazi_ime'
                        OR mg_golub.godina='$pretrazi_godina'
                        OR mg_status.status='$pretrazi_status'
                        OR O.brojgoluba='$pretrazi_otac'
                        OR M.brojgoluba='$pretrazi_majka')...

But if instead OR u put AND and if for example only mg_golub.brojgolub='' is empty, then it will search every record in database where brojgolub is empty and it won't find nothing and it won't show nothing as result.
How to solve that situation?

A: If you want to apply the several conditions simultaneously, you need the AND parameter, like the gender is "male" AND the age is "35". If the user is not passing some of the parameters, it may mean he doesn't know them, or cares about them: the gender is male and i don't care about the age. If that is the case, you need to exclude that condition from your query, instead of using extra conditions that will only slow the query down.

A: You could use a foreach and iterate the $_GET array for construct your SQL statement
$sql = "SELECT * FROM table";

if(count($_GET) > 0)
{
    // Append WHERE clause
    $sql .= " WHERE ";

    // Construct WHERE
    foreach($_GET as $key => $value)
    {
        if($value != '')
        {
            $sql .= ' '.$key.' = '.$value.' AND ';
        }
    }

    // Remove last "AND"
    $sql = trim( $sql, 'AND ');

 }

I didn't test this code, is just for reference how to ignore a emtpy value in your SQL statement. hope this help.
Updated: avoid 1=1 in query

A: if you want to skip the parameter if it's empty then
where (someparam1 is null or (someparam1 = somecolumn1))
and (someparam2 is null or (someparam2 = someColumn2)
and ...

is a way you want to go.
if quotesmart always returns a string, then
where ((someparam1 = '') or (someparam1 = somecolumn1))
and ((someparam2 = '') or (someparam2 = someColumn2)
and ...

if you don't want to put unneeded parameters in the sql, then generate a list/hash of selected parameters and build a parameterised sql statement from it, and set the parameters values.

A: Maybe you can use
AND (b.a='' OR b.a='$a')

instead.


text:
Q: Handler postdelayed is not fired after given delay interval when quitting the app in android? Code Snippet:
Handler handler= new Handler();
handler.postDelayed(networkRunnable,
                10000);

/**
 * A runnable will be called after the 10 second interval
 */
Runnable networkRunnable= new Runnable() {
    @Override
    public void run() {
        //Not fired if I quit the app before 10 seconds after 1 second.
    }
};

Setting Handler post delayed to trigger after 10 seconds. If I quit the app in between 1 to 10 seconds the run method never called.
Please help me on this.
Thanks in advance.

A: The Android runtime aggressively manages process lifetime, destroying processes as their entry points are closed (i.e. when the last activity is finished, for example).  Having said that, I don't know of any execution environment in which the code above will execute the callback reliably without additional logic.
If you want the call-out to fire for sure, you will need to register a Service with the Android core and use the service thread's Handler to schedule the call-out.  Android will (usually) keep the Service running and your call-out will be fired later.  You should then also unregister the service in the call-out to free up system resources.

A: In order to achieve this I used an AlarmManager instead of the handler at, its working now, this is an extract of the code I'm using:
@Override
protected void onHandleIntent(Intent intent) {
    Log.d(Constants.TAG, "onHandleIntent");
    ...
    restartService();
    Log.d(Constants.TAG, "finish");
}

private void restartService() {
   AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
   Intent queryIntent = new Intent(context, ServiceClass.class);
   PendingIntent pendingQueryIntent = PendingIntent.getService(context, 0, queryIntent,
    PendingIntent.FLAG_UPDATE_CURRENT);
    // schedule the intent for future delivery
    alarmManager.set(AlarmManager.RTC, System.currentTimeMillis() + Constants.RESTART_TIME, pendingQueryIntent);
}

In this way I'm able to restart the service no matter if the user closes the app using home, back or swipe from recent apps, the only way it stops working is if the uses forces the app to stop.
Hope it helps


text:
Q: Cockroachdb used all memory after start even though data size is only 2GiB
*

*1.9 GiB database size on disk.

*60 GiB memory.

After start cockroach starts to use all memory and increase goroutines count, until it eats whole memory.
gossip client (0/3 cur/max conns)
gossip server (0/3 cur/max conns, infos 0/0 sent/received, bytes 0B/0B sent/received)
W200117 11:21:26.697551 195 storage/store.go:3926  [n1,s1] handle raft ready: 0.6s [processed=1]
W200117 11:21:26.839611 177 storage/store.go:3926  [n1,s1] handle raft ready: 0.6s [processed=1]
W200117 11:21:26.839933 206 storage/store.go:3926  [n1,s1] handle raft ready: 0.7s [processed=1]
W200117 11:21:26.840083 170 storage/store.go:3926  [n1,s1] handle raft ready: 0.6s [processed=1]
W200117 11:21:27.036814 190 storage/store.go:3926  [n1,s1] handle raft ready: 0.6s [processed=1]
W200117 11:21:29.764620 198 storage/store.go:3926  [n1,s1] handle raft ready: 0.7s [processed=1]
W200117 11:21:34.446099 167 storage/store.go:3926  [n1,s1] handle raft ready: 0.7s [processed=1]
W200117 11:21:34.563275 182 storage/store.go:3926  [n1,s1] handle raft ready: 1.0s [processed=1]
I200117 11:21:35.034645 276 server/status/runtime.go:465  [n1] runtime stats: 60 GiB RSS, 9012 goroutines, 52 GiB/3.6 GiB/59 GiB GO alloc/idle/total, 761 MiB/852 MiB CGO alloc/total, 11145.7 CGO/sec, 732.2/48.3 %(u/s)time, 0.1 %gc (1x), 411 KiB/571 KiB (r/w)net
W200117 11:21:36.774832 170 storage/store.go:3926  [n1,s1] handle raft ready: 0.7s [processed=1]
I200117 11:21:45.128897 276 server/status/runtime.go:465  [n1] runtime stats: 61 GiB RSS, 9111 goroutines, 53 GiB/4.0 GiB/60 GiB GO alloc/idle/total, 445 MiB/539 MiB CGO alloc/total, 23047.0 CGO/sec, 754.2/28.9 %(u/s)time, 0.0 %gc (0x), 362 KiB/455 KiB (r/w)net
fatal error: runtime: out of memory

After that there are only errors in log:
runtime stack:
runtime.throw(0x2b00eec, 0x16)
    /usr/local/go/src/runtime/panic.go:616 +0x81
runtime.sysMap(0xd2d44b0000, 0x2db0000, 0x0, 0x4882bf8)
    /usr/local/go/src/runtime/mem_linux.go:216 +0x20a
runtime.(*mheap).sysAlloc(0x48410a0, 0x2db0000, 0x20224af01)
    /usr/local/go/src/runtime/malloc.go:470 +0xd4
runtime.(*mheap).grow(0x48410a0, 0x16d7, 0x0)
    /usr/local/go/src/runtime/mheap.go:907 +0x60
runtime.(*mheap).allocSpanLocked(0x48410a0, 0x16d7, 0x4882c08, 0x2050e5e)
    /usr/local/go/src/runtime/mheap.go:820 +0x301
runtime.(*mheap).alloc_m(0x48410a0, 0x16d7, 0x101, 0x0)
    /usr/local/go/src/runtime/mheap.go:686 +0x118
runtime.(*mheap).alloc.func1()
    /usr/local/go/src/runtime/mheap.go:753 +0x4d
runtime.(*mheap).alloc(0x48410a0, 0x16d7, 0xd00f000101, 0xc4204a4180)
    /usr/local/go/src/runtime/mheap.go:752 +0x8a
runtime.largeAlloc(0x2dae000, 0xd00f970100, 0x0)
    /usr/local/go/src/runtime/malloc.go:826 +0x94
runtime.mallocgc.func1()
    /usr/local/go/src/runtime/malloc.go:721 +0x46
runtime.systemstack(0x7f1b00000000)
    /usr/local/go/src/runtime/asm_amd64.s:409 +0x79
runtime.mstart()
    /usr/local/go/src/runtime/proc.go:1175

goroutine 16380 [running]:
runtime.systemstack_switch()
    /usr/local/go/src/runtime/asm_amd64.s:363 fp=0xc9995451b8 sp=0xc9995451b0 pc=0x70b970
runtime.mallocgc(0x2dae000, 0x0, 0x0, 0x0)
    /usr/local/go/src/runtime/malloc.go:720 +0x8a2 fp=0xc999545258 sp=0xc9995451b8 pc=0x6c46e2
runtime.growslice(0x268d940, 0xd29e7c0000, 0xd146e4, 0xd146e4, 0x2dad295, 0x0, 0x0, 0x0)
    /usr/local/go/src/runtime/slice.go:172 +0x21d fp=0xc9995452c0 sp=0xc999545258 pc=0x6f5c2d
github.com/cockroachdb/cockroach/pkg/roachpb.(*ScanResponse).combine(0xd064b26ee8, 0x302bdc0, 0xd0bc2462b0, 0x302bdc0, 0xd0bc2462b0)
    /go/src/github.com/cockroachdb/cockroach/pkg/roachpb/api.go:259 +0x3fb fp=0xc9995453e0 sp=0xc9995452c0 pc=0xda0efb
github.com/cockroachdb/cockroach/pkg/roachpb.(*BatchResponse).Combine(0xcae57fb7a0, 0xc503e11da0, 0xc7b2972a40, 0x6, 0x8, 0x0, 0x0)
    /go/src/github.com/cockroachdb/cockroach/pkg/roachpb/batch.go:360 +0x32e fp=0xc9995454c8 sp=0xc9995453e0 pc=0xe4d50e
github.com/cockroachdb/cockroach/pkg/kv.(*DistSender).divideAndSendBatchToRanges.func1(0xc999545848, 0xc999545b28, 0xc999545a70, 0xc999545b20, 0xc99954578f, 0xc999545830, 0xc999545794)
    /go/src/github.com/cockroachdb/cockroach/pkg/kv/dist_sender.go:821 +0x273 fp=0xc999545680 sp=0xc9995454c8 pc=0x1767443
github.com/cockroachdb/cockroach/pkg/kv.(*DistSender).divideAndSendBatchToRanges(0xc42077a700, 0x305a3c0, 0xcb14dc0d20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4de731900, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/kv/dist_sender.go:1000 +0x797 fp=0xc999545a58 sp=0xc999545680 pc=0x174b557
github.com/cockroachdb/cockroach/pkg/kv.(*DistSender).Send(0xc42077a700, 0x305a3c0, 0xcb14dc0d20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc67b3dbd00, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/kv/dist_sender.go:683 +0x4c7 fp=0xc999545d58 sp=0xc999545a58 pc=0x174a497
github.com/cockroachdb/cockroach/pkg/kv.(*txnLockGatekeeper).SendLocked(0xcb19e3abc8, 0x305a3c0, 0xcb14dc0d20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc67b3dbd00, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/kv/txn_coord_sender.go:234 +0xf5 fp=0xc999545e08 sp=0xc999545d58 pc=0x17588a5
github.com/cockroachdb/cockroach/pkg/kv.(*txnMetrics).SendLocked(0xcb19e3ab90, 0x305a3c0, 0xcb14dc0d20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc67b3dbd00, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/kv/txn_interceptor_metrics.go:58 +0x12d fp=0xc999545ed8 sp=0xc999545e08 pc=0x1761f7d
github.com/cockroachdb/cockroach/pkg/kv.(*txnSpanRefresher).sendLockedWithRefreshAttempts(0xcb19e3aaf8, 0x305a3c0, 0xcb14dc0d20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc67b3dbd00, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/kv/txn_interceptor_span_refresher.go:167 +0x98 fp=0xc999545fb8 sp=0xc999545ed8 pc=0x17645a8
github.com/cockroachdb/cockroach/pkg/kv.(*txnSpanRefresher).SendLocked(0xcb19e3aaf8, 0x305a3c0, 0xcb14dc0d20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc67b3dbd00, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/kv/txn_interceptor_span_refresher.go:105 +0x11e fp=0xc9995460a0 sp=0xc999545fb8 pc=0x176404e
github.com/cockroachdb/cockroach/pkg/kv.(*txnPipeliner).SendLocked(0xcb19e3aa78, 0x305a3c0, 0xcb14dc0d20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc67b3dbd00, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/kv/txn_interceptor_pipeliner.go:169 +0x165 fp=0xc9995461b8 sp=0xc9995460a0 pc=0x1762555
github.com/cockroachdb/cockroach/pkg/kv.(*txnIntentCollector).SendLocked(0xcb19e3aa38, 0x305a3c0, 0xcb14dc0d20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc67b3dbd00, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/kv/txn_interceptor_intent_collector.go:106 +0x45d fp=0xc999546338 sp=0xc9995461b8 pc=0x17605ad
github.com/cockroachdb/cockroach/pkg/kv.(*txnSeqNumAllocator).SendLocked(0xcb19e3ab78, 0x305a3c0, 0xcb14dc0d20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc67b3dbd00, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/kv/txn_interceptor_sequence_nums.go:62 +0x1f3 fp=0xc999546450 sp=0xc999546338 pc=0x1763e33
github.com/cockroachdb/cockroach/pkg/kv.(*txnHeartbeat).SendLocked(0xcb19e3a990, 0x305a3c0, 0xcb14dc0d20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc67b3dbd00, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/kv/txn_interceptor_heartbeat.go:230 +0x542 fp=0xc999546e00 sp=0xc999546450 pc=0x175df82
github.com/cockroachdb/cockroach/pkg/kv.(*TxnCoordSender).Send(0xcb19e3a800, 0x305a3c0, 0xcb14dc0d20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc67b3dbd00, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/kv/txn_coord_sender.go:648 +0x456 fp=0xc999547160 sp=0xc999546e00 pc=0x175b136
github.com/cockroachdb/cockroach/pkg/internal/client.(*DB).sendUsingSender(0xc420778280, 0x305a3c0, 0xc9d8025380, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/internal/client/db.go:623 +0x135 fp=0xc999547228 sp=0xc999547160 pc=0xfdc3f5
github.com/cockroachdb/cockroach/pkg/internal/client.(*Txn).Send(0xc909d72990, 0x305a3c0, 0xc9d8025380, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/internal/client/txn.go:805 +0x14c fp=0xc999547380 sp=0xc999547228 pc=0xfe64ac
github.com/cockroachdb/cockroach/pkg/sql/sqlbase.(*txnKVFetcher).fetch(0xc6b75efd50, 0x305a3c0, 0xc9d8025380, 0x0, 0xc9995479c0)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/sqlbase/kvfetcher.go:327 +0x597 fp=0xc9995477f8 sp=0xc999547380 pc=0x15708a7
github.com/cockroachdb/cockroach/pkg/sql/sqlbase.(*txnKVFetcher).nextBatch(0xc6b75efd50, 0x305a3c0, 0xc9d8025380, 0x10000cc88b49400, 0x0, 0x15, 0xcc88b49420, 0x0, 0xc42b83d400, 0x2, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/sqlbase/kvfetcher.go:394 +0x6d fp=0xc999547878 sp=0xc9995477f8 pc=0x157112d
github.com/cockroachdb/cockroach/pkg/sql/sqlbase.(*RowFetcher).nextKV(0xcad73e5f18, 0x305a3c0, 0xc9d8025380, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/sqlbase/rowfetcher.go:479 +0x370 fp=0xc999547a20 sp=0xc999547878 pc=0x157a730
github.com/cockroachdb/cockroach/pkg/sql/sqlbase.(*RowFetcher).NextKey(0xcad73e5f18, 0x305a3c0, 0xc9d8025380, 0x0, 0x0, 0x0)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/sqlbase/rowfetcher.go:498 +0x8a fp=0xc999547b00 sp=0xc999547a20 pc=0x157a9da
github.com/cockroachdb/cockroach/pkg/sql/sqlbase.(*RowFetcher).StartScanFrom(0xcad73e5f18, 0x305a3c0, 0xc9d8025380, 0x30387c0, 0xc6b75efd50, 0x0, 0x1)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/sqlbase/rowfetcher.go:447 +0xd9 fp=0xc999547b40 sp=0xc999547b00 pc=0x157a359
github.com/cockroachdb/cockroach/pkg/sql/sqlbase.(*RowFetcher).StartScan(0xcad73e5f18, 0x305a3c0, 0xc9d8025380, 0xc909d72990, 0xc9f8754400, 0x3f, 0x40, 0x0, 0x0, 0x0, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/sqlbase/rowfetcher.go:435 +0x208 fp=0xc999547c88 sp=0xc999547b40 pc=0x157a1c8
github.com/cockroachdb/cockroach/pkg/sql/distsqlrun.(*joinReader).readInput(0xcad73e5500, 0x0, 0x0)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/distsqlrun/joinreader.go:440 +0x92c fp=0xc999547e38 sp=0xc999547c88 pc=0x17c8b3c
github.com/cockroachdb/cockroach/pkg/sql/distsqlrun.(*joinReader).Next(0xcad73e5500, 0x0, 0x0, 0x0, 0xcb15328e10)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/distsqlrun/joinreader.go:356 +0x2df fp=0xc999547e90 sp=0xc999547e38 pc=0x17c81af
github.com/cockroachdb/cockroach/pkg/sql/distsqlrun.Run(0x305a3c0, 0xc9d8025380, 0x3063380, 0xcad73e5500, 0x3037440, 0xcb19e92e00)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/distsqlrun/base.go:172 +0x35 fp=0xc999547ed0 sp=0xc999547e90 pc=0x1789045
github.com/cockroachdb/cockroach/pkg/sql/distsqlrun.(*ProcessorBase).Run(0xcad73e5500, 0x305a3c0, 0xc9d8025380, 0x0)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/distsqlrun/processors.go:731 +0x98 fp=0xc999547f10 sp=0xc999547ed0 pc=0x17d4b58
github.com/cockroachdb/cockroach/pkg/sql/distsqlrun.(*Flow).StartSync(0xcad736dc00, 0x305a3c0, 0xc9d8025380, 0x2c375e8, 0xcad72389a0, 0x3037140)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/distsqlrun/flow.go:581 +0x191 fp=0xc999547f60 sp=0xc999547f10 pc=0x17aaa41
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).Run(0xc4208e7700, 0xc4c10cb020, 0xc909d72360, 0xc999548898, 0xcb19e8a500, 0xc8e49839b0, 0x0)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:253 +0x886 fp=0xc999548790 sp=0xc999547f60 pc=0x1b119a6
github.com/cockroachdb/cockroach/pkg/sql.(*DistSQLPlanner).PlanAndRun(0xc4208e7700, 0x305a3c0, 0xc9d8024b10, 0xc8e49839b0, 0xc4c10cb020, 0xc909d72360, 0x304d340, 0xcad73ecdc0, 0xcb19e8a500)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:756 +0x24c fp=0xc999548a38 sp=0xc999548790 pc=0x1b14fac
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithDistSQLEngine(0xc8e4983500, 0x305a3c0, 0xc9d8024b10, 0xc8e4983918, 0x3, 0x7f1b1a3c03c0, 0xc909d72480, 0xcabe553601, 0xd, 0xd)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:971 +0x2d8 fp=0xc999548c10 sp=0xc999548a38 pc=0x1ac15d8
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine(0xc8e4983500, 0x305a3c0, 0xc9d8024b10, 0x305da40, 0xcafa482f80, 0xcabe553680, 0xd, 0xd, 0xc90a26f440, 0x119, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:818 +0xa7e fp=0xc999548dd8 sp=0xc999548c10 pc=0x1ac096e
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState(0xc8e4983500, 0x305a3c0, 0xc9d8024b10, 0x305da40, 0xcafa482f80, 0xcabe553680, 0xd, 0xd, 0xc90a26f440, 0x119, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:396 +0xa8f fp=0xc9995495b0 sp=0xc999548dd8 pc=0x1abc96f
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt(0xc8e4983500, 0x305a3c0, 0xc9d8024b10, 0x305da40, 0xcafa482f80, 0xcabe553680, 0xd, 0xd, 0xc90a26f440, 0x119, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:96 +0x341 fp=0xc999549748 sp=0xc9995495b0 pc=0x1abbac1
github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run(0xc8e4983500, 0x305a300, 0xc9e1391740, 0xc4207bee58, 0x5400, 0x15000, 0xc4207beef0, 0xc4c0d0c790, 0x0, 0x0)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:1180 +0x1400 fp=0xc999549e88 sp=0xc999549748 pc=0x1ab3560
github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn(0xc42087e780, 0x305a300, 0xc9e1391740, 0xc8e4983500, 0x5400, 0x15000, 0xc4207beef0, 0xc4c0d0c790, 0x0, 0x0)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:391 +0xce fp=0xc999549ee8 sp=0xc999549e88 pc=0x1aaf1de
github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommandsAsync.func1(0xc66dbb98c1, 0xc719da4640, 0x305a300, 0xc9e1391740, 0xc4c0d0c790, 0x304f900, 0xc719da4620, 0xc9c20116e0, 0xc426828a00, 0x0, ...)
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:520 +0x1e7 fp=0xc999549f78 sp=0xc999549ee8 pc=0x1f07747
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc999549f80 sp=0xc999549f78 pc=0x70e501
created by github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommandsAsync
    /go/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:475 +0x17b

I've used this config max-sql-memory=.3 and cache=.40.

A: From the handle raft ready messages, it seems like your disk is underprovisioned on IOPS or slow to handle requests, which is causing KV operations to queue up in memory.
One workaround to physically limit the amount of memory Cockroach's SQL processors and storage-level caches use, using the flags --max-sql-memory and --cache respectively. This will not solve this problem entirely as raft operations will still queue up until the disk is correctly provisioned, but it will help.
The below command will set both SQL and cache memory limits to 25% of total system memory:
cockroach start --store=<dir> --max-sql-memory=0.25 --cache=0.25
More on memory limits: https://www.cockroachlabs.com/blog/memory-usage-cockroachdb/


text:
Q: Should I use strip tags on the fly or store on server already stripped I am using WMD like stackoverflow uses. I have read the upvoted posts on the topic which all advise to store both the markdown and the html_purified versions on the server. The reason for this is the markdown is needed for the user to edit his post, and the to purify on the fly is too expensive for the server so better to convert it and store it on the server.
https://stackoverflow.com/a/519322/1240324
However, when I show on the index page a bit of every question, then I dont want the markdown or the html version. I would like to call strip_tags on every question excerpt. But would this be heavy for the server to do it on the fly? Should I store a third field for a stripped tagged version?

A: strip_tags() isnt particularly expensive. I wouldn't worry about it.


text:
Q: why nginx proxy_connect_timeout seems not work I have a api server by nginx and the config is below. I use "proxy_connect_timeout" and "proxy_next_upstream" to make a "backup server",which mean when the "proxy_pass http://backup_server;" is busy(maybe because mysql/redis connect timeout), and the request time is up to 400ms, it return to me a http_504 and the request comes to "jump_to_error" and then handle by lua scripts(The lua is just return a static file content and I also show it below).
    location /xxx/xxx/xxx{
            proxy_http_version 1.1;
            proxy_set_header Connection "";
            proxy_set_header Host xxx.xxx.xxx;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_connect_timeout 400ms;
            proxy_send_timeout 400ms;
            proxy_read_timeout 400ms;
            proxy_buffer_size 256k;
            proxy_buffers 4 256k;
            proxy_busy_buffers_size 256k;
            proxy_temp_file_write_size 256k;
            proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404 http_429;
            proxy_max_temp_file_size 128m;
            proxy_pass http://backup_server;
            access_log /nginx.log json;
            error_page  429 500 502 503 504 = @jump_to_error;
    }

location @jump_to_error {
    default_type 'text/plain';
    content_by_lua_file xxx.lua;
    access_log /lua.log json;
    }

But when the request qps is increase (just about 40/sec), the $upstream_response_time in nginxlog become more than 400ms. And I have checked the cpu load, disk IO and network IO, all of them are normal.
request_time log
So, I have two questions about this.

*

*Why the $upstream_response_time and be more than "proxy_connect_timeout" set in nginx.conf.(I also test that when continue to increase the qps, the time can even be more than 1s..)

*I also checked my online nginx log, I found that there are some request with two "upstream status/upstream time". I set two servers in proxy_pass module and I know when one is down proxy_pass will return me two upstream status(502 200) and two upstream time(http://nginx.org/en/docs/http/ngx_http_upstream_module.html). But I can't understand  why there are about 0.1% request with two "504 status" in just one "504 status".
there are a few double 504 status
And this is my lua scripts which just return a static file content. I have ever and debug log to record the time cost in lua and almost all of the requests are less than 10ms so maybe we can assume the lua is not relate to the question above.
function readfile(path)
  local file = io.open(path, "r")
  if file then
    local content = file:read("*a")
    io.close(file)
    return content
  end
  return nil
end

local file = "/xxx/xxx/file1"

local content = readfile(file)
ngx.header["Access-Control-Allow-Origin"] = "*"
ngx.header["Content-Type"] = "text/plain; charset=utf-8"
ngx.print(content)


text:
Q: One container with ranked profiles I want to create a leaderboard but I stuck in this issue:

.profiles-container {
  display: flex;
  width: 105%;
  flex-wrap: wrap;
  margin-top: 20px;
  margin-bottom: 12px;
}
.profile {
  background: grey;
  width: 33%;
  height: 94px;
  margin-right: 50px;
  margin-left: 50px;
}

1

2

3

4

5

6

7

8

9

10

As you see I have one profiles-container and I added the profiles inside it,
The issue is the ranks are in the same row, I want to rank like this instead:

I want it like leaderboard so I want it to rank first column the the second one right ?
Is the a solution to do it without changing the structure of HTML code ?

A: Is this works? I wrapped your profiles in another div with class name profileMain and gave width: 49%for it to keep 2 elements in same row and flexbox feature justify-content: center align-items: center to keep inner element in center of 49%

.profiles-container {
  display: flex;
  width: 100%;
  height: 100%;
  flex-wrap: wrap;
}
.profileMain {
  width: 49%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.profile {
  display: flex;
  justify-content: center;
  align-items: center;
  background: yellow;
  width: 180px;
  height: 194px;
  margin-bottom: 32px;
}

1

2

3

4

5

6

7

8

9

10


text:
Q: Function that converts a decimal to binary: how to return result instead of printing it? I need to write a function that converts an integer into binary.
The function definition I have written so far is:
def decimalToBinary(number):
    if number > 1:
        decimalToBinary(number//2)
    print(number % 2, end = '')

My problem is that:

*

*I should return the result instead of printing it, and I am unsure how to do that.

*I am overall unsure if my code is the best recursive code I could have written.

Thank you for your time!

A: Convert the digit to a string, and use return instead of print. Then concatenate it with the recursive call.
def decimalToBinary(number):
    if number > 1:
        return decimalToBinary(number//2) + str(number % 2)
    else:
        return str(number % 2)

A: You can pass a count variable to position the digits
def decimalToBinary(number, count = 0):
    if number > 1:
        return ((number%2) * (10**count) + decimalToBinary(number//2, count+1))
    return ((number%2) * (10**count))

Also, if you need a non-recursive function you can use something like this
def LinealDecimalToBinary(num):
    count = 0
    binNum = 0
    while(num > 0):
        binNum += (num%2) * (10**count)
        num = num//2
        count += 1
    return binNum


text:
Q: bootstrap scss with reactjs not adding bootstrap classes I've installed bootstrap using
npm install bootstrap@4.0.0-alpha.6 --save

in my dependencies I have:
 "dependencies": {
    "bootstrap": "^4.0.0-alpha.6",
    "react": "^15.6.1",
    "react-dom": "^15.6.1"
  }

in my styles.scss
@import '~bootstrap/scss/bootstrap';

and here's my webpack file:
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
    template: './src/index.html',
    filename: 'index.html',
    inject: 'body'
})

module.exports = {
    entry: './src/index.js',
    output: {
        path: __dirname + '/dist',
        filename: 'build.js'
    },
    devServer: {
        historyApiFallback: true
    },
    module: {
        loaders: [
            { test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
            { test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/ },
            {
                test: /\.scss$/,
                use: [
                    'style-loader',
                    'css-loader?importLoaders=1&modules&localIdentName=[name]_[local]_[hash:base64:5]',
                    'sass-loader',
                ],
            }
        ]
    },
    plugins: [HtmlWebpackPluginConfig]
}

but when I add container class in my header component
import React from 'react';

export class Header extends React.Component {
    render() {
        return(
          header here
        );
    }
}

export default Header;

it looks like this:

and in build.js I can't find .container class. .row as well etc.
inside bootstrap.scss>>import grid container looks this:
@if $enable-grid-classes {
  .container {
    @include make-container();
    @include make-container-max-widths();
  }
}

and in _variables.scss inside bootstrap this variable is true
$enable-grid-classes:       true !default;

so what's wrong?

A: You have to import your .scss file in your component and apply in html. Like:
import React from 'react';
import styles from './styles.scss'; // your .scss file

export class Header extends React.Component {
    render() {
        return(
          header here
        );
    }
}

export default Header;


text:
Q: complex valued Lipschitz continuous It is well known that a real-valued function $f: \mathbb{R}^{N\times 1}\rightarrow \mathbb{R}$ is called Lipschitz continuous if there exists a positive real constant $K$ such that, for all real $x_1$ and $x_2$,
$$\Vert f(x_1)-f(x_2) \Vert \leq K\Vert x_1-x_2\Vert$$
A differentiable function $f: \mathbb{R}^{N\times 1}\rightarrow \mathbb{R}$ is said to have an L-Lipschitz continuous gradient if there exists a positive real constant $L$ such that, for all real $x_1$ and $x_2$,
$$\Vert \nabla f(x_1)-\nabla f(x_2) \Vert \leq L\Vert x_1-x_2\Vert$$.
My question now is:
How to express a differentiable function $f: \mathbb{C}^{N\times 1}\rightarrow \mathbb{R}$ is called Lipschitz continuous or L-Lipschitz continuous gradient?
$$\Vert f(x_1)-f(x_2) \Vert \leq K\Vert x_1-x_2\Vert ?$$
$$\Vert \mathcal{D}_{x^*} f(x_1)-\mathcal{D}_{x^*} f(x_2) \Vert \leq L\Vert x_1-x_2\Vert?$$.
Whether the function $$f(x)=\frac{x^H A x}{x^H B x}$$ satisfies Lipschitz continuous or L-Lipschitz continuous gradient?
Any help is highly appreciated. Thanks in advance!

A: In my opinion, it is still $\|\triangledown f(x_{1})-\triangledown f(x_{1})\|\leq L\|x_{1}-x_{2}\|$, and based on this conclusion, we can have $f(x)$ majorized as $f(x)\leq f(x_{t})+\Re\{\triangledown^{H}f(x_{t})(x-x_{t})\}+L/2\|x-x_{t}\|_{2}^{2}$, which is known as the Descent Lemma, where $x\in\mathbb{C}^{n}$ and $f$ is real-valued function.


text:
Q: How to specific OU automatticaly for new user in AD? Import-Module ActiveDirectory

$firstname = Read-Host -Prompt "Please write firstname"
$lastname = Read-Host -Prompt "Please write lastname"

$SearchBase = "DC=Domain,DC=com"
$OUList = Get-ADOrganizationalUnit -SearchBase $SearchBase -Filter * -Properties Name,DistinguishedName | Select-Object -Property Name,DistinguishedName

$OU = $OUList | Out-GridView -Title "Select OU and Click OK" -OutputMode Single

#Create the AD User
New-ADUser `
-Name "$firstname $lastname" `
-GivenName $firstname `
-Surname $lastname `
-UserPrincipalName "$firstname.$lastname".ToLower() `
-AccountPassword (ConvertTo-SecureString "Customs1!" -AsPlainText -Force) `
-Path $OU `
-ChangePasswordAtLogon 1 `
-Enabled 1 `
-DisplayName "$firstname $lastname" `
-SamAccountName "$firstname.$lastname".ToLower()

  $timer = [diagnostics.stopwatch]::startnew()
  $erroractionpreference = "silentlycontinue"
  $mailboxsuccess = $false
  while (($timer.elapsed.totalseconds -lt 900) -and (!($mailboxsuccess)))
   {
   $error.clear()

   Enable-Mailbox -Identity $username -Alias $username -Database $mailboxdatabase
`your text`
   if($error.count -eq 0)
    {
    write-host "Mailbox successfully created"
    $mailboxsuccess = $true
    }

   else
    {
    write-host "." -nonewline
    start-sleep -s 30
    }

   }
  $timer.stop()
  $erroractionpreference = "continue"
  $secs = "{0:N2}" -f ($timer.elapsed.totalseconds)
  write-host "Process ran for: $secs seconds."

I try to create an user in specific OU automatically with grid table where I select an OU and click ok, but my program doesn't work, after run appear this.
Please write firstname: Test1
Please write lastname: Test2
....

I need help, thank you.
So far I managed to create a user in a specific OU manually, but I don't want this, I want in automatically mode, I don't know how...


text:
Q: Como utilizar MAX() en SQL server para mostrar unicamente el valor maximo? Intenté con lo siguiente:
SELECT idOfertasEmpleo, MAX(salario) AS SalarioMax
FROM Empresa.OfertasEmpleo;

Pero me da el siguiente error

Column 'Empresa.OfertasEmpleo.idOfertasEmpleo' is invalid in the
  select list because it is not contained in either an aggregate
  function or the GROUP BY clause.

También intenté con un GROUP BY:
SELECT idOfertasEmpleo, MAX(salario) AS SalarioMax
FROM Empresa.OfertasEmpleo GROUP BY idOfertasEmpleo;

Pero me los muestra de la siguiente forma:

y yo sólo necesito el maximo y mostrar a quien le pertenece

A: Es porque se selecciona idOfertasEmpleo, entonces te pone ese dato:
SELECT idOfertasEmpleo, MAX(salario) AS SalarioMax
FROM Empresa.OfertasEmpleo GROUP BY idOfertasEmpleo;

Si se necesita solo el salario, seria así:
SELECT MAX(salario) AS SalarioMax FROM Empresa.OfertasEmpleo;

A: Si lo que deseas es obtener el salario máximo, pues hacer lo siguiente:

*

*Usa GROUP BY dado que trabajas con una función de agregación MAX

*En el SELECT invoca a la columna que te ayudará a identificar de quien es, por ejemplo esa columna pudiera llamarse nombre

*Usa la instrucción TOP con un valor de 1 para indicarle solo te devuelva una fila del conjunto de resultados

Quedando tu consulta así:
SELECT TOP 1 nombre, MAX(salario) AS SalarioMax
FROM Empresa.OfertasEmpleo
GROUP BY nombre;

Si necesitas agregar la columna idOfertasEmpleo considera que esta pudiera alterar el resultado esperado y no mostrar de primera mano el salario mayor y a quien le corresponde; si aún así lo necesitas considero que al final de tu consulta debes hacer uso de ORDER BY
ORDER BY idOfertasEmpleo DESC;


text:
Q: Syntax for float format string in pandas? I want to use the to_csv() function in pandas to create a csv string from a dataframe. The function has a float_format parameter to control how floats are formatted in the output. However, I cannot find any documentation about how to use this parameter.
The pandas documentation helpfully only says "Format string for floating point numbers". I have tried searching the whole pandas documentation for "float_format" but found only references to the term and a few examples, such as in IO tools or options and settings, no explanation or definition. It is used in many other functions as well but it does not seem to be documented at all.
Can anyone point me to a documentation of the float_format parameter in pandas?

A: You can find some information concerning the values that float_format can take in the python docs. More specifically in the section for the Format Specification Mini-Language. The link is : Format Specification Mini-Language.. It is not pandas docs but I hope this helps.


text:
Q: AngularJS compiling PHP-generated code in Datatable I'm having Datatables function serverSide by making ajax requests to a Laravel route.
The laravel route returns data like what is explained on this page: https://datatables.net/manual/server-side, including a column with some HTML.
The columns it populates includes an Actions column where I want to have links that use angular directives like ngClick and ngClass. I know that the HTML in the columns needs to be compiled in order for them to work, but I don't know how to go about doing it, especially since it is being generated by PHP.

A: Used a callback http://datatables.net/reference/option/createdRow to call $compile on the whole row so each row is processed by the compiler.
elem.DataTable({
  ...
  createdRow: function(row, data, dataIndex) {
      $compile(row)($scope)
  ...
});


text:
Q: Failed to determine Pass/Failure of the task "Run Embedded Signature Test" We have developed driver for printer and preparing its submission for WHQL signature.
We have one failed WHQL test - Failed to determine Pass/Failure of the task "Run Embedded Signature Test"
A link for a test:
http://msdn.microsoft.com/en-us/library/windows/hardware/jj124852.aspx
It is a test of embedded signature - may be it should fail until we drivers are signed?
The logs are below:
Failure : Failed to determine Pass/Failure of the task "Run Embedded Signature Test". Task Will be marked as Failed anyway.

Failure : Failed to Parse the LogFile Associated with the Execute Task

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Copying LogFiles From TaskGuidXML "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test"

Cause : Copying File "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" Fails

Failure : Failed to Copy the Logfiles associated with the Execute Task

Cause : Cannot Find Pattern "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml"

Cause : Failed to Parse the RollupCounts XML file  "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test".

Cause : Failed to move to rool element TaskResult

Cause : the rollup counts XML file  "C:\WLK\JobsWorkingDir\Tasks\WTTJobRunFC644A7F-4450-4864-8725-3EBE4E252C47\2773D33C-D67D-440B-94CB-DD76F21788B6.xml" For Task "Run Embedded Signature Test" does not exist.

Cause : The Execute Task with Commandline cmd /c EmbeddedSignature.exe /driver: 2>errorout.txt Failed with ExitCode e0434352

A: The problem was in Russian windows, after installation of English windows version of windows  the problem has been resolved and test passed.
Please close the topic.


text:
Q: Populate calculated values from other sheets into new sheet I have excel which contains four sheets (say sheet1, sheet2, sheet3 and sheet4). I want to populate calculated values and other information from (sheet1, sheet2, sheet3) to sheet4. Both sheet1, sheet2 contains ID,Name, Age, Amount whereas sheet1 is static page and sheet2 is dynamic page. sheet3 will have ID, Name, Age, Contribution. once all these values are entered sheet4 should populate ID, Name, Age, Total(Amount * Contribution).
Sheet 1:
+--------------------------+
| ID | Name | Age | Amount |
+--------------------------+
| 1  | AAAA | 20  | 1500   |
+--------------------------+
| 2  | BBBB | 21  | 2000   |
+--------------------------+
| 3  | CCCC | 25  | 6000   |
+--------------------------+

Sheet 2:
+--------------------------+
| ID | Name | Age | Amount |
+--------------------------+
| 4  | XXXY | 20  | 3000   |
+--------------------------+
| 7  | YYYY | 21  | 7000   |
+--------------------------+
| 9  | ZZZZ | 25  | 5000   |
+--------------------------+

Sheet 3:
This sheet contribution value will be entered by user and they randomly enter for any user from both of the sheets (sheet1 or sheet2)
+------------------------------+
| ID | Name | Age | Contribute |
+------------------------------+
| 1  | AAAA | 20  | 1          |
+------------------------------+
| 3  | CCCC | 25  | 8          |
+------------------------------+
| 7  | YYYY | 21  | 9          |
+------------------------------+
| 9  | ZZZZ | 25  | 10         |
+------------------------------+

Sheet 4:
This should be auto populate the ID, Name and Age from Sheet3 exactly and Values should be Amount * Contribution (Amount my come from sheet1 or sheet2 based on the ID)
+------------------------------+
| ID | Name | Age | Value      |
+------------------------------+
| 1  | AAAA | 20  | 1500       |
+------------------------------+
| 3  | CCCC | 25  | 48000      |
+------------------------------+
| 7  | YYYY | 21  | 63000      |
+------------------------------+
| 9  | ZZZZ | 25  | 50000      |
+------------------------------+

A: Try the next code, please. It must be copied in the dummy "Sheet4" module.
You must replace "Sheet1_", "Sheet2_", "Sheet3_" sheet names with your real ones. It will also clear all records for a deleted ID:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.Column = 1 Then
        Dim sh1 As Worksheet, sh2 As Worksheet, sh3 As Worksheet, IDCell As Range
        Dim dContrib As Double, dAmount As Double

        Set sh1 = Worksheets("Sheet1_"): Set sh2 = Worksheets("Sheet2_")
        Set sh3 = Worksheets("Sheet3_")

        Set IDCell = sh3.Range("A:A").Find(What:=Target.Value, LookAt:=xlWhole)
        If Not IDCell Is Nothing Then
            If Target.Value <> "" Then
                Target.Offset(0, 1).Value = IDCell.Offset(0, 1).Value
                Target.Offset(0, 2).Value = IDCell.Offset(0, 2).Value
                If IsNumeric(IDCell.Offset(0, 3).Value) Then
                     dContrib = IDCell.Offset(0, 3).Value
                Else
                    'for the case of writing the ID header...
                    Target.Offset(0, 3).Value = "Value"
                    Exit Sub
                End If
            End If
        Else
            MsgBox """" & Target.Value & """ ID could not be found...": Target.Activate
            Exit Sub
        End If
        Set IDCell = sh1.Range("A:A").Find(What:=Target.Value, LookAt:=xlWhole)
        If Not IDCell Is Nothing Then
            If Target.Value <> "" Then
                dAmount = IDCell.Offset(0, 3).Value
                Target.Offset(0, 3).Value = dAmount * dContrib: Exit Sub
            End If
        End If
         Set IDCell = sh2.Range("A:A").Find(What:=Target.Value, LookAt:=xlWhole)
        If Not IDCell Is Nothing Then
            If Target.Value <> "" Then
                dAmount = IDCell.Offset(0, 3).Value
                Target.Offset(0, 3).Value = dAmount * dContrib: Exit Sub
            End If
        End If
        If Target.Value <> "" Then
            MsgBox """" & Target.Value & """ ID could not be found...": Target.Activate
        Else
            Target.Offset(0, 1).ClearContents: Target.Offset(0, 2).ClearContents
            Target.Offset(0, 3).ClearContents
        End If
   End If
End Sub

After edit:
Please, use the next code. Paste the next code in the Click event of your button existing on Sheet3:
Private Sub MyButton_Click()
    Dim sh1 As Worksheet, sh2 As Worksheet, sh As Worksheet, sh4 As Worksheet
    Dim dContrib As Double, dAmount As Double, IDCell As Range, Target As Range
    Dim lastRow As Long, rngCopy As Range, i As Long

    Set sh1 = Worksheets("Sheet1_"): Set sh2 = Worksheets("Sheet2_")
    Set sh = ActiveSheet: Set sh4 = Worksheets("Sheet4_")

    'Clear all the content of Sheet4, except its headers first row:
    sh4.Range("A2:D" & sh4.Range("A" & Rows.Count).End(xlUp).row).ClearContents

    'Copy all data from the first three columns of Sheet3:
    Set rngCopy = sh.Range("A2:C" & sh.Range("A" & Rows.Count).End(xlUp).row)
    sh4.Range("A2").Resize(rngCopy.Rows.Count, rngCopy.Columns.Count).Value = rngCopy.Value

    'Iterate between all existing IDs and process the data:
    lastRow = sh4.Range("A" & Rows.Count).End(xlUp).row
    For i = 2 To lastRow
        Set Target = sh.Range("A" & i) 'ID to be processed
        dContrib = Target.Offset(0, 3).Value 'Amount

        Set IDCell = sh1.Range("A:A").Find(What:=Target.Value, LookAt:=xlWhole)
        If Not IDCell Is Nothing Then
            If Target.Value <> "" Then
                dAmount = IDCell.Offset(0, 3).Value
                sh4.Range("D" & i).Value = dAmount * dContrib
            End If
        Else
            Set IDCell = sh2.Range("A:A").Find(What:=Target.Value, LookAt:=xlWhole)
            If Not IDCell Is Nothing Then
                If Target.Value <> "" Then
                    dAmount = IDCell.Offset(0, 3).Value
                    sh4.Range("D" & i).Value = dAmount * dContrib
                End If
            End If
        End If
        Next i
        sh4.Activate 'activate the processed sheet, in order to see the result
End Sub

A: You dont require sheet 4 to do this.
Sheet1: Keep entire table in sheet 1
Sheet2: Enter id and use formula [=vlookup(A1,A1:D10,2,0)] in name field where you want value of name. Here 2 refers to column no. of sheet 1. This way you can use formulae is all cells. Whenever you change id, remaining fields will be auto populated.


text:
Q: iOS Auto login WKWebView using Google Sign In (Swift) I have a Web View app for iOS and using only Web View, In some pages sign-in is required for that i am using Google Sign-in that is working find but i want to auto-login via google every time once user login successfully.
Is it possible to skip sign-in / auto login while on application next time after once login?


text:
Q: Using transfinite iteration in the construction of inductive sets Edit: I've edited this question quite a bit since I first posted it, with the intention of making it clearer what I am asking. If something still seems unclear, please let me know. Check the edit history for previous versions.
Motivation
When I ask for the definition of the natural numbers, the only consistent response which I receive is that "the natural numbers are the set containing < 0 / 1 > which is closed under succession" (from this point on, I will consider $0$ to be the smallest natural number). All additional information about the natural numbers seems to vary depending on the source.
Since this is the common point of agreement, I can conclude that at least the following are true of the natural numbers:
$1.\qquad0 \in \Bbb{N}$
$2.\qquad\forall n\in \Bbb{N}. s(n)\in \Bbb{N}$
This alone does not suffice to define the natural numbers, however. It is trivial to show that if $s(n)=n$, then $\{0\}=\Bbb{N}$ satisfies (1) and (2).
So there must be an additional rule $\forall n\in \Bbb{N}.s(n)\ne n$.
This is still insufficient to define the natural numbers. If $s(0)=1$ and $s(1)=0$, then $\{0,1\}=\Bbb{N}$ satisfies all three rules.
After doing this about six more times, I came up with a list of rules which, taken together, seem to identify the set of natural numbers.
Upon inspection, I noticed that these same rules can be used to define other things aside from "the set of natural numbers", such as ordinals (or at least countable ordinals), polynomials, and 'small' cardinals (e.g. $\aleph_0,\aleph_1,\ldots$).
To that end, I elected to abstract the rules so that they could be inherited by these other systems.
The Rules
Let $(X,\sigma,\prec)$ be a structure satisfying the following:
$1.\qquad \exists o.o\in X$
$2.\qquad \forall x\in X.\sigma(x)\in X$
$3. \qquad \forall x\in X. x\prec\sigma(x)$
$4. \qquad \forall x,y \in X. x\prec y\implies x\ne y$
$5. \qquad \forall x,y,z \in X. x\prec y \land y\prec z\implies x\prec z$
Note: $(X,\sigma,\prec,o)$ may be used instead if you wish to discard $(1)$
Note: The natural numbers are obtained by $X\to\Bbb{N}$, $\sigma\to s$, and $\prec\to<$.
Were I just a bit more demanding, I would say that these rules are inadequate because they fail to specify the full extent of $X$. However, I never saw this as a possibility for the motivating example (the natural numbers), and seeing as what I do have is more precise than anything I have been given prior, this seems like a small enough concession.
Ideally, $X$ can be obtained by taking $\{o\}$, computing $\sigma(o)$, adding this to $\{o\}$ and continuing in this fashion for an indeterminate number of stages.
(technically, this would also require $\forall x\in X\setminus \{o\}. \exists w\in X.\sigma(w)=x$ and $\nexists x\in X.\sigma(x)=o$, but I omitted these since they are not essential to the question).
This could all be summarized as $X=\{o,\sigma(o),\sigma(\sigma(o)),\ldots\}$ - and it's tempting to leave it at that. But what does "$o,\sigma(o),\sigma(\sigma(o)),\ldots$" actually mean? Does it terminate at some point? What is the eventual cardinality of $X$?
Rather than casually dismissing these questions with the usual "we know the natural numbers are countable [because reasons], and therefore..." I resolved to find a direct and definitive answer.
Since it isn't possible to continue the sequence $\sigma(o),\sigma(\sigma(o)),\ldots$ forever I decided to use ordinals to define the iteration of the function $\sigma$:
$\sigma^0(x)=x\qquad (0\in\mathbf{Ord})$
$\sigma^{s(\alpha)}(x)=\sigma(\sigma^\alpha(x))\qquad (\alpha\in\mathbf{Ord})$
Why ordinals?
Clearly there is no greatest member of $X$, so $X$ is something to the effect of "all elements up to $\sigma^\infty(o)$". But the notation $\sigma^\infty(o)$ is ambiguous. What is $\sigma^\infty(x)$? What is $\sigma(\sigma^\infty(x))$? Using ordinals, it is possible to differentiate infinite iterations of $\sigma$ from one another in a way that is impossible if we just leave it at "$X$ is infinite". Since $(X,\sigma)\cong(\Omega,s):\Omega\subseteq\textbf{Ord}$,  the repeated applications of $\sigma$ correspond directly to successive ordinals.
The Question
Originally, this question was about restricting the iteration $\sigma$ to clarify the definition of $X$. At the time, I had assumed that "closed under $\sigma$" was an absolute - i.e. "closed under arbitrary applications of $\sigma$" by definition - and that a restriction to the iteration of $\sigma$ was necessary for $X$ to remain countable. The need to explicitly state the restriction on the repeated application of $\sigma$ might seem unnecessary at first, but it is no more necessary to say that a topology (using the open-sets definition) is "closed under finite intersections" as opposed to "closed under intersection".
Regardless, unless $X$ is a proper class (in which case, the natural numbers are also a proper class), there must be some least ordinal $\beta$ such that $X=\bigcup_{\alpha<\beta}\{\sigma^\alpha(o)$}.
This is a problem because $\beta$ cannot be determined via 1 through 5. Interpreting $X$ as the set of natural numbers with succession and their usual order, what this effectively says is that "the natural numbers are the set containing $0$ and all successors of $0$ which are natural numbers" - which is of course true, but it's also unhelpful.
Since Tanner Swett's answer suggests that 1 through 5 can be used to prove that $X$ is closed only under finite iterations of $\sigma$, how can I show this to be the case?
Furthermore, how do I prove that $\beta=\omega$ (which it must, if $X$ is deemed countable)?
Finally, how can I define $X$ in a non-circular fashion? Even if I can prove that $\omega$ is the least ordinal such that $X=\bigcup_{\alpha<\omega}\sigma^\alpha(o)$, I still haven't defined $\omega$. And since $(\omega,s,\in)$ is an example of the structure being described, this ultimately reduces to $\omega=\bigcup_{\alpha<\omega}s^\omega(\emptyset)$ - which, along with 1 through 5, is trivially satisfied by every infinite ordinal (again, true but unhelpful).

Note: applying the restriction "for finitely many iterations of $\sigma$" doesn't seem to work using the Cantor or Dedekind definitions of finite, since applying this construction to the class of Cantor finite sets leads back to the same problem and using the Dedekind definition makes things... weird. I'm still working on the Kuratowski definition.
Note: I have not studied model theory in-depth, but I tagged this as "model theory" since that seems to be the subject which came up most frequently while researching this question.
Note: while I am calling this a "construction" in the title, I would prefer to think of it as a "definition," since a failure to equate the two, in this case, would entail that the natural numbers are not defined - which is something I am unwilling to accept.

A:
From $(2)$ it follows that if $\varphi$ is valid, then $\forall x_0\in X.I_{x=x_0}^{\varphi}\sigma(x)\in X$.

I'm not sure what you mean by "valid," exactly, but it's not accurate to say that if $\varphi$ is a predicate on $X$, then $\forall x_0\in X.I_{x=x_0}^{\varphi}\sigma(x)\in X$. This is because—for one—your definition of $I$ is not complete. For example, if $\phi(x) = (x = x)$, then $I_{x=o}^\phi\ \sigma(x)$ is an undefined expression.

Except that (2), as stated, guarantees that for any ordinal $\gamma$, $I_{n=\emptyset}^{i\in\gamma}s(n)\in\omega$. Suppose that $\gamma=\omega_1$, then $I_{n=\emptyset}^{i\in\omega_1}s(n)=\omega_1\land I_{n=\emptyset}^{i\in\omega_1}s(n)\in\omega\implies\omega_1\in\omega$ (else we have $s^\beta(\alpha)\ne\alpha+\beta$ or $\emptyset\cup\omega_1\ne\omega_1$).

Well, that's not true at all. If $\gamma = \omega_1$, then $I_{n = \emptyset}^{i \in \gamma}\ s(n)$ is an undefined expression.
And besides, (2) holds of $X = \omega$, and yet $\omega_1 \notin \omega$.
Now, you write in a comment:

Your making an assumption that wasn't stated, namely "closed under $σ$ = closed under finitely many applications of $σ$".

Well, technically, "closed under $\sigma$" means "closed under just one application of $\sigma$," which entails being closed under any finite number of applications of $\sigma$. But it doesn't entail being closed under infinitely many applications of $\sigma$ (that's not even a well-defined concept in general).
So, there's no problem here. The set of natural numbers is closed under succession, and it satisfies your definition of a structure $X$. This doesn't lead to any falsehoods such as $\omega_1 \in \omega$.
It looks like what you've done is to assume that the conditional iteral $I$ is well-defined and well-behaved everywhere, and from this, you've derived a falsehood. Thus, you've proven that the conditional iteral $I$ is not well-defined and well-behaved everywhere.

You write:

If $\gamma=\omega_1$ then $I_{n=\emptyset}^{i\in\omega_1}s(n)=\emptyset\cup\omega_1=\omega_1$. It is because $\omega_1\notin\omega$ that $X$ cannot be interpreted as $\omega$ if (2) holds in all cases.

You haven't defined $I$ in such a way that $I_{n=\emptyset}^{i\in\omega_1}s(n)$ is defined as $\omega_1$... well, not unless the word "hypothetical" in your definition is meant to imply that $I$ is defined even if your program does not halt. But in that case, it's not clear what $I$ is defined as. Saying something like "it's the hypothetical output value of this program which runs forever without outputting a value" doesn't constitute a meaningful definition.
(Side question: what does the $i$ in the superscript in $I_{n=\emptyset}^{i\in\omega_1}s(n)$ mean? Is that supposed to be $n$?)
In any case, axiom (2) states that $\forall x\in X.\sigma(x)\in X$; it doesn't say anything about $I_{n=\emptyset}^{i\in\omega_1}s(n)$. You cannot conclude, from the statement that $\forall x\in X.\sigma(x)\in X$, that $I_{n=\emptyset}^{i\in\omega_1}s(n) \in X$.
Overall, you seem to think that the first-order logic sentence $\forall x\in X.\sigma(x)\in X$ entails that you can take an element of $x$, apply the function $\sigma$ infinitely many times, and end up with an element of $x$ as the result. It does not.


text:
Q: How to select all/Unselect all check boxes from Listview in BaseAdapter I want to select all/Unselect all check box.
here is my code.
private class BaseAdpterSendToServer extends BaseAdapter{

        String latti,calulationVal;
        String longi;
        String name;

        public BaseAdpterSendToServer(Context context) {
        layoutInflater = LayoutInflater.from(context);
        }

        @Override
        public int getCount() {

            return AndroidCamera.imagelistcount;
        }

        @Override
        public Object getItem(int arg0) {
            return arg0;
        }

        @Override
        public long getItemId(int arg0) {
            return arg0;
        }

        @Override
        public View getView(int position, View convertView, ViewGroup arg2) {

            viewHolder holder;

            if(convertView==null){
                holder  = new viewHolder();
                convertView =layoutInflater.inflate(R.layout.row_send_to_server, null);

                holder.showImage = (ImageView)convertView.findViewById(R.id.imgView);
                holder.txtCalulation = (TextView)convertView.findViewById(R.id.txtCalualtionVal);
                holder.txtLatti = (TextView)convertView.findViewById(R.id.txtValLat);
                holder.txtLongi = (TextView)convertView.findViewById(R.id.txtValLong);
                holder.txtName = (TextView)convertView.findViewById(R.id.txtValName);
                holder.checkBox = (CheckBox)convertView.findViewById(R.id.chkBox);
                convertView.setTag(holder);
            }
            else{
                holder =(viewHolder)convertView.getTag();
            }
            int pos = 0;
            DBConnect d1 = new DBConnect(getApplicationContext(),"colorCode.db");

            pos = position+1;
            Cursor c = d1.selectedImageId(pos);

            String path = c.getString(1);
             calulationVal = c.getString(2);
             String s= calulationVal.toString();
             latti = c.getString(3);
             longi = c.getString(4);
             name = c.getString(5);
                d1.close();

          Bitmap b1 = BitmapFactory.decodeFile(path);

            System.out.println("THE BITMAP ISK ----- "+b1);

            holder.showImage.setImageBitmap(b1);
            holder.txtCalulation.setText(""+s);
            holder.txtLatti.setText(""+latti);
            holder.txtLongi.setText(""+longi);
            holder.txtName.setText(""+name);

            bt_f_unsel.setOnClickListener(new OnClickListener() {

                }
            });

            return convertView;
        }

        class viewHolder{
            TextView txtCalulation ,txtLatti, txtLongi,txtName;
            ImageView showImage;
            CheckBox checkBox;
        }

any help will be good for me.

A: You can make a button, which will go through your model (the data you have) and set false/true. Then you should call notifyDataSetChanged() to tell view to update the screen

A: My suggestion is just make a button which will select/deselect all check boxes and onClick of button make a for loop to do that manually. I don't know the other way.
normally we make it like this,
for(int i=0; i < listView.getChildCount(); i++){
 RelativeLayout itemLayout = (RelativeLayout)listView.getChildAt(i);
CheckBox cb = (CheckBox)itemLayout.findViewById(R.id.MyListViewCheckBox);
cb.setChecked(true);

I hope it will help you.


text:
Q: JsonString to Object in VB6 So I need to convert following response from Httprequest of JsonString to Object. Can someone help in looping it to an object. [New to Vb6]
Please see the below Json response.
{
    "Participants": [
    {
      "Participant": {
        "EntityHierarchy": {},
        "ProviderPlatform": "string",
        "ProviderPlatformDetail": [
          {
            "ProviderPlatform": "string",
            "Primary": true
          }
        ],
        "FirstName": "string",
        "LastName": "string",
        "BusinessName": "string",
        "City": "string",
        "Region": "string",
        "PostalCode": "string",
        "Phone": "string",
        "CountryCode": "string",
        "Email": "string",
        "AccountNumber": "string",
        "Active": true,
        "PSuiteAttribute": "string",
        "ParticipantIdentifier": "string",
        "SystemParticipantIdentifier": "string",
        "ITAIdentifier": "string"
        },
       "Platform": "string",
       "Program": "string",
       "ProgramFriendlyName": "string",
       "EnterpriseServicesIdentifier": "string",
       "IdentityMapped": true,
       "MappedToMasterPlatform": true,
       "MasterPlatform": "string",
       "SupportingPlatform": "string",
       "MasterPlatformName": "string",
       "SupportingPlatformName": "string",
       "FaultedMessages": [
       "string"
       ]
}

A: Bruce McPherson makes heavy use of a class called cJobject to do JSON handling in VBA/VB6. cJobject is too big to fit in an answer, but you can get its current source code off GitHub. See also his usage notes.

A: There are plenty of JSON classes floating around written in VB6, VBA, or VB6 that is portable to VBA.
Here are a couple more:
JsonBag, Another JSON Parser/Generator
JNode - JSON revisited