The ADSTERRA reference program is now AVAILABLE! The | Proxies123.com

EARN ADDITIONAL MONEY WITH THE ADSTERRA REFERENCE PROGRAM!

Take advantage of the commission for life and add 5% to your current earnings joining the Adsterra Referral Program! The more people you refer, the more income you will get. Simple!
Adsterra publishers have a unique "invitation" URL and real-time statistics to track their earnings. Become an Adsterra editor here: https: //
For program details, read here.

Advantages of Adsterra Publisher:
– There are no minimum traffic requirements
– More than 190 countries covered
– 80% revenue share
– 100% fill rate and 100% count
– Wide range of ad formats: banners, popunders, pushups, interstials, etc.
– Up to $ 5 CPM for popunders and up to $ 1.5 CPM for banners
– Adsterra API for static
– 5% reference program
– Net15 payments – always on time
– Payments to Paypal, Payoneer, Webmoney, Wire, Paxum, Payza, BITCOIN
– 24/7 support

Sign up! Adsterra com

A program that detects measurements of objects?

I need to build a program that detects an object and takes its measurements, what can I use to build it? I was thinking about OpenCV, is there a program that already does this job? Can OpenCV take it?

How do I add an image to a Python program using tkinter?

I am trying to add an image to a program with the following code:

from tkinter import * 

root = Tk()

imagem = PhotoImage(file="imagem")

lb = Label(root, imagem=imagem)

lb.place(x = 0, y = 20)

root.mainloop()

The image is saved in the same folder as the program code, but it still does not work.

php: you can't program a bash script with crontab

I'm going crazy because I don't understand what I'm doing wrong.

I wrote this bash script to run a php script with nohup.
Does it look like this:

#!/bin/bash
nohup /usr/bin/php /opt/bitnami/nginx/html/folder/script.php $argv > fileoutput.txt 2>&1 &

When I run in the terminal how ./script.sh works, I can see the process running if grep php and also the updates of my database.

Now I am trying to automate this process with crontab with this instruction:

43 * * * * /bin/sh /opt/bitnami/nginx/html/folder/script.sh

I am currently just changing the minute to test automation, since I will add a $ argv cycle to run when I get this to work.

I have applied chmod 777 to the script.sh and now I really have no idea what else to fix.

Thanks in advance!

What's wrong with this Python program?

Write a Python program as follows:
The program gets as input non-negative numbers one after the next. Each number will be fed on the keypad with after. At the end of the entry there will be -1 that is not part of the entry.
The program checks if there are balanced numbers at the entrance.
If not, then show 0, then go immediately to the beginning of the next line.
If yes, find the maximum balanced number that appears in the entry. Then it shows on the first line the number of times it appears and on the second line its value, then immediately goes to the beginning of the next line.
No empty line space characters are displayed. The entry operation does NOT show any text before the entry is made.
My codes are as follows:

# PART A
def even_digits(n):
    count = 0
    while n > 9:
        n //= 10
        if n % 10 % 2 == 0:
            count += 1
    return count


# PART B
def digits(n):
    count = 1
    while n > 9:
        n //= 10
        count += 1
    return count


# PART C
def odd_digits(n):
    return digits(n) - even_digits(n)


# PART D
def balanced(n):
    return even_digits(n) == odd_digits(n)


# PART E
n = int(input())
count = 0
max_balanced = -1
while n != -1:
    if balanced(n):
        if count == 0:  # first time we have a balanced number
            max_balanced = n
            count = 1
        elif n > max_balanced:
            max_balanced = n
            count = 1
        elif n == max_balanced:
            count += 1
    n = int(input())
print(count)
if count > 0:
    print(max_balanced)

But when I enter:
444333
7878787878
25
7878787878
99989888
-1

The results that this program gave me were:
1
444333

What is different from the expected results:
two
7878787878

I am totally a Python newbie and any response is appreciated.

Has my program made good use of c ++ functions and is there anything in my program that I have done that I should avoid?

//  Created by George Austin Bradley on 19/11/2019.
//  Copyright © 2019 George Austin Bradley. All rights reserved.

Hi. I was wondering if any of you would mind reviewing my program. I am a beginner / aspiring programmer and I am looking for advice on how I could make my program more efficient. For example, have I made good use of subroutines / functions? Am I using the classes correctly? Is there anything I can do to reduce the duration of the program? Any advice from programmers would be greatly appreciated even if it's just a prayer!
Thank you very much,
George bradley

#include 
#include 
#include 
#include 

using namespace std;

class cCar{
private:
    string _sName;
    double _dPrice;
public:
    cCar(string s, double d){
        _sName = s;
        _dPrice = d;
    }
    string getName(){return _sName;}
    double getPrice(){return _dPrice;}
};

vectorCarDatabase(vector&car_list){
    car_list.push_back(cCar("Blue Nissan Skyline",1000));
    car_list.push_back(cCar("Red Mini",3000));
    car_list.push_back(cCar("Black Land Rover",4000));
    car_list.push_back(cCar("Beatle",9000));
    car_list.push_back(cCar("Ferrari",300000));
    return car_list;
}
class Finance{
private:
    string _sUserName;
    double _dCostOfCar;
    string _sChosenCar;
    int _iFinancePlan;
    double _dDepositedAmount;
    double _dMonthlyPayments;
    double _dTotalLeftToPay;

public:
    Finance(string sName, double dCostOfCar, string sChosenCar, int iFinancePlan, double dDepositedAmount, double dDMonthlyPayments, double dTotalLeftToPay){
        _sUserName = sName;
        _dCostOfCar = dCostOfCar;
        _sChosenCar = sChosenCar;
        _iFinancePlan = iFinancePlan;
        _dDepositedAmount = dDepositedAmount;
        _dMonthlyPayments = dDMonthlyPayments;
        _dTotalLeftToPay = dTotalLeftToPay;
    }
    string getUserName(){return _sUserName;}
    double getdCostOfCar(){return _dCostOfCar;}
    string getChosenCar(){return _sChosenCar;}
    int getFinancePlan(){return _iFinancePlan;}
    double getDepositAmount(){return _dDepositedAmount;}
    double getMonthlyAmount(){return _dMonthlyPayments;}
    double getTotalLeftToPay(){return _dTotalLeftToPay;}
};
//START OF PROTOTYPE
void ViewPurchases(vector&buyers, char &cOption, bool &bExit);
//END OF PROTOTYPE
//1. This displays the car menu items.
void display_menu(vector&car_list)
{
    cout << "nMENU";
    for (int iCount = 0; iCount != car_list.size(); iCount++)
    {
        cout << "n" << iCount + 1 << ". " << car_list(iCount).getName();
        cout << "ntPrice: £" << car_list(iCount).getPrice();
        cout << "n";
    }
}

//This procedure proccesses the user's selection and all information regarding price and name of car are then transferred to transaction variables.
void selectedCar(vector&car_list, string &sNameOfChosenCar, double &dCostOfChosenCar)
{

    int iSelectionFromMenu = -1;

    do{
        cout << "nChoose a car that you'd wish to buy from the menu (1 - " << car_list.size() << "): ";
        cin >> iSelectionFromMenu;
        if(iSelectionFromMenu > 0 && iSelectionFromMenu <= car_list.size())
        {
            sNameOfChosenCar = car_list(iSelectionFromMenu - 1).getName();
            dCostOfChosenCar = car_list(iSelectionFromMenu - 1).getPrice();

        }
        else
        {
            cout << "nPlease enter valid number!";
            iSelectionFromMenu = -1;
        }
    }while(iSelectionFromMenu == -1);
}
//This procedure gets from the user their preferred finance plan through their input.
void FinanceLength(int &iFinanceLength)
{
    do{
        cout << "nHow long do you wish for your finance plan to last? (1 - 4 years): ";
        cin >> iFinanceLength;
        if (iFinanceLength < 0 || iFinanceLength > 4)
        {
            cout << "nOops, try again! Please enter between 1 - 4!";
        }
    }while(iFinanceLength < 0 || iFinanceLength > 4);
}

//This procedure gets the user's deposit.
void DepositMoney(double &dDepositAmount)
{
    do{
        cout << "nEnter deposit amount (minimum £500 accepted): £";
        cin >> dDepositAmount;
        if (dDepositAmount < 500)
        {
            cout << "nTry again! Deposit an amount greater than or equal to £500.";
        }
    }while(dDepositAmount < 500);
}

//This function calculates the amount of money the user has to pay after deposit, added tax and charge percentage of 10%
double TotalLeftToPay(double iFinanceLength, double dDepositAmount, double dCostOfChosenCar)
{
    double dChargePercentage = 0.10;
    double dTotalLeftToPay = dCostOfChosenCar + (dCostOfChosenCar * dChargePercentage) - dDepositAmount + 135;
    return dTotalLeftToPay;
}

//This calculates monthly payments.
double MonthlyPayments(double dTotalLeftToPay, int iFinanceLength)
{
    double dMonthlyPayments = (dTotalLeftToPay / iFinanceLength) / 12;
    return dMonthlyPayments;
}

void EndOfProgramOptions(vector&buyers, char &cOption, bool &bExit)
{
    char cInputSelection = 0;
    do{
        cout << "View your purchases (y/n): ";
        cin >> cInputSelection;
        cInputSelection = toupper(cInputSelection);
        if (cInputSelection == 'Y')
        {
            ViewPurchases(buyers, cOption, bExit);
        }
    }while(cInputSelection != 'Y' && cInputSelection != 'N');


}
//This asks the user whether they'd like to restart the application.
void RestartOptions(char &cOption, bool &bExit, vector&buyers)
{
    do{
        cout << "nDo you wish to make another purchase? (y/n): ";
        cin >> cOption;
        cOption = toupper(cOption);
        switch(cOption)
        {
            case 'Y':
                bExit = false;
                break;
            case 'N':
                EndOfProgramOptions(buyers, cOption, bExit);
                bExit = true;
                break;
            default:
                cout << "Sorry, that's an invalid input, please try again!";
                continue;
        }
    }while(cOption != 'Y' && cOption != 'N');
}

//This string function returns either year or years (plural)
string  YearOrYears(int iFinanceLength)
{
    return (iFinanceLength > 1)? "years" : "year";
}

//This displays receipt of the user's transaction.
void Receipt(const string &sUserName, const int &iFinanceLength, const double &dDepositAmount, char cOption, bool &bExit, const string &sNameOfChosenCar, const double &dCostOfChosenCar, vector&buyers)
{
   double dTotalLeftToPay = TotalLeftToPay(iFinanceLength, dDepositAmount, dCostOfChosenCar);
   double dMonthlyPayments = MonthlyPayments(dTotalLeftToPay, iFinanceLength);
     buyers.push_back(Finance(sUserName,dCostOfChosenCar,sNameOfChosenCar,iFinanceLength,dDepositAmount, dMonthlyPayments,dTotalLeftToPay));

        cout << "nReceipt for: " << sUserName << ". ";
        cout << "nYou have chosen " << sNameOfChosenCar << ".";
        cout << "nYour finance plan timescale is " << iFinanceLength << " " << YearOrYears(iFinanceLength) << ".";
        cout << "nYou've deposited £" << dDepositAmount << ".";
        cout << "nTotal left to pay: £" << dTotalLeftToPay;
        cout << "nMonthly Payments: £" << dMonthlyPayments;
        cout << "n";
  RestartOptions(cOption, bExit, buyers);
}
//This displays receipt of the user's transaction.
void ViewPurchases(vector&buyers, char &cOption, bool &bExit)
{
    for (int iCount = 0; iCount != buyers.size(); iCount++)
    {
        cout << "nPurchase " << iCount + 1 << " by " << buyers(iCount).getUserName() << ". ";
        cout << "nYou have chosen " << buyers(iCount).getChosenCar() << ".";
        cout << "nYour finance plan timescale is " << buyers(iCount).getFinancePlan() << " " << YearOrYears(buyers(iCount).getFinancePlan()) << ".";
        cout << "nYou've deposited £" << buyers(iCount).getDepositAmount() << ".";
        cout << "nTotal left to pay: £" << buyers(iCount).getTotalLeftToPay() << ".";
        cout << "nMonthly Payments: £" << buyers(iCount).getMonthlyAmount() << ".";
        cout << "n";
    }
    RestartOptions(cOption, bExit,buyers);
}
//This asks the user whether they're happy with the options of they've chosen.
void AcceptDeclineOptions(string &sUserName, int &iFinanceLength, double &dDepositAmount, bool &bExit, string &sNameOfChosenCar, double &dCostOfChosenCar, vector&buyers)
{
    char cOption = 0;
    do
    {
        cout << "nConfirm finance plan (y/n): ";
        cin >> cOption;
        cOption = toupper(cOption);

        if (cOption == 'Y')
        {
            Receipt(sUserName, iFinanceLength, dDepositAmount, cOption, bExit, sNameOfChosenCar, dCostOfChosenCar, buyers);
        }
        else if (cOption == 'N')
        {
            RestartOptions(cOption, bExit, buyers);
        }
        else
        {
            cout << "nSorry, that's not a valid command.";
        }
    }while(cOption != 'Y' && cOption != 'N');
}

int main()
{

    bool bExit = false;
    int iFinanceLength = 0;
    double dDepositAmount = 0;
    string sNameOfChosenCar = "";
    double dCostOfChosenCar = 0;
    vectorcar_list;
    CarDatabase(car_list);
    vectorcar_purchases;
    vectorbuyers;
    cout << "Welcome!";
    string sUserName = "";
    cout << "nEnter your name: ";
    cin >> sUserName;
    do{
        display_menu(car_list);
        selectedCar(car_list, sNameOfChosenCar, dCostOfChosenCar);
        FinanceLength(iFinanceLength);
        DepositMoney(dDepositAmount);
        AcceptDeclineOptions(sUserName, iFinanceLength,dDepositAmount,bExit, sNameOfChosenCar, dCostOfChosenCar, buyers);
    }while(bExit == false);

}

c – Write a program that loads integer variables that have 0 or 1 values ​​and then say if the expression is true or false

I just started programming and I have the following task: write a program that loads integer variables that have 0 or 1 values ​​and then say if it's not ayesc + a * no bc + ayesno c + ab * c is true or false. I wrote this:

int a, b, c;

printf ("a: n");

scanf ("%d", &a);

printf ("b: n");

scanf ("%d", &b);

printf ("c: n");

scanf ("%d", &c);

if ((a==1 || a==0) && (b==1 || b==0) && (c==0 || c==1))

printf ("%d &&(%d||%d) || %d&&%d=%dn", a, b, c, b &&(a||c) || a&&c );

else

printf ("Numbers are not correct!n");

I simplified the expression from the beginning and obtained: b (a + c) + a * c. The program I wrote does not work correctly. Can someone help me? I use C.

c – a program that loads integer variables that have 0 or 1 values

I just started programming and I have the following task: write a program that loads integer variables that have 0 or 1 values ​​and then say if it's not ayesc + a * no bc + ayesno c + ab * c is true or false. I wrote this:

int main (null) {

int a, b, c, d;

printf ("a: n");

scanf ("% d", & a);

printf ("b: n");

scanf ("% d", & b);

printf ("c: n");

scanf ("% d", & c);

if ((a == 1 || a == 0) && (b == 1 || b == 0) && (c == 0 || c == 1))

printf ("% d && (% d ||% d) ||% d &&% d =% d n", a, b, c, b && (a || c) || ​​a && c) ;

plus

printf ("The numbers are not correct! n");

returns 0;
}

I simplified the expression from the beginning and obtained: b (a + c) + a * c. The program I wrote does not work correctly. Can someone help me? I use C.

Doubt in java How to make my program run only for 10 minutes?

HOW TO MAKE MY PROGRAM ONLY WORK FOR 10 MINUTES:

Good afternoon, they let me do a project in java and I already have everything I just need one thing, and I have to make the program only work for 10 minutes and then close, I thought I would use a thread but I would prefer someone else to advise me on how to achieve this

How to create a shell script that waits until a program finishes and after finishing does another process

In the shell script, how to create the script you expect and verify that a particular program runs and then when the running program is dead or dead, then perform another process