Trending questions in Web Development

0 votes
1 answer

How to run node.js app forever when console is closed?

Hello @kartik, You may also want to consider ...READ MORE

Oct 14, 2020 in Node-js by Niroj
• 82,840 points
2,395 views
0 votes
1 answer

How to set max_execution_time in PHP CLI?

Hello, set_time_limit() works in CLI scripts. <?php set_time_limit(1); //in ...READ MORE

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

How do I specify unique constraint for multiple columns in MySQL?

Hello @kartik, Use this: ALTER TABLE `votes` ADD UNIQUE ...READ MORE

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

Error: listen EADDRINUSE while using nodejs?

Hello @kartik, EADDRINUSE means that the port number which listen() tries ...READ MORE

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

How to convert a UNIX Timestamp to Formatted Date String?

Hello @kartik, Try gmdate like this: <?php $timestamp=1333699439; echo gmdate("Y-m-d\TH:i:s\Z", $timestamp); ?> Hope it helps!! Thank ...READ MORE

Sep 29, 2020 in Laravel by Niroj
• 82,840 points
3,003 views
0 votes
1 answer

How to set session timeout in web.config?

Hello @kartik, If you want to set the ...READ MORE

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

How to detect a mobile device in PHP?

Hello @kartik, Here is the code: <?php $useragent=$_SERVER['HTTP_USER_AGENT']; if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( ...READ MORE

Sep 29, 2020 in Laravel by Niroj
• 82,840 points
2,983 views
0 votes
1 answer

Error:Laravel requires the Mcrypt PHP extension.

Hello, Use which php in the terminal to see which ...READ MORE

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

Error:TypeError: Object.values is not a function.

Hello @kartik, Object.values is a new feature . It is ...READ MORE

Oct 15, 2020 in Node-js by Niroj
• 82,840 points
2,284 views
0 votes
1 answer

How to use Redirect in the new react-router-dom of Reactjs?

Hello, To navigate to another component you can ...READ MORE

May 18, 2020 in Java-Script by Niroj
• 82,840 points
8,745 views
0 votes
1 answer

How can to make a query with LIKE and get all results with mysqli ?

Hello @kartik, Here's how you properly fetch the ...READ MORE

Nov 17, 2020 in PHP by Niroj
• 82,840 points
829 views
+1 vote
1 answer

How to download a file from NodeJS Server using Express?

Hello @kartik, Express has a helper for this as: app.get('/download', function(req, ...READ MORE

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

How to exclude certains columns while using eloquent using php?

Hello @kartik, using hidden array in model is good, but ...READ MORE

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

How to get access to webpack-dev-server from devices in local network?

Hello @kartik, You can set your ip address ...READ MORE

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

How to call a parent window function from an iframe?

Hello @kartik, Using Window.postMessage() This method safely enables cross-origin communication. And if ...READ MORE

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

How do I use the json_encode() function with MySQL query results?

Hello @kartik, Use this: $sth = mysqli_query($conn, "SELECT ..."); $rows ...READ MORE

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

How to upgrad Node.js to latest version?

Hello, The module n makes version-management easy: sudo npm install n ...READ MORE

Nov 24, 2020 in Node-js by Niroj
• 82,840 points
477 views
0 votes
1 answer

How to specify a port to run a create-react-app based project?

Hello @kartik, You could use cross-env to set the port, ...READ MORE

Jul 22, 2020 in Angular by Niroj
• 82,840 points
5,866 views
0 votes
1 answer

How to Get $_POST from multiple checkboxes?

Hello @kartik, Set the name in the form ...READ MORE

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

Error:npm WARN unmet dependency in nodejs

Hii @kartik, Following are the possible solution : Manually ...READ MORE

Jul 12, 2020 in Node-js by Niroj
• 82,840 points
6,291 views
0 votes
1 answer

How do I make an asynchronous GET request in PHP?

Hello @kartik, Works with both POST and GET ...READ MORE

Oct 22, 2020 in PHP by Niroj
• 82,840 points
1,848 views
0 votes
1 answer

Error: Premature end of script headers: backup.php

Hello @kartik< Try this settings on my apache.conf: <VirtualHost ...READ MORE

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

How to check Page.Validate() on client side (JavaScript) in ASP.Net?

Hello @kartik, Page_ClientValidate() will work. It returns true if ...READ MORE

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

How to get current URL path in PHP?

Hello @kartik, Use $_SERVER['REQUEST_URI'].  The URI which was given in ...READ MORE

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

How to Abort Ajax requests using jQuery?

Hello kartik, Just use ajax.abort(). For example you could ...READ MORE

Apr 27, 2020 in Java-Script by Niroj
• 82,840 points
9,486 views
0 votes
1 answer

How do I disable right click on my web page?

Hello @kartik, You can do that with JavaScript ...READ MORE

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

How do I convert a PDF document to a preview image in PHP?

Hello @kartik, You need ImageMagick and GhostScript <?php $im = new imagick('file.pdf[0]'); $im->setImageFormat('jpg'); header('Content-Type: image/jpeg'); echo ...READ MORE

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

How to Get the full URL in PHP?

Hello @kartik, Have a look at $_SERVER['REQUEST_URI'], i.e. $actual_link = ...READ MORE

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

How to “Refresh” the User object in Laravel?

Hello @kartik, You can update the cache object ...READ MORE

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

How to embed PHP code in JavaScript?

Hello, If your whole JavaScript code gets processed ...READ MORE

Nov 9, 2020 in PHP by anonymous
• 82,840 points
989 views
0 votes
1 answer

How to return database table name in Laravel?

Hello @kartik, There is a public getTable() method ...READ MORE

Sep 24, 2020 in Laravel by Niroj
• 82,840 points
2,977 views
0 votes
1 answer

How to read a list of files from a folder using PHP?

Try this: $files = array_values(array_filter(scandir($path), function($file) use ($path) ...READ MORE

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

How to know which php.ini is used?

Hello @kartik, ou can use php_ini_loaded_file() Taken from php.net: $inipath = ...READ MORE

Oct 30, 2020 in PHP by Niroj
• 82,840 points
1,403 views
0 votes
1 answer

Error: reverting ./composer.json to its original content

Hello @kartik, I used to use this: composer require ...READ MORE

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

How can I determine the type of an HTML element in JavaScript?

Hello @kartik, nodeName is the attribute you are looking ...READ MORE

Oct 8, 2020 in Java-Script by Niroj
• 82,840 points
2,342 views
0 votes
1 answer

How to get the Last Inserted Id Using Laravel Eloquent?

Hello @kartik, Firstly create an object, Then set ...READ MORE

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

Error:jquery each loop return false not end the function

Hii @kartik, Returning from one function doesn't call as it's ...READ MORE

Jun 2, 2020 in JQuery by Niroj
• 82,840 points
7,864 views
0 votes
1 answer

Fatal error: Cannot access empty property in C:\xampp\htdocs\MyTestPages\f.php on line 15

Hello @kartik, You access the property in the ...READ MORE

Oct 19, 2020 in PHP by Niroj
• 82,840 points
1,876 views
0 votes
1 answer

How to discard a variable from a PHP session array

Hello, Try this: if (isset($_POST['remove'])) { ...READ MORE

Nov 13, 2020 in PHP by Niroj
• 82,840 points
770 views
0 votes
1 answer

How do I access static member of a class?

Hello, If A is a class, you can access it ...READ MORE

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

How to run migrations on another database in laravel?

Hello @kartik, If you place database config on ...READ MORE

Sep 28, 2020 in Laravel by Niroj
• 82,840 points
2,751 views
0 votes
1 answer

Error:Cannot read property 'remove' of undefined at BrowserDomAdapter.removeClass

Hello @kartik, There are several ways to add ...READ MORE

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

How to access array returned by a function in php?

Hello @kartik, Since PHP 5.4 it's possible to ...READ MORE

Nov 10, 2020 in PHP by anonymous
• 82,840 points
861 views
0 votes
1 answer

How to get browser width using JavaScript code?

Hello @kartik, Use this code: var w = window.innerWidth; var ...READ MORE

Oct 9, 2020 in Java-Script by Niroj
• 82,840 points
2,231 views
0 votes
1 answer

How do you cache an image in Javascript?

Hii @kartik, You have to do three thigs: You ...READ MORE

Jun 2, 2020 in Java-Script by Niroj
• 82,840 points
7,811 views
0 votes
1 answer

How I can make a query with MySQL that checks if the valuein a certain column contains certain data?

Hello @kartik, Try this query: mysql_query(" SELECT * FROM `table` WHERE `column` ...READ MORE

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

How do I save value in my own session variable in Magento?

Hello @kartik, Let's say you want to save ...READ MORE

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

How do I capture PHP output into a variable?

Hello, Try this: <?php ob_start(); ?> <xml/> <?php $xml = ob_get_clean(); ...READ MORE

Nov 3, 2020 in PHP by Niroj
• 82,840 points
1,148 views
0 votes
1 answer

How to change Yarn default packages directory?

Hello @kartik, You can create a .yarnrc file with the ...READ MORE

Nov 12, 2020 in Laravel by Niroj
• 82,840 points
747 views
0 votes
0 answers

how to create exception in react router using Route::get('/{path?}', 'IndexController@index')->name('index') ->where('path', '.*');

I am using react routers within Laravel ...READ MORE

Nov 15, 2020 in Laravel by datso
• 120 points

recategorized Nov 16, 2020 by Niroj 682 views