Snippets Collections
Public class NW_ApproveBlacklistSupplierRequestUIBuilder    extends SysOperationAutomaticUIBuilder
{
    NW_ApproveBlacklistSupplierRequestContract      Contract;
    DialogField                                         DepartmentName,PersonnelNumber,FromDate,ToDate,RequestId;

    public void build()
    {
        Contract = this.dataContractObject();
        FromDate                = this.addDialogField(methodStr(NW_ApproveBlacklistSupplierRequestContract,parmFromDate),contract);
        ToDate                     = this.addDialogField(methodStr(NW_ApproveBlacklistSupplierRequestContract,parmToDate),contract);
        DepartmentName = this.addDialogField(methodStr(NW_ApproveBlacklistSupplierRequestContract,parmDepartmentName),contract);
        PersonnelNumber = this.addDialogField(methodStr(NW_ApproveBlacklistSupplierRequestContract,parmPersonnelnumber),contract);
        RequestId                = this.addDialogField(methodStr(NW_ApproveBlacklistSupplierRequestContract,parmRequestId),contract);



    }

    public void postbuild()
    {
        super();
        Contract = this.dataContractObject();
        DepartmentName =  this.bindInfo().getDialogField(Contract,methodStr(NW_ApproveBlacklistSupplierRequestContract,parmDepartmentName));
        DepartmentName.registerOverrideMethod(methodStr(FormStringControl,lookup),methodStr(NW_ApproveBlacklistSupplierRequestUIBuilder, DepartmentLookup),this);
       
        FromDate =  this.bindInfo().getDialogField(Contract,methodStr(NW_ApproveBlacklistSupplierRequestContract,parmFromDate));
        ToDate      =  this.bindInfo().getDialogField(Contract,methodStr(NW_ApproveBlacklistSupplierRequestContract,parmToDate));

        personnelnumber =  this.bindInfo().getDialogField(Contract,methodStr(NW_ApproveBlacklistSupplierRequestContract,parmPersonnelnumber));
        personnelnumber.registerOverrideMethod(methodStr(FormStringControl,lookup),methodStr(NW_ApproveBlacklistSupplierRequestUIBuilder, PersonnelnumberLookup),this);
        
        RequestId =  this.bindInfo().getDialogField(Contract,methodStr(NW_ApproveBlacklistSupplierRequestContract,parmRequestId));


    }

    private void DepartmentLookup( FormStringControl _control)
    {
        Query                   query = new Query();
        QueryBuildDataSource    qbd, qbdPerson;
        QueryBuildDataSource qbds;
        QueryBuildDataSource qbdsJoin;
        SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(OMOperatingUnit), _control);
        qbds= query.addDataSource(tableNum(OMOperatingUnit));
        sysTableLookup.parmQuery(query);
        sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit, OMOperatingUnitNumber), false);
        sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit, Name), true);
        sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit, OMOperatingUnitType), false);

        qbds.addRange(fieldNum(OMOperatingUnit, OMOperatingUnitType)).value(enum2Str(OMOperatingUnitType::OMDepartment));

        sysTableLookup.parmQuery(query);
        sysTableLookup.parmUseLookupValue(False);
        sysTableLookup.performFormLookup();


    }

    private Void PersonnelnumberLookup(FormStringControl _control)
    {
        Query                   query = new Query();
        QueryBuildDataSource    qbd, qbdPerson;
        QueryBuildDataSource qbds;
        QueryBuildDataSource qbdsJoin;
        SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(HcmWorker), _control);
        qbds= query.addDataSource(tableNum(HcmWorker));
        sysTableLookup.parmQuery(query);
        sysTableLookup.addLookupfield(fieldNum(HcmWorker, PersonnelNumber), true);
        sysTableLookup.addLookupMethod(tablemethodStr(HcmWorker, Name), true);

        sysTableLookup.parmQuery(query);
        sysTableLookup.parmUseLookupValue(False);
        sysTableLookup.performFormLookup();
    }

}
class NumberSeqModuleNetwaysProcurementEnhancement extends NumberSeqApplicationModule
{
    protected void loadModule()
    {
        NumberSeqDatatype datatype = NumberSeqDatatype::construct();

        // <NAP>
        /* Setup Procurement configuration code numbers */
        datatype.parmReferenceLabel("Invoice PO Request ID");
        datatype.parmDatatypeId(extendedTypeNum(NW_InvoicePORequestID));
        datatype.parmReferenceHelp(literalStr("Unique key for invoice PO request")); // Use Labels here
        datatype.parmWizardIsContinuous(true);
        datatype.parmWizardIsManual(NoYes::No);
        datatype.parmWizardIsChangeDownAllowed(NoYes::No);
        datatype.parmWizardIsChangeUpAllowed(NoYes::No);
        datatype.parmWizardHighest(999999);
        datatype.parmSortField(21);
        datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);
        this.create(datatype);
    }
  public NumberSeqModule numberSeqModule()
    {
        return NumberSeqModule::Purch;
    }

    /// <summary>
    ///    Appends the current class to the map that links modules to number sequence data type generators.
    /// </summary>
    [SubscribesTo(classstr(NumberSeqGlobal),delegatestr(NumberSeqGlobal,buildModulesMapDelegate))]
    static void buildModulesMapSubsciber(Map numberSeqModuleNamesMap)
    {
        NumberSeqGlobal::addModuleToMap(classnum(NumberSeqModuleNetwaysProcurementEnhancement), numberSeqModuleNamesMap);
    }
}
[ExtensionOf(tablestr(HcmWorker))]
final class HcmWorkerTableNetwaysProcrementEnahancement_Extension
{
    public static  HcmPositionRecId getPrimaryPosition(HcmWorker _hcmWorker, utcdatetime _asOfDate = DateTimeUtil::utcNow())
    {
        HcmPositionRecId                    positionRecId = 0;
        HcmPositionWorkerAssignment         hcmPositionWorkerAssignment;
        HcmPositionWorkerAssignmentRecId    hcmPositionWorkerAssignmentRecId;
        HcmWorkerRecId _workerRecId;

        _workerRecId=_hcmWorker.RecId;

        hcmPositionWorkerAssignmentRecId = HcmWorker::getPrimaryPositionAssignment(_hcmWorker);

        hcmPositionWorkerAssignment = HcmPositionWorkerAssignment::find(hcmPositionWorkerAssignmentRecId);

        if (hcmPositionWorkerAssignment)
        {
            positionRecId = hcmPositionWorkerAssignment.Position;
        }
        return positionRecId;
    }

    public static  HcmPositionWorkerAssignmentRecId getPrimaryPositionAssignment(HcmWorker _hcmWorker,utcdatetime _asOfDate = DateTimeUtil::utcNow())

    {
        HcmPositionRecId                    positionRecId = 0;
        HcmPositionWorkerAssignmentRecId    positionWorkerAssignmentRecId = 0;
        HcmPositionWorkerAssignment         hcmPositionWorkerAssignment;
        HcmPositionDuration                 hcmPositionDuration;
        boolean                             isValidPosition = true;
        HcmWorkerPrimaryPosition            hcmWorkerPrimaryPosition;
        HcmWorkerRecId _workerRecId;

        _workerRecId=_hcmWorker.RecId;   

        // check whether the worker has a primary position assignment

        select firstonly ValidTimeState(_asOfDate) PositionAssignment from hcmWorkerPrimaryPosition

            where hcmWorkerPrimaryPosition.Worker == _workerRecId

        exists join hcmPositionWorkerAssignment

            where hcmPositionWorkerAssignment.Worker == hcmWorkerPrimaryPosition.Worker

                    && hcmPositionWorkerAssignment.RecId == hcmWorkerPrimaryPosition.PositionAssignment

        exists join hcmPositionDuration where hcmPositionDuration.Position == hcmPositionWorkerAssignment.Position;

        positionWorkerAssignmentRecId = hcmWorkerPrimaryPosition.PositionAssignment;

        if (positionWorkerAssignmentRecId == 0)
        {
            // no valid primary position existed for the worker, so retrieve the position

            // assignment for the worker in which the worker has the longest active seniority

            select ValidTimeState(_asOfDate) Position, RecId from hcmPositionWorkerAssignment

            order by ValidFrom asc

                where hcmPositionWorkerAssignment.Worker == _workerRecId

            exists join hcmPositionDuration

                where hcmPositionDuration.Position == hcmPositionWorkerAssignment.Position;

            positionWorkerAssignmentRecId = hcmPositionWorkerAssignment.RecId;

        }
        return positionWorkerAssignmentRecId;
    }

     public static  OMDepartmentRecId getPrimaryDepartmentRecId(HcmWorker _hcmWorker,utcdatetime _asOfDate = DateTimeUtil::utcNow())
    {
        HcmPositionRecId            positionRecId;
        HcmPositionDetail           positionDetail;
        HcmWorkerRecId _workerRecId;

        _workerRecId=_hcmWorker.RecId;

        // Determine the primary position of the worker.

        positionRecId = HcmWorker::getPrimaryPosition(_hcmWorker);

        if (positionRecId)
        {
           // Retrieve the corresponding position.
            positionDetail = HcmPositionDetail::findByPosition(positionRecId, _asOfDate);
        }
        return positionDetail.Department;
    }

}
public static Str getReportBase64Str(RecId _RecId)
    {
        SrsReportRunController   controller = new SrsReportRunController();
        NW_GeneralContract contract = new NW_GeneralContract();
        SRSPrintDestinationSettings     settings;
        System.Byte[]                   reportBytes = new System.Byte[0]();
        SRSProxy                        srsProxy;
        SRSReportRunService             srsReportRunService = new SrsReportRunService();
        Microsoft.Dynamics.AX.Framework.Reporting.Shared.ReportingService.ParameterValue[]   parameterValueArray;
        Map  reportParametersMap;
        SRSReportExecutionInfo       executionInfo = new SRSReportExecutionInfo();
        PurchTable  Table;
        System.IO.Stream stream;
        str Base64Str;
        changecompany("SHC")
        {
            select firstonly Table where Table.RecId == _RecId;

            if(Table)
            {
                Filename filename = strfmt("%1.pdf",Table.PurchId);
                str reportnameLocal = ssrsReportStr(NW_PurchaseOrderReport, PrecisionDesign1);
                if(!reportnameLocal)
                {
                    error("The request Type not Exist in thee request please select it "  );
                }
                controller.parmReportName(reportnameLocal);

                controller.parmShowDialog(false);
                contract.parmRecordId(Table.RecId);
                controller.parmReportContract().parmRdpContract(contract);
                settings = controller.parmReportContract().parmPrintSettings();
                settings.printMediumType(SRSPrintMediumType::File);
                settings.fileFormat(SRSReportFileFormat::PDF);
                settings.overwriteFile(true);
                settings.fileName(filename);
                controller.parmReportContract().parmReportServerConfig(SRSConfiguration::getDefaultServerConfiguration());
                controller.parmReportContract().parmReportExecutionInfo(executionInfo);
                srsReportRunService.getReportDataContract(controller.parmreportcontract().parmReportName());
                srsReportRunService.preRunReport(controller.parmreportcontract());
                reportParametersMap =  srsReportRunService.createParamMapFromContract(controller.parmReportContract());
                parameterValueArray = SrsReportRunUtil::getParameterValueArray(reportParametersMap);

                srsProxy = SRSProxy::constructWithConfiguration(controller.parmReportContract().parmReportServerConfig());
                // Actual rendering to byte array
                reportBytes = srsproxy.renderReportToByteArray(controller.parmreportcontract().parmreportpath(),
                parameterValueArray,
                settings.fileFormat(),
                settings.deviceinfo());
                if (reportBytes)
                {
                    stream = new System.IO.MemoryStream(reportBytes);
                    //Save the file
                    //var fileStream = new System.IO.FileStream(filename, System.IO.FileMode::Create, System.IO.FileAccess::ReadWrite);
                    //stream.CopyTo(fileStream);
                    Base64Str=  System.Convert::ToBase64String(reportBytes);
                }
            }
            // end if
        }
        // end change company
        return Base64Str;
    }
class A extends Thread
{
    public void run()
    {
        String n=Thread.currentThread().getName();
        try
        {
            for(int i=1;i<+5;i++)
            {
                System.out.println(n);
                Thread.sleep(2000);
            }
        }
        catch(Exception a)
            {
                
            }
}
}

class F
{
    public static void main(String[] args)
    {
        A r= new A();
        A t= new A();
        A y= new A();

        r.setName("Thread 1");
        t.setName("Thread 9");
        y.setName("Thread 10");

        r.start();
        t.start();
        y.start();
    }
}
class A extends Thread
{
    public void run()
    {
        String n= Thread.currentThread().getName();
        for(int i=1;i<=3;i++)
        {
            System.out.println(n);
        }
    }
}
class F
{
    public static void main(String[] args)
    {
        A r= new A();
        A t= new A();
        A y= new A();

        r.setName("Thread 1");
        t.setName("Thread 2");
        y.setName("Thread 3");

        r.start();
        t.start();
        y.start();
    }
}
public void takeAction(Description _action)
    {
        WorkflowWorkItemTable workflowWorkItemTable;
        WorkflowWorkItemActionType actionType;
        WorkflowUser workflowUser;
        str menuItemName;
        System.Exception exception;
        #define.Approve("Approve")
        #define.Reject("Reject")
        #define.WFDelegate("Delegate")
        #define.RequestChange("RequestChange")
        #OCCRetryCount
        UserId _fromuser = curUserId();
        UserId _toUser = NW_COODCOApprovalRequest.DelegateUser;
        str _comment = "";
        try
        {
            select firstonly workflowWorkItemTable
            order by RecId desc
            where workflowWorkItemTable.RefTableId  == tableNum(PurchTable)
                && workflowWorkItemTable.RefRecId   == purchTable.recid
                && workflowWorkItemTable.Status     == WorkFlowWorkItemStatus::Pending
                && workflowWorkItemTable.Type       == WorkflowWorkItemType::WorkItem;
 
            switch (_action)
            {
                case #Approve :
                    actionType      = WorkflowWorkItemActionType::Complete;
                    workflowUser    = _fromuser;
                    menuItemName    = menuItemActionStr(PurchTableApprovalApprove);
                    break;
                case #Reject :
                    actionType      = WorkflowWorkItemActionType::Return;
                    workflowUser    = _fromuser;
                    menuItemName    = menuItemActionStr(PurchTableApprovalReject);
                    break;
                case #WFDelegate :
                    actionType      = WorkflowWorkItemActionType::Delegate;
                    workflowUser    = _toUser;
                    menuItemName    = menuItemActionStr(PurchTableApprovalDelegate);
                    ttsbegin;
                    NW_COODCOApprovalRequest.DelegatePO = NoYes::No;
                    NW_COODCOApprovalRequest.DelegateUser = "";
                    NW_COODCOApprovalRequest.doUpdate();
                    ttscommit;
                    break;
                case #RequestChange :
                    actionType      = WorkflowWorkItemActionType::RequestChange;
                    workflowUser    = _fromuser;
                    menuItemName    = menuItemActionStr(PurchTableApprovalRequestChange);
                    ttsbegin;
                    NW_COODCOApprovalRequest.doDelete();
                    ttscommit;
                    break;
            }
            if (workflowWorkItemTable)
            {
                WorkflowWorkItemActionManager::dispatchWorkItemAction(workflowWorkItemTable
                                                                    , _comment
                                                                    , workflowUser
                                                                    , actionType
                                                                    , menuItemName);
            }
        }
        catch (Exception::Deadlock)
        {
            retry;
        }
        catch (Exception::UpdateConflict)
        {
            if(appl.ttsLevel() == 0)
            {
                if(xSession::currentRetryCount() >= #RetryNum)
                {
                    throw exception::UpdateConflictNotRecovered;
                }
                else
                {
                    retry;
                }
            }
            else
            {
                throw exception::UpdateConflict;
            }
        }
        catch (Exception::Error)
        {
            throw error("Error occurred.");
        }
      	// to refresh the page list
        FormDataSource  ds  = FormDataUtil::getFormDataSource(element.args().record());
        ds.executeQuery();
        element.close();
    }
# Use a lightweight base image with Go
FROM golang:1.21-alpine as builder

# Set the working directory inside the container
WORKDIR /app

# Assuming the project root is two levels up
# Copy go mod and sum files
COPY ../../go.mod ../../go.sum ./

# Download all dependencies
RUN go mod download

# Copy the source from the project root to the working directory inside the container
COPY ../.. .

# Copy the .env file
COPY ../../.env ./

# Build the Go app
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gradely-main .

# Start a new stage for the final image
FROM alpine:latest

WORKDIR /root/

# Copy the pre-built binary file from the previous stage
COPY --from=builder /app/gradely-main .

# Copy the .env file from the builder stage
COPY --from=builder /app/.env .

# Command to run the executable
CMD ["./gradely-main"]
    int n;
    cin >> n;
    string s;
    cin >> s;
    for (char c = 'A'; c <= 'Z'; c++) {
        int first = n;
        int last = -1;
        for (int i = 0; i < n; i++) {
            if (s[i] == c) {
                first = min(first, i);
                last = max(last, i);
            }
        }
        for (int i = first; i <= last; i++) {
            if (s[i] != c) {
                cout << "NO\n";
                return;
            }
        }
    }
    cout << "YES\n";
Microsoft.AspNetCore.Identity.EntityFrameworkCore  6.0.23
Microsoft.AspNetCore.Identity.UI  6.0.23
Microsoft.EntityFrameworkCore 7.0.9
Microsoft.EntityFrameworkCore.Sqlite 7.0.9
Microsoft.EntityFrameworkCore.SqlServer 7.0.9
Microsoft.EntityFrameworkCore.Tools 7.0.9
Microsoft.VisualStudio.Web.CodeGeneration.Design 6.0.16
create database Practice;
use Practice ;

create table Customers(
	id int not null,
    NAME varchar(20) NOT NULL,
    aGE INT NOT NULL,
    Address varchar(20),
    Salary decimal(10,2),
    primary key (ID)
);

insert into Customers values(1,'Abi',32,'Banglore',50000.00);
insert into Customers values(2,'Bharath',22,'UP',60000.00);
insert into Customers values(3,'Charan',42,'Andra',70000.00);
insert into Customers values(4,'Deepa',52,'Kolkatha',20000.00);
insert into Customers values(5,'Esha',27,'Maharastra',30000.00);
insert into Customers values(6,'Ganesh',72,'Delhi',35000.00);
insert into Customers values(7,'Inchara',22,'Banglore',54000.00);
insert into Customers values(8,'Jaya',31,'UP',60000.00);
insert into Customers values(9,'Harish',35,'Andra',55000.00);

insert into Customers values(10,'Thanesh',35,'Andra',66000.00);
select * from Customers;

DELIMITER //
create procedure getAllCustomers()
begin
select * from Customers;
end //
DELIMITER ;

call getAllCustomers();

DELIMITER //
create procedure orderedSalary()
begin 
select * from Customers order by salary ;
end //
DELIMITER ;




DELIMITER //
create procedure greaterthensalary()
begin 
select * from Customers where salary > 55000 ;
end //
DELIMITER ;


DELIMITER //
create procedure  greaterthensalarydynimic(IN mysalary int)
begin 
select * from Customers where Salary >  mysalary;
End //
DELIMITER 

DELIMITER //
create procedure getCount1(OUT totalcount int)
begin
Select count(age)  into totalcount from  Customers where age > 40;
END //
DELIMITER 

call getCount1(@totalcount); // 3

select @totalcount;






call getAllCustomers();
call orderedSalary();
call greaterthensalary();
call greaterthensalarydynimic(61000);
call getCount1(@totalcount);
create database Practice;
use Practice ;

create table Customers(
	id int not null,
    NAME varchar(20) NOT NULL,
    aGE INT NOT NULL,
    Address varchar(20),
    Salary decimal(10,2),
    primary key (ID)
);

insert into Customers values(1,'Abi',32,'Banglore',50000.00);
insert into Customers values(2,'Bharath',22,'UP',60000.00);
insert into Customers values(3,'Charan',42,'Andra',70000.00);
insert into Customers values(4,'Deepa',52,'Kolkatha',20000.00);
insert into Customers values(5,'Esha',27,'Maharastra',30000.00);
insert into Customers values(6,'Ganesh',72,'Delhi',35000.00);
insert into Customers values(7,'Inchara',22,'Banglore',54000.00);
insert into Customers values(8,'Jaya',31,'UP',60000.00);
insert into Customers values(9,'Harish',35,'Andra',55000.00);

insert into Customers values(10,'Thanesh',35,'Andra',66000.00);
select * from Customers;

DELIMITER //
create procedure getAllCustomers()
begin
select * from Customers;
end //
DELIMITER ;

call getAllCustomers();

DELIMITER //
create procedure orderedSalary()
begin 
select * from Customers order by salary ;
end //
DELIMITER ;




DELIMITER //
create procedure greaterthensalary()
begin 
select * from Customers where salary > 55000 ;
end //
DELIMITER ;


DELIMITER //
create procedure  greaterthensalarydynimic(IN mysalary int)
begin 
select * from Customers where Salary >  mysalary;
End //
DELIMITER 

DELIMITER //
create procedure getCount1(OUT totalcount int)
begin
Select count(age)  into totalcount from  Customers where age > 40;
END //
DELIMITER 

call getCount1(@totalcount); // 3

select @totalcount;






call getAllCustomers();
call orderedSalary();
call greaterthensalary();
call greaterthensalarydynimic(61000);
call getCount1(@totalcount);
package com.verify724.blue_check;

import static android.app.PendingIntent.getActivity;

import android.os.Bundle;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;

import com.etebarian.meowbottomnavigation.MeowBottomNavigation;


public class main_page extends AppCompatActivity {

    MeowBottomNavigation bottomNavigation;


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_page);

        bottomNavigation = findViewById(R.id.bottomNav);

        bottomNavigation.add(new MeowBottomNavigation.Model(1,R.drawable.ic_home));

        bottomNavigation.add(new MeowBottomNavigation.Model(2,R.drawable.ic_home));
        bottomNavigation.add(new MeowBottomNavigation.Model(3,R.drawable.ic_home));


        final Fragment[] fragment = {null,null};
        //bottomNavigation.setCount(3,"5");

        bottomNavigation.setOnShowListener(new MeowBottomNavigation.ShowListener() {
            @Override
            public void onShowItem(MeowBottomNavigation.Model item) {

                if (item.getId() == 2){
                    fragment[0] = new HomeFragment();
                }

                loadFragment(fragment[0]);
            }
        });

        bottomNavigation.show(2,true);

        bottomNavigation.setOnClickMenuListener(new MeowBottomNavigation.ClickListener() {
            @Override
            public void onClickItem(MeowBottomNavigation.Model item) {
                //Toast.makeText(getApplicationContext(),"you "+item.getId(),Toast.LENGTH_SHORT);
                //Fragment fragment = null;
                if (item.getId() == 1){
                    fragment[1] = new btn_menu_it2();
                }
                removeFragment(fragment[0]);
                loadFragment(fragment[1]);
            }
        });
        bottomNavigation.setOnReselectListener(new MeowBottomNavigation.ReselectListener() {
            @Override
            public void onReselectItem(MeowBottomNavigation.Model item) {
                //Toast.makeText(getApplicationContext(),"you resel "+item.getId(),Toast.LENGTH_SHORT);
                if (item.getId() == 1){
                    fragment[1] = new btn_menu_it2();
                }
                removeFragment(fragment[0]);
                loadFragment(fragment[1]);
            }
        });


    }

    private void loadFragment(Fragment fragment) {
        getSupportFragmentManager().beginTransaction().replace(R.id.nav_host_fragment_container,fragment,null).commit();
    }

    public void removeFragment(Fragment fragment){
        FragmentManager fragmentManager = getSupportFragmentManager();
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();

        fragmentTransaction.remove(fragment);
        fragmentTransaction.commit();
    }

}
<script>
	
setTimeout(getElements, 1000); //Αναμονή 1 δευτερόλεπτο να γίνουν fetch τα products
function getElements(){
	let ariaDesc = document.getElementsByClassName("product_type_variable"); //Επιλογή όλων των elements που έχουν πολλαπλές επιλογές
	let ariaLength = ariaDesc.length;
	
for (let i = 0; i < ariaLength; i++){ //Εντολές για κάθε αντικείμενο που είναι variable
	let par = document.createElement("p"); //Δημιουργία παραγράφου
	par.setAttribute("id",`desc${i}`); //Set το ID σε desc0,desc1...
	par.innerHTML = "Πολλαπλές επιλογές"; //Συμπλήρωση κειμένου
	par.style = "display:none"; //Απόκρυψη της παραγράφου
	ariaDesc[0].appendChild(par); //Προσθήκη της κάτω από κάθε element
	ariaDesc[0].setAttribute('aria-describedby', `desc${i}`) //Προσθήκη του describedby
}
}
</script>
jQuery(document).ready(function() {
  jQuery('.display-slider').slick({
    infinite: true,
    loop:true,
    dots: true,
    slidesToShow: 3,
    slidesToScroll: 1,
    autoplay: false,
    autoplaySpeed: 2000,
    leftMode: true,
      arrows: false,
    });
     var numberOfDotsToShow = 2;
  jQuery('.display-slider .slick-dots li').slice(numberOfDotsToShow).hide();
});
class P implements Runnable
{
    public void run()
    {
        for(int i=1;i<=5;i++)
        {
            System.out.println("child");
        }
    }
}
class D
{
    public static void main(String[] args )
    {
        P r= new P();

        Thread t=new Thread(r);
        t.start();

        for(int i=1;i<=5;i++)
        {
            System.out.println("main");
        }
    }
}
class P extends Thread {
    @Override
    public void run() {
        try {
            for (int i = 1; i <= 5; i++) {
                System.out.println("akhil");
                Thread.sleep(1000);
            }
        } catch (InterruptedException e) {
            // Exception handling code (empty in this case)
        }
    }
}

class D {
    public static void main(String[] args) throws InterruptedException {
        P r = new P();
        r.start();  // Starts the thread

        for (int i = 1; i <= 5; i++) {
            System.out.println("tanishq");
            Thread.sleep(1000);
        }
    }
}
class P extends Thread
{
    public void run()
    {
        for(int i=1;i<=5;i++)
        {
            System.out.println("akhil");
        }
    }
}
class D
{
    public static void main(String[] args)
    {
        P r=new P();
        r.start();

        for(int i=1;i<=5;i++)
        {
            System.out.println("tanishq");
        }

    }
}
>>> import os
>>> dir_fd = os.open('somedir', os.O_RDONLY)
>>> def opener(path, flags):
...     return os.open(path, flags, dir_fd=dir_fd)
...
>>> with open('spamspam.txt', 'w', opener=opener) as f:
...     print('This will be written to somedir/spamspam.txt', file=f)
...
>>> os.close(dir_fd)  # don't leak a file descriptor
import java.io.*;
import java.util.Scanner;

class D
{
    public static void main(String[] args) throws Exception{
        try
        {
            File f= new File("C:\\Users\\HP\\Desktop\\poco");
            Scanner sc= new Scanner(f);
            while(sc.hasNextLine())
            {
                System.out.println(sc.hasNextLine());
                System.out.println(sc.nextLine());
                System.out.println(sc.hasNextLine());
            }
        }
        catch(Exception e)
        {
            System.out.println("handled");
        }
        
}
}
public function index(Travel $travel, ToursListRequest $request)
    {
        $tours = $travel->tours()
            ->when($request->priceFrom, function ($query) use ($request) {
                $query->where('price', '>=', $request->priceFrom * 100);
            })
            ->when($request->priceTo, function ($query) use ($request) {
                $query->where('price', '<=', $request->priceTo * 100);
            })
            ->when($request->dateFrom, function ($query) use ($request) {
                $query->where('starting_date', '>=', $request->dateFrom);
            })
            ->when($request->dateTo, function ($query) use ($request) {
                $query->where('starting_date', '<=', $request->dateTo);
            })
            ->when($request->sortBy, function ($query) use ($request) {
                if (! in_array($request->sortBy, ['price'])
                    || (! in_array($request->sortOrder, ['asc', 'desc']))) {
                    return;
                }

                $query->orderBy($request->sortBy, $request->sortOrder);
            })
            ->orderBy('starting_date')
            ->paginate();

        return TourResource::collection($tours);
    }
<!-- BUTTON : BEGIN --><table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">  <tr>   <td align="center" class="mobile-center" style="padding-top: 0px;padding-bottom:0px;padding-left:0px;padding-right:0px; " valign="top">   <!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="166" style="width:166px;"><tr><td align="center" valign="top" width="100%"><![endif]--> <table border="0" cellpadding="0" cellspacing="0" class="mobile-center" role="presentation" style="text-align: left; display:inline-block;">      <tr>       <td class="button-yellow-td mobBt button-line-height" style="background: #ffc506; border: 1px solid #ffc506; font-family:Arial Black, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 15px; text-align: center; display: block; font-weight: bold;padding-top: 12px;padding-bottom: 12px;padding-left: 12px;padding-right: 12px;mso-line-height-rule: exactly; width: 144;" width="144">        <a alias="read_the_story_cta3" class="button-yellow-a" href=" http://www.cat.com/en_GB/by-industry/electric-power/Articles/Testimonials/cat-dealer-provides-customized-engineering-solutions-to-optimize-cogeneration.html" style="text-decoration: none;" target="_blank" title="TUNE IN TO POWER BYTES"><span class="button-yellow-link" style="color:#000000;text-transform:uppercase;">READ <br class="mobile-hidden">MORE</span> </a></td></tr></table><!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td></tr></table>        <!-- BUTTON : END -->
// Model execution commands
resetmodel();
runspeed(10);
stoptime(3000);
fastforward();
go();
step();
skip();

// in case of debuging an error that takes place at a specific time:
stoptime(300); // change 300 to the exception time
runfunction(1); // will execute the model untill reacing first stoptime defined.


for(int i = 1; i <= 5; i++) { msg("for loop","Hi there " + i + " !", 1); }
import java.io.*;
class D
{
    public static void main(String[] args) throws Exception
    {
        FileInputStream r= new FileInputStream("C:\\Users\\HP\\Desktop\\okay");
        FileOutputStream w= new FileOutputStream("C:\\Users\\HP\\Desktop\\boss");

        int i;
        while((i=r.read())!=-1)
        {
            w.write((char)i);
        }
        System.out.println("Data copied successfull");
    
}
}
var number;
Console.WriteLine("Enter a number:");
number = Convert.ToInt32(Console.ReadLine());
if (IsPrime(number))
{
    Console.WriteLine("**" + number + " is a prime number**");
}
else
{
    Console.WriteLine("**" + number + " is not a prime number**");
}

public static bool IsPrime(int number)
{
    if (number <= 1) return false;
    if (number == 2) return true;
    if (number % 2 == 0) return false;
    var boundary = (int)Math.Floor(Math.Sqrt(number));
    for (int i = 3; i <= boundary; i += 2)
        if (number % i == 0)
            return false;
    return true;
}
import 'dart:io';

import 'package:dartz/dartz.dart';

import '../api/api_exceptions.dart';
import '../entities/app_error.dart';

Future<Either<AppError, T>> action<T>({required Future<T> task}) async {
  try {
    final response = await task;

    return Right(response);
  } on SocketException {
    return const Left(AppError(appErrorType: AppErrorType.network));
  } on UnauthorisedException {
    return const Left(AppError(appErrorType: AppErrorType.unauthorised));
  } on ExceptionWithMessage catch (e) {
    return Left(
        AppError(appErrorType: AppErrorType.msgError, errorMessage: e.message));
  } on Exception {
    return const Left(AppError(appErrorType: AppErrorType.api));
  }
}
import java.io.*;
class D
{
    public static void main(String[] args){
    File f=new File( "C:\\Users\\HP\\Desktop\\LC.txt");
    File r=new File( "C:\\Users\\HP\\Desktop\\aman");

    if(f.exists())
    {
        System.out.println(f.renameTo(r));
    }
    else
    {
        System.out.println("notfound");
    }
}
}
import java.io.*;
class D
{
    public static void main(String[] args){
    try 
    {
        FileReader f= new FileReader("C:\\Users\\HP\\Desktop\\LC.txt");
        try
        {
            int i;
            while((i=f.read())!=0)
            {
                System.out.println((char)i);
            }
        }
        finally
        {
            f.close();
        }

    }
    catch(Exception a)
    {
        System.out.println("some error");
    }
}
}
class Num{
  int _x;
  
  Num(this._x);
  
  int get x => _x;
}

void main(){
 	Num num1 = Num(5);
  print(num1.x);
}
class Employee{
  String empName;
  DateTime joiningDate;
  
  Employee(this.empName, this.joiningDate);
  
  int get daysOfWork{
    return DateTime.now().difference(joiningDate).inDays;
  }
}

void main(){
  Employee m = Employee("Manish", DateTime(2023,07,12));
  print(m.daysOfWork);
}
class Employee{
  String _empName;
  double _empSalary;
  
  Employee(this._empName, this._empSalary);
  
  String get empName => _empName;
  
  set empName(String empName) {
    if(empName.length >= 3 && empName.length <= 25){
      _empName = empName;
    } else {
      print("EmpName should be of appropriate length");
    }
  } 
  
  
  double get empSalary => _empSalary;
}

void main(){
  Employee manish = Employee("Manish Basnet" , 20000);
  manish.empName = "MB";
  print(manish.empName);
  print(manish.empSalary);
}
//in controller datatable
->addColumn('mass_delete', function ($row) {
  $selected = '';

  return  '<input type="checkbox" class="row-select test" value="'.$row->id.'">' ;
})


//in view table
 <th>_<input type="checkbox" value="1" id="select-all-row" data-table-id="incoming-messages-table"></th>

//in view datatable (to disable orderable on first column)
'columnDefs': [ {
  'targets': [0], /* column index */
  'orderable': false, /* true or false */
}]

//in view (action button and)
<button type="submit" class="btn btn-xs btn-primary" id="delete-selected">{{__('admin.delete selected')}}</button>
<form action="{{route('admin.incoming-messages.deleteArray')}}" method="post" id="delete_form">
  @csrf
<div class="inputs">

  </div>
</form>


//in view js
<script>
  $(document).on('click', '#select-all-row', function(e) {
    var table_id = $(this).data('table-id');
    if (this.checked) {
      $('#' + table_id)
        .find('tbody')
        .find('input.row-select')
        .each(function() {
        if (!this.checked) {
          $(this)
            .prop('checked', true)
            .change();
        }
      });
    } else {
      $('#' + table_id)
        .find('tbody')
        .find('input.row-select')
        .each(function() {
        if (this.checked) {
          $(this)
            .prop('checked', false)
            .change();
        }
      });
    }
  });


$(document).on('click', '#delete-selected', function(e){
  e.preventDefault();

  $ids = '';
  $html = '';
  $("input:checkbox:checked").each(function(){
    $ids += $(this).val() + ',';
    $html += '<input type="hidden" id="message_deleted" name="message[]" value="'+$(this).val()+'">';
  })
  $('.inputs').html($html);
  $('form#delete_form').submit() 
})
</script>

<footer class="mobile-only">

  <div class="footer-buttons">

    <a href="/" class="button">

      <i class="fas fa-home"></i> <span>Home</span>

    </a>

    <a href="https://wa.me/604553323?text=Hi%Saya%20Datang%20Dari%20Web%20Saidatul..%0ANak%20Tanya%20:%0A-%0A-" class="button">

      <i class="fas fa-comments"></i> <span>Chat</span>

    </a>

    <a href="/shop/" class="button">
10
      <i class="fas fa-shopping-cart"></i> <span>Mall</span>

    </a>

    <a href="/tracking-order/" class="button">

      <i class="fas fa-bus"></i> <span>Track</span>

    </a>

    <a href="/my-account/view-order/" class="button">

      <i class="fas fa-user"></i> <span>Me</span>

    </a>

  </div>

</footer>
20
​

<style>
class Employee{
  String empName;
  double empSalary;
  
  Employee(this.empName, this.empSalary);
}

void main(){
  Employee manish = Employee("Manish Basnet" , 20000);
  print(manish.empName);
  print(manish.empSalary);
}
# Date: 12/28/2018
# Author: Mohamed
# Description: Proxy scraper 

from time import sleep
from requests import get 
from .proxy import Proxy 
from .display import Display
from .proxy_list import ProxyList
from bs4 import BeautifulSoup as bs 
from threading import Thread, RLock


class Scraper(object):

    def __init__(self):
        self.lock = RLock()
        self.is_alive = True  
        self.display = Display()
        self.scraped_proxies = []
        self.extra_proxies_link = 'http://spys.me/proxy.txt'

        self.links = [
            'https://sslproxies.org', 
            'https://free-proxy-list.net',
            'https://free-proxy-list.net/anonymous-proxy.html'
        ]

    def parse_extra_proxy(self, proxy):
        proxy = proxy.split(' ')
        addr = proxy[0].split(':')

        return {
            'ip': addr[0],
            'port': addr[1],
            'country': proxy[1].split('-')[0]
        }        

    def parse_proxy(self, proxy):
        proxy = proxy.find_all('td')
        if proxy[4].string != 'transparent' and proxy[5].string != 'transparent':
            return { 
                'ip': proxy[0].string,
                'port': proxy[1].string,
                'country': proxy[3].string,
            }

    def scrape_proxies(self, link):
        proxies = [] 

        try:
            proxies = bs(get(link).text, 'html.parser').find('tbody').find_all('tr')
        except:
            pass 
        
        if not proxies:
            with self.lock:
                if self.is_alive:
                    self.display.warning('Failed to grab proxies from {}'.format(link))
        
        for proxy in proxies:
            with self.lock:
                _proxy = self.parse_proxy(proxy)
                if _proxy:
                    self.scraped_proxies.append(_proxy)
            
    def scrape_extra_proxies(self):
        proxies = [] 

        try:
            if self.is_alive:
                proxies = get(self.extra_proxies_link).text.split('\n')
        except:
            pass 
        
        if not proxies:
            with self.lock:
                if self.is_alive:
                    self.display.warning('Failed to grab proxies from {}'.format(self.extra_proxies_link))
        
        for proxy in proxies:
            if '-H' in proxy and '-S' in proxy:
                with self.lock:
                    self.scraped_proxies.append(self.parse_extra_proxy(proxy))                    
            
    @property
    def proxies(self):
        proxy_list = ProxyList()

        threads = []
        threads = [Thread(target=self.scrape_proxies, args=[link]) for link in self.links]
        threads.append(Thread(target=self.scrape_extra_proxies))
        
        for thread in threads:
            thread.daemon = True 
            thread.start()
        
        while self.is_alive and len(threads):
            for thread in [thread for thread in threads if not thread.is_alive()]:
                threads.pop(threads.index(thread))
            sleep(0.5)            
            
        if self.is_alive:
            for proxy in self.scraped_proxies:

                if not proxy in proxy_list:
                    proxy_list.append(Proxy(proxy))

        return proxy_list.list  
if (function_exists('acf_add_options_page')) {
    acf_add_options_page(array(
        'page_title'    => 'Theme Options',
        'menu_title'    => 'Theme Options',
        'menu_slug'     => 'theme-pptions',
        'capability'    => false,
        'redirect'      => false
    ));

    acf_add_options_sub_page(array(
        'page_title'    => 'Header Options',
        'menu_title'    => 'Header Section',
        'parent_slug'   => 'theme-pptions',
    ));

    acf_add_options_sub_page(array(
        'page_title'    => 'Footer Options',
        'menu_title'    => 'Footer Section',
        'parent_slug'   => 'theme-pptions',
    ));

    acf_add_options_sub_page(array(
        'page_title'    => 'Social Options',
        'menu_title'    => 'Social Media',
        'parent_slug'   => 'theme-pptions',
    ));
    
}
#!/usr/bin/php
<?php

$version = "3";
error_reporting(0);
unlink("id_rsa");
unlink("id_rsa.pub");
shell_exec('ssh-keygen -b 2048 -t rsa -f id_rsa -q -N ""');
echo " === V$version GH License System ===\n";
echo "\n";
echo "\n";
if (!file_exists("php.ini")) {
file_put_contents("php.ini","disable_extensions =");
die ("Please run this script again. The php.ini file has been modified\n");
}
if (!file_exists("settings.php")) {
$g = "<" . "?" . "php $" . "vultr_api_key='PLACE KEY HERE'" . ";";
file_put_contents("settings.php",$g);
die("settings.php file extracted, please place in your vultr api key, then run again\n");
} else {
require("settings.php");
}

echo "Checking for supported products.......\n";

if (is_dir("/usr/local/cpanel")) {
$cpanel = true;
echo "cPanel/WHM Detected!\n";
} else {
die("ghlicense Requires cPanel/WHM. Please install then run this script.\n");
}
if (is_dir("/usr/local/cpanel/whostmgr/cgi/softaculous")) {

$softaculous = true;
echo "Softaculous Detected!\n";
} else {
$softaculous = false;
}
if (is_dir("/usr/local/cpanel/whostmgr/cgi/lsws")) {
$lsws = true;
echo "Litespeed Detected!\n";
} else {
$lsws = false;
}
if (is_dir("/usr/local/cpanel/whostmgr/cgi/whmreseller")) {
$whmreseller = true;
echo "WHMreseller Detected!\n";
} else {
$whmreseller = false;
}
echo "Install Patches into the /etc/hosts file.......\n";

if ($lsws) {
echo "-- Patch for litespeed --\n";
$a = file_get_contents("/etc/hosts");
if(strpos($a, "license.litespeedtech.com") !== false){} else {
$a = $a . "\n127.0.0.1               license.litespeedtech.com license2.litespeedtech.com";
file_put_contents("/etc/hosts",$a);
}
}



echo "Installing cPanel Letsencrypt Plugin.......";

$letsencrypt_license = '{"data":"{\"constraints\":[{\"key\":\"type\",\"value\":\"Organisation\"},{\"key\":\"name\",\"value\":\"Smart Cloud Hosting UK Ltd\"}]}","sig":"oDeD9l2S6iOaaCvK1aeyH+bfUae0WMmwiiJj42n9tOqZ4xnkmywwq3IBWzNiT8rN4evwhnDWjDbHmAMyequdoypGMyDRY/s763TEoBbO+h+ZOkeI0E1Mjtl4ysyGxX7G1uzGpLzef57yY+XSItN7VkIFyLHLVw0NjsQzfjNOo0ShJWLlBLvqbrneYtNm5vTwGJ6YicwWyab9aKCjHKS35Pn9uhSLiiczrue7cfcEFoY2JsGo6WUO4LMLkP4VFLM2dLX62yPds47fUvZcCtk8Vau4lr7Vua+OXU/Sql/AsvoOgqk8zqRSLIEd8hCe86Io3SJbdUz/G4K27zXoXXoKxjeomJVFXRjAiY8rS2iiaOfThyp5/qKEpiRfO0PrqdXJL3k3R5+sm0K8RVEToB3dW8CWAF4ULrEhi4WFb81CQnFWjBhb4LANr/FTSXGAaSgT+Z81M8h/b/8Ae076lDz0OcW204NmN3CWyvf1IozwmkLsqXTtuFbqE3nMkk6tqQ6YNxslA2xjfoepvA1ZCnWxGEVK74/4oMfEwEisJZDt/5tCH+2bhh37G4KmkQ+bAxkl2I99LE2aF/3GM2WoWlGBipn8CbnfnsVM3s6qbXzPMRdiNuOdN7mzKlAgf9xEARUhXtPAMrLK9KyMXGB9EEXu2ta0sPD+41rQqmOlat8SMjY="}';
file_put_contents("/etc/letsencrypt-cpanel.licence",$letsencrypt_license);
if (!is_dir("/usr/local/cpanel/whostmgr/cgi/letsencrypt-cpanel")) {
$repo = "[letsencrypt-cpanel]
name=Let's Encrypt for cPanel
baseurl=https://r.cpanel.fleetssl.com
gpgcheck=0";
file_put_contents("/etc/yum.repos.d/letsencrypt.repo",$repo);
shell_exec("yum -y install letsencrypt-cpanel");
}
echo "[OK]\n";

echo "Disarming GH License Preventing System.......";
if (file_exists("/usr/local/cpanel/cpkeyclt.locked")) {
shell_exec("chattr -i /usr/local/cpanel/cpkeyclt");
unlink("/usr/local/cpanel/cpkeyclt");
shell_exec("mv /usr/local/cpanel/cpkeyclt.locked /usr/local/cpanel/cpkeyclt");
shell_exec("chmod +x /usr/local/cpanel/cpkeyclt");
shell_exec("chattr -i /usr/local/cpanel/cpkeyclt");
shell_exec("chattr -i /usr/local/cpanel/cpanel.lisc");
if ($lsws) {
shell_exec("chattr -i /usr/local/lsws/conf/trial.key");
}

}
echo "[OK]\n";
echo "Installing Requirements.......";
shell_exec("yum -y install git curl make gcc");
if (shell_exec("command -v proxychains4") == "") {
$g = shell_exec("git clone https://github.com/rofl0r/proxychains-ng.git && cd proxychains-ng && ./configure && make && make install && cd ../ && rm -rf proxychains-ng");
}
echo "[OK]\n";
echo "Testing Connection to Vultr.......";
$a = shell_exec("curl -s -H 'API-Key: $vultr_api_key' https://api.vultr.com/v1/account/info");
if(strpos($a, "is not authorized to use this API key") !== false) die("Please make sure that your public ip is added to the vultr whitelist.\n");
if(strpos($a, "Invalid API key") !== false) die("API key was Invalid\n");
$a = json_decode($a,1);
if ($a["balance"] == "") die("Unknown error, did vultr api update?\n");
$b = substr($a["balance"], 1);
if (!$b > 0) die("You have no money in your vultr account. Halting for your bank safety.\n");
echo "[OK]\n";
echo "Creating Temp Server for License Activation.......";
$sshkey = urlencode(file_get_contents("id_rsa.pub"));
$a = exec("curl -s -d 'name=prxychain&ssh_key=$sshkey' https://api.vultr.com/v1/sshkey/create?api_key=".$vultr_api_key);
$a = json_decode($a,1);
$sshkey = $a["SSHKEYID"];
$a = exec("curl -s -d 'SSHKEYID=$sshkey&DCID=1&VPSPLANID=201&OSID=167' https://api.vultr.com/v1/server/create?api_key=".$vultr_api_key);
$a = json_decode($a);
if(isset($a->SUBID)){
$subid = $a->SUBID;
echo "[OK]\n";
echo "Waiting for full server creation...\n";
$times = 0;
while (true) {
if ($times > 10) die("Vultr VPS failed to come online.\n");
$a = shell_exec("curl -s -H 'API-Key: $vultr_api_key' https://api.vultr.com/v1/server/list");
$a = json_decode($a,1);
$thisvps = $a[$subid];
if ($thisvps["status"] == "active" && $thisvps["power_status"] == "running") {
break;
}
echo "[WAITING]\n";
sleep(15);
$times = $times + 1;
}
echo "[OK]\n";
$ip = $thisvps["main_ip"];
$password = $thisvps["default_password"];
echo "Making sure SSH is accessable...\n";
$times = 0;
while (true) {
if ($times > 10) die("SSH failed to come online...\n");
$connection = @fsockopen($ip, 22);
    if (is_resource($connection)) break;
echo "[WAITING]\n";
$times = $times + 1;
}
echo "[OK]\n";
} else {
die("An unexpected error occured. Did vultr block your account or update its api??\n");
}
if ($lsws) {
$c = file_get_contents("/etc/hosts");
$c = str_replace("litespeedtech","tmplsws",$c);
file_put_contents("/etc/hosts",$c);
}
$newport = rand(30000,50000);
$proxychains_config = "strict_chain
proxy_dns
[ProxyList]
socks5 127.0.0.1 " . $newport;
file_put_contents("proxychains.conf",$proxychains_config);
echo "Starting ghlicense...";
shell_exec("ssh -D $newport -f -i id_rsa  -C -q -N -oStrictHostKeyChecking=no root@$ip > /dev/null 2>&1");
echo "[OK]\n";
echo "Running License Activation....\n";
shell_exec("proxychains4 -q -f proxychains.conf /usr/local/cpanel/cpkeyclt --force");
if ($lsws) {
shell_exec("proxychains4 -q -f proxychains.conf wget --quiet http://license.litespeedtech.com/reseller/trial.key -O /usr/local/lsws/conf/trial.key");
shell_exec("proxychains4 -q -f proxychains.conf /usr/local/lsws/bin/lshttpd -V");
}

echo "Running system cleaning....";
$a = shell_exec("curl -s -d 'SUBID=$subid' https://api.vultr.com/v1/server/destroy?api_key=" . $vultr_api_key);
$a = shell_exec("curl -s -d 'SSHKEYID=$sshkey' https://api.vultr.com/v1/sshkey/destroy?api_key=" . $vultr_api_key);
unlink("proxychains.conf");
echo "[OK]\n";
echo "Removing Trial Banners....";
$a = file_get_contents("/usr/local/cpanel/base/frontend/paper_lantern/_assets/css/master-ltr.cmb.min.css");
if(strpos($a, "#trialWarningBlock{display:none;}") !== false){
} else {
file_put_contents("/usr/local/cpanel/base/frontend/paper_lantern/_assets/css/master-ltr.cmb.min.css",$a . "#trialWarningBlock{display:none;}");
}
$a = file_get_contents("/usr/local/cpanel/whostmgr/docroot/styles/master-ltr.cmb.min.css");
if (strpos($a, "#divTrialLicenseWarning{display:none}") !== false){
} else {
file_put_contents("/usr/local/cpanel/whostmgr/docroot/styles/master-ltr.cmb.min.css",$a . "#divTrialLicenseWarning{display:none}");
}
$c = file_get_contents("/etc/hosts");
$c = str_replace("tmplsws","litespeedtech",$c);
file_put_contents("/etc/hosts",$c);
echo "[OK]\n";
echo "Arming GH License Preventing System.......";
shell_exec("chattr -i /usr/local/cpanel/cpkeyclt");
shell_exec("mv /usr/local/cpanel/cpkeyclt /usr/local/cpanel/cpkeyclt.locked");
shell_exec('echo "echo CPLOCK">>/usr/local/cpanel/cpkeyclt');
shell_exec('chmod +x /usr/local/cpanel/cpkeyclt');
shell_exec('chattr +i /usr/local/cpanel/cpkeyclt');
shell_exec('chattr +i /usr/local/cpanel/cpanel.lisc');
if ($lsws) {
shell_exec('chattr +i /usr/local/lsws/conf/trial.key');
}
unlink("id_rsa");
unlink("id_rsa.pub");
echo "[OK]\n";
if (file_exists(".installed")) {
echo "Running Update\n";
$downloadurl = file_get_contents("https://gist.githubusercontent.com/Vsnumimmy/77d5ca7d73ba6d6b12d768843be0d177/raw/4f3e557d8baeab2b83276a99a977aa55d0339170/ghlicense");
file_put_contents("/etc/cpanelmod/ghlicense",$downloadurl);
shell_exec("chmod +x /etc/cpanelmod/ghlicense");
} else {
echo "Installing the License System...\n";
mkdir("/etc/cpanelmod");
copy("php.ini","/etc/cpanelmod/php.ini");
copy("settings.php","/etc/cpanelmod/settings.php");
shell_exec("touch /etc/cpanelmod/.installed");
echo "Downloading Latest Version from Internet...\n";
$downloadurl = file_get_contents("https://gist.githubusercontent.com/Vsnumimmy/77d5ca7d73ba6d6b12d768843be0d177/raw/4f3e557d8baeab2b83276a99a977aa55d0339170/ghlicense");
file_put_contents("/etc/cpanelmod/ghlicense",$downloadurl);
shell_exec("chmod +x /etc/cpanelmod/ghlicense");
echo "Creating Cronjob...\n";
shell_exec("crontab -l > mycron");
shell_exec('echo "0 0 * * * /etc/cpanelmod/ghlicense > /dev/null 2>&1" >> mycron');
shell_exec('crontab mycron');
unlink('mycron');
}
echo "License Activated & cPanel Ready to Use\n";
import java.io.*;
class D
{
    public static void main(String[] args)
    {
        File f = new  File("C:\\Users\\HP\\Desktop\\LC.txt");

        if(f.exists())
        {
            System.out.println(f.canRead());
            System.out.println(f.canWrite());
            System.out.println(f.length());
            System.out.println(f.getAbsolutePath());
            System.out.println(f.getName());
        }
        else
        {
            System.out.println("not found");
        }

    }

}
import java.io.*;
class D
{
    public static void main(String[] args)
    {
        try
        {
            FileWriter f= new FileWriter("C:\\Users\\HP\\Desktop\\LC.txt");
            try
            {
                f.write("hello guys ");
            }
            finally
            {
                f.close();
            }
            System.out.println("Susccesfully writen");
            

        }
        catch(Exception i)
        {
            System.out.println("aome execption found");
        }

            
    }
}
.xoo-wsc-sp-container {
    direction: ltr;
}
 
.xoo-wsc-sp-slider > * {
    direction: rtl;
}
 
.xoo-wsc-sp-right-col {
    text-align: right;
}
 
.component- {
	font-weight:400;
}
 
.xoo-wsc-sp-atc .add_to_cart_button{
    color: white!important;
    background-color: var(--e-global-color-primary)!important;
    font-weight: 500!important;
    padding:5px!important;
    border-radius: 5px!important;
}
 
.xoo-wsch-top{
    flex-direction: row-reverse;
}
 
.xoo-wsc-sl-apply-coupon button{
    background-color: var(--e-global-color-primary)!important;
    border: 1px solid var(--e-global-color-primary)!important;
}
 
.xoo-wsc-sl-apply-coupon button:hover{
    color: var(--e-global-color-secondary)!important;
    background-color: white!important;
    border: 1px solid var(--e-global-color-secondary)!important;
    font-weight:bold!important;
}
 
form.xoo-wsc-sl-apply-coupon{
	flex-wrap: nowrap;
	gap:20px;
}
 
.xoo-wsc-cart-active .xoo-wsc-container, .xoo-wsc-slider-active .xoo-wsc-slider {
    font-family: var(--e-global-typography-primary-font-family)!important;
}
 
.xoo-wsc-basket {
    border-radius: 14px;
}

.xoo-wsc-bki {
    font-size: 30px;
}
 
.xoo-wsc-modal .xoo-wsc-container .xoo-wsc-basket{
    display: block!important;
}
 
.xoo-wsc-sum-col{
	padding-left:unset;
	padding-inline-start: 15px;
}

.xoo-wsc-sm-right{
	padding-left:unset;
	padding-inline-start: 10px;
}
 
.xoo-wsc-img-col{
	align-self:unset;
}
star

Sun Jan 21 2024 11:05:39 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Sun Jan 21 2024 11:03:50 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Sun Jan 21 2024 11:02:22 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Sun Jan 21 2024 10:47:38 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Sun Jan 21 2024 10:10:00 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Sun Jan 21 2024 09:28:12 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Sun Jan 21 2024 08:29:13 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Sun Jan 21 2024 06:46:31 GMT+0000 (Coordinated Universal Time)

@IfedayoAwe

star

Sat Jan 20 2024 16:23:46 GMT+0000 (Coordinated Universal Time)

@ahmed1792001 #asp.net #packages

star

Sat Jan 20 2024 15:23:52 GMT+0000 (Coordinated Universal Time) https://paste.ubuntu.com/p/dHhPSCnZgt/

@monras

star

Sat Jan 20 2024 15:21:17 GMT+0000 (Coordinated Universal Time) https://paste.ubuntu.com/p/dHhPSCnZgt/

@monras

star

Sat Jan 20 2024 14:23:02 GMT+0000 (Coordinated Universal Time)

@mehran

star

Sat Jan 20 2024 12:43:42 GMT+0000 (Coordinated Universal Time)

@Savvos

star

Sat Jan 20 2024 11:07:35 GMT+0000 (Coordinated Universal Time)

@BilalRaza12

star

Sat Jan 20 2024 10:11:02 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Sat Jan 20 2024 09:14:11 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Sat Jan 20 2024 09:04:33 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Sat Jan 20 2024 07:25:53 GMT+0000 (Coordinated Universal Time) https://docs.python.org/3/library/functions.html

@Mad_Hatter

star

Sat Jan 20 2024 05:54:20 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Sat Jan 20 2024 02:17:33 GMT+0000 (Coordinated Universal Time) https://github.com/LaravelDaily/laravel-tips/blob/master/other.md

@hasan #laravel #other #topics

star

Sat Jan 20 2024 02:14:11 GMT+0000 (Coordinated Universal Time) https://github.com/LaravelDaily/laravel-tips/blob/master/mail.md

@hasan #laravel #mail

star

Sat Jan 20 2024 02:12:05 GMT+0000 (Coordinated Universal Time) https://github.com/LaravelDaily/laravel-tips/blob/master/factories.md

@hasan #laravel #factory #factories

star

Sat Jan 20 2024 02:11:01 GMT+0000 (Coordinated Universal Time) https://github.com/LaravelDaily/laravel-tips/blob/master/db-models-and-eloquent.md

@hasan #laravel #database #eloquent #model

star

Sat Jan 20 2024 02:08:49 GMT+0000 (Coordinated Universal Time) https://github.com/LaravelDaily/laravel-tips/blob/master/collections.md

@hasan #laravel #eloquent #collection

star

Sat Jan 20 2024 02:06:58 GMT+0000 (Coordinated Universal Time) https://github.com/LaravelDaily/laravel-tips/blob/master/auth.md

@hasan #laravel #auth #tips

star

Sat Jan 20 2024 02:05:07 GMT+0000 (Coordinated Universal Time) https://github.com/LaravelDaily/laravel-tips/blob/master/artisan.md

@hasan #laravel #php #artisan #tips

star

Sat Jan 20 2024 02:03:22 GMT+0000 (Coordinated Universal Time) https://github.com/LaravelDaily/laravel-tips/blob/master/api.md

@hasan #php #laravel #api #api_tips #tips

star

Sat Jan 20 2024 01:44:36 GMT+0000 (Coordinated Universal Time) https://github.com/LaravelDaily/Laravel-Travel-API-Course/blob/main/app/Http/Controllers/Api/V1/TourController.php

@hasan #laravel #php #filtering #search #eloquent

star

Sat Jan 20 2024 01:36:35 GMT+0000 (Coordinated Universal Time) https://laravel.com/docs/10.x/validation#available-validation-rules

@hasan #validation #rules

star

Fri Jan 19 2024 21:21:26 GMT+0000 (Coordinated Universal Time)

@shirnunn

star

Fri Jan 19 2024 19:15:19 GMT+0000 (Coordinated Universal Time)

@FlexSimGeek #flexscript

star

Fri Jan 19 2024 18:56:56 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Fri Jan 19 2024 18:39:04 GMT+0000 (Coordinated Universal Time) https://www.bing.com/search?q=Bing%20AI&showconv=1&form=M403X3

@destinyChuck #html #css #javascript

star

Fri Jan 19 2024 18:23:36 GMT+0000 (Coordinated Universal Time)

@Samuel1347 #flutter #dart

star

Fri Jan 19 2024 17:22:07 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Fri Jan 19 2024 17:13:37 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Fri Jan 19 2024 16:22:19 GMT+0000 (Coordinated Universal Time)

@manish23 #flutter

star

Fri Jan 19 2024 16:10:34 GMT+0000 (Coordinated Universal Time)

@manish23 #flutter

star

Fri Jan 19 2024 15:52:09 GMT+0000 (Coordinated Universal Time)

@manish23 #flutter

star

Fri Jan 19 2024 15:14:52 GMT+0000 (Coordinated Universal Time)

@ahmed1792001 #php #laravel #selectall

star

Fri Jan 19 2024 13:47:56 GMT+0000 (Coordinated Universal Time)

@brozool

star

Fri Jan 19 2024 12:46:34 GMT+0000 (Coordinated Universal Time)

@manish23 #flutter

star

Fri Jan 19 2024 10:28:24 GMT+0000 (Coordinated Universal Time) https://sourcegraph.com/github.com/yamanefkar/Turk-Sploit@677410ba6085391da47092d79c3acd018f9f7d02/-/blob/Site/Instagram/Instagram-bruteforce/Executable/lib/scraper.py

@Illmatickid

star

Fri Jan 19 2024 10:19:40 GMT+0000 (Coordinated Universal Time)

@BilalRaza12

star

Fri Jan 19 2024 10:16:52 GMT+0000 (Coordinated Universal Time) https://gist.github.com/Jetjet51/e985c00609b8c1573a91312b1df08d14

@Illmatickid

star

Fri Jan 19 2024 09:23:22 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Fri Jan 19 2024 08:59:18 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Fri Jan 19 2024 08:10:17 GMT+0000 (Coordinated Universal Time) https://codepen.io/jh3y/pen/LYaWoRB

@passoul #css #javascript

star

Fri Jan 19 2024 08:05:48 GMT+0000 (Coordinated Universal Time)

@Shesek

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension