Categories
Mastering Development

How to add BLOB to form?

I’m trying to record an audio-file using MediaRecorder and upload the recorded audio to the server’s disk afterwards. Recording is no problem so far and I have the BLOB available. All I want to do, is to attach the file to a form, so I can access it in my controller, when the submit button […]

Categories
Mastering Development

how to get last child of nsubj?

I am using python spacy to get the sentence elements as Subject,Predicate,Object etc. It gives you nominal subject as nsubj .If you follow childrens you will get whole subject of sentence, but I couldn’t get it with .net core. What I did was I created a class called Word and put properties like I get […]

Categories
Mastering Development

how to receive data from flask to jquery?

I am trying to read the data from one of the flask end point to the jquery as follows <script> $(function() { $("#generate_transaction").click(function(){ $.ajax({ url:"/new/transaction", type:"POST", dataType: ‘json’, headers: {‘Access-Control-Allow-Origin’: ‘*’}, data:$(‘#transaction_form’).serialize(), success: function(response){ //setting the Amount field empty document.getElementById(‘Amount’).value = ” }, error: function(error){ console.log(error); } }); }); }); </script> Here ‘#generate_transaction’ is the […]

Categories
Mastering Development

How to get input filename in multer with node.js

How can we get the name of the file that we are inputed when uploading files? I using multer on node.js and I want to store the filename in mysql db but I can’t figure out how to get the filename. var cpUpload = upload.fields([{ name: ‘featured_img’, maxCount: 1 }, { name: ‘audio’, maxCount: 1 […]

Categories
Mastering Development

Unable to load preload script – Electron.js Ubuntu 18.04.4

I’m trying to understand how to effectively load the proload.js file in electron: Version "electron": "^9.1.2", Version "electron-builder": "^22.8.0", In background.js I put webPreferences: { nodeIntegration: false, contextIsolation: true, //preload: path.join(app.getAppPath(), "preload.js"), preload: path.join(__dirname, "./preload.js"), }, preload.js and background.js are in the same folder: src folder. this is my preload.js : const { contextBridge, ipcRenderer […]

Categories
Mastering Development

Organizing scripts for Multiple templates Angular

Hi every one I’m new to Angular so I had some issues ; I have 3 different templates , each one is corresponding to some componenent into my project , I put all my assets into assets folder and all the links and js scripts into index.html , but there are some scripts that are […]

Categories
CMS Magento Mastering Development

I am getting error during installation at 73% for ‘Dotdigitalgroup_Email’ saying invalid column email

Module ‘Dotdigitalgroup_Email’: Installing data… Upgrading data… [ERROR] PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘imported’ in ‘where clause’ in C:\xampp\htdocs\magento2\vendor\magento\framework\DB\Statement\Pdo\Mysql.php:91 Stack trace: #0 C:\xampp\htdocs\magento2\vendor\magento\framework\DB\Statement\Pdo\Mysql.php(91): PDOStatement->execute(Array) #1 C:\xampp\htdocs\magento2\vendor\magento\framework\DB\Statement\Pdo\Mysql.php(107): Magento\Framework\DB\Statement\Pdo\Mysql->Magento\Framework\DB\Statement\Pdo\{closure}() #2 C:\xampp\htdocs\magento2\vendor\magento\framework\DB\Statement\Pdo\Mysql.php(92): Magento\Framework\DB\Statement\Pdo\Mysql->tryExecute(Object(Closure)) #3 C:\xampp\htdocs\magento2\vendor\magento\zendframework1\library\Zend\Db\Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array) #4 C:\xampp\htdocs\magento2\vendor\magento\zendframework1\library\Zend\Db\Adapter\Abstract.php(480): Zend_Db_Statement->execute(Array) #5 C:\xampp\htdocs\magento2\vendor\magento\zendframework1\library\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query(‘UPDATE `email_c…’, Array) #6 C:\xampp\htdocs\magento2\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(546): Zend_Db_Adapter_Pdo_Abstract->query(‘UPDATE `email_c…’, Array) #7 C:\xampp\htdocs\magento2\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php(613): Magento\Framework\DB\Adapter\Pdo\Mysql->_query(‘UPDATE `email_c…’, Array) #8 C:\xampp\htdocs\magento2\generated\code\Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor.php(128): […]

Categories
Mastering Development

I am having a very strange issue using styled-components. I have a style rule which should be applied to <tr> elements on focus: const TableStyles = styled.table` width: 100%; table-layout: auto; border-collapse: collapse; tr:focus { background-color: #e7f0ff; } `; This rule works for the table rows in the table body but does not work for […]

Categories
Mastering Development

Send an unsolicited message to Discord channel using nodejs

Looking for a way to send completely unsolicited messages to my discord channel using discord.js. Background: I have a nodejs app running on my desktop that is monitoring a few websites and I need to notify my team so they can deal with things as the problem evolves. It’s an ongoing issue which I’m not […]

Categories
Artificial Intelligence (AI) Mastering Development

TD3+lstm predicting the same output for varying states

I have a model with TD3 + lstm in both actor and critic. I am trying to make it learn to predict some specific actions based on the environment conditions. However i see that the AI predicts very nearly the same actions for all the states.Moreover my problem statement has many negative rewards and there […]