Categories
Ask Games RPG Games

Best/worst experiences you’ve had with a DM?

Engineering lead, manager, festival producer stepping into DM shoes after being asked by friends. In light of COVID19 a group of friends has asked me to run some Zoom hosted DnD campaigns. I’m usually the one to organize game nights, and I already know how to break problems and assignments down, I’ve been in and […]

Categories
Mastering Development

Maximize profit with disregard to number of pickup-delivery done OR tools

I am trying to maximize profit, whether I deliver all pickups-deliveries does not matter. I tried setting SetArcCostEvaluatorOfAllVehicles to use negative profit instead of cost callback; however, this does not work, an I get no solution often, my thought is that cost cannot be negative. Is this correct? Adding AddVariableMaximizedByFinalizer with profit callback does not […]

Categories
Development

Extraction datas from forms

I’ve just start to learn Django and now I’m trying understand how to insert datas in db, how to work with datas from templates and ect. My question is about extracting datas from form(Meta class) in template. Here is my code: model class Worker(models.Model): POSITION_SHOICE = ( (‘MANAGER’, ‘MANAGER’), (‘developer’, ‘DEVELOPER’), (‘teamlead’, ‘TEAMLEAD’), (‘pm’, ‘PM’), […]

Categories
Development

Add Button or radio button for each row in the table

I use react material ui table, I want to add a button or a radio button per row, help me. My table code is mentioned below. <GridContainer> <GridItem xs={12} sm={12} md={12}> <Card> <CardHeader color=”success”> <h4 className={classes.cardTitleWhite}>New Expenses</h4> <p className={classes.cardCategoryWhite}> </p> </CardHeader> <CardBody> <Table tableHeaderColor=”success” tableHead={[“Expense”, “DivNo”, “Amount”, “Generated by”,”Description”, “Date”]} tableData={[ [“Advance Pay(Weekly salary advance)”, […]

Categories
Development

Spring Boot Service Junit Mockito issue

I have written Junit for the service. mocking dao. Service method return type in EmployeeDTO. Dao return type is Employee. problem is employee to employeeDto conversion failed in test case. when(dao.method()).thenReturn(new Employee), so on call od service.method() I am facing issue since dozer is in between to convert employee to employeedto in the actual code. […]

Categories
Development

Web application not working in swarm mode while using traefik

**I’m trying to use Traefik to load-balance my web apps via docker swarm. I have installed sample application like joomla in swarm mode behind traefik. Joomla works fine when the application is deployed on the same node as traefik (ie, manager), and I can access it through the browser by hitting the manager’s node IP. […]

Categories
Development

How to handle different types of users when loggin in?

In an application I’ve been building, I have a users table. The users represent a firm’s staff. I also implemented a role/permission system. Permissions are assigned to roles (staff, manager, director, etc.), and roles are assigned to users. Permissions prohibit the use of certain actions in the app. Now, I’m introducing another user type: customer […]

Categories
Development Google Java Javascript jQuery JSON MySQL Plugins

How to send Json Object from view function to javascript

flask function view from adding users and displaying the records in Json, I dont know how to send json data to my Javascript file through url, I have been trying to find the solution for over a week but find no luck. Hope I will get some help here. @guests.route(‘/’, methods=[‘GET’,’POST’]) def add_guests(): form = […]

Categories
Development

Error with opening url in other tab in js code

In my Laravel 5.8 / “vue”: “^2.6.10″/ app I need to open url in other tab in js code. I found example let routeData = this.$router.resolve({name: ‘routeName’, query: {data: “someData”}}); window.open(routeData.href, ‘_blank’); here Can vue-router open a link in a new tab? but implementing it I did not find valid way : let routeData = […]

Categories
Development SQL

SQLite how to query this?

Tables: CREATE TABLE “Employees” ( “Id” INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, “Name” TEXT NOT NULL, “EnrollmentDate” INTEGER NOT NULL, “BaseSalary” REAL NOT NULL, “ChiefId” INTEGER, “PositionId” INTEGER ) CREATE TABLE “Position” ( “Id” INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, “PositionName” INTEGER NOT NULL, “YearPercent” INTEGER NOT NULL, “MaxYearPercent” INTEGER ) Data Positions: […]