Hello, this is a Matlab code where you imagine yourself running a supermarket and need to calculate the net profit of your business. Please help me finish it

Note (use a switch statement in a while statement)
Use for loop too!! () 1

    '(1): Example on how to start!(!(enter image description here)(1))(1)'

    '(2) clc
    clear all'

    '(3)a= input('How many different items did you have? ')
     name= input('Which items did you buy? ','s')'

Development process – What steps should I take to familiarize myself with a new code base?

I joined a small software development team to work on an existing code base. While I'm busy learning the programming languages ​​required and actually reading the code, I wonder if there are things that software developers would recommend to get familiar with working with an unknown code base efficiently.

I am concerned that my question is too broad, so comments on how I can improve it would be appreciated.

php – How do I complete this code to include a delete function that deletes both the directory and the files in it?

So I looked through certain files and excluded them from the directory, displayed files that were numbered with a delete key, and had to enter a delete function to delete the directory and the files contained in it. I'm not sure how that is written, someone can give an answer.

";
        echo "";
        echo $count;
        echo "";
        echo "";
        echo $file;
        echo "";            
        echo "";
        echo "
"; if(isset($_POST($v_delete))) { // Your php delete code here echo "delete file : ".$file; } echo ""; } $count++; }

?>

java – Is there a specific code to add money and check hands in poker?

The player must start at $ 200 and there should be 3 radio buttons for $ 1, $ 10 and $ 100 bets. If the player presses deal, the stake should be deducted from the player's pocket. Then the player selects which cards they want to hold and presses Draw. At this point, the game should determine whether the player's hand is a winning hand. Check out a standard 5-card poker table for the winning hands. If the hand wins, the player's pocket should be credited with double the bet amount, and then we will return to the betting phase.

I'm playing a poker game and I've come a long way. This is the command prompt that I use for this code. I checked many examples, but couldn't use any of them to add the money. I have already added the RadioButtons. Any tips or a better example that I could use?

Button btDEAL = new Button("DEAL");
    btDEAL.setOnAction(e -> draw(hBox));


{


private int Money = $200;
    Money = $200;



    Button btdraw = new Button("DRAW");
    btdraw.setOnAction(e -> draw(hBox));

    //Creates hold button to hold cards
    Button bthold1 = new Button("HOLD");
    bthold1.setOnAction(new Hold1Handler());
    Button bthold2 = new Button("HOLD");
    bthold2.setOnAction(new Hold2Handler());
    Button bthold3 = new Button("HOLD");
    bthold3.setOnAction(new Hold3Handler());
    Button bthold4 = new Button("HOLD");
    bthold4.setOnAction(new Hold4Handler());
    Button bthold5 = new Button("HOLD");
    bthold5.setOnAction(new Hold5Handler());


    RadioButton r1 = new RadioButton("$1");
    RadioButton r2 = new RadioButton("$10");
    RadioButton r3 = new RadioButton("$100");

    holdBox.getChildren().addAll(bthold1, bthold2, bthold3, bthold4, bthold5);


    vBox.getChildren().addAll(hBox, holdBox, btdraw, btDEAL, r1, r2, r3);



    // Creates the window with the pane inside
    Scene scene = new Scene(vBox, 500, 500);
    primaryStage.setTitle("Poker Five Cards");
    primaryStage.setScene(scene);
    primaryStage.show();


}


public static void main(String args()) {
    launch(args);
}



public void draw(HBox pane) {
    // shuffle deck
    java.util.Collections.shuffle(cards);

    // The card will be swaped if not under the hold button
    if (hold1 == false) {
        exit(images.get(0), 1);
        new java.util.Timer().schedule(
        new java.util.TimerTask() {
        @Override
        public void run() {
        Image image1 = new Image(new File("card\" + cards.get(0) + ".png").toURI().toString());
        images.get(0).setImage(image1);
        enter(images.get(0), 1);
                    }
                },
                1000
        );
    }
    else {
        new PathTransition(Duration.ZERO, new Path(new MoveTo(0,50)), images.get(0)).play();
    }
    //If card not under hold then the card will flip and a new image shows up
    if (hold2 == false) {
        exit(images.get(1), 2);
        new java.util.Timer().schedule(
        new java.util.TimerTask() {
        @Override
        public void run() {
        Image image2 = new Image(new File("card\" + cards.get(1) + ".png").toURI().toString());
        images.get(1).setImage(image2);
        enter(images.get(1), 2);
                    }
                },
                1000
        );
    }
    else {
        new PathTransition(Duration.ZERO, new Path(new MoveTo(0,50)), images.get(1)).play();
    }

    if (hold3 == false) {
        exit(images.get(2), 3);
        new java.util.Timer().schedule(
        new java.util.TimerTask() {
        @Override
        public void run() {
        Image image3 = new Image(new File("card\" + cards.get(2) + ".png").toURI().toString());
        images.get(2).setImage(image3);
        enter(images.get(2), 3);
                    }
                },
                1000
        );
    }
    else {
        new PathTransition(Duration.ZERO, new Path(new MoveTo(0,50)), images.get(2)).play();
    }

    if (hold4 == false) {
        exit(images.get(3), 4);
        new java.util.Timer().schedule(
        new java.util.TimerTask() {
        @Override
        public void run() {
        Image image4 = new Image(new File("card\" + cards.get(3) + ".png").toURI().toString());
        images.get(3).setImage(image4);
        enter(images.get(3), 4);
                    }
                },
                1000
        );
    }
    else {
        new PathTransition(Duration.ZERO, new Path(new MoveTo(0,50)), images.get(4)).play();
    }

    if (hold5 == false) {
        exit(images.get(4), 5);
        new java.util.Timer().schedule(
        new java.util.TimerTask() {
        @Override
        public void run() {
        Image image5 = new Image(new File("card\" + cards.get(4) + ".png").toURI().toString());
        images.get(4).setImage(image5);
        enter(images.get(4), 5);
                    }
                },
                1000
        );
    }
    else {
        new PathTransition(Duration.ZERO, new Path(new MoveTo(0,50)), images.get(4)).play();
    }


}
private void enter(Node card, int pos) 
{
    //A timer is set the card to flip
    PathTransition path = new PathTransition();
    path.setDuration(Duration.millis(1000));
    path.setNode(card);
    path.setPath(new Path(new MoveTo(0, -300), new LineTo(0, 50)));
    path.play();
}





    private void exit(Node card, int pos) 
    {
        ((ImageView)card).setImage(new Image(new File("card\b2fv.png").toURI().toString()));
    PathTransition path = new PathTransition();
    path.setDuration(Duration.millis(1000));
    path.setNode(card);
    path.setPath(new Path(new MoveTo(0,50), new LineTo(0,600)));
    path.play();
}
//if the card is under the hold button it is true, if not it is false
class Hold1Handler implements EventHandler {
    @Override
    public void handle(ActionEvent e) {
        if (hold1 == true) {
            hold1 = false;
        } else if (hold1 == false) {
            hold1 = true;
        }
    }
}

class Hold2Handler implements EventHandler {
    @Override
    public void handle(ActionEvent e) {
        if (hold2 == true) {
            hold2 = false;
        } else if (hold2 == false) {
            hold2 = true;
        }
    }
}

class Hold3Handler implements EventHandler {
    @Override
    public void handle(ActionEvent e) {
        if (hold3 == true) {
            hold3 = false;
        } else if (hold3 == false) {
            hold3 = true;
        }
    }
}

class Hold4Handler implements EventHandler {
    @Override
    public void handle(ActionEvent e) {
        if (hold4 == true) {
            hold4 = false;
        } else if (hold4 == false) {
            hold4 = true;
        }
    }
}

class Hold5Handler implements EventHandler {
    @Override
    public void handle(ActionEvent e) {
        if (hold5 == true) {
            hold5 = false;
        } else if (hold5 == false) {
            hold5 = true;
        }
    }

Build and deploy an Azure function when building blob containers in C # code

I have a (.net core C #) API for uploading, retrieving, deleting, etc. images. Images are uploaded to blob containers that are dynamically created from the code. The name is given when uploading an image with the POST request. Azure also provides a blob trigger feature that can be used to create a reduced, low-quality image size for each image uploaded to a specific blob container. This image resizing app has to be duplicated for each newly created container. If duplicated, I have to bind the new container names as the source and target containers of the new instance of the image resizing app AND provide them in the same resource group as the first function app.

Is there any way to do all of this with the C # code? If not from the code, how can I do that?

PrintLn header for C ++ Code Review Stack Exchange

I have always wondered how PrintLn can be most elegantly implemented in C ++. I have not yet come to a perfect conclusion. This is my shot.

Link for the "print line" version of std :: cout, std :: cerr and std :: clog. So you can type
CoutLn << "Hello world!"; instead of std::cout << "Hello world!" << 'n';

CoutLn, CerrLn, ClogLn are implemented.

#include 
#include 
#include 

/* Template magic: determine if our type is printable. */
template
struct is_to_stream_writable : std::false_type {};
template
struct is_to_stream_writable()<())>> : std::true_type {};

/* Since std::cout, std::cerr etc. are all different instances of the same type, 
 * let's define dummy classes for detecting different instances. */
class Cout{};
class Cerr{};
class Clog{};

template
class PrintLn {
  private:
    static std::ostream* stream;
    static std::mutex m;
  public:
    PrintLn() {
      if constexpr (std::is_same::value) stream = &std::cout;
      else if constexpr (std::is_same::value) stream = &std::cerr;
      else if constexpr (std::is_same::value) stream = &std::clog;
    }
    template
    PrintLn& operator<<(const T& msg) {
      static_assert(is_to_stream_writable::value, "your type is not printable");
      std::lock_guard(PrintLn::m);
      *stream << msg;
      return *this;
    }
    ~PrintLn() {
      std::lock_guard(PrintLn::m);
      *stream << 'n';
    }
};

/* Declare static variables. */
template
typename::std::mutex PrintLn::m;

template
typename::std::ostream* PrintLn::stream;

using CoutLn = PrintLn;
using CerrLn = PrintLn;
using ClogLn = PrintLn;

/* Shorter syntax, for example: `CerrLn{} << "error";` -> `CerrLn << "error";`. */
#define CoutLn CoutLn{}
#define CerrLn CerrLn{}
#define ClogLn ClogLn{}

8 – Language code and country code on the URL

I tried to do this:

I have a multilingual site with 8 languages ​​(en, fr, es, de etc.) and I want to make all these languages ​​available for all countries.

I want Drupal to understand this:

  • / en CO alias of / en
  • / en-FR alias of / en
  • / es-US alias of / es
  • / es-AR alias of / es
  • / fr-CO alias of / fr
  • / de-US alias of / de

And so on … (you share exactly the same content)

Adding all of these custom languages ​​is easy, but I don't want to because more than 1600 combinations are possible.

Do you know if there is a way to do this programmatically or with a module?

I am currently looking for PathProcessor, but for now no result.

Any help would be appreciated.

I want to know the complexity of this code below

include

include

include

void main ()
{
char p (10) (5), temp (5);
int i, j, pt (10), wt (10), totwt = 0, pr (10), temp1, n;
float avgwt;
printf ("Enter number of girls:");
scanf ("% d", & n);
for (i = 0; ipr (j))
{
temp1 = pr (i);
pr (i) = pr (j);
pr (j) = temp1;
temp1 = pt (i);
pt (i) = pt (j);
pt (j) = temp1;
strcpy (temp, p (i));
strcpy (p (i), p (j));
strcpy (p (j), temp);
}}
}}
}}
Weight (0) = 0;
for (i = 1; i