Categories
Mastering Development

#Javascript To input an array with char at [0] and numbers at [1]&[2] with window.prompt

everyone My name is Supasin Wuthikulphakdi, and I have homework to enter an object-like array into the alert window and the outer loop continues until we type “end”, and I’m in a hurry, expected to deliver within 3:00 pm UTC. That’s what I was ordered to do What should I write more about the input? […]

Categories
Development

Electron App with Vue and vue-cli-plugin-electron-builder can’t working with Tesseract.js

I have created a project with vue-service-cli. After trying to use tesseract OCR but I can’t load lang.traineddata locally and remotely. I have tried examples (they work) from tesseract.js repo and other many ways but with no result. When I try to load them I see standard error: Error opening data file ./eng.traineddata Please make […]

Categories
Development

How to check radiobutton with Enum value in Asp.net core mvc view

I have rendered my view like below <div class=”row row-margin-zero”> <label class=”radio-inline margin-rightt-ten margin-leftt-five margin-top-none”> <input type=”radio” asp-for=”@Model.Countries” name=”optradio” value=”1″ class=”margin-rightt-five”> America </label> <label class=”radio-inline margin-rightt-ten margin-leftt-five margin-top-none”> <input type=”radio” asp-for=”@Model.Countries” name=”optradio” value=”2″ class=”margin-rightt-five”> Australia </label> <label class=”radio-inline margin-rightt-ten margin-leftt-five margin-top-none”> <input type=”radio” asp-for=”@Model.Countries” name=”optradio” value=”0″ class=”margin-rightt-five”> Eng </label> </div> Below is my Enum public […]

Categories
Development

ordering a field value in sequential order in unix

I have a file with duplicate values in it. Based on few fields(filed 2, field3) i need to remove the duplicates and change the sequence of a field (ID) which is unique key of the file. how can i achieve this?. for eg. My file (test.txt) contains 1,Eng,ECE 2,Eng,ECE 3,Eng,CS 4,Eng,CS I want the output […]

Categories
Development

Old OCR application not working in newer enviroment

I am trying to follow the following old youtube tutorial https://www.youtube.com/watch?v=Kjdu8SjEtG0 After importing and installing packages and copy and pasting code I have many errors. I believe the problem is the imports are newer and the code referenced is for an older package. Can anyone help with getting the code to work in a modern […]

Categories
Development MongoDB

How handle i18n(with fallback) on MongoDB when translation is in another Collection?

Given these excerpt collections: Translation Collection [ { “_id”: “id01_name”, “text”: “Item’s Name” }, { “_id”: “id01_desc”, “text”: “Item’s lore description” }, { “_id”: “sk_id”, “text”: “Item’s skill description” }, ] Item Collection [ { “_id”: “id01”, “name”: “id01_name”, “lore_description”: “id01_desc”, “skill”: { “description”: “sk_id01”, } } ] Question: Using only mongodb driver (NO Mongo […]

Categories
Development SQL

Data not inserting from radio buttons into SQL DB from c#

Hy Everyone! I am trying to add some yes/no values into my sql database by using some radio buttons and checkboxes. when I click the insert button it does not show any error but also does not insert data into the table. I have a DBConn class that has following code: class DBConn { DataSet […]

Categories
Development SQL

Data not inserting from radio buttons into SQL DB from c#

Hy Everyone! I am trying to add some yes/no values into my sql database by using some radio buttons and checkboxes. when I click the insert button it does not show any error but also does not insert data into the table. I have a DBConn class that has following code: class DBConn { DataSet […]

Categories
Development

Submitting a form where input is array in php

I want to submit the values of marks, grade, subject, and name of different students in PHP. While adding the marks the average and grade get automatically calculated in front end using jQuery of each student. But I am having trouble submitting array values through PHP. I tried several options but none of them worked. […]

Categories
Development

Frequency matrix – how to build in Python

I have very little experience with Python and trying to build a frequency matrix which would summarize how many publication titles contain specific keywords, broken down by Faculty and keyword group (SDG). My current script uses test data and shows the occurrences when a title from a Faculty has a keyword from one of the […]