proof techniques – Lambda calculus without free variables is as strong as lambda calculus?

First question: How would one prove that by removing free (unbound) variables from lambda calculus, and allowing only bound variables, its power is not reduced (it is still Turing-complete) ?

Second question: Is the proposition given above really true? Is lambda calculus sans free variables really Turing-complete?

docker – How to interpolate Jenkins environment variables inside Dockerfile?

I have a Jenkins pipeline,
One of the stages of the pipeline is to build the artifact from a java application code.
The artifact always get the name hello-world-${BUILD_ID}.war using BUILD_ID jenkins environment variable for every build the name of the artifact will be changed.

Than, I have another stage in which I have to build a docker image for this artifact.
One of the lines of the Docker file is:
COPY hello-world-war-1.0.${BUILD_ID}.war /usr/local/tomcat/webapps/java-app.war
In this line I have to copy the artifact to to the docker images.

For some reason, the mentioned interpolation doesn’t work and when I run the pipeline I get the same error:
COPY failed: stat hello-world-war-1.0..war: no such file or directory

Of course, when I hard code the number of the build id inside the Dockerfile, all work well.

Attached is a screenshot of the whole the Dockerfile.

Thanks in advance for any help !

enter image description here

Getting values of 2 variables and a constant based on a single equation using a 3D graph

This is my function.

`g(p_, q_, c_) := 
 2^(-p*Log2(p) - 
     q*Log2(q) - (1 - p)*Log2(1 - p) - (1 - q)*
      Log2(1 - q))*(c^(p*q + (1 - p)*(1 - q)))*(1 - c)^(1 - 
     p*q - (1 - p)*(1 - q))`

I have graphed this function taking g as a function of p and q, I am varying c as a constant.

`flo=Manipulate(Plot3D({g(p, q, c)}, {p, 0, 1}, {q, 0, 1}), {c, 0.001, 1})`

enter image description here

How can I get values of p, q and c so that g(p,q,c)<1?

Anything I add to path in enviroment variables gets deleted after i close the window

So, I’ve been looking for solution’s on the web but I can’t find any. Every time I try to add something to path it deletes it right after I close it. This is on my user. However if you do it as administrator it will save it. I can’t use here because the admin is another profile and I have all of my developing tools in my profile. Can any of you help me.

amazon web services – Ansible Join two variables

I have two variable definition files as follows

    Project: "{{ project_name }}"
    Application: "{{ application_name }}"
    Region: "{{ aws_region }}"
    Ansible: "Yes"

    environment_name: dev

Now in task.yml I am trying to create aws ec2 instance with all tags but its not working.

    key_name: "{{ keypair_name }}"
    instance_type: "{{ ec2_instance_type }}"
    instance_tags: "{{ aws_common_tags + ec2_instance_tags }}"

We are getting the following error:

"tags": {
        "Ansible": "Yes",
        "Application": "webserver",
        "Project": "document_upload",
        "Region": "us-west-2"

fatal: (localhost): FAILED! => {
    "msg": "Unexpected templating type error occurred on ({{ aws_common_tags + ec2_instance_tags }}): unsupported operand type(s) for +: 'dict' and 'dict'" }


service – linux capabilities to read environment variables?

I’d like to run a service as a non-privileged user, but it needs to bind to a system port number (i.e. less than 1024), so I give it setcap 'cap_net_bind_service=+ep' <path for service>, all good.

Problem is, on startup, the service reads environment vars and for some reason it can’t do that when it has cap_net_bind_service. So, with two copies of the executable, one with cap_net_bind_service, one without, only the one without can read environment vars.

It’s as though there’s a default set of capabilities that allows reading env vars, but the exe loses that capability when I give it cap_net_bind_service. Is that right, or is something else going on? What additional capability might I need to give to the service so that it can read env vars? There’s nothing in capability.h that jumps out as being “allow env var reading”?

Post variables disappearing.

I’ve got an ajax call that sends two arrays of data. Portals and Stubs.

The headers look like this:

portals(630)(lat) -36.876755
portals(630)(lng): 174.767649
portals(630)(name): Eden Garden
portals(631)(lat): -36.873148
portals(631)(lng): 174.761531
portals(631)(name): Gordon House - Wesley Dementia Care
stubs(0)(lat): -36.865096
stubs(0)(lng): 174.77066
stubs(1)(lat): -36.872709
stubs(1)(lng): 174.766448
stubs(2)(lat): -36.864204
stubs(2)(lng): 174.770893
stubs(3)(lat): -36.875467
stubs(3)(lng): 174.73618
stubs(4)(lat): -36.861377
stubs(4)(lng): 174.769936

Code (markup):

in my php script I have

$portals = filter_input(INPUT_POST, 'portals', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
$stubs = filter_input(INPUT_POST, 'stubs', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);

Code (php):

$portals always has a list
$stubs sometimes has a list, sometimes it’s NULL.
Even if I have no data, I’ll always send an empty array so it should never be NULL

When I output array_keys($_POST) only shows stubs sometimes which makes me think that it’s not a filter_input problem.

I can’t see anything that would indicate why $stubs is failing.

If I save the post variables to a file it’s 192kb
My hosting settings: post_max_size 8M (Default)
So that shouldn’t be a problem.

Is there a gotcha with $_POST and arrays that I need to know about?

Normally by the time I’ve tried to put down all the relevant info in a query I’ve found the thing I’ve tripped over. Not this time. I don’t normally work with such large amounts of data but it’s really not that much, surely.

EDIT: I’ve found my culprit!

in my PHP settings I have max_input_vars = 1000 which means it’s been dropping off large portions of even the Portals array and explains a weird bug I hadn’t worked my way through to.

So being on shared hosting I can’t just dive into php.ini

I’ve added this to my .htaccess and will keep an eye on it.

<IfModule mod_php7.c>

php_value max_input_vars 5000


Code (markup):


ordinary differential equations – Initial-value problem by separation of variables

Sorry if this is too easy, but I have really been struggling with this. I have been asked to solve the initial-value problem by separation of variables and determine the maximum time interval of existence of the solutions for $$dot{x}=x(2-x)^2,, x(0)=1$$
When integrating, I got $$t=frac{1}{4},logleft( frac{x(t)}{2-x(t)}right)-frac{1}{2(2-x(t))}+frac{1}{2}$$
But I need to get an explicit equation for $x(t)$ and I cannot find a way to get it. Should I make a change of variables? Also, I would say that the maximum interval of existence of the solution is $(-infty,infty)$?

python – Function return is changing my variables

I have a really strange problem in Python. I have a list list_1 of strings, and depending on if a condition is met, this list gets fed into a recursive function with some other arguments. This recursive function func_1 returns a tuple that contains a changed version of the original list_1. I explicitly unpack it as list_2.

But when I try to use list_1 (the unchanged list) in a function AFTER func_1, the list_1 variable has changed to match list_2. My code reads very similar to this:

list_1 = ("A", "B", "C")

if condition:

    #prints this: ("A", "B", "C")

    list_2, list_3, list_4 = func_1(list_1, list_5, list_6)

    #prints this: ("C", "B", "A")

    #prints this: ("C", "B", "A")

Somehow my list_1 is being changed to list_2 without me explicitly telling it to do so, and with no global variables at work. The recursion function does not call the function that list_1 is in ever either. How is this possible?

mysql – Create many user_id variables

I want to create a temporary table for the user result and the user_id variable, but if several users use the database, the table and variable will be recreated. How can I isolate database usage for multiple users?
I heard about connections, but based on the fact that there are only 150 connections by default, I thought they were for other purposes. I also heard about transactions, but I have nothing to roll back, so maybe this tool is not for me.
I also do not want to add different “id” for the variable “user_id” because it is confusing
What should I use?

Short example:

def create connection(user_id):
cursor.execute('SET @user_id = %s' ,(user_id,))
cursor.execute('CREATE TEMPORARY TABLE user_resulte AS (SELECT column FROM results WHERE column = @user_id)')

p.s. I’m a novice in databases 🙂