Code:
Set < SearchFieldsEnum > searchFields = new HashSet < SearchFieldsEnum >
();
searchFields.add (SearchFieldsEnum.USER_ID);
question: how to implement this code with php?
Code:
Set < SearchFieldsEnum > searchFields = new HashSet < SearchFieldsEnum >
();
searchFields.add (SearchFieldsEnum.USER_ID);
question: how to implement this code with php?
php, so you can consider using array to implement
.<?php
Class Set {
private $arr = [];
public function add($val) {
if (!in_array($val, $this->arr)) {
array_push($this->arr, $val);
}
return $this->arr;
}
}
$set = new Set();
print_r($set->add(2));
print_r($set->add(2));
print_r($set->add(3));
print_r($set->add(4));
the ability is limited, if there is a mistake, please do not hesitate to give advice.
has not quite understood the concepts of controller, service layer, dao layer and logic layer, and how to use them and why to use them in this way ...
for example, (- 1) get 225 ...
to query the data after horizontal split, suppose the data of a business is split horizontally, and the monthly records are stored in a table. The data of each table is about 1000w. There are already more than 20 tables, such as table_201606,.,table_201...
because I want to open the official account page in Mini Program, but Mini Program can only open the set business domain name, I think of two ways: 1. Open a registered business domain name, and then jump to the official account page in the registered...
Project is the user name information required by Vue, which is stored in the user s browser. This user name information can be obtained on other websites for example, if I log in to Tencent s website in my browser, can Baidu get my Tencent account inf...
what is stored in the database is the html code, which is mainly a piece of div content, including the style, does not contain the body and other tags, and the label is strict in opening and closing. If I want to query the keyword "class " now, if I us...
the map of Tetris is implemented in a two-dimensional array, and squares are also implemented in arrays, but I just don t understand how maps interact with squares. is how to know where the square is on the map. Besides, although the two-dimensional ...
how does the QQ WeChat group @ all women, get all women s information ...
1, JAVA DES encryption class, how to use PHP to achieve encryption, decryption. (1) encryption if the key is 123mursharpAbcd, the plaintext is hello world, output 3d518daea941120d72fe3488f5d27a64 under this code, it will appear before data decryption...
for example, if there is a set of numbers such as 1, 2, 5, 7, 11, 14, how can Filter come up with two sets of numbers: [1, 2] and [5, 6, 7, 7]? ask for advice ...
the original rule is as follows [1-9] {1} [0-9] {3} now I want to rule out the result of 2035. How do I write it? because I m in a hurry, I can t think for myself. Regularity is my weakness. Thank you! ...
there is no vue rich text with formulas, that is, formulas in mathematics, physics and chemistry ...
python smtp send email setup signature? you can also say how it is sent in other languages ....
vue scaffolding code php back-end server language does not know how to get the content entered in the vue-quill-editor rich text editor api given to the official website I just say that new a quill and then use getContents (); to get the content how ...
as shown in the figure, if you want to do a login interception based on $api.getStorage ( userId ), the desired effect of is 1. Enter the page that can open the green box (main.html), but the other three in the red box cannot be opened directly (mes...
...
I m not familiar with the git command. I used vscode s git management tool to "undo the last commit " twice, but now I don t want to undo those commits. How can I restore them? ...
there is such a requirement: user login module, does not support the choice of login method, only a text input box, while supporting: QQ number, mobile number, e-mail, nickname, ID card, etc. (if the user filled in the values of these five fields) any f...
ask what is the development environment and language of short video playback software similar to Douyin requirements: if developers only have JAVA and front end now, what is the best development environment? is it okay to use Hbuilder s MUI? wi...
generate the corresponding loop based on the given number. If 2 is given, a double cycle is generated, and 3 is a triple cycle if 3 is given, then for (let i = 0; i < arr.length; iPP) { for (let j = 0; j < arr.length; jPP) { ...