Posts

Artificial Intelligence Programs For Programming in Python

Traveling Salesman Problem ( TSP )] Artificial Intelligence Programs For Master Leval Programming in Python from iter tools import permutations def distance(point1, point2): >>> distance([3,4],[0,0]) 5.0 >>> distance([3,6],[10,6]) 7.0 return ((point1[0] - point2[0])**2 + (point1[1] - point2[1])**2) ** 0.5 def total_distance(points): all the points are in the given order. >>> total_distance([[1,2],[4,6]]) 5.0 >>> total_distance([[3,6],[7,6],[12,6]]) 9.0 return sum([distance(point, points[index + 1]) for index, point in enumerate(points[:-1])]) def travelling_salesman(points, start=None): Time complexity is O(N!), so never use on long lists. >>> travelling_salesman([[0,0],[10,0],[6,0]]) ([0, 0], [6, 0], [10, 0]) >>> travelling_salesman([[0,0],[6,0],[2,3],[3,7],[0.5,9],[3,5],[9,1]]) ([0, 0], [6, 0], [9, 1], [2, 3], [3, 5], [3, 7], [0.5, 9]) """ if the start is None: start = points[0] return min([perm for perm ...

Complete Guide to PHP LARAVEL and How It is Used in This World of Development

The Complete Guide to PHP LARAVEL and How It is Used in This World of Development Introduction: What is The PHP Language and Why is it Needed? PHP Basics for the New Developer: Variables & Loops How to Build a Web Application Using Laravel Framework Why Use Laravel for Your Development Needs? Conclusion - Understanding the Power of PHP as a Language and Why It's Important To Keep Learning 3 Methods to Create an API in PHP (keywords: PHP API, PHP server, PHP create API, generate API) Why You Need an API for Your Business? (keywords: ai writing assistant, content generator software, ai writer use cases, can ai write a blog) The Complete Guide to Developing API in PHP Introduction: What is API and How Does it Work? What Are the Benefits of Developing API in PHP? How Do I Create a Request Request With PHP 5.6 or Higher? How to Use Curl Library In PHP to Retrieve Data From a URL? How To Generate an App ID and Secret Key for Use With iOS or Android SDKs? Free API PHP Developer Tutori...

GPSC Reasoning SSC Reasoning Quiz

GPSC Reasoning SSC Reasoning Quiz NO Question OP1 OP2 OP3 OP4 Right 1 Look at this series: 73, 10, 83, 11, 9, 12, ... What number should come next? 7 10 12 13 2 2 Look at this series: 74, 10, 8, 11, 94, 12, ... What number should come next? 8 88 888 8888 23 3 Paragraph Question n/a n/a n/a n/a n/a 4 how ____ you? n/a n/a n/a n/a Fine 5 Look at this series: 7, 10, 8, 11, 9, 12, ... What number should come next? 8 88 888 8888 n/a 6 Simple Question n/a n/a n/a n/a Simple Answer 7 i___rfom mumbai A...

How to select div tag row using JavaScript - Codingonly4u

Image
  Select div tag row using javascript Set Styles <style> .selecttt {     background-color: #e5f7ff; border: 1px solid black; border-radius: 10px; width: 100%; } details > summary {   padding: 4px;   width: 99%;   background-color: #ffffff;   border: none;   box-shadow: 1px 1px 2px #bbbbbb;   cursor: pointer; } details summary > * {    display: inline; } details summary::before {    content:"🡒";    color: blue;    /* you can style it however you want, use background-image for example */ } /* By using [open] we can define different styles when the disclosure widget is open */ details[open] summary::before {    content:"🡑";    color: blue;  } summary {list-style: none} summary::-webkit-details-marker {display: none; } </style> Set HTML Dynamic Content           ...

How to integrate API in core PHP - Coding Point

Image
Create API in Core PHP First Create the Database in your PHPMyAdmin and make required tables. Create the  PHP  Project or Your REST  API . Configure a Database for Your  PHP   API . Add a Gateway Class for the yourTable. Perform the  PHP   API . Secure Your  PHP   API  handling of functions. Once your API setup For use of that API you want to use POSTMAN Software for run your APIS.

Create Image Slider Using JavaScript, HTML5, And CSS3 - CodingPoint

Image
Create Image Slider HTML CSS Slider 1. Index.html <!DOCTYPE > <html xml:lang="en" lang="en"> <head> <link rel="stylesheet" type="text/css" href="images/styles.css" /> <script src="images/jquery-latest.js" type="text/javascript"></script> <script src="images/shBrushXml.js" type="text/javascript"></script> <script src="images/jquery.bxslider2.min.js" type="text/javascript"></script> <script src="images/scripts.js" type="text/javascript"></script> <script type="text/javascript" charset="utf-8"> SyntaxHighlighter.all(); </script> <title>bxSlider | jQuery Content Slider Plugin</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head> <body> <!-- end header_inne...

How to create Pagination with PHP and MySql - Codingpoint

Image
How to create Pagination with PHP and MySql   Pagination in Table PHP 1. Create a Database and connect it. <?php error_reporting(0); $mysql_hostname = "localhost"; //your mysql host name $mysql_user = "root"; //your mysql user name $mysql_password = ""; //your mysql password $mysql_database = "php_advance"; //your mysql database $bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Opps some thing went wrong"); mysql_select_db($mysql_database, $bd) or die("Error on database connection"); ?> 2.index.php new file <?php include('config.php'); //include of db config file include ('paginate.php'); //include of paginat page $per_page = 5; // number of results to show per page $result = mysql_query("SELECT * FROM countries"); $total_results = mysql_num_rows($result); $total_pages = ceil($total_results / $per_page);//total pages we going to hav...

How to Multiple files upload at once using PHP - CodingPoint

Image
Multiple files upload at once using PHP Multiple Upload Files First Create File Index.php in Your Editor Copy This HTML Code <!DOCTYPE html> <html> <head> <title>Multiple File Upload</title> <link rel="stylesheet" type="text/css" href="bootstrap.css"> <style type="text/css"> body{ display: table; margin: 0 auto; } </style> </head> <body> <h1>Multiple File Upload Using PHP</h1> <form action="" enctype="multipart/form-data" method="post"> <div class="form-group"> <label for='upload'>Add Attachments:</label> <input id='upload' name="upload[]" type="file" multiple="multiple" /> </div> <p><input type="submit" name="submit" value="Submit" class="btn btn-success"></p> ...