1 year ago by mamdouh

I am trying to add two floating point numbers var sum = parseFloat(a) + parseFloat(b); How do i set the decimal precision of the result to one? Eg: 0.1+0.2 should give 0.3 . . .

javascriptfloatdecimalprecision
  • 0
  • 0
  • 366
1 year ago by mamdouh

I have to map an array of lowercase characters a to z to numbers 1 to 26. Example: [a,c,f] to [1,3,6] I tried  arr.map( function(x){ return (x-96); } )   However this returns an array o . . .

javascriptcharacter-asciiascii-conversionarraymap
  • 0
  • 0
  • 507
1 year ago by mamdouh

I have an associated array $myarray = array(                      "foo1" => "bar1",                 . . .

phpassociative-arraystring
  • 0
  • 0
  • 476
1 year ago by mamdouh

What is the best way to check if string is Palindrome in PHP? . . .

phppalindromestringfunction
  • 0
  • 0
  • 716
1 year ago by mamdouh

Should i use isset() or array_key_exists()? . . .

phpassociative-array
  • 2
  • 0
  • 851
1 year ago by mamdouh

Hi, echo "/n";   is not working for me somehow?   . . .

phpnewline
  • 1
  • 0
  • 332
1 year ago by Fischer

how can i check if samba is already installed or not in my raspberry pi? I have a folder named samba in /etc with 2 files smb.conf and gdbcommands  I can see 2 samba related packages in the list . . .

raspberry-pisamba
  • 1
  • 0
  • 986
1 year ago by Fischer

I'm trying to edit the file /etc/samba/smb.conf in my Raspberry Pi using vi editor. When i try to save the file i get  this error "/etc/samba/smb.conf" E212: Can't open file for writing I am l . . .

raspberry-pivisambasmbconf
  • 1
  • 0
  • 655
1 year ago by noddy

How do i list all files or directories starting with 'a' or 'b' using ls? I tried ls a* and it doesn't work? . . .

linuxls
  • 0
  • 0
  • 373
1 year ago by noddy

What are the arguments to tar command for extracting from tar.xz? . . .

linuxtarxzuncompress
  • 1
  • 0
  • 388
1 year ago by noddy

How to set environment variables like PATH? How to do this from shell and how to make it available permanently? Is the command same for various distributions? . . .

linuxenvironment-variablepath
  • 1
  • 0
  • 446
1 year ago by noddy

What is the easiest way to find Linux version and distribution name from the terminal? Is there a command that works for all different distributions? I am on Fedora. . . .

linuxfedoraversiondistributioncommand
  • 1
  • 0
  • 355
1 year ago by Vikas

Is it possible to completely remove / disable cortana from windows 10? If possible i want to remove the search box completely from the taskbar. . . .

windows-10cortana
  • 0
  • 0
  • 385
2 years ago by noddy

I am trying to insert into MYSQL table some data recieved from AJAX post. Error: Cannot enqueue Handshake after already enqueuing a Handshake.     at Protocol._validateEnqueue (C:\nodejs\n . . .

nodejsexpressmysqlhandshake
  • 2
  • 0
  • 5152
2 years ago by Remy Pereira

I have configured file history backup on my windows 10 laptop to copy files from a drive partition to an external usb HDD drive. In the Backup-options page when i click on backup now, it says ba . . .

windows-10filehistorybackup
  • 1
  • 0
  • 798