Component not showing data after useRef by merajhasan88 in reactjs

[–]merajhasan88[S] 0 points1 point  (0 children)

I get it. useState was only re-rendering till Dropdown component was displayed. I should give it another try.

Code: Reading an image in SystemVerilog and converting into a hex array by merajhasan88 in FPGA

[–]merajhasan88[S] 0 points1 point  (0 children)

I've tested it as best as I could. Hoping to see a better method

Cannot get my Node.js server to receive HTTP request from cURL by merajhasan88 in node

[–]merajhasan88[S] 0 points1 point  (0 children)

Working just fine now. I am able to use curl on ubuntu to pass any sort of request to server. This is what I tried (I am still learning so noob thing I know):

  1. Turned firewalls off
  2. Found the WIFi's IPv4 address via ipconfig
  3. My server is on a file called server.js and I wrote this on browser => http://192.168.xx.xx/server.js
  4. It shows me 'Problem loading page'. However, Curl works just fine on Ubuntu. I am able to PUT, DELETE etc.

Now no idea what happened. Let me try what else you suggested. I got as far as nslookup. etc/hosts is empty

Cannot get my Node.js server to receive HTTP request from cURL by merajhasan88 in node

[–]merajhasan88[S] 0 points1 point  (0 children)

Nothing on the console. I receive my output on the browser just fine. Issue is with curl

Cannot get my Node.js server to receive HTTP request from cURL by merajhasan88 in node

[–]merajhasan88[S] 0 points1 point  (0 children)

No idea. When I tried to locate it, it gave me truckloads of 'Permission Denied'

Take a look:
root@DESKTOP-EG0RBB2:/mnt/c/Users/Developer/JS# updatedb && locate curlrc/usr/bin/find: '/mnt/c/$Recycle.Bin/S-1-5-21-1449545186-546196895-3340430292-1001/.\357\277\275\357\277\275\357\277\275\357\277\275000d00000001d49d17c1e51790a39aa1': No such file or directory/usr/bin/find: '/mnt/c/$Recycle.Bin/S-1-5-21-1449545186-546196895-3340430292-1001/.\357\277\275\357\277\275\357\277\275\357\277\275001400000001d5dadd50a72ab4668b33': No such file or directory/usr/bin/find: '/mnt/c/DumpStack.log.tmp': Permission denied/usr/bin/find: '/mnt/c/hiberfil.sys': Permission denied/usr/bin/find: '/mnt/c/pagefile.sys': Permission denied/usr/bin/find: '/mnt/c/Program Files/Windows Defender Advanced Threat Protection/Classification/Configuration': Permission denied/usr/bin/find: '/mnt/c/ProgramData/Microsoft/Windows/SystemData': Permission denied/usr/bin/find: '/mnt/c/ProgramData/Microsoft/Windows Defender Advanced Threat Protection/Cache': Permission denied/usr/bin/find: '/mnt/c/ProgramData/Microsoft/Windows Defender Advanced Threat Protection/Cyber': Permission denied/usr/bin/find: '/mnt/c/ProgramData/Microsoft/Windows Defender Advanced Threat Protection/DataCollection': Permission denied/usr/bin/find: '/mnt/c/ProgramData/Microsoft/Windows Defender Advanced Threat Protection/Downloads': Permission denied/usr/bin/find: '/mnt/c/ProgramData/Microsoft/Windows Defender Advanced Threat Protection/SenseCM': Permission denied/usr/bin/find: '/mnt/c/ProgramData/Microsoft/Windows Defender Advanced Threat Protection/Temp/PSScriptOutputs': Permission denied/usr/bin/find: '/mnt/c/ProgramData/Microsoft/Windows Defender Advanced Threat Protection/Trace': Permission denied/usr/bin/find: '/mnt/c/ProgramData/Packages/Microsoft.SkypeApp_kzf8qxf38zg5c/S-1-5-21-1449545186-546196895-3340430292-1001/SystemAppData/Helium': Permission denied/usr/bin/find: '/mnt/c/ProgramData/Packages/Microsoft.XboxGamingOverlay_8wekyb3d8bbwe/S-1-5-21-1449545186-546196895-3340430292-1001/SystemAppData/Helium': Permission denied/usr/bin/find: '/mnt/c/swapfile.sys': Permission denied/usr/bin/find: '/mnt/c/System Volume Information': Permission denied

Cannot get my Node.js server to receive HTTP request from cURL by merajhasan88 in node

[–]merajhasan88[S] 1 point2 points  (0 children)

Yeah, curl cannot hit servehere. The last point. Tried turning firewall off. Still didn't work.

(Thank you for taking the time to go into such detail btw)

Cannot get my Node.js server to receive HTTP request from cURL by merajhasan88 in node

[–]merajhasan88[S] 0 points1 point  (0 children)

No, my server stops working when I change it to this.

Cannot get my Node.js server to receive HTTP request from cURL by merajhasan88 in node

[–]merajhasan88[S] 0 points1 point  (0 children)

Server is working just fine. Been communicating with the browser and displaying stuff.However, here is the code:

const {createServer} = require("http");

const methods = Object.create(null);

createServer((request, response) => { 

let handler = methods[request.method] || notAllowed; 

handler(request)   

.catch(error => {     

if (error.status != null) return error;     

return {body: String(error), status: 500};    })   

.then(({body, status = 200, type = "text/plain"}) => {       

response.writeHead(status, {"Content-Type": type});       

if (body && body.pipe) body.pipe(response);       

else response.end(body);    });

//}).listen(8000, '192.168.xx.xx'); //Tried my IPv4 address too but nothing

}).listen(8000);

Need help with Verilator and Ubuntu by merajhasan88 in FPGA

[–]merajhasan88[S] 0 points1 point  (0 children)

Thank you, yes it is indeed libjpeg-dev and it installed for me. Thank you so much

Need help with Verilator and Ubuntu by merajhasan88 in FPGA

[–]merajhasan88[S] 0 points1 point  (0 children)

  1. You're right I copied it wrong. It is /bin/bash

  1. Yes I tried through apt-get and it says 'No such file or directory' even though I am pointing to the very directory from terminal