pymatgen.analysis.diffraction.core module¶
-
class
AbstractDiffractionPatternCalculator
[source]¶ Bases:
abc.ABC
Abstract base class for computing the diffraction pattern of a crystal.
-
SCALED_INTENSITY_TOL
= 0.001¶
-
TWO_THETA_TOL
= 1e-05¶
-
get_pattern
(structure, scaled=True, two_theta_range=(0, 90))[source]¶ Calculates the diffraction pattern for a structure.
Parameters: - structure (Structure) – Input structure
- scaled (bool) – Whether to return scaled intensities. The maximum peak is set to a value of 100. Defaults to True. Use False if you need the absolute values to combine XRD plots.
- two_theta_range ([float of length 2]) – Tuple for range of two_thetas to calculate in degrees. Defaults to (0, 90). Set to None if you want all diffracted beams within the limiting sphere of radius 2 / wavelength.
Returns: (DiffractionPattern)
-
get_plot
(structure, two_theta_range=(0, 90), annotate_peaks=True, ax=None, with_labels=True, fontsize=16)[source]¶ Returns the diffraction plot as a matplotlib.pyplot.
Parameters: - structure – Input structure
- two_theta_range ([float of length 2]) – Tuple for range of two_thetas to calculate in degrees. Defaults to (0, 90). Set to None if you want all diffracted beams within the limiting sphere of radius 2 / wavelength.
- annotate_peaks – Whether to annotate the peaks with plane information.
- ax – matplotlib
Axes
or None if a new figure should be created. - with_labels – True to add xlabels and ylabels to the plot.
- fontsize – (int) fontsize for peak labels.
Returns: (matplotlib.pyplot)
-
plot_structures
(structures, fontsize=6, **kwargs)[source]¶ Plot diffraction patterns for multiple structures on the same figure.
Parameters: - structures (Structure) – List of structures
- two_theta_range ([float of length 2]) – Tuple for range of two_thetas to calculate in degrees. Defaults to (0, 90). Set to None if you want all diffracted beams within the limiting sphere of radius 2 / wavelength.
- annotate_peaks (bool) – Whether to annotate the peaks with plane information.
- fontsize – (int) fontsize for peak labels.
Keyword arguments controlling the display of the figure:
kwargs Meaning title Title of the plot (Default: None). show True to show the figure (default: True). savefig “abc.png” or “abc.eps” to save the figure to a file. size_kwargs Dictionary with options passed to fig.set_size_inches e.g. size_kwargs=dict(w=3, h=4) tight_layout True to call fig.tight_layout (default: False) ax_grid True (False) to add (remove) grid from all axes in fig. Default: None i.e. fig is left unchanged. ax_annotate Add labels to subplots e.g. (a), (b). Default: False
-
show_plot
(structure, **kwargs)[source]¶ Shows the diffraction plot.
Parameters: - structure (Structure) – Input structure
- two_theta_range ([float of length 2]) – Tuple for range of two_thetas to calculate in degrees. Defaults to (0, 90). Set to None if you want all diffracted beams within the limiting sphere of radius 2 / wavelength.
- annotate_peaks (bool) – Whether to annotate the peaks with plane information.
-
-
class
DiffractionPattern
(x, y, hkls, d_hkls)[source]¶ Bases:
pymatgen.core.spectrum.Spectrum
A representation of a diffraction pattern
Parameters: - x – Two theta angles.
- y – Intensities
- hkls – [{“hkl”: (h, k, l), “multiplicity”: mult}], where {“hkl”: (h, k, l), “multiplicity”: mult} is a dict of Miller indices for all diffracted lattice facets contributing to each intensity.
- d_hkls – List of interplanar spacings.
-
XLABEL
= '$2\\Theta$'¶
-
YLABEL
= 'Intensity'¶


Arkounay/2D-Canvas-Image-Particles
A simple lightweight 2D particle system using Canvas.
Download
Sources
Releases
Example
Default behaviour
Rotation, light on hover
Mouse emit
Custom tints, and zoom on hover
Advanced
Apply
Ctrl S
Alt Enter


This page will house some of the activities and lessons I've created for Physics and Astronomy classes as part of the NSF fundend GK-12 Reach for the Stars program at Northwestern University.
Click the links below to access the different activities. Some require a Python installation, while others only require a browser.


"With their knowledge, experience, and reliability they were able to take our complex website idea and design and find a way to make it happen efficiently on our timeline. Startrev's team was very responsive easy to communicate with."
- Jason M.
Best of Blinds


- offers Go to home
Power of Lavender
Taken in Provence, France
Lavandula (common name lavender) is a genus of 39 known species of flowering plants in the mint family, Lamiaceae. It is native to the Old World and is found from Cape Verde and the Canary Islands, southern Europe across to northern and eastern Africa, the Mediterranean, southwest Asia to southeast India.
notifications


Learning with Texts - Fork
2.8.1-fork
Learn foreign languages with texts
Loading...
Searching...
No Matches
New feature not available in the official LWT
User Interface
Mobile support, responsive design
Support for different themes
Display translations of terms with status in the reading frame
Much better interface for the main menu
Save text/audio position in the reading frame
Multiwords selection (click and hold on a word → move to another word → release mouse button)
Key bindings work when you hover over a word
Bulk translate new words in the reading frame
New key bindings in the reading frame:
T (translate sentence),
P (pronounce term),
G (edit term with Google Translate)
Ability to change audio playback speed (doesn't work when using the flash plugin)
Improved HTML organization. It has several effect:
You can read texts in "reader mode" in most browsers
Simple mobile compatibility
More than LWT
Automatically translate terms with LibreTranslate
Automatic text to speech
Automatic spelling for Japanese with MeCab
Automatically import texts from RSS feeds (for more info see:
Newsfeed Import
)
Longer (> 9 characters) expressions can now be saved (up to 250 characters)
Improved Search/Query for Words/Texts
Selecting terms according to a text tag
Term
import with more options (i.e.: combine translations, multiple tag import,...)
Two database backup modes (new or old structure)
Back-end
Native support for Docker
Database improvements: the database takes much less space on the server
Better caching due to an improved file management
Enhanced security and robustness due do sanitazed SQL inputs
Generated by
1.9.6


The Gallery of Horns
Filter by Keyword
Sort by Horns
Sort by Title
Page One
Page Two
{{title}}
{{description}}
{{horns}}


--- layout: page title: Lean Prover Zulip Chat Archive permalink: archive/116395maths/62584polynomials.html ---
Where can I find the following facts: Z[x] is a commutative ring
, and evaluation at x = i is a ring homomorphism
?
I don't think we have specialized to univariate polynomials, but mv_polynomial
and an evaluation operation on it are defined in multivariate_polynomial
Scott -- Kenny has been working on adjoint functors of various forgetful functors, and I pointed out to him that the adjoint of the forgetful functor from commutative rings to sets would give both of the things you ask about for free. Are you back to an internet connection yet? He should talk to you about category theory!
@Kevin Buzzard https://leanprover.zulipchat.com/#narrow/stream/113488-general/subject/category.20theory.20libraries/near/124608241
{% endraw %}


KDE Software Compilation 4 is a comprehensive desktop environment with a huge number of applications written for it and a huge amount of users. It is based on the Qt framework.
For more information visit the official KDE project site at http://www.kde.org/.
The core KDE packages are listed in the recommended and tested build order. The additional KDE packages can be built in any order.
Last updated on 2013-02-11 10:51:17 -0800


Substitute teacher fired after student beating goes viral
KYLE, Texas (AP) - A substitute teacher has been fired and charged with aggravated assault following the beating of a 15-year-old female high school student in an incident captured on video.
Tiffani Shadell Lankford is free on $10,000 bond after her arrest Friday afternoon. If convicted of the second-degree felony, she could be sentenced to two to 20 years in prison.
Video of last week’s incident in a foreign-language class at Lehman High School in Kyle, Texas, about 20 miles (32 kilometers) south of Austin went viral.
Court records list no attorney for the 32-year-old San Marcos woman, and her telephone number is not published.
The students in the class were being loud and the situation escalated when the teacher cursed at them, said Paul Batrice, an attorney for the girl’s family. The girl told the teacher not to talk to her that way, he said.
 Batrice said in a statement the teen is being treated for “severe injuries.”
“This is unacceptable to say the least, and we will demand justice to the fullest extend of the law to enact the change so obviously necessary,” he said.
Lankford started working for the Hays Consolidated Independent School District on Aug. 30. She had worked 18 times as a substitute teacher, starting on Sept. 13 and ending Friday.
“We are appalled at the actions of this former employee. There is absolutely no excuse or circumstance that can justify what you see unfold on the video. It is unconscionable what this adult did to one of our students,” said school district spokesman Tim Savoy in a statement.
The incident has caught the attention of Texas Gov. Greg Abbott, who called for an investigation of the district.
“Conduct like this won’t be tolerated in Texas classrooms. The substitute teacher who committed this heinous act has been arrested and will face serious legal consequences. The school district will be investigated by the Texas Education Agency,” he said in a statement.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


| File name | File size | Upload status | Date | |
|---|---|---|---|---|
| {{x.name}} | {{x.filesize | filesize: 0}} |
|
{{x.finished_at | date:'shortDate'}} |
| Used in pipeline | Job ID | Date |
|---|---|---|
| DNA realignment: homo sapiens | 1234 | July 20, 2016 |
| DNA realignment: homo sapiens | 1235 | July 20, 2016 |
| DNA realignment: homo sapiens | 1236 | July 20, 2016 |
| DNA realignment: homo sapiens | 1237 | July 20, 2016 |


A note pad.
You can widen or narrow the notepad by pressing on the appropriate arrow buttons at the bottom.
The notepad supports cut and paste, and drag and drop, but no formatting.


- e(String, String) - Static method in class com.blog.ljtatum.androidx.logger.Logger
-
Helper method for logging e-verbose
- EARTH_RADIUS - Static variable in class com.app.framework.constants.Constants
-
- encode(Object) - Method in class com.app.framework.utilities.map.BaseNCodec
-
Encodes an Object using the Base-N algorithm.
- encode(byte[]) - Method in class com.app.framework.utilities.map.BaseNCodec
-
Encodes a byte[] containing binary data, into a byte[] containing characters in the alphabet.
- encodeBase64(byte[], boolean) - Static method in class com.app.framework.utilities.map.Base64
-
Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.
- encodeBase64(byte[], boolean, boolean) - Static method in class com.app.framework.utilities.map.Base64
-
Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.
- encodeBase64(byte[], boolean, boolean, int) - Static method in class com.app.framework.utilities.map.Base64
-
Encodes binary data using the base64 algorithm, optionally chunking the output into 76 character blocks.
- encodeBase64String(byte[]) - Static method in class com.app.framework.utilities.map.Base64
-
Encodes binary data using the base64 algorithm but does not chunk the output.
- endLocation - Variable in class com.app.framework.utilities.map.model.TurnByTurnModel
-
- ensureBufferSize(int, BaseNCodec.Context) - Method in class com.app.framework.utilities.map.BaseNCodec
-
Ensure that the buffer has room for size
bytes
- Enum - Class in com.app.framework.enums
-
Created by LJTat on 3/4/2017.
- Enum() - Constructor for class com.app.framework.enums.Enum
-
- Enum.SocialMedia - Enum in com.app.framework.enums
-
- ErrorListener - Interface in com.app.framework.listeners
-
Created by leonard on 9/9/2016.
- ErrorUtils - Class in com.app.framework.utilities
-
Created by leonard on 11/13/2015.
- ErrorUtils() - Constructor for class com.app.framework.utilities.ErrorUtils
-


The install packages provide two servers, the M-Pin Authentication Server and a demo system. In addition, CertiVox also runs M-Pin Managed Services, accessible through the CertiVox APIs.
The CertiVox APIs provide interfaces to access CertiVox M-Pin and M-Key services. They allow a customer to register with CertiVox by providing their organisation name, their admin name and their email address; it isn't mandatory to provide such data. The server will randomly generate a 128 bit hex encoded value, M-Pin API ID, and will use this as the unique M-Pin server's identifier to provide SAKKE and ECCSI private keys. In addition, the APIs also provide calls for a M-Pin server secret and a M-Pin time permit.
The demo system is a web server included in the package that enables the end user's registration on the CertiVox system out of the box. The demo system signs the end user's requests for the M-Pin Client Secret. This request is rendered to the browser which forwards it to the CertiVox API. It then validates the request and sends a client secret to the end user's browser. The demo system also render to the browser a request to the API for a time permit. The end user is now able to perform M-Pin authentication.
The M-Pin Authentication Server uses M-Pin Protocol to authenticate end users through two factor authentication. The result of an authentication attempt is an authentication Token, signed with ECCSI and encrypted with AES-GCM. The AES-KEY is then encapsulated with SAKKE. An encrypted token is then formed and sent to the end user's browser where it is forwarded to the demo server. The demo server decapsulates the AES-GCM key using SAKKE, decrypts the token and verifies the signature using ECCSI. It then checks that the timestamp in the token has not expired and that the successCode has been set to one. If this is the case, then the end user is authenticated. Note that the demo site is responsible for revocation and that a token will be forwarded to it even if authentication against the M-Pin Authentication Server fails.
Certivox runs its API services under SSL.
It is recommended that the Customers run the MPin Authentication server and their application layer using SSL to prevent man in the middle attacks.
Every string passed to and from the API needs to be UTF-8 encoded.
All requests for M-Pin clientSecrets must contain a url signature. The string to sign must be of this format
stringToSign = "method:<method> customerID:<customerID> endUserID:<endUserID> expires:<expiresStr>"
A signature is generated using ECCSI. The result is then hex encoded to generate the url signature.
The current version of our API is version 0.1. Every call to the service will return the API version that was used for the call and the latest version available.
The demo system and the authentication server retrieve their configurations from two configuration files, mpin.conf and demo.conf. They need to be located in the same directory where the web servers and the authentication server are run. The two files are almost identical, as the only difference consists in an extra parameter in demo.conf. The additional parameter, MPinAuthenticationServer, sets the location of the M-Pin Authentication Server (IP Address or host name) and the port number on which the authentication server runs the webSocket service. These files are used to configure all the services.
An example of such a file is shown below:
{ logLevel => 'debug', # info || error || debug testLevel => 1, # 1 means dump errors to client logLevel => 'debug', # info || error || debug || test MPinAuthenticationServer => <MPinAuthenticationServer URL for webSocket>, customerID => <customer identity>, serverSecret => <MPin Server Secret>, KbS => <SAKKE Private key>, ZS => <SAKKE System Public Key>, PVTSSK => <ECCSI Private Key>, KPAK => <ECCSI System Public Key>, hypnotoad => { listen => [<port and SSL keys], workers => <number of workers>, proxy => 1 } };
Hynotoad is UNIX optimized preforking web server that is used in this distribution. The listen setting describes the URL / IP and Port number that the server should listen on. The number of process is defined by the workers setting. It is common to deploy Hypnotoad behind a reverse proxy. The proxy setting will allow Mojolicious to automatically pick up the X-Forwarded-For and X-Forwarded-HTTPS headers.
Errors are returned using standard HTTP error code syntax. Any additional info is included in the body of the return call.
Code Description
400 Missing required parameter: <parameter> 401 You are not authorized to use the API. Invalid Signature 403 Request expired 403 <method> does not exist 404 URI Not Found 5xx Server error.
Retrieves the time permits of a registered user.
https://m-pinapi.certivox.net/v0.1/permits?endUserID=<endUserID>&customerID=<customerID>
0.1
GET
Calculates the MPIN Client permits with is returned in this JSON object.
JSON response.
{ "certiVoxAPI" : { "version" : 0.1, "latestVersion" : 0.1 }, "permits" : { "MPINTimePermit" : "<MPINTimePermit>" } }
500 MPIN time permit request failed
Retrieves the MPIN client secret of an End User
https://m-pinapi.certivox.net/v0.1/clientSecret?customerID=<customerID>&expires=2014-05-13T13:30:33Z&endUserID=<endUserID>&signature=<signature>
0.1
POST
Calculates the MPIN Client secret with is returned in this JSON object.
JSON response.
{ "certiVoxAPI" : { "version" : 0.1, "latestVersion" : 0.1 }, "clientSecret" : { "clientSecret" : "<clientSecret>" } }
401 Missing required parameter: <param> 401 You are not authorized to use the API. Invalid Signature 403 Request expired 500 request for M-Pin clientSecret failed
Registers a Customer and returns a set of keys and a customer ID.
https://m-pinapi.certivox.net/v0.1/customer?organisation_name=<organisation's name>&admin_name?=<administrator's name>&email=<administrator's email address>
0.1
GET
These parameters are not required.
Customer's keys and customer identity
JSON response.
{ "keys" : { "KbS" : <SAKKE Private key>, "ZS" : <SAKKE System Public Key>, "KPAK" : <ECCSI System Public Key>, "serverSecret" : <MPin Server Secret>, "PVTSSK" : <ECCSI Private Key>, }, "certiVoxAPI" : { "version" : 0.1, "latestVersion" : 0.1 }, "statusMessage" : "Registered", "customerID" : <customer identity>, }
200 Registered 500 generateECCSIMasterKeyPair failed 500 generateSAKKEMasterKeyPair failed 500 DB ERROR: Please contact support
The M-Pin End User requests an authentication token for his identity from the M-Pin Authentication Server. The token is signed with ECCSI. It is encrypted with AES-GCM and the AES-GCM key is encapsulated using SAKKE. The ecrypted M-Pin Authentication Token is returned to the M-Pin End User.
The reponse from this call is then sent to the M-Pin Relying Party server for further processing. The M-Pin Relying Party server decapsulates the AES-GCM key, decrypts the token and verifies the signature. The timestamp is also checked to ensure the token has not expired. If the sucessCode is 1 then the Relying Party knows that the identity in the endUserID field is authenticated.
The structure of the unencrypted signed token is as follows;
Authentication Token { "successCode" : <code>, "signature" : <ECCSI signature>, "endUserID" : <End-User Identity>, "expires" : <UTC Timestamp> }
The successCode is 0 for authentication failure or else 1 for success.
The structure of the encrypted token is as follows;
Encrypted Authentication Token { "HRbS" : <SAKKE cryptotext>, "iv" : <AES-GCM Initialisation Vector>, "ciphertext" : <AES-GCM cryptotext>, "tag" : <AES-GCM checksum> },
In addition the success code from AES-GCM, ECCSI and SAKKE are also returned. A non zero value indicates failure and would require the Customer to contact certivox support.
"error" : { "AESError" : 0, "ECCSIError" : 0, "SAKKEError" : 0 },
ws://<customerURL>/authenticationToken
0.1
WebSocket
The call uses webSockets and this has to be made over port 443 in order to allow access over Telecom networks.
All data sent over the socket must be hex encoded. An abridged example the flow of data between the client and server is as follows;
WEBSOCKET PASS1 REQUEST { "type" : "parameters", "zIDc" : "042...d42", "endUserID" : "6b65616c616e", "maskedSecret" : "040...ab6" }
WEBSOCKET PASS1 RESPONSE { "parameters" : { "maskedPairing" : "0af...f2c", "wIDc" : "042...394" }, "certiVoxAPI" : { "version" : 0.1, "latestVersion" : 0.1 }, "statusMessage" : "SUCCESS", "type" : "parameters", "code" : 200 }
WEBSOCKET PASS2 REQUEST { "authenticator" : "3e16fd1c0c3149280e9b0a277e68bc2ef038db79fda4bd4cc7ae20617ea9a750", "customerID" : "2ac8abba7efa09c2b0c3b760742ef2", "type" : "authenticator", "endUserID" : "6b65616c616e" }
WEBSOCKET PASS2 RESPONSE { "certiVoxAPI" : { "version" : 0.1, "latestVersion" : 0.1 }, "authToken" : { "HRbS" : "70a...13a", "iv" : "a49f7e9c0089035eeac8ffa3", "ciphertext" : "d66...e78", "tag" : "82ae04bc41ee8f3331d83f9cc1188957" }, "statusMessage" : "No indication of success", "error" : { "AESError" : 0, "ECCSIError" : 0, "SAKKEError" : 0 }, "type" : "authenticator", "code" : 0 }
Encrypted Authentication Token
PASS1 RESPONSE
200 SUCCESS 500 calculateServerKey failed
PASS2 RESPONSE
The codes 200 and 401 will only be returned if the returnCode is equal to 1 in the mpin.pl file or else a code of 000 will be returned. A return code of 000 gives no indication of success or failure to authenticate.
000 No indication of success 200 SUCCESS: Client and Server Authenticators matched 401 ERROR: Client Authenticator is invalid
The M-Pin Relying Party receives, via the M-Pin End User, the encrypted authentication token from the M-Pin Authentication Server. It also receieves an error structure that gives the error code that occured in the cryptographic functions on the authentication server.
The AES-GCM key is decapsulated and then used to decrypt the encrypted authentication token. The signature of the authentication token is then verified.
The end user is authenticated if the success field in the authentication token is set to success, and the token has not expired. In a real deployment the number of authentication attempts would also be a factor in determining whether an end user is allowed access to protected content.
A session cookie, with a duration of one hour, is generated and rendered to the browser following a successful authentication.
https://<demoURL>/verifyToken
0.1
POST
A session cookie.
Attempts are not being counted in the demo server.
200 Authenticated 401 Authentication Failed. Token Expired 401 Authentication Failed. Please re-enter PIN 410 Max attempts reached: Please contact support


Introduction
This documentation aims to provide all the information you need to work with our API.
Base URL
http://localhost
Authenticating requests
This API is not authenticated.
Banner
APIs for user view banners
Display all banner and link to category or product.
a
Example request:
curl -X GET \
-G "/api/banner" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/banner"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
DDisplay specific banner and link to category or product.
Example request:
curl -X GET \
-G "/api/banner/cumque" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/banner/cumque"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Cart
APIs for manage cart
Display a listing of the Cart products where user
Example request:
curl -X GET \
-G "/api/cart" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/cart"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Store a newly created cart in storage.
Example request:
curl -X POST \
"/api/cart" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"product_id":2}'
const url = new URL(
"/api/cart"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 2
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Display the specified cart items.
Example request:
curl -X GET \
-G "/api/cart/vero" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/cart/vero"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Update the specified cart items
Example request:
curl -X PUT \
"/api/cart/saepe" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/cart/saepe"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Remove the specified product from cart
Example request:
curl -X DELETE \
"/api/cart/autem" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/cart/autem"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Category
APIs for manage category
Display all category
Example request:
curl -X GET \
-G "/api/category" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/category"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display the specified category.
Example request:
curl -X GET \
-G "/api/category/sed" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/category/sed"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Chat
APIs for manage chat
Display a listing of the resource.
Example request:
curl -X GET \
-G "/api/chat" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/chat"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Store a newly created resource in storage.
Example request:
curl -X POST \
"/api/chat" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/chat"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Display the specified resource.
Example request:
curl -X GET \
-G "/api/chat/blanditiis" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/chat/blanditiis"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Update the specified resource in storage.
Example request:
curl -X PUT \
"/api/chat/aut" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/chat/aut"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Remove the specified resource from storage.
Example request:
curl -X DELETE \
"/api/chat/incidunt" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/chat/incidunt"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Discount Product
APIs for manage discount product
Display a list of discount Product
Example request:
curl -X GET \
-G "/api/discount_product" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display the specified discount product.
Example request:
curl -X GET \
-G "/api/discount_product/rem" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product/rem"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display by subcategory
Example request:
curl -X GET \
-G "/api/discount_product/sub/fugiat" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product/sub/fugiat"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display latest product
Example request:
curl -X GET \
-G "/api/discount_product/latest" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product/latest"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display product order by name A-Z
Example request:
curl -X GET \
-G "/api/discount_product/name" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product/name"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display product order by name Z-A
Example request:
curl -X GET \
-G "/api/discount_product/nameD" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product/nameD"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display product order by price Low-High
Example request:
curl -X GET \
-G "/api/discount_product/price" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product/price"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display product order by price High-Low
Example request:
curl -X GET \
-G "/api/discount_product/priceD" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product/priceD"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display by subcategory and order by latest
Example request:
curl -X GET \
-G "/api/discount_product/sub/omnis/latest" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product/sub/omnis/latest"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display by subcategory and order by name A-Z
Example request:
curl -X GET \
-G "/api/discount_product/sub/sit/name" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product/sub/sit/name"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display by subcategory and order by name Z-A
Example request:
curl -X GET \
-G "/api/discount_product/sub/ut/nameD" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product/sub/ut/nameD"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display by subcategory and order by price Low-High
Example request:
curl -X GET \
-G "/api/discount_product/sub/distinctio/price" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product/sub/distinctio/price"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display by subcategory and order by price High-Low
Example request:
curl -X GET \
-G "/api/discount_product/sub/exercitationem/priceD" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/discount_product/sub/exercitationem/priceD"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Endpoints
Handle a registration request for the application.
Example request:
curl -X POST \
"/api/register" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/register"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Handle a login request to the application.
Example request:
curl -X POST \
"/api/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
api/logout
Example request:
curl -X POST \
"/api/logout" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/logout"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Send a reset link to the given user.
Example request:
curl -X POST \
"/api/password/email" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/password/email"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Reset the given user's password.
Example request:
curl -X POST \
"/api/password/reset" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/password/reset"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Display the password reset view for the given token.
If no token is present, display the link request form.
Example request:
curl -X GET \
-G "/api/password/reset/et" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/password/reset/et"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (500):
{
"message": "Route [password.update] not defined.
Example request:
curl -X GET \
-G "/banner" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/banner"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Show the form for creating a new resource.
Example request:
curl -X GET \
-G "/banner/create" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/banner/create"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Store a newly created resource in storage.
Example request:
curl -X POST \
"/banner" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/banner"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Display the specified resource.
Example request:
curl -X GET \
-G "/banner/ratione" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/banner/ratione"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Show the form for editing the specified resource.
Example request:
curl -X GET \
-G "/banner/corrupti/edit" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/banner/corrupti/edit"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Update the specified resource in storage.
Example request:
curl -X PUT \
"/banner/ut" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/banner/ut"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Remove the specified resource from storage.
Example request:
curl -X DELETE \
"/banner/error" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/banner/error"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Display a listing of the resource.
Example request:
curl -X GET \
-G "/category" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/category"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Show the form for creating a new resource.
Example request:
curl -X GET \
-G "/category/create" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/category/create"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Store category
Example request:
curl -X POST \
"/category" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name":"commodi"}'
const url = new URL(
"/category"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "commodi"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Display the specified resource.
Example request:
curl -X GET \
-G "/category/et" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/category/et"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Show the form for editing the specified resource.
Example request:
curl -X GET \
-G "/category/ad/edit" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/category/ad/edit"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Update the specified resource in storage.
Example request:
curl -X PUT \
"/category/sapiente" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name":"quis"}'
const url = new URL(
"/category/sapiente"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "quis"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Remove the specified resource from storage.
Example request:
curl -X DELETE \
"/category/nisi" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/category/nisi"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Display a listing of the resource.
Example request:
curl -X GET \
-G "/discountProduct" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/discountProduct"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Show the form for creating a new resource.
Example request:
curl -X GET \
-G "/discountProduct/create" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/discountProduct/create"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Store a newly created resource in storage.
Example request:
curl -X POST \
"/discountProduct" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/discountProduct"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Display the specified resource.
Example request:
curl -X GET \
-G "/discountProduct/iure" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/discountProduct/iure"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Show the form for editing the specified resource.
Example request:
curl -X GET \
-G "/discountProduct/repudiandae/edit" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/discountProduct/repudiandae/edit"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Update the specified resource in storage.
Example request:
curl -X PUT \
"/discountProduct/et" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/discountProduct/et"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Remove the specified resource from storage.
Example request:
curl -X DELETE \
"/discountProduct/aut" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/discountProduct/aut"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Display a listing of the resource.
Example request:
curl -X GET \
-G "/order" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/order"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Display the specified resource.
Example request:
curl -X GET \
-G "/order/eius" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/order/eius"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Display a listing of the resource.
Example request:
curl -X GET \
-G "/product" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/product"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Show the form for creating a new resource.
Example request:
curl -X GET \
-G "/product/create" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/product/create"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Store a newly created resource in storage.
Example request:
curl -X POST \
"/product" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/product"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Display the specified resource.
Example request:
curl -X GET \
-G "/product/inventore" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/product/inventore"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Show the form for editing the specified resource.
Example request:
curl -X GET \
-G "/product/dolor/edit" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/product/dolor/edit"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Update the specified resource in storage.
Example request:
curl -X PUT \
"/product/libero" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/product/libero"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Remove the specified resource from storage.
Example request:
curl -X DELETE \
"/product/cupiditate" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/product/cupiditate"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Display a listing of the resource.
Example request:
curl -X GET \
-G "/subcategory" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/subcategory"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Show the form for creating a new resource.
Example request:
curl -X GET \
-G "/subcategory/create" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/subcategory/create"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Display the specified resource.
Example request:
curl -X GET \
-G "/subcategory/quo" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/subcategory/quo"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Show the form for editing the specified resource.
Example request:
curl -X GET \
-G "/subcategory/ut/edit" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/subcategory/ut/edit"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Remove the specified resource from storage.
Example request:
curl -X DELETE \
"/subcategory/molestiae" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/subcategory/molestiae"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Display a listing of the resource.
Example request:
curl -X GET \
-G "/user" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/user"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Display the specified resource.
Example request:
curl -X GET \
-G "/user/aut" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/user/aut"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
Remove the specified resource from storage.
Example request:
curl -X DELETE \
"/user/corporis" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/user/corporis"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
order/orderItems/{id}
Example request:
curl -X GET \
-G "/order/orderItems/omnis" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/order/orderItems/omnis"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (302):
<!DOCTYPE html>

<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://localhost/login'" />
<title>Redirecting to http://localhost/login</title>

Redirecting to http://localhost/login.

Received response:
Request failed with error:
login
Example request:
curl -X GET \
-G "/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
require
<form action="/login" method="post">
<input type="hidden" name="_token" value="P7rpMCq2I8eTeJkoRPxH8aRwPPr7J3Ahc8FjJ5ue">
username <input type="text" name="username">
password <input type="text" name="password">
<button type="submit">Submit</button>
</form>
Received response:
Request failed with error:
login
Example request:
curl -X POST \
"/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
logout
Example request:
curl -X POST \
"/logout" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/logout"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Order
APIs for manage order
Display a listing of the order
Example request:
curl -X GET \
-G "/api/order" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/order"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Store a newly created order in storage
Example request:
curl -X POST \
"/api/order" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"price":379,"address":"eos","delivery_charge":12.5,"comment":"maiores","orderItems":[[],[]]}'
const url = new URL(
"/api/order"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"price": 379,
"address": "eos",
"delivery_charge": 12.5,
"comment": "maiores",
"orderItems": [
[],
[]
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Display the specified order
Example request:
curl -X GET \
-G "/api/order/sed" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/order/sed"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Update the specified order
Example request:
curl -X PUT \
"/api/order/ducimus" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"status":2}'
const url = new URL(
"/api/order/ducimus"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"status": 2
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
display order items
Example request:
curl -X POST \
"/api/order/orderItems" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"order_id":18}'
const url = new URL(
"/api/order/orderItems"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"order_id": 18
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Product
APIs for manage product
Display all products
Example request:
curl -X GET \
-G "/api/product" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display the specified product.
Example request:
curl -X GET \
-G "/api/product/asperiores" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/asperiores"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Search by name
Example request:
curl -X GET \
-G "/api/product/search/architecto" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/search/architecto"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display by subcategory
Example request:
curl -X GET \
-G "/api/product/sub/ea" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/sub/ea"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display latest product
Example request:
curl -X GET \
-G "/api/product/latest" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/latest"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display product order by name A-Z
Example request:
curl -X GET \
-G "/api/product/name" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/name"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display product order by name Z-A
Example request:
curl -X GET \
-G "/api/product/nameD" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/nameD"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display product order by price Low-High
Example request:
curl -X GET \
-G "/api/product/price" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/price"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display product order by price High-Low
Example request:
curl -X GET \
-G "/api/product/priceD" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/priceD"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display by subcategory and order by latest
Example request:
curl -X GET \
-G "/api/product/sub/similique/latest" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/sub/similique/latest"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display by subcategory and order by name A-Z
Example request:
curl -X GET \
-G "/api/product/sub/pariatur/name" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/sub/pariatur/name"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display by subcategory and order by name Z-A
Example request:
curl -X GET \
-G "/api/product/sub/ab/nameD" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/sub/ab/nameD"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display by subcategory and order by price Low-High
Example request:
curl -X GET \
-G "/api/product/sub/dolorem/price" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/sub/dolorem/price"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display by subcategory and order by price High-Low
Example request:
curl -X GET \
-G "/api/product/sub/sint/priceD" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/product/sub/sint/priceD"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
SubCategory
APIs for manage SubCategory
Display a listing of the subcategory.
Example request:
curl -X GET \
-G "/api/sub_category" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/sub_category"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display the specified subcategory.
Example request:
curl -X GET \
-G "/api/sub_category/quasi" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/sub_category/quasi"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display the subcategory under a category
Example request:
curl -X GET \
-G "/api/subcategory/category/quam" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/subcategory/category/quam"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Display the subcategory under a subcategory
Example request:
curl -X GET \
-G "/api/subcategory/subcategory/sit" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/subcategory/subcategory/sit"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Users
APIs for manage user
Update the image
Example request:
curl -X POST \
"/api/user/avatar" \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-F "image[]=@C:\Users\HP\AppData\Local\Temp\php2B24.tmp"
const url = new URL(
"/api/user/avatar"
);
let headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('image[]', document.querySelector('input[name="image[]"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Display the specified user info.
Example request:
curl -X GET \
-G "/api/user/nesciunt" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/user/nesciunt"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Update the information
Example request:
curl -X PUT \
"/api/user/eius" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"/api/user/eius"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:


Connections
Events
Groups
My Network
(current)
Messaging
Profile
Edit Profile
Settings
Logout
Search


Source code for selenium.webdriver.common.touch_actions
"""
The Touch Actions implementation
"""
from selenium.webdriver.remote.command import Command
[docs]class TouchActions(object):
"""
Generate touch actions. Works like ActionChains; actions are stored in the
TouchActions object and are fired with perform().
"""
def __init__(self, driver):
"""
Creates a new TouchActions object.
:Args:
- driver: The WebDriver instance which performs user actions.
It should be with touchscreen enabled.
"""
self._driver = driver
self._actions = []
[docs] def tap(self, on_element):
"""
Taps on a given element.
:Args:
- on_element: The element to tap.
"""
self._actions.append(lambda:
self._driver.execute(Command.SINGLE_TAP, {'element': on_element.id}))
return self
[docs] def double_tap(self, on_element):
"""
Double taps on a given element.
:Args:
- on_element: The element to tap.
"""
self._actions.append(lambda:
self._driver.execute(Command.DOUBLE_TAP, {'element': on_element.id}))
return self
[docs] def tap_and_hold(self, xcoord, ycoord):
"""
Touch down at given coordinates.
:Args:
- xcoord: X Coordinate to touch down.
- ycoord: Y Coordinate to touch down.
"""
self._actions.append(lambda:
self._driver.execute(Command.TOUCH_DOWN, {
'x': xcoord,
'y': ycoord}))
return self
[docs] def move(self, xcoord, ycoord):
"""
Move held tap to specified location.
:Args:
- xcoord: X Coordinate to move.
- ycoord: Y Coordinate to move.
"""
self._actions.append(lambda:
self._driver.execute(Command.TOUCH_MOVE, {
'x': xcoord,
'y': ycoord}))
return self
[docs] def release(self, xcoord, ycoord):
"""
Release previously issued tap 'and hold' command at specified location.
:Args:
- xcoord: X Coordinate to release.
- ycoord: Y Coordinate to release.
"""
self._actions.append(lambda:
self._driver.execute(Command.TOUCH_UP, {
'x': xcoord,
'y': ycoord}))
return self
[docs] def long_press(self, on_element):
"""
Long press on an element.
:Args:
- on_element: The element to long press.
"""
self._actions.append(lambda:
self._driver.execute(Command.LONG_PRESS, {'element': on_element.id}))
return self
[docs] def flick(self, xspeed, yspeed):
"""
Flicks, starting anywhere on the screen.
:Args:
- xspeed: The X speed in pixels per second.
- yspeed: The Y speed in pixels per second.
"""
self._actions.append(lambda:
self._driver.execute(Command.FLICK, {
'xspeed': xspeed,
'yspeed': yspeed}))
return self
[docs] def flick_element(self, on_element, xoffset, yoffset, speed):
"""
Flick starting at on_element, and moving by the xoffset and yoffset
with specified speed.
:Args:
- on_element: Flick will start at center of element.
- xoffset: X offset to flick to.
- yoffset: Y offset to flick to.
- speed: Pixels per second to flick.
"""
self._actions.append(lambda:
self._driver.execute(Command.FLICK, {
'element': on_element.id,
'xoffset': xoffset,
'yoffset': yoffset,
'speed': speed}))
return self


I am a second-year undergraduate student pursuing major in Mathematics and Computing at Indian Institute of Technology, Kharagpur. My interests include Competitive Programming, Open Source, Web Development, Mobile Computing.
I take interest in learning about LIFE through people, meeting and sharing experiences. I like to invest in long informed and elaborate discussions about technology, science, humans, movies, religion and not to forget politics, but not necessarily in that order. I write a blog for personal opinions on some of those.
Have a look at my resume to know more about me and here's a longer version.
Website still in developmentphase.
Site hosted on
Site primarily for desktop Some mobile features may not work now.


Hamming Distance
问题描述 :
(From wikipedia) For binary strings a and b the Hamming distance is equal to the number of ones in a XOR b. For calculating Hamming distance between two strings a and b, they must have equal length.
Now given N different binary strings, please calculate the minimum Hamming distance between every pair of strings.
Now given N different binary strings, please calculate the minimum Hamming distance between every pair of strings.
输入:
The first line of the input is an integer T, the number of test cases.(0<T<=20) Then T test case followed. The first line of each test case is an integer N (2<=N<=100000), the number of different binary strings. Then N lines followed, each of the next N line is a string consist of five characters. Each character is ’0′-’9′ or ‘A’-'F’, it represents the hexadecimal code of the binary string. For example, the hexadecimal code "12345" represents binary string "00010010001101000101".
输出:
The first line of the input is an integer T, the number of test cases.(0<T<=20) Then T test case followed. The first line of each test case is an integer N (2<=N<=100000), the number of different binary strings. Then N lines followed, each of the next N line is a string consist of five characters. Each character is ’0′-’9′ or ‘A’-'F’, it represents the hexadecimal code of the binary string. For example, the hexadecimal code "12345" represents binary string "00010010001101000101".
样例输入:
2 2 12345 54321 4 12345 6789A BCDEF 0137F
样例输出:
6 7
题目地址： http://acm.hdu.edu.cn/showproblem.php?pid=4712
首先，算汉明距离就是二进制异或以后的1的个数，统计1的个数用x&=x-1很快很神奇。
用if(x&1) {count++; x>>=1;} 在位数比较多的时候会慢一些。
然后就是看题解学到的神奇的“随机”！ 来取到“任意的两个” 1w次wa，但是10w次就不会，20组testcase ，不会超时；
真的ac了，很神奇
代码：
#include<iostream> #include<ctime> #include<algorithm> #include<cstdlib> #include<cstdio> using namespace std; int a[100005]; int hamming(int x,int y) { x=x^y; int count=0; while(x) { x&=x-1; count++; } return count; } int min(int &a,int &b) { return a<b?a:b; } int main() { int T; cin>>T; srand(time(0)); int n; while(cin>>n) { for(int i=0;i<n;i++) scanf("%x",&a[i]); int test=100000; int x,y; int ans=100; while(test--) { x=rand()%n; y=rand()%n; while(x==y) x=rand()%n; ans=min(ans,hamming(a[x],a[y])); } cout<<ans<<endl; } }
版权声明：本文为博主原创文章，未经博主允许不得转载。
参考：http://blog.csdn.net/jingqi814/article/details/11880325
(adsbygoogle = window.adsbygoogle || []).push({});
露出菊花也可~~


Tool is an American rock band from Los Angeles. Formed in 1990, the group's line-up includes drummer Danny Carey, guitarist Adam Jones, and vocalist Maynard James Keenan. Justin Chancellor has been the band's bassist since 1995, replacing their original bassist Paul D'Amour. Tool has won four Grammy Awards, performed worldwide tours, and produced albums topping the charts in several countries. To date, the band has released five studio albums, one EP and one box set.
They emerged with a heavy metal sound on their first studio album, Undertow (1993), and became a dominant act in the alternative metal movement with the release of their follow-up album Ænima in 1996. Their efforts to unify musical experimentation, visual arts, and a message of personal evolution continued with Lateralus (2001) and 10,000 Days (2006), gaining critical acclaim and international commercial success.
Their fifth studio album, Fear Inoculum, was released on August 30, 2019 to widespread critical acclaim. Prior to its release, the band had sold over 13 million albums in the US alone. Due to Tool's incorporation of visual arts and very long and complex releases, the band is generally described as a style-transcending act and part of progressive rock, psychedelic rock, and art rock. The relationship between the band and today's music industry is ambivalent, at times marked by censorship, and the band's insistence on privacy.


Deprecation Warning: The button
mixin has been deprecated and will be removed in the next major version release. Take a look at Bitters, which includes basic styles for buttons.
The button add-on provides well-designed buttons with a single line in your CSS.
The mixin supports a style parameter and an optional color argument. The available button styles are:
simple
(default)
shiny
pill
The mixin can be called with no arguments, which will render a blue button with the simple
style.
Create beautiful buttons by defining a style and color argument; using a single color, the mixin calculates the gradient, borders, box shadow, text shadow and text color of the button. The mixin will change the text to be light when on a dark background, and dark when on a light background.
{% highlight scss %} button { @include button(shiny, #ff0000); } {% endhighlight %}


How Impactful was Shin Megami Tensei?
Shin Megami Tensei greatly contributed to the RPG genre, during the time of its release it was the only RPG to be set in present tense instead of in a futuristic/past tense world or a fantasy world, this set the game up completely different from any RPG of the time while set-in current time Tokyo the point was to make it relatable for the player, and show the struggles any average person has to deal with while showing anybody can be important or make a change. Unlike other RPGs of its time or nowadays you won't find the main enemy/ villain being some big bad crazy monster but a fight between two different ideologies shown through the games storyline as a battle between God and Satan.
SMT is over 30 years old and is based off of a novel of the same name but still has new games coming out today it inspired the devil Summoner series and the Persona series made by the same creators and has become a very popular series all over the world still growing in size today. Most RPG's have a good and intriguing storyline but SMT went a whole level above that, it's storyline had multiple different endings causing character development that was so deep party members could die twice, party members that didn’t agree with the main character would even become your enemy and force you to kill them.
SMT doesn't stand up to graphics nowadays but back in the 1990s when the game released it was impressive for how many different sprites still had animations and although the different Dungeons the player went through were basic in design the back tracking was not very tough in this game as it was in many RPGs of its time. SMT was very different from any RPG game and has brought forth a massive amount of games underneath it's belt following the same idea that the antagonist isn't always a person or monster sometimes it's the difference in ideas or how people choose to live their lives or judge people on their lives.


Flexibility of having multiple parallel instances of Linux using WSL
29 Sep 2020Working with Windows can be truly a nightmare in scientific computing projects. The main reason behind this is that most of the scientific computing libraries have developed natively for Linux, and in the case of cross-platform ones, the building and installation process on Linux is more straightforward and easy to accomplish. In addition to this, the freedom you have while working with the command line interface can never be experienced in Windows with PowerShell or the traditional Command Prompt.
So why are we talking about this when Linux is there and we don’t need to stick to Windows? The problem arises when you work for a big organization that doesn’t allow Linux to be installed on your machine because all the operational workflow, communication systems, and things like that are going to take place in Windows (which is indeed my case at KU Leuven, although I have installed an ILLEGAL dual boot version of Linux by bypassing the organizational Bitlocker, but it’s not always feasible and convenient to reboot to Windows to join a meeting, sign something or print a document).
The solution to this problem was released by Microsoft several years ago, a feature of Windows called Windows Subsystem for Linux (WSL), providing you with an emulated Linux kernel on top of which you can install your favorite distribution. It gives you full terminal access as well as limited support for running graphical applications (with some tricks of course). Recently, they have also extended and upgraded this feature to a real Linux kernel in WSL 2 (which I haven’t tested yet), which has also some cool and long awaited features such as GPU support.
But, beside this, WSL can be tweaked to bring even more productivity especially if you want to test multiple libraries and different configurations without touching your previous working instances of configured Linux (which indeed happens every now and then in scientific computing). Doing this in a native installation of Linux (like with chroot
) requires some effort. Having multiple instances of the same Linux distribution in WSL is not supported out-of-the-box but can be accomplished using a less-known, yet fantastic tool called LxRunOffline. The simplest way to install LxRunOffline is by downloading the compiled binaries from GitHub. Adding the executable path to the “Path” environment variable is highly recommended. After doing that, a new instance can be installed as simple as:
> LxRunOffline i -n <name_of_the_instance> -d <isntallation_location> -f <path_of_the_downloaded_image> -s
in which the i
argument indicates the installation action (to see all available operations, execute LxRunOffline
without any action). Then, the installed instance can be run using:
> LxRunOffline r -n <name_of_the_instance>
You can encapsulate this command in a batch file, which can be placed on Desktop (or even better somewhere in “Path”, so you can run it directly from Command Prompt in any directory) for an easier access.
And now, the great flexibility comes with the freedom of choosing whatever you want as the distribution. What I use most often for this purpose is Ubuntu Core, a light-weight Linux distribution aimed for IoT devices, but with APT package manager installed, which enables me to start with a tiny Linux installation, and then configure it to fit my needs. By doing this, I can quickly have a fresh installation of Linux to test or run something without affecting the previous configurations I have. A wide variety of Ubuntu Core images can be downloaded here. A typical command for such a purpose can be then something like this:
> LxRunOffline i -n ubuntu-4.6 -d c:\wsl\ubuntu-test46 -f ubuntu-bionic-core-cloudimg-amd64-root.tar.gz -s


Get started with Micronaut quickly and easily with one of our Quick-Start Packages, or contact us to set up a custom consulting engagement.
Consulting and support packages are provided by Object Computing, Inc. (OCI), home to the Micronaut Framework.
The OCI team can assist you with:
- Architecture and design review
- Rapid prototyping, troubleshooting, and debugging
- Customizing, modifying, and extending the product
- Integration assistance and support
- Mentorship and architecture throughout the lifecycle of your project


Seer Moira:
If you follow the path from the western part of the village, you'll meet someone who'll stop your wandering. His name is
Karuda
.
When you meet him, tell him to wait.


|
GLAC
1.0
|
Directories | |
| directory | tools |
Files | |
| file | correlator.cpp |
| file | correlator.h [code] |
| file | energydensity.cpp |
| file | energydensity.h [code] |
| file | latticeactionchargedensity.cpp |
| file | latticeactionchargedensity.h [code] |
| file | mastersampler.cpp |
| file | mastersampler.h [code] |
| file | mastersamplertopcxyz.cpp |
| file | mastersamplertopcxyz.h [code] |
| file | observables.h [code] |
| file | plaquette.cpp |
| file | plaquette.h [code] |
| file | supersampler.cpp |
| file | supersampler.h [code] |
| file | topologicalcharge.cpp |
| file | topologicalcharge.h [code] |


Go Back
Collapsible
Link with href
Button with data-bs-target
Some placeholder content for the collapse component. This panel is hidden by default but revealed when the user activates the relevant trigger.


There are times when all of us will need to ask a question. This is especially true for programmers. There are tons of resources and communities of people out there that want to help you, but you have to be able to convey your question properly. Asking a question that will get a favorable response takes a little planning and awareness of the community or person that you are asking.
There are a number of rules that make up a good question, and these rules can vary depending on who you ask. As a general rule of thumb, your questions should be specific, informative, able to replicated, and courteous. You should give very specific information into what is troubling you and avoid statements like "someone help me learn ruby!". People are much more willing to help you solve a problem than explain an entire language to you!
Reflecting on my own question asking, I am not always as specific as I should be. I am an avid Quora and Stack Overflow reader so I have some experience with the proper way to structure questions, but sometimes it is hard to figure out the best way to ask a question. When you are dealing with code in particular, it can often be a challenge to determine what information is pertinent to include in the question.
For instance, sometimes you have a question about a class you are working on that interacts with 4 other classes. In this case, how do you explain that relationship in a short question description? Do you link those other classes as well in your explanation of the problem?
It can be difficult to navigate these types of problems, but what I have found is to just start asking questions and adjust your question answer based on the feedback you receive from people trying to help you. Often on Stack Overflow you will have people answer your question right away. On the other hand if you ask a bad question people will let you know right away. Take the criticism constructively and use that to help formulate your questions in the future. You often won't ask the perfect question the first time, but that is OK! If you take the feedback and use it you will be writing great questions in no time. Also a good idea is to look at how other people ask questions and model your questioning based on their best practices.


Links
- Biolyrics — Faris's personal
blog.
- Metacogni.tv — A Cognitive
Science blog that thinks about thinking.
- The Vancouver Technology Network — A social enterprise still in its infacy. Their
mission statement is to provide empowerment to marginalized populations
through technology.


Fill out the form to receive our free info package which contains:
- LTO Network Presentation
- Access to the Demo Portal
- Technical documentation + playground (Developers only)
Every day, we help system integrators, independent software vendors and other organizations to build new solutions with our blockchain technology. Are you ready to learn more about the blockchain solutions & products built on LTO Network?
Fill out the form to receive our free info package which contains:
Alternatively you can email us at<EMAIL_ADDRESS>Note: acquisition is not appreciated!
Receive your free onboarding package
Come take a peek, or have a beer at our office.
LTO Network Office
Burgerweeshuispad 201
1076 GR
Amsterdam, The Netherlands


I am a doer, who smiles to his mistakes, in order to achieve the next stop at the top.
I am a customer experience devote, which started about 15 years ago.
I put on test the cutomer inter-relation on multiple ambiance. Such like Scuba Diving, being under water about 114 feet feet and trying that my customers being confortable and relax. Also worked for a while providing network remote support to users in very remote areas, where Netflix is the life motivator.
Through the years, I constantly thought how easier my life could be if I had someone who advised me which rocks I had to avoid, shortening the way for arriving to the dream path.
Beginnings of my coding path
After another of my multiple adventures, I cameback from the french army and got a job as a Head Trainer for one OrangeTheory studio. Things did not worked as I planned to, reason why I was unemployed and not so happy for a couple of months, until I noticed that fitness industry won't give me an interesting income, reason why I moved my self, until getting an entry tech support job.
After different tech companies on the process, the Corona Virus said Hello World, causing that the company in which I was at that moment, moved us to work remotely. I decided to put all my energy on learning coding, while being enclaustered at home
In the Coding MindHalaX
Now I am in the process of formating my mindhala, cutting with an axe all the insecurities in order to dominate some coding lagunuages.
I concluded some certifications in FreeCodeCamp and going for much more


--- layout: post title: Automatic vim plugin loading with pathogen date: '2011-10-20T00:00:00+02:00' tags: - vim - plugin tumblr_url: http://aladac.tumblr.com/post/19947557086/automatic-vim-plugin-loading-with-pathogen ---
My editor of choice is vim. I am using a MacOS desktop with a fairly recent version of vim, but I am often working on Ubuntu servers. Even in the newest LTS the vim plugins available in the standard package repos may be ancient.
I found a convenient way to auto load plugins installed directly from git repositories: pathogen.vim
You just need to:
… then edit your .vimrc to initialize pathogen:
… and install a plugin to test if everything works:


Tile’s ‘Smart Alerts’ now warns users if they forget an item at home
The beta will be available in December
by Dean DaleyTile’s Bluetooth trackers are already able to help users find their lost products, but now company is looking to expand that functionality by relaunching ‘Smart Alerts.’
Tile’s new Smart Alerts, which is currently in beta, automatically warns users when they’ve left an item with a tracker in it behind for five minutes. You’ll be able to set ‘safe zones’ so that the tile won’t set off an alarm when you forget your purse at home.
Smart Alerts beta requires a premium subscription, but if you’re forgetful enough, this new feature might be worth it. The premium subscription costs $34.99 CAD for the year. The New Tile Mate is priced at $29.99 CAD, the New Tile Pro costs $39.99 ($74.99 for a two pack), the New Slim is priced at $34.99 and the New Sticker costs $49.99 CAD for a two-pack.
The beta will be available in December.
Source: Tile


--- title: Add a densely-connected NN layer to an output type: docs repo: https://github.com/rstudio/keras menu: main: name: Add a densely-connected NN layer to an output - keras parent: keras-reference aliases: - /reference/keras/layer_dense.html - /keras/reference/layer_dense.html - /guide/keras/reference/layer_dense.html - /tools/tools/keras/reference/layer_dense.html - /installation/keras/reference/layer_dense.html - /tutorials/keras/reference/layer_dense.html - /guide/tools/keras/reference/layer_dense.html - /deploy/keras/reference/layer_dense.html - /tools/keras/reference/layer_dense.html - /tutorials/tools/keras/reference/layer_dense.html ---
Implements the operation: output = activation(dot(input, kernel) + bias)
where activation
is the element-wise activation function passed as the
activation
argument, kernel
is a weights matrix created by the layer, and
bias
is a bias vector created by the layer (only applicable if use_bias
is TRUE
). Note: if the input to the layer has a rank greater than 2, then
it is flattened prior to the initial dot product with kernel
.
layer_dense(
object,
units,
activation = NULL,
use_bias = TRUE,
kernel_initializer = "glorot_uniform",
bias_initializer = "zeros",
kernel_regularizer = NULL,
bias_regularizer = NULL,
activity_regularizer = NULL,
kernel_constraint = NULL,
bias_constraint = NULL,
input_shape = NULL,
batch_input_shape = NULL,
batch_size = NULL,
dtype = NULL,
name = NULL,
trainable = NULL,
weights = NULL
)
| object | Model or layer object |
| units | Positive integer, dimensionality of the output space. |
| activation | Name of activation function to use. If you don't specify anything, no activation is applied (ie. "linear" activation: a(x) = x). |
| use_bias | Whether the layer uses a bias vector. |
| kernel_initializer | Initializer for the |
| bias_initializer | Initializer for the bias vector. |
| kernel_regularizer | Regularizer function applied to the |
| bias_regularizer | Regularizer function applied to the bias vector. |
| activity_regularizer | Regularizer function applied to the output of the layer (its "activation").. |
| kernel_constraint | Constraint function applied to the |
| bias_constraint | Constraint function applied to the bias vector. |
| input_shape | Dimensionality of the input (integer) not including the samples axis. This argument is required when using this layer as the first layer in a model. |
| batch_input_shape | Shapes, including the batch size. For instance,
|
| batch_size | Fixed batch size for layer |
| dtype | The data type expected by the input, as a string ( |
| name | An optional name string for the layer. Should be unique in a model (do not reuse the same name twice). It will be autogenerated if it isn't provided. |
| trainable | Whether the layer weights will be updated during training. |
| weights | Initial weights for layer. |
Input shape: nD tensor with shape: (batch_size, ..., input_dim)
. The most
common situation would be a 2D input with shape (batch_size, input_dim)
.
Output shape: nD tensor with shape: (batch_size, ..., units)
. For
instance, for a 2D input with shape (batch_size, input_dim)
, the output
would have shape (batch_size, unit)
.
Other core layers:
layer_activation()
,
layer_activity_regularization()
,
layer_attention()
,
layer_dense_features()
,
layer_dropout()
,
layer_flatten()
,
layer_input()
,
layer_lambda()
,
layer_masking()
,
layer_permute()
,
layer_repeat_vector()
,
layer_reshape()