JSON.zip

Recommended Vector DB Structure for Amazon Bedrock Integration

388

A Vector DB is a database that stores data as high-dimensional vectors,enabling efficient similarity searches based on vector embeddings generated by machine learning models.JSON-based Vector DBs offer the benefit of storing both vector embeddings and asso...

Dynamic JSON Editor based in HTML/JavaScript

Dynamic JSON Editor based in HTML/JavaScript

506

JSON,or JavaScript Object Notation,is a lightweight,human-readable data-interchange format that uses a text-based structure derived from JavaScript syntax to represent data as key-value pairs and ordered lists.It is commonly used for transmitting data betw...

JSON format control in PHP

690

PHP provides an easy way to handle JSON format, whether you're creating or parsing it. Let's delve into how to do both.Creating JSON format in PHP is straightforward. You can use arrays and the json_encode() function to convert PHP data into a JSON string....

Default Timeout for Amazon Bedrock invoke_model

732

The concept of "default timeout" for Amazon Bedrock invoke_model primarily refers to the client-side timeout of the AWS SDKs (like Boto3) or the AWS CLI,rather than a configurable service-side timeout on Bedrock itself.Bedrock will process your request unt...

Integrating VectorDB stored in S3 with Amazon Bedrock

Integrating VectorDB stored in S3 with Amazon Bedrock

421

One of the rising area regarding smart search is to use Vector Database stored in S3 with Amazon Bedrock so you can use it for retrieval-augmented generation (RAG) or semantic search.Amazon Bedrock is a fully managed service that allows developers to acces...

Understanding Amazon Bedrock Agent for AI-based ChatBot

Understanding Amazon Bedrock Agent for AI-based ChatBot

640

What is Amazon Bedrock?Amazon Bedrock is a fully managed service that makes it easy for customers to build and scale generative AI applications using a variety of foundation models (FMs).Its functional role is to provide access to these powerful,pre-traine...

Getting Started with FAISS: A CentOS 7 Installation Guide

Getting Started with FAISS: A CentOS 7 Installation Guide

277

What is FAISS?FAISS (Facebook AI Similarity Search) is a library developed by Facebook AI Research for efficient similarity search and clustering of dense vectors.It provides algorithms that search for points in a set of vectors that are closest to a given...

Milvus & FAISS: Decoding Their ML Synergy

Milvus & FAISS: Decoding Their ML Synergy

275

What is Milvus?Milvus is an open-source vector database designed for storing,indexing,and managing billions of embedding vectors.It specializes in high-performance similarity search over these vectors.Milvus is built to handle the unique challenges of vect...

PHP form handling example in single page

412

This example shows a very simple form together with the form handling process on a single page. Below is another approach based on Heredoc I like:

How to get Referral URL ?

2,068

Grabs the referring URL - get the HTTP_REFERER and save it to a variable. code snippet: .While not inherently intended for API security,the HTTP_REFERER header can be a valuable tool for implementing an API that restricts access to certain resources based ...

How to convert formatted date time string to datetime?

443

Whatever the formatted string is,strtotime() function convert the formatted date time string to datetime.Following example shows the simple reference can convert date time string whatever the formatted input is.

Adding and Subtracting Time

553

The time () function generates a long string of numbers representing how many seconds have passed since January 1, 1970. It is possible to add and subtract time by adding and subtracting seconds.

The three simplest regular expressions you will use in PHP

580

The three most basic searches using regular expressions are searching for the strings start, the strings end, or for characters it contains. We can do these using the following symbols:^ indicates the string starts with the specified characters, so "^strcp...

Number Format

481

In this article we'll make number format like 0001, 0002, 0003 in stead of 1, 2 ,3. It's very easy to do this for your counter, category or product ID. etc.

A Function Returns Large Random Numbers

425

This basically randomly pick a number between the min and max values. This is made because the rand() and mt_rand() function can not accept numbers larger than 2^31 or 2^63,depend on your processor and complier.

Function AccountCryptPassword($password,$salt)

724

Encryption and password account accessFunction AccountCryptPassword($password,$salt) {  if($salt=="")  {   srand(time());   $random=rand();   $itoa64=". / 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; ...

Cardinal Endings

490

This php based script will find numbers and give them a cardinal ending.This can be useful for displaying rankings or results of a competition.The script is easy to install and use .Explanation::addOrdinalSuffix($number): This function adds the appropriate...

URL Rewriter PHP

612

URL Rewriter PHP is a short code that can be used to rewrite dynamic PHP urls as URL's that link to static htmlpages.Increases search engine rankings by creating a static system of page linking as well as making all content available. Associated Data for U...

Browser detection in PHP

735

Sometimes, you may want to know what kind of browser is connecting to your web site. Actually such kind of information is usually stored in $_SERVER.  Below is the reference: