Trending questions in Web Development

0 votes
1 answer

How to delete a file via PHP?

Hello @kartik, The following should help realpath — Returns canonicalized ...READ MORE

Sep 17, 2020 in PHP by Niroj
• 82,840 points
628 views
0 votes
1 answer

How to delete a cookie using javscript?

Hello @kartik, Try this: function delete_cookie( name, path, domain ...READ MORE

Sep 21, 2020 in Java-Script by Niroj
• 82,840 points
483 views
0 votes
1 answer

How to build an Uber clone app like Wooberly?

Hello @Bruceoxenford, Many uber clone scripts were developed ...READ MORE

Sep 11, 2020 in Web Development by Niroj
• 82,840 points
879 views
0 votes
1 answer

How can I allow django admin to set a field to NULL?

Hello @kartik, Try to overwrite the save() method ...READ MORE

Jun 12, 2020 in Java-Script by Niroj
• 82,840 points
4,810 views
0 votes
1 answer

How to get value of selected radio button?

Hello @kartik, Use this: var rates = document.getElementById('rates').value; The rates ...READ MORE

Sep 2, 2020 in Java-Script by Niroj
• 82,840 points
1,257 views
0 votes
1 answer

How nodejs get file name from absolute path?

Hello @kartik, Use the basename method of the path module: path.basename('/foo/bar/baz/asdf/quux.html') // returns 'quux.html' If you ...READ MORE

Jul 14, 2020 in Node-js by Niroj
• 82,840 points
3,427 views
0 votes
1 answer

How do you bind an Enum to a DropDownList control in ASP.NET?

Hello @kartik, I probably wouldn't bind the data as it's ...READ MORE

Jul 23, 2020 in Angular by Niroj
• 82,840 points
3,005 views
0 votes
1 answer

Error:setState doesn't update the state immediately

Hello @kartik, The method setState() takes a callback. And ...READ MORE

Jun 4, 2020 in Angular by Niroj
• 82,840 points
5,118 views
0 votes
1 answer

How to concatenate text from multiple rows into a single text string in SQL server?

Hello @kartik, Use COALESCE: DECLARE @Names VARCHAR(8000) SELECT @Names = ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,840 points
3,079 views
0 votes
1 answer

How can I get useful error messages in PHP?

Hello @kartik, The following enables all errors: ini_set('display_startup_errors', 1); ini_set('display_errors', ...READ MORE

Sep 16, 2020 in PHP by Niroj
• 82,840 points
585 views
0 votes
1 answer

How to get client IP address in Laravel >5?

Hello @kartik, Use request()->ip(). Since Laravel 5 it's advised/good practice ...READ MORE

Sep 11, 2020 in Laravel by Niroj
• 82,840 points
796 views
0 votes
1 answer

How can I get current route

Hello @Ava, Try this this.router.events.filter((event: any) => event instanceof ...READ MORE

Sep 14, 2020 in Angular by Niroj
• 82,840 points
656 views
0 votes
1 answer

Error: CERT_UNTRUSTED while using npm command

Hello @kartik, You can bypass https using below ...READ MORE

Jul 17, 2020 in Node-js by Niroj
• 82,840 points
3,233 views
0 votes
1 answer

Error:Chrome refuses to execute an AJAX script due to wrong MIME type

Hello @kartik, By adding a callback argument, you ...READ MORE

Jun 19, 2020 in Java-Script by Niroj
• 82,840 points
4,402 views
0 votes
1 answer

How to increase the execution timeout in php?

Hello @kartik, You need to change some setting ...READ MORE

Sep 1, 2020 in PHP by Niroj
• 82,840 points
1,180 views
0 votes
0 answers

I am unable to send emails on my php script

I am unable to send emails from ...READ MORE

Sep 6, 2020 in Laravel by Titus
• 160 points

recategorized Sep 6, 2020 by Niroj 1,032 views
0 votes
1 answer

How can I check the existence of an element in jQuery?

Hello @ Arpit In JavaScript, everything is 'truthy' or ...READ MORE

Sep 8, 2020 in Java-Script by Niroj
• 82,840 points
848 views
0 votes
1 answer

How to pass data to view in Laravel?

Hello @kartik, You can pass data to the ...READ MORE

Sep 11, 2020 in Laravel by Niroj
• 82,840 points
706 views
0 votes
1 answer

How do I catch exceptions / missing pages in Laravel 5?

Hello @kartik, In Laravel 5 you can catch ...READ MORE

Aug 11, 2020 in Laravel by Niroj
• 82,840 points
2,028 views
0 votes
1 answer

How to get current path of a Request with its query parameters?

Hello @kartik, Try to use the following: \Request::getRequestUri() Hope this ...READ MORE

Aug 11, 2020 in Laravel by Niroj
• 82,840 points
2,027 views
0 votes
1 answer

What is the “hasClass” function with plain JavaScript?

Hello @Kartik, Simply use classList.contains(): if (document.body.classList.contains('thatClass')) { ...READ MORE

Sep 2, 2020 in Java-Script by Niroj
• 82,840 points
1,062 views
0 votes
1 answer

How to get the current URL with JavaScript?

Hello @kartik, Use: window.location.href As noted in the comments, ...READ MORE

Aug 28, 2020 in Java-Script by Niroj
• 82,840 points
1,287 views
0 votes
1 answer

How do I “include” functions from my other files in nodejs?

Hello @kartik, You require any js file,so you just ...READ MORE

Jul 9, 2020 in Node-js by Niroj
• 82,840 points
3,430 views
0 votes
1 answer

How do I remove documents using Node.js Mongoose?

Hello @kartik, If you don't feel like iterating, ...READ MORE

Sep 4, 2020 in Java-Script by Niroj
• 82,840 points
953 views
0 votes
1 answer

How do I import an SQL file using the command line in MySQL?

Hello @kartik, Try: mysql -u username -p database_name < ...READ MORE

Aug 26, 2020 in PHP by Niroj
• 82,840 points
1,341 views
0 votes
1 answer

How to insert multiple rows from a single query using eloquent/fluent?

Hello @kartik, You can use the following approach. $data ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,840 points
1,838 views
0 votes
1 answer

How do I see the extensions loaded by PHP?

Hello @kartik, Running php -m will give you all the ...READ MORE

Sep 15, 2020 in PHP by Niroj
• 82,840 points
433 views
0 votes
1 answer

How do I log errors and warnings into a file?

Hello @kartik, Use the following code: ini_set("log_errors", 1); ini_set("error_log", "/tmp/php-error.log"); error_log( ...READ MORE

Sep 14, 2020 in PHP by Niroj
• 82,840 points
498 views
0 votes
1 answer

How to print a stack trace in Node.js?

Hello @kartik, Any Error object has a stack member that traps the ...READ MORE

Jul 20, 2020 in Node-js by Niroj
• 82,840 points
2,879 views
0 votes
1 answer

What does double question mark (??) operator mean in PHP?

Hello, It's the "null coalescing operator", added in ...READ MORE

Apr 2, 2020 in PHP by Niroj
• 82,840 points
7,579 views
0 votes
1 answer

How to create a database from shell command?

Hello @kartik, Try: cat filename.sql | mysql -u username ...READ MORE

Aug 26, 2020 in PHP by Niroj
• 82,840 points
1,276 views
0 votes
1 answer

How to get the children of the $(this) selector?

Hello @kartik, The jQuery constructor accepts a 2nd ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,840 points
610 views
0 votes
1 answer

How can I upload files asynchronously?

Hello @kartik, Using JavaScript code you can do it ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,840 points
598 views
0 votes
1 answer

Error:No Access-Control-Allow-Origin header is present on the requested resource node.js

Hello @kartik, My guess is that you're serving ...READ MORE

Jun 8, 2020 in Java-Script by Niroj
• 82,840 points
4,658 views
0 votes
1 answer

What does this construct look like in Typescript for Angular ?

Hello @kartik, try this. selectChildren(data, $event) { ...READ MORE

Sep 8, 2020 in Angular by Niroj
• 82,840 points
676 views
0 votes
1 answer

How to delete duplicates on a MySQL table?

Hello @kartik, This removes duplicates in place, without ...READ MORE

Aug 26, 2020 in PHP by Niroj
• 82,840 points
1,224 views
0 votes
1 answer

How can I make a div stick to the top of the screen once it's been scrolled to?

Hello @kartik, Using javascript: var initTopPosition= $('#myElementToStick').offset().top; ...READ MORE

Sep 4, 2020 in Java-Script by Niroj
• 82,840 points
835 views
0 votes
1 answer

How to update column with null value?

Hello @kartik, CREATE TABLE your_table (some_id int, your_column ...READ MORE

Aug 26, 2020 in PHP by Niroj
• 82,840 points
1,210 views
0 votes
1 answer

Error:PHP mail function doesn't complete sending of e-mail

Hello @kartik, If you are using an SMTP ...READ MORE

Jul 30, 2020 in Laravel by Niroj
• 82,840 points
2,372 views
0 votes
1 answer

How to get a list of user accounts using the command line in MySQL?

Hello @kartik, Use this query: SELECT User FROM mysql.user; Which ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,840 points
1,574 views
0 votes
1 answer

How to use multiple databases in Laravel?

Hello @kartik, Laravel has inbuilt support for multiple ...READ MORE

Jul 30, 2020 in Laravel by Niroj
• 82,840 points
2,345 views
0 votes
1 answer

How can i insert data in relation table using model?

Hello @Alisha, Try to work using the model ...READ MORE

Aug 24, 2020 in Java-Script by Niroj
• 82,840 points
1,342 views
0 votes
1 answer

How to get the size of the screen, current web page and browser window?

Hello @kartik, You can get the size of ...READ MORE

Sep 10, 2020 in JQuery by Niroj
• 82,840 points
516 views
0 votes
1 answer

How to get GET (query string) variables in Express.js on Node.js?

Hello @kartik, Since you've mentioned Express.js in your ...READ MORE

Jul 8, 2020 in Node-js by Niroj
• 82,840 points
3,260 views
0 votes
1 answer

How to deserializing a JSON into a JavaScript object?

Hello @kartik, To collect all item of an array ...READ MORE

Sep 3, 2020 in Java-Script by Niroj
• 82,840 points
780 views
0 votes
1 answer

Error:login in Laravel. How to solve?

Hey, First check if your model login has a field password in ...READ MORE

Mar 26, 2020 in Laravel by Niroj
• 82,840 points
7,730 views
0 votes
1 answer

Error:Internal server errordisplay in PHP via htaccess only

Hello @kartik,  Try adding this line .htaccess: php_flag display_startup_errors ...READ MORE

Sep 1, 2020 in PHP by Niroj
• 82,840 points
846 views
+1 vote
1 answer

How to restore MySQL database from physical files?

Hello @kartik, A MySQL MyISAM table is the ...READ MORE

Aug 20, 2020 in PHP by Niroj
• 82,840 points
1,294 views
0 votes
1 answer

How can I connect to a Tor hidden service using CURL in PHP?

Hello @kartik, I use Privoxy and cURL to scrape Tor ...READ MORE

May 19, 2020 in PHP by Niroj
• 82,840 points
5,327 views
0 votes
1 answer

How to convert JSON string to array?

Hello @kartik, If you pass the JSON in ...READ MORE

Aug 27, 2020 in PHP by Niroj
• 82,840 points
1,031 views