Magento 2 creates a new customer area

I want to create a new example for a customer section example order

URL like: customer / account / sample orders /

I tried below method that works, but it is wrong to change core Magento files, what I tried is below, but I want to do it vai module

1: created a file Sampleorders.php

vendor / magento / module-customer / Controller / Account / Sampleorders.php

An SQL script that creates mer-compliant tables

System users require registration, and it is necessary to save their personal information and log in to the environment. Furthermore

As part of the main functionality of the system, any user can specify locations of possible dengue outbreaks, send photos, locations, etc. Therefore we need a database to store all this data safely and efficiently. His task then is to create an initial needs overview of the types of information that are stored in the bank and to create an entity relationship model (MER) that describes how this information is related within the bank become. Include entities, relationships (with their respective cardinalities) and attributes in the MER.

In a second step after creating the MER, create a simple SQL script to create all the necessary tables according to the MER

list – SharePoint Workflow 2010 occasionally creates folders on the SharePoint 2016 website

I have a workflow that generates folders in a separate document library based on information from a task list. I have enabled it to start manually and when a task is created. However, an error is displayed in the workflow for certain tasks:

Enter the image description here

I tried to edit it in different ways without success. There seems to be no point in which it is not created, there is no obvious similarity that could cause the error between the elements.

Does anyone know a specific reason why this could happen?

python 3.x – Makes json inputs and creates dynamic json outputs based on the input values: look for a better way to do this

I have this particular scenario where I will get a JSON that could have multiple objects. From the several objects, I will create a new Json, in which nested arrays can grow by n amounts depending on some json object values.

I hope there is a better way to do this. Maybe my example below is the best way? I looked at, but I don't think this will help as converting the data class object to another JSON seems complicated.

Update: I think I'll put the original JSON object in a data class. Then iterate over the objects.

Example entry: Note that 3 and 4 are start and end times for breaks. For this reason, the start and end times are displayed in the break array.

    "name": "Jay",
    "clock_type": 1,
    "start": "4am"
}, {
    "name": "Jay",
    "clock_type": 4,
    "start": "5am"
    "name": "Jay",
    "clock_type": 3,
    "end": "6am"
    "name": "Jay",
    "clock_type": 4,
    "start": "7am"
    "name": "Jay",
    "clock_type": 3,
    "end": "8am"


Example output:

"name": "Jay",
"start": "4am",
"break": ({
    "start": "5am",
    "end": "6am"
}, {
    "start": "7am",
    "end": "8am"


What I'm doing is going through the array and dynamically creating the punch based on the "clock_type".

import json

def write_new_json(data):

    request = {}
    break_count = 0

    for i in data:
        # 1 = New Object. First Clock In
        if i('clock_type') in (1):
            request.update({"name": i("name"),
                            "start": i("start")})
        # 3 = Break End
        if i('clock_type') in (3):
            request("break")(break_count).update({"end": i("end")})
            break_count += 1

        # 4 = Break start. If there is already a breaks object, then we do not create a breaks array, 
              # we just append to the existing one.
        if i('clock_type') in (4):
            if break_count == 0:
                request.update({"break": ()})

            request("break").append({"start": i("start")})

       # 2 = Not in the example, but a punch of 2 would reset break_count to 0.

    return request

with open('example.json') as f:
    api_request = write_new_json(json.load(f))


Web applications – Django's Python "" creates a superuser and reports the error "no such table"

I am working on my graduation year project. I wanted to extend the standard user model provided by Djangos to add more attributes. I have added the following code in mine

class User(AbstractUser):
    contact = models.CharField(max_length=100)

Also in I added:

AUTH_USER_MODEL = 'esacp.User'

whereas esacp is the name of my app.

After I did all of that, I ran python makemigrations esacpthen I ran python migrate in my CMD. Both commands worked perfectly.

Now I have created an administrator role for my Django Web App to manage things as superuser when I ran the command python createsuperuserAfter typing the username and pressing Enter, I was asked for the username. This gave me the mistake:
django.db.utils.OperationalError: no such table: esacp_user

The screenshot of the whole bug is attached below:
Enter image description here

Please tell me where I made mistakes or missed something?

Thanks in advacned.

ui design – Unity – Creates a Windows command prompt

I want to create a simple Windows command prompt in the game. I'm using the Unity desktop 90's desktop user interface asset pack to prototype an old Windows desktop interface.

I played around with Text Mesh Pro and got some success, but it's very hacked.

Does anyone know of blogs / tutorials on running a command prompt / terminal in the game? I can't find anything with this type of mechanic.

Thank you very much.

combobox – Creates an entry in the Access form based on the entry selected from the combo box (without including the entry from the combo box)

I use Access to keep a list (with details) of the cases I'm working on (I'm a lawyer). I want Access to add a unique case identifier to each case. I use a form to enter the data in the database.

I wrote this very simple code to get the Case ID No:

Private Sub Command81_Click()
If Not IsNull(Me.Case_ID) Then
Command81.Enabled = True
Me.Case_ID = Me.Combo321 + Format(Me.(Date Original Event), "yymmdd") + Format(Time, "hhmmss")
End If
End Sub

The idea is that I fill in the various fields on the form and then click a button to name the case ID (in the text box (on the form) and the field (in the database) labeled & # 39; Fall_ID & # 39 ; add.

When I click the button, it should check if a case ID already exists. If this is the case, no new one will be created. If there are none, a new case ID is created based on the country where the case occurred (Combo321) + the date the original event occurred + the time I created the case ID ,

The country in which the case occurred is selected from a dropdown menu (Combo321). The options in the drop-down menu come from a table with a list of countries:

Netherlands, United Kingdom, Germany etc.

If possible, I would like to keep the list of (full) country names in the drop-down menu, but use a 2 or 3-digit abbreviation in the case ID. So when I choose from the dropdown menu that the case happened in the Netherlands, I want the case to start with NL. If the case happened in the UK, I would like the case to start with UK.

Is it possible to create a second column with the abbreviations in the table with the country names and then to start the case ID in the code with the entry in the second column that "belongs" to the corresponding entry in the first column (the complete Country name) that I selected from the dropdown menu?

Or is there maybe another way to do this?

C # – "Instantiate" function in Unity creates enemies but is not shown

So I make a top-down shooter (2D) and have already built an enemy prefabricated house. It goes to the player, damages him and reacts physically to bullets until he finally dies. The prefabricated house itself is fine because I can create it manually and it works as intended. The problem occurs when I want to automate the spawn process with a script. So I created a script for it, here it is:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameController : MonoBehaviour

    public GameObject enemy;

    private float spawnPositionX; 
    private float spawnPositionY;

    Vector2 spawnVector;

    // Start is called before the first frame update
    void Start()

    void SpawnEnemy()
        spawnPositionX = Random.Range(-630f, 630f);
        spawnPositionY = Random.Range(-340f, 340f);

        spawnVector = new Vector2(spawnPositionX, spawnPositionY);

        Instantiate(enemy, spawnVector, Quaternion.identity);

As you can see, it's not too complex. I am only referring to a game object (which I linked by the way) and then create some variables that contain the x and y positions where the enemy randomly appears. Then when I call the function, these positions are set and stored in a two-dimensional vector, so that they can then be used with the instantiation function.

That … works … somehow? When I launch the game, the enemy instance is created, I can see the clone in the hierarchy and I can select it and see that it is actually moving, but it's like … not there? I cannot see it on the screen and it is not invisible because I cannot interact with it either. It's really weird and I have no idea what's going on.

I tried not to put the script on the camera, on the screen, on a new empty object, anything. I also checked whether the prefab and the instance being created are actually active. I thought the coordinates were out of bounds, but when I check my player coordinates they're inbounds, so it can't be. I am completely lost in this thought? Thank you very much.

Trying to have a group of units in Python 3 creates random values ​​for a salvage loot system independently

I'm working on developing a salvage mechanic for my game. I want different units to calculate salvage after an encounter to randomly determine how much each one could intercept of fallen allies or attackers.

As I have now set it up, it is calculated as a group.
IE: If I have a group of units that can have a residual value of 5 together and receive 1 to 4 pieces for each residual value, then I have a range of 5 to 20 residual values ​​(provided there are 20 or more) to collect salvage pieces). I simply multiply the total residual value of the group by a random number in a range from 1 to 4.

My question is how can I get each unit to calculate their salvage individually from their own range, rather than as a group, as I am now doing, to achieve a greater variance in the amount of salvage generated.

I am fairly new and any suggestion or insight would be appreciated.

Below is the code for a demo I set up for the salvage system:

import random

parts_inventory = 0
undif_unit_count = 999
haulers = 2
foragers = 1
salvage_value = (haulers * 2) + foragers
temp_salvage = 0
salvage_random = random.randint(1, 4)

attack = random.randint(1, 6)
fatalities = attack
salvage_pool = fatalities * 4

print("There were {} units destroyed resulting in {} pieces of potential salvage".format(attack, salvage_pool))
print("Your units can haul away {} peice of salvage".format(salvage_value))

def salvage_operation(parts_inventory=parts_inventory):
    print("Encounter Haul {}".format(salvage_value))
    if salvage_value <= salvage_pool:
        print("You gained {} salvaged parts.".format(salvage_value))
        parts_inventory = parts_inventory + salvage_value
    if salvage_value > salvage_pool:
        print("You gained {} salvaged parts.".format(salvage_pool))
        parts_inventory = parts_inventory + salvage_pool