java – Stat management in an RPG (like Pokémon e.g.): How to update stats after each battle or other stat changing events?

I’m currently creating a terminal-based RPG like Pokémon as a learning project so my programming skills are limited. My main problem right now is stat management of the player.

My code works like this:

  1. I have a Player class which creates characters. Its constructor has parameters for character information/stats (final).

  2. I can create a Player object with character information/stats

  3. This object is then used in Battle class. Here each character stats are stored inside an ArrayList.

  4. I assign temporary stats for damage calculation and here is where I am having problems.

Player stats are only temporarily changed during damage calculation and are back to normal after battle. I tried to return changed temporary stats as a new Player object after the battle to replace the old one, but I don’t know how to use them or if my code is even able to do it. I know that this design flawed by default, but this is my best solution.

How can I manage stats in a clean way with my approach if it’s possible? Otherwise I will refactor.

Here is the code:

Player class (Enemy is basically the same):

public class Player {
    private final String name;
    private final int hp;
    private final int mp;
    private final int attack;
    private final int defense;
    private final int special;
    private final int speed;
    private int exp;
    private int level;
 
    public Player(String name, int hp, int attack, int defense, int special, int speed, int exp, int level, int mp) {
        this.name = name;
        this.hp = hp;
        this.attack = attack;
        this.speed = speed;
        this.special = special;
        this.defense = defense;
        this.exp = exp;
        this.level = level;
        this.mp = mp;
    }
 
    public String getName() {
        return this.name;
    }
 
    public int getHP() {
        return this.hp;
    }
 
    public int getAttack() {
        return this.attack;
    }
 
    public int getDefense() {
        return this.defense;
    }
 
    public int getSpeed() {
        return this.speed;
    }
 
    public int getSpecial() {
        return this.special;
    }
 
    public int getExp() {
        return this.exp;
    }
 
    public int getLevel() {
        return this.level;
    }
 
    public int getMP(){return this.mp;}
 
 
    @Override
    public String toString() {
        return "Name: " + this.name + "n" +
                "HP: " + this.hp + "n" +
                "MP: " + this.mp + "n" +
                "Attack: " + this.attack + "n" +
                "Defense: " + this.defense + "n" +
                "Special: " + this.special + "n" +
                "Speed: " + this.speed+ "n" +
                "Level: " + this.level+ "n" +
                "Exp: " + this.exp;
 
    }
 
}

Battle class:

     
import java.util.ArrayList;
import java.util.Random;
import java.util.Scanner;
 
public class BattleSystem {
    private final ArrayList<Player> statsPlayer;
    private final ArrayList<Enemy> statsEnemy;
    private String namePlayer;
    private String nameEnemy;
    private int tempHealthEnemy;
    private int tempHealthPlayer;
    private int physicalDamagePlayer;
    private int physicalDamageEnemy;
    private final int speedPlayer;
    private final int speedEnemy;
    private int turnCounter = 0;
    private int tempExpPlayer;
    private int tempLevelPlayer;
    private int tempExpEnemy;
    private int tempAttackPlayer;
    private int tempDefensePlayer;
    private int tempSpecialPlayer;
    private int tempSpeedPlayer;
    private int tempAttackEnemy;
    private int tempDefenseEnemy;
    private int tempSpecialEnemy;
    private int tempSpeedEnemy;
    private int tempManaPlayer;
 
    public BattleSystem(Player statsPlayer, Enemy statsEnemy) {
        this.statsPlayer = new ArrayList<>();
        this.statsEnemy = new ArrayList<>();
        this.namePlayer = statsPlayer.getName();
        this.nameEnemy = statsEnemy.getName();
        this.tempHealthPlayer = statsPlayer.getHP();
        this.tempHealthEnemy = statsEnemy.getHP();
        this.physicalDamagePlayer = statsPlayer.getAttack();
        this.physicalDamageEnemy = statsEnemy.getAttack();
        this.speedPlayer = statsPlayer.getSpeed();
        this.speedEnemy = statsEnemy.getSpeed();
        this.tempExpPlayer = statsPlayer.getExp();
        this.tempLevelPlayer = statsPlayer.getLevel();
        this.tempExpEnemy = statsEnemy.getExp();
        this.tempAttackPlayer = statsPlayer.getAttack();
        this.tempDefensePlayer = statsPlayer.getDefense();
        this.tempSpecialPlayer = statsPlayer.getSpecial();
        this.tempAttackEnemy = statsEnemy.getAttack();
        this.tempDefenseEnemy = statsEnemy.getDefense();
        this.tempSpecialEnemy = statsEnemy.getSpecial();
        this.tempSpeedEnemy = statsEnemy.getSpeed();
        this.tempManaPlayer = statsPlayer.getMP();
    }
 
    public void addStatsPlayer(Player statsPlayer) {
        this.statsPlayer.add(new Player(statsPlayer.getName(),
                statsPlayer.getHP(),
                statsPlayer.getAttack(),
                statsPlayer.getDefense(),
                statsPlayer.getSpecial(),
                statsPlayer.getSpeed(),
                statsPlayer.getExp(),
                statsPlayer.getLevel(),
                statsPlayer.getMP()));
    }
 
    public void addStatsEnemy(Enemy statsEnemy) {
        this.statsEnemy.add(new Enemy(statsEnemy.getName(),
                statsEnemy.getEnemyID(),
                statsEnemy.getHP(),
                statsEnemy.getAttack(),
                statsEnemy.getDefense(),
                statsEnemy.getSpecial(),
                statsEnemy.getSpeed(),
                statsEnemy.getExp()));
    }
 
    public int playerAttackPhasePhysical() {
        turnCounter++;
 
        int tempDamageToEnemy = tempDamagePhysicalPlayer - this.tempDefenseEnemy;
        if (tempDamageToEnemy < 0) {
            tempDamageToEnemy = 0;
        }
        this.tempHealthEnemy -= tempDamageToEnemy;
 
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        System.out.println("Turn: " + turnCounter);
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        System.out.println(this.namePlayer + " attacks Enemy!");
 
        System.out.println(this.nameEnemy + " took " + tempDamageToEnemy + " damage!");
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        if (this.tempHealthEnemy <= 0) {
            this.tempHealthEnemy = 0;
        }
        System.out.println(this.namePlayer + " HP: " + tempHealthPlayer);
        System.out.println(this.nameEnemy + " HP: " + tempHealthEnemy);
        if (this.tempHealthEnemy <= 0) {
            return this.tempHealthEnemy = 0;
        }
        return this.tempHealthEnemy;
    }
 
    public int enemyAttackPhasePhysical() {
        turnCounter++;
 
        this.tempHealthPlayer -= tempDamageToPlayer;
 
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        System.out.println("Turn: " + turnCounter);
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        System.out.println(this.nameEnemy + " attacks Player!");
        System.out.println(this.namePlayer + " took " + tempDamageToPlayer + " damage!");
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        if (this.tempHealthPlayer <= 0) {
            this.tempHealthPlayer = 0;
        }
        System.out.println(this.namePlayer + " HP: " + tempHealthPlayer);
        System.out.println(this.nameEnemy + " HP: " + tempHealthEnemy);
        if (this.tempHealthPlayer <= 0) {
            return this.tempHealthPlayer = 0;
        }
        return this.tempHealthPlayer;
    }
 
    public boolean isDeadPlayer() {
        if (this.tempHealthPlayer <= 0) {
            return true;
        }
        return false;
    }
 
    public boolean isDeadEnemy() {
        if (this.tempHealthEnemy <= 0) {
            return true;
        }
        return false;
    }
 
    public Player fight() {
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        System.out.println("~                                 FIGHT!                               ~");
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        System.out.println(this.namePlayer + " encountered a " + this.nameEnemy + "!");
        if (this.speedPlayer >= this.speedEnemy) {
            while (!isDeadPlayer() && !isDeadEnemy()) {
                System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
                System.out.println(this.namePlayer + " HP: " + tempHealthPlayer;
                System.out.println(this.nameEnemy + " HP: " + tempHealthEnemy);
                System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
                System.out.println("((1)Attack) ");
                System.out.print("Command: ");
                Scanner scan = new Scanner(System.in);
                String command = scan.nextLine();
                if (command.equals("Attack") || command.equals("attack") || command.equals("1")) {
                    playerAttackPhasePhysical();
                } 
                  System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
                    System.out.println(this.namePlayer + " HP: " + tempHealthPlayer;
                    System.out.println(this.nameEnemy + " HP: " + tempHealthEnemy);
                }
                if (isDeadEnemy()) {
                    break;
                }
                enemyAttackPhasePhysical();
            }
        } else {
            while (!isDeadPlayer() && !isDeadEnemy()) {
                enemyAttackPhasePhysical();
                if (isDeadPlayer()) {
                    break;
                }
                playerAttackPhasePhysical();
            }
        }
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        if (isDeadEnemy()) {
            System.out.println(this.namePlayer + " WON!");
            this.tempExpPlayer += this.tempExpEnemy;
            System.out.println(this.namePlayer + " earned " + this.tempExpEnemy + " EXP!");
            while (this.tempExpPlayer >= 100) {
                System.out.println(this.namePlayer + " leveled up!");
                this.tempHealthPlayer += 10;
                this.tempAttackPlayer += 5;
                this.tempDefensePlayer += 5;
                this.tempSpecialPlayer += 5;
                this.tempSpeedPlayer += 2;
                this.tempExpPlayer -= 100;
                this.tempLevelPlayer++;
            }
 
            System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
            return new Player(this.namePlayer, this.tempHealthPlayer, this.tempAttackPlayer, this.tempDefensePlayer, this.tempSpecialPlayer, this.tempSpeedPlayer, this.tempExpPlayer, this.tempLevelPlayer,this.tempManaPlayer);
 
        } else if (isDeadPlayer()) {
            System.out.println(this.namePlayer + " LOST");
 
            System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
 
            return new Player(this.namePlayer, this.tempHealthPlayer, this.tempAttackPlayer, this.tempDefensePlayer, this.tempSpecialPlayer, this.tempSpeedPlayer, this.tempExpPlayer, this.tempLevelPlayer,this.tempManaPlayer);
        }
 
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        return new Player(this.namePlayer, this.tempHealthPlayer, this.tempAttackPlayer, this.tempDefensePlayer, this.tempSpecialPlayer, this.tempSpeedPlayer, this.tempExpPlayer, this.tempLevelPlayer,this.tempManaPlayer);
    }
 
    @Override
    public String toString() {
        return this.statsPlayer + "n" +
                "n" + this.statsEnemy;
    }
 
}
```

web development – Ubuntu Server Management – How do I stop hard drive space from creeping up over time?

I have been using ubuntu servers for the last 5 years, I have consistently had the same issue with hard drive space creeping up over time.

I use AWS CloudWatch to notify me if a server crosses 80% hard drive space consumption, when they do, in general, I have followed the following steps in order to trim down my footprint.

Unfortunately though even after doing these steps it doesn’t always bring the hard drive space under 80% and I end up having to increase my hard drive space. I mainly develop using two programming languages and deploy REST API’s in Ruby and NodeJS.


  • On servers running NodeJS, we use PM2 for application management, and proxy pass NGINX traffic to ExpressJS
  • On servers running Ruby, we use passenger + NGINX
  • On every server I have logging enabled in my REST API’s, and I rotate my logs automatically

To trim down my memory footprint I do the following:

Step 1] keep my system updated

sudo apt update

Step 2] sometimes running upgrade, it can be scary to upgrade to a new major ubuntu version if you are not prepared to

sudo apt upgrade

Step 3] cleaning out apt package cache

sudo apt clean

Step 4] removing old kernals

sudo apt autoremove --purge


I need some way of being able to see what part of my OS creeps up in hard drive consumption over time, I have ran different scripts that tell me how large folders are etc, but I still haven’t found any conclusive solutions or evidences of the problem, ubuntu with my understanding just keeps creeping on memory.

Are there any solutions that others have to my problem?

Basic java text-based management game

In a few hours I threw together this little text-based java game. Pretty much you’re managing a forest and have to try and keep it together while keeping enough of a profit to move forward.

package com.company;

import java.util.Arrays;
import java.util.Scanner;
import java.util.concurrent.ThreadLocalRandom;

import static java.lang.Integer.parseInt;

public class Main {

    static int gold = 60, trees = 15, unr_trees = 0, r_trees = 0, fertilizer = 1, animal_protection = 0;

    static int refinesLeftThisTurn;

    static int turn = 1, actionsUsedThisTurn = 0;

    static int wildlifeProtection;

    public static void main(String() args) {
        cls();
        System.out.println("Treemnger:nn");
        game();
    }

    public static void game() {
        boolean endCommand = false;
        Scanner s = new Scanner(System.in);

        while (true) {
            endCommand = false;
            refinesLeftThisTurn = 10;
            actionsUsedThisTurn = 0;
            System.out.println("Turn: " + turn);

            System.out.println("n");
            while (!endCommand) {
                System.out.println("Enter a command (type 'help' for list)");
                String commandEntered = s.nextLine();

                String() splitCommand = commandEntered.split(" ");

                String command = splitCommand(0);
                String() subcommands = Arrays.copyOfRange(splitCommand, 1, commandEntered.length());

                switch (command.toLowerCase()) {
                    case "help":
                        System.out.println("Commands: 'help', 'resources', 'chop', 'sell', 'refine', 'buy', 'use', 'clear', 'end'");
                        endCommand = false;
                        break;

                    case "resources":
                        printResources();
                        endCommand = false;
                        break;

                    case "chop":
                        if (subcommands(0) != null) {
                            if (trees - parseInt(subcommands(0)) >= 0) {
                                trees -= parseInt(subcommands(0));
                                unr_trees += parseInt(subcommands(0));
                                if (rng(1, 30) == 1) {
                                    System.out.println("Lucky! You got 5 extra wood!");
                                    unr_trees += 5;
                                }

                            } else {
                                System.out.println("You need more trees!");
                                break;
                            }
                        } else {
                            System.out.println("Please provide number of trees to be cut, e.g. 'chop 3'.");
                            break;
                        }
                        endCommand = false;
                        actionsUsedThisTurn++;
                        break;

                    case "sell":
                        if (subcommands(0) == null) {
                            System.out.println("Please provide the type of wood to sell!");
                            break;
                        }
                        if (subcommands(1) == null || NotIntString(subcommands(1))) {
                            System.out.println("Please provide the amount of wood to sell!");
                            break;
                        }

                        switch (subcommands(0)) {
                            case "unrefined":
                                if (unr_trees - parseInt(subcommands(1)) >= 0) {
                                    unr_trees -= parseInt(subcommands(1));
                                    gold += rng(4, 6) * parseInt(subcommands(1));

                                } else {
                                    System.out.println("You need more unrefined logs!");
                                }
                                break;
                            case "refined":
                                if (r_trees - parseInt(subcommands(1)) >= 0) {
                                    r_trees -= parseInt(subcommands(1));
                                    gold += rng(13, 17) * parseInt(subcommands(1));
                                } else {
                                    System.out.println("You need more refined logs!");
                                }
                                break;
                            default:
                                System.out.println("Please specify either 'unrefined' or 'refined' logs.");
                                break;
                        }
                        actionsUsedThisTurn++;
                        break;

                    case "refine":
                        if (refinesLeftThisTurn < 0) {
                            System.out.println("You cannot refine any more times this turn! Wait till next turn to regain your 10 refines!");
                        }
                        if (subcommands(0) == null) {
                            System.out.println("Please provide the amount of wood to refine!");
                            break;
                        }

                        if (unr_trees - parseInt(subcommands(0)) >= 0 || gold - (parseInt(subcommands(0)) * 5) >= 0) {
                            unr_trees -= parseInt(subcommands(0));
                            r_trees += parseInt(subcommands(0));
                            gold -= parseInt(subcommands(0)) * 5;
                            refinesLeftThisTurn -= parseInt(subcommands(0));
                        }
                        actionsUsedThisTurn++;
                        break;

                    case "buy":
                        if (subcommands(0) == null) {
                            System.out.println("Please provide what you would like to buy!");
                            break;
                        }
                        if (subcommands(1) == null || NotIntString(subcommands(1))) {
                            System.out.println("Please provide the amount you would like to buy!");
                            break;
                        }

                        switch (subcommands(0)) {
                            case "fertilizer":
                                if ((gold - parseInt(subcommands(1))) * 50 >= 0) {
                                    fertilizer += parseInt(subcommands(1));
                                    gold -= parseInt(subcommands(1)) * 50;
                                    if (rng(1, 20) == 1) {
                                        System.out.println("Lucky! You got 2 extra fertilizer!");
                                        fertilizer += 2;
                                    }
                                }
                                break;
                            case "wildlifeprotection":
                                if ((gold - parseInt(subcommands(1))) * 50 >= 0) {
                                    animal_protection += parseInt(subcommands(1));
                                    gold -= parseInt(subcommands(1)) * 40;
                                    break;
                                }

                            default:
                                System.out.println("Please specify either 'fertilizer' or 'wildlifeprotection'");
                                break;
                        }
                        actionsUsedThisTurn++;
                        break;

                    case "use":
                        if (subcommands(0) == null) {
                            System.out.println("Please provide what you would like to use!");
                            break;
                        }
                        if (subcommands(1) == null || NotIntString(subcommands(1))) {
                            System.out.println("Please provide how many of that item you would like to use!");
                            break;
                        }

                        switch (subcommands(0)) {
                            case "fertilizer":
                                if (fertilizer - parseInt(subcommands(1)) >= 0) {
                                    fertilizer -= parseInt(subcommands(1));
                                    trees += rng(2, 4);
                                    if (rng(1, 10) == 1) {
                                        System.out.println("Lucky you! You get 5 extra trees!");
                                        trees += 5;
                                    }
                                } else {
                                    System.out.println("You need more fertilizer!");
                                }
                                break;
                            case "wildlifeprotection":
                                if (animal_protection - parseInt(subcommands(1)) >= 0) {
                                    animal_protection -= parseInt(subcommands(1));
                                    wildlifeProtection++;
                                } else {
                                    System.out.println("You need more wildlife protection!");
                                }
                                break;
                            default:
                                System.out.println("Please specify either 'fertilizer' or 'wildlifeprotection'");
                        }
                        actionsUsedThisTurn++;
                        break;

                    case "clear":
                        cls();
                        break;

                    case "end":
                        cls();
                        System.out.println("Thank's for playing!");
                        System.exit(0);

                    default:
                        System.out.println("Invalid command!");
                        break;
                }

                if (actionsUsedThisTurn >= 5) {
                    turn++;
                    endCommand = true;
                }
            }
            if (wildlifeProtection == 0) {
                trees -= rng(2, 4);
            }
            if (trees < 0) {
                cls();
                System.out.println("You lost, making it to " + turn + " turns! Make it longer next time!");
                System.exit(0);
            }
        }
    }

    public static void cls() {
        System.out.print("33(H33(2J");
        System.out.flush();
    }

    public static void printResources() {
        String s = "Trees: " +
                trees +
                "nGold: " +
                gold +
                "nnUnrefined Trees: " +
                unr_trees +
                "nRefined Trees: " +
                r_trees +
                "nnFertilizer: " +
                fertilizer +
                "nAnimal Protection: " +
                animal_protection;
        System.out.println(s);
    }

    private static boolean NotIntString(String string) {
        try {
            parseInt(string);
            return false;
        } catch (NumberFormatException e) {
            return true;
        }
    }

    private static int rng(int min, int max) {
        return ThreadLocalRandom.current().nextInt(min, max + 1);
    }
}

GitHub

key management – How does a Certificate get associated to the private key pair?

I am new to SSL certs and trying to understanding once the certificate is imported into the Certificate Store (in Windows), how does the certificate get associated with the private key pair? Is that by creating a pfx that would contain the certificate and private key and import that pfx into Certificate Store? We intent to use the TPM to store the private key (but not using it to generate the keypair). How do we tell the certificate store where the associated private key is to a certificate?

project management – Does exist any methodology, which helps decide which elements to choose into the technology stack?

In most cases, it is prescribed what kind of programming language to use with what framework. In my question, I’m pointing to those situations when there is no requirement for the stack.

I understand that many people are limited by their previous experience, what kind of languages they used before, but I would like to abandon this factor.

When a project is starting and the participants have the freedom to select the elements of the technology stack, they have to decide somehow why do they choose one option despite the other alternatives.

Due to my previous search, I identified some website, which has a categorization and review system for technologies:

The list is not complete, and I’m curious if there is a “best” for these “comparative” sites. Like there is a “best” for searching something on the internet, although it has working and available alternatives.

To show an example: It’s about a web development project, there is a frontend, backend, and a database. It must be determined which language and technologies to use for each part of the system.
It is obvious that popularity and support is an important factor, but that’s lead to my question of detail:

How can someone determine the popularity and supportability of the options?

key management – How does a Certificate bind to the private key?

I am new to SSL certs and trying to understanding once the certificate is imported into the Certificate Store (in Windows), how does the private key get binded to that certificate that holds the public key of the keypair? Is that by creating a pfx that would contain the certificate and private key and import that pfx into Certificate Store? We intent to use the TPM to store the private key (but not using it to generate the keypair). How do we tell the certificate store where the private key is?

How to run An Ad management in a wordpress blog?

I run a tech blog in which I want to place the Ads of the companies who want to promote their products. So far I am doing manual HTML but it is tedious. I also need to define zones where I could run banners of multiple companies and could set the expiry of it. How do I achieve in WordPress?

Staffing Service for Software Development & Infrastructure Management | NewProxyLists

Staffing Service for Software Development & Infrastructure Management

Netedge Technology is a leading technical support and server management company. We are running this business since more than 14 years. We have a great team of certified Systems Administrators who can take care of your servers from initial server setup to critical server and infrastructure management.

We help businesses to manage risk and control costs by reducing the ownership. We are providing 24×7 infrastructure management, Infrastructure Automation and cloud infrastructure design, implementation and management. We can manage any kind of infrastructure like Datacenter, webhosting servers, corporate network, and servers etc.. We can provide all the service for handling NOC (Network Operation Center ).

We are providing dedicated and shared technical staffing services. Our team works dedicated to the client like as their employee on our payroll.

There is no false commitment. Dedicated person is 100% dedicated to client only.

Dedicated staffing = 8 hours a day 5 days a week.

Shared staffing = 4 hours a day 5 days a week.

Please check this link for more details of the staffing service.

Dedicated Staffing Services

Shared Staffing Services

There are so many other services we are dealing with. Please find here with the details.

Server Management

Linux Server Management

Windows Server Security

Control Panel Security

Game Server Management

PCI Compliance

Dedicated Staffing

Shared Staffing

Remote Desktop Support

Technical Support

Hourly Technical Support

Ticket & Chat Support

One Time Service

Software Development

Virtualization Management

VPS Server Management

VPS Node Management

Web Hosting Support

Control Panel Management

Datacenter Management

IT Infrastructure Automation

Remote Infrastructure Management

Cloud Infrastructure Management

NOC Management

Web Application Management

Mobile Application Management

IOT Application Management

Please feel free to contact us at

sales@netedgetechnology.com if in case of any question.

Website = https://www.netedgetechnology.com

stored procedures – SQL Server Management Send Mail as Part of a Job

I have a SQL Job that I would like to send an email through, but for some reason I can’t get any details on why the email is not sending. This code works as expected when executed in the query window, and SQL Server Agent will also send error emails to me, so my email profile seems to be set up correctly. The code:

BEGIN
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'MailProfile',
@recipients = 'myaccount@emailcom',
@subject = 'Bad Data Report',
@query = N' USE Database;
   DECLARE @yesterday date = getdate() - 1;  select * from Timecards WHERE Date = @yesterday AND (DailyHours > 24.1 OR DailyHours < 0 ) ',
@exclude_query_output = 1,
@attach_query_result_as_file = 1,
@query_result_header = 1,
@query_attachment_filename = 'BadDataQuery.txt'
END

Following some advice from similar issues on this site, I tried looking through sysmail_allitems and sysmail_faileditems, but neither log any attempts to send. I also created a stored procedure that I had the job call as a roundabout way to send the email, but that also did not send an email nor leave an error. Any ideas what might be going on?

key management – How can I store and manage my GPG key pair securely?

I’ve taken measures and thoughts on how to securely store and manage my key pair. In the process of it a few questions arose, which I’m not capable of answering yet. My key pair will be used to encrypt passwords and documents of banks, insurances, invoices, photos and the like. All this data is not publicly available. It is stored in a cloud with password restricted access. I’m evaluating right now, which one fits best.

This is how I set up my key pair:

# Generated a key pair in the past, following general tutorials
gpg> list
sec rsa2048/9AB628FC04C23871
    created: 2019-02-29 expires: 2022-02-29 usage: SC
    trust: ultimate    validity: ultimate
ssb rsa2048/17832C40CF826BA9
    created: 2019-02-29 expires: 2022-02-29 usage: E
( ultimate ) (1). Thomas Kelly <Tkelly@ua-corp.com>

> gpg --list-keys --with-fingerprint Tkelly@ua-corp.com
pub    rsa2048 2019-02-29 (SC) (expires: 2022-02-29)
       B69A 8371 FC28 402C C204 82CF 7138 A96B B8F4 C87A
uid         ( ultimate ) Thomas Kelly <Tkelly@ua-corp.com>
sub    rsa2048 2019-02-29 (E) (expires: 2022-02-29)

> fdisk /dev/sdb # n, 2048, +2G, w
> cryptsetup open --type plain -d /dev/urandom /dev/sdb1 data
> dd if=/dev/zero of=/dev/mapper/data status=progress bs=1M
> cryptsetup close data
> cryptsetup luksFormat /dev/sdb1 # pw ...
> sudo cryptsetup open /dev/sdb1 data
> mkfs.ext4 /dev/mapper/data

Then I went on and exported my keys towards this device, I’ve created. After I got used to it, that private keys are always a little bit different from another and you can’t export your sub-public key, the following questions remained:

  1. Are both of the following commands returning the ssb key (17832C40CF826BA9)?
gpg --export-secret-keys 17832C40CF826BA9
gpg --export-secret-subkeys 9AB628FC04C23871
  1. Is it fine to remove the key 9AB628FC04C23871 from my system, after I backed it up on the drive, created above?

  2. Should I save a revocation certificate with it?

  3. This key pair once expired and I changed the expire date. I can’t remember correctly, but I’ve found two additional certificates lying around that seem to be these old expires certificates. I’ve read that the process of changing the expiring value creates new certificates. Can you confirm this?

  4. I want to have two certificate stores like this on different locations. I’d renew the key on a yearly base. Should I use paperkey or the same digital method above?