php – Problem of product insertion and user detail

I use PHP 7.2 MySQL Add to Cart. insert a product as a detail of the user's gest. and product detail all data is inserted, but not product data. I want to insert detailed product data. data inserted as

productImage, productName, product_qty, price) inserted by extraction
foreach buckle impload function of database
PHP code here …

<? php
$ msg = & # 39;
if (isset ($ _ POST['submit'])) {
$ address = mysqli_real_escape_string ($ conn, $ _POST['address'])
$ total = mysqli_real_escape_string ($ conn, $ _POST['total'])
            
        foreach ($ _SESSION["products"] as $ product) {
$ productName = $ product["productName"];
$ productPrice = $ product["productPrice"];
$ product_qty = $ product["product_qty"];
$ productImage1 = $ product["productImage1"];
}
$ productImage = implode (& # 39 ;, $ productImage);
$ productName = implode (& # 39 ;, $ productName);
$ product_qty = implode (& # 39 ;, $ product_qty);
$ price = implode (& # 39;, & # 39 ;, $ price);
                      
            $ query = "INSERT INTO commands
(address, productImage, productName, product_qty, total, price,)
VALUES (& # 39; $ address & # 39; $, productImage & # 39;
& # 39; $ productName & # 39;, & quot; $ product_qty & # 39; $ total & # 39;, & quot; $ price & # 39;) & quot;
$ run = mysqli_query ($ conn, $ query);
not defined ($ _SESSION["products"])
echo "";
}
?>

: 2019 nw

: 2019 nw[IMG]https: //i106.fastpic*****big/2019/0611/63/d4a8f7df565fa0de31e0b4ad1e3ee063.jpg[/IMG] : : : May 23, 2019 – 2 min – Sent by VHS: – VHS :, ":" "2:": "" – ,,,. "2019": 3 10:51. "". , "" October 4, 2018 – 49 min: X-Men: Phoenix Dark (2019) Cinematube 1 136. 40: 002019 X-Men: Dark Phoenix Jean Costume Costume Gray Cosplay Jumpsuit Jacket85-90cm33-35in, size 73-76cm28- 30in, hip 83-90cm32-35in, should have a width of 44cm.pay contact us kindly, thank you to contact us by email or TradeManager online. (1988). 1 65. :: (2019). Vtube – 36 .. (2019) -. Vtube: (2019) – 2.2019-06-07. : :: (4010); IMDb: (605); : 1967-08-08 (1966) HD 1080 720p. 2019 :, () -:.,:, ​​You Tube20th Century Fox Russia: 2019. 1. : ,,: 83. 2019, 2019 -. : .2019Anwap 2019: (2019). : (2019). Dark Phoenix 12+. :::. (2019) (). Revisions :::. "". . :. ! 2,565,528. 00h47. . 684 385.. 30-. – :. 29, ::. : 5 2019: 6 2019, -. ,. : Dark Phoenix. . . : 7.5. .: Hans Zimmer :: X-Men: Dark Phoenix: United States: Score: 2019: 01:08:02: Lossless: FLAC: Songs 01. Gap (8:08) 02. Dark (4:28) 03. Frameshift (8:16) 04. Friendship (5:53) 05. Intimate (10:14) 06. Negative (3:59) 07. Suppression (4:52) 08. Imprudent (9:36) 09. Insertion (7: 57) 10 .: 2019., ,, -. ,,,. ,:: ,,. , ,, -. ,. : RU. : (2019). : (2019). CAMRip 2019. – :. : (2019) 720 HD. . . :: – ,. ,. . – -,, – :. . 34 ..: 12 2018 ..: Wonder. You Tube- 20th Century ,, 2019-02-28 14:25:35. 2019-02-28 14:25:35 ,,. ,: Dark Phoenix. . : 5 .: X-Men: Dark Phoenix, 2019. 02:34. X-MEN: DARK PHOENIXBand official announcement 3Dans the cinemas June 6, 2019. 12:49. : (,,) X-MEN: Dark Phoenix. 2:01. (2019). 2:07. : X-Men: Dark Phoenix (: 14 2019) 2019,. 2:24. 2019. 02:09. : X-Men: Dark Ph :: 2019: 2019: 2019 hd ::: hd :: http: //thecorner.ning.com/profiles/b…5gokzyanllg2yh.

Davidbendy
Reviewed by Davidbendy sure
.
: 2019 nw
: 2019 nwhttps: //i106.fastpic ***** big / 2019/0611/63 / d4a8f7df565fa0de31e0b4ad1e3ee063.jpg ::: May 23, 2019 – 2 min – Uploaded by VHS: – VHS :, "" "" "" " :: "" – ,,,. "2019": 3 10h51. ":"., "" October 4, 2018 – 49 min: X-Men: Dark Phoenix (2019) Cinematub 1 136. 40: 002019 X-Men: Dark Phoenix Jean Costume Costume Gray Cosplay Jumpsuit Jacket85-90cm33-35in, size 73-76cm28-30in, hip 83-90cm32-35in, should
Evaluation: 5

.

Python – Palindrome Insertion Challenge

Here is my solution to the following Daily coding problem

From a string, find the feasible palindrome by inserting the
the smallest possible number of characters anywhere in the word. If there is
is possible to make more than one palindrome of minimal length, return
the oldest lexicographically (the first in alphabetical order).

Example

Contribution: race

Exit: ecarace

I've used a PEP8 checker for this code and the only problem I could not solve was the "UPPER_CASE" naming style because I do not understand what I'm supposed to do to solve this problem.

import itertools

def find_palindrome (word, new_strings) -> str:
"" "Find the first palindrome word of a given string by adding new letters" ""
for add_string in new_strings:
for the index in the interval (len (word)):
new_word = word[:index] + "" .join (add_string) + word[index:]
            if new_word == new_word[::-1]:
returns new_word

if __name__ == "__main__":
word = "race"
new_strings = sorted (list (itertools.chain.from_ableable (itertools.permutations (word, n)
for n in the range (len (word) +1))))
print (find_palindrome (word, new_strings))

GSA Content Generator ISSUE- No insert insertion desired but addin sources enabled.

Hi
When I register a campaign in GSA Content Generator, a problem always arises: no added insert would be searched but the sources of the addin enabled.

What is it? What should I do to solve this problem?

php – creation of a directory for the insertion image of the seller in the database, but empty file location

I want to insert data using the name of the PHP 7.2 table vendeur_login and field

user_id, username, password, login_type, image, logo PHP insert into a script.
work shoe error please help me …

![Entrezladescriptiondel&#39;imageici[enterimagedescriptionhere[entrezladescriptiondel'imageici[enterimagedescriptionhere

show the error here

Notice: Undefined index: logo in
D: xammp htdocs multivender myhomeportal seller-register.php online
94

Notice: Undefined index: logo in
D: xammp htdocs multivender myhomeportal seller-register.php online
94

Notice: Undefined index: image in
D: xammp htdocs multivender myhomeportal seller-register.php online
95

Notice: Undefined index: image in
D: xammp htdocs multivender myhomeportal seller-register.php online
95

PHP line number like 94

    move_uploaded_file ($ _FILES["logo"]

  ["tmp_name"], "../ sellerimage / $ user_id /".$$ FILES["logo"]["name"])

PHP line number like 95

move_uploaded_file ($ _FILES["image"]

["tmp_name"], "../ sellerimage / $ user_id /".$$ FILES["image"]["name"])

PHP any script here

<? php
$ username = $ password = $ confirm_password = "";
$ username_err = $ password_err = $ confirm_password_err = "";
$ type_login = $ type_err = $ type_login = "";
$ logo = $ logo_err = $ logo = & # 39;
$ image = $ image_err = $ image = & # 39;

if ($ _ SERVER["REQUEST_METHOD"] == "POST") {

if (empty (trim ($ _ POST["username"]))) {
$ username_err = "Please enter a username.";
} other {
$ sql = "SELECT user_id FROM seller_login WHERE username =?";

if ($ stmt = mysqli_prepare ($ conn, $ sql)) {
mysqli_stmt_bind_param ($ stmt, "s", $ param_username);

$ param_username = trim ($ _ POST["username"])

if (mysqli_stmt_execute ($ stmt)) {
mysqli_stmt_store_result ($ stmt);

if (mysqli_stmt_num_rows ($ stmt) == 1) {
$ username_err = "This username is already taken.";
} other {
$ username = trim ($ _ POST["username"])
}
} other {
echo "Oops! An error has occurred. Please try again later.";
}
}

mysqli_stmt_close ($ stmt);
}
// ------------------------
if (empty (trim ($ _ POST["type_login"]))) {
$ type_err = "Please select a user type.";
} other {
$ type_login = trim ($ _ POST["type_login"])
}
//------------grant----------------


// ------------------------
if (empty (trim ($ _ POST["password"]))) {
$ password_err = "Please enter a password.";
} elseif (strlen (trim ($ _ POST["password"])) < 6){
            $password_err = "Password must have atleast 6 characters.";
        } else{
            $password = trim($_POST["password"]);
        }

        if(empty(trim($_POST["confirm_password"]))){
            $confirm_password_err = "Please confirm password.";     
        } else{
            $confirm_password = trim($_POST["confirm_password"]);
            if(empty($password_err) && ($password != $confirm_password)){
                $confirm_password_err = "Password did not match.";
            }
        }
        //-------------------seller logo insert------------------------

        if(empty($_FILES["logo"]["name"])){$logo_err = "Please Select Logo.";} 
        else{ $logo =$_FILES["logo"]["name"];}
        //-------------------image---------------------------

        if(empty($_FILES["image"]["name"])){$image_err = "Please Select image.";} 
        else{$image =$_FILES["image"]["name"];}

        //--------------------directory creation for Seller images---------------

        $query=mysqli_query($conn,"select max(user_id) as pid from seller_login");
        $result=mysqli_fetch_array($query);
        $sellerid=$result['pid']+1;
        $dir="../sellerimage/$sellerid";
        mkdir($dir);// directory creation for Seller images
        move_uploaded_file($_FILES["logo"]["tmp_name"],"../sellerimage/$sellerid/".$_FILES["logo"]["name"]);
        move_uploaded_file($_FILES["image"]["tmp_name"],"../sellerimage/$sellerid/".$_FILES["image"]["name"]);




        //----------------------------------------------------------------

        if(empty($username_err) && empty($password_err) && empty($confirm_password_err)){

            $sql = "INSERT INTO seller_login (username, password, type_login, logo, image) VALUES (?, ?, ?, ?, ?)";

            if($stmt = mysqli_prepare($conn, $sql)){
                mysqli_stmt_bind_param($stmt, "sssss", $param_username, $param_password, $type_login, $logo, $image);

                $param_username = $username;

                $param_password = password_hash($password, PASSWORD_DEFAULT); 

                if(mysqli_stmt_execute($stmt)){
                    $msg="Successfully Login";      
                } else{
                     $msg="Something went wrong. Please try again later.";
                }
            }
            mysqli_stmt_close($stmt);
        }
        mysqli_close($conn);
    }
    ?>

Data Structures – Restructuration of the trinode of red-black tree after insertion and deletion

When you perform an insert / delete on a red-black tree, how can one argue or prove that it requires at most one / two trinode restructuring (s), respectively?
My thoughts up to now were as follows: after inserting a node and the existence of two consecutive red nodes along a path from the root to the leaf , a restructuring is carried out, followed by a re-coloring, culminating in a red-black tree. Does this mean that after inserting a node, there can only be one red double problem in the tree, which requires a restructuring to solve it? ?

Sorting – Self Balancing Binary Search Tree Optimized for Insertion

I have written a "quiz" that invites the user to compare two elements of subjective value. Once the position of all elements is determined, an ordered list is displayed, of the most valuable at least. The number of elements is fixed. The current implementation can be seen at https://dfdx.us/core-values-quiz/.

What matters most is to minimize the number of comparisons the user needs to enter or, more specifically, to minimize the amount of time the user must make each comparison multiplied by the number of comparisons.

Currently, I propose two methods of sorting: Quicksort and insertion into a binary tree. Compared to a self-balancing BST, Quicksort will always require more comparisons, but as each consecutive comparison relates to a single element (the partition element), the brain does not need to change a lot of context and can answer questions faster. . The binary search tree will present fewer issues that take longer. I let the user decide which method he wants to use, given the advantages and disadvantages of each.

Since the comparisons required to rebalance the tree are managed by the computer, and not by the user, these comparisons do not need to be optimized, but only the number of comparisons needed to determine the relative position in the current tree. I believe this optimization is equivalent to, between each element insertion, balance the tree as perfectly as possible. This is to say requiring the strictest balancing stress.

The best algorithm I've tested is the AVL tree. Although the AVL tree is very bad for insertion / deletion times for most applications, it has a decent balancing constraint that provides high search speeds. The rebalancing between each insertion / deletion is what makes it inefficient, but since, compared to the human input, these comparisons are negligible, it is very good for my situation.

My situation requires an additional constraint: the user must never be presented twice the same comparison. For the AVL tree, rebalance breaks this constraint. So I just memorize all the answers of the user in a dictionary. I can not imagine a situation in which this case could not be treated with this memoziation, but I thought I would mention it nevertheless.

I really have two questions:

  1. Am I right in saying that balancing the tree as perfectly as possible guarantees the lowest number of prompts to the user?

  2. Is there a better balancing algorithm than an AVL tree?

Since before the start of the quiz, the order of the elements is random, even if you use a non-self-balanced BST value, you will get a more or less balanced tree. I could see an argument going on that Perfectly rebalancing after each insertion might actually produce a greater number of prompts, as each will have as many prompts as possible from lg (n); a slightly less balanced tree could potentially have some "lucky" insertions that require a little less than lg (n), and some "unlucky" inserts that require more, but that the lucky ones will carry it on average over unlucky ones. (I hope this makes sense.)

java – Bubble sorting algorithm, insertion and selection with CSV file

I have to perform 3 actions on a CSV file, but by ordering the algorithms method, it should work in JAVA – NETBEANS

The first is by bubble, where we must determine which city has the smallest number of registrants.

The second is by insertion, where it is necessary to determine the degree to which a larger quantity has been inscribed.

The third is by means of the sorting algorithm by selection, but I can explain it already in detail.

The CSV file to use, I downloaded it to a reader, who wants to help me tell me to share the information.

Thank you and blessings!

google sheets – Automatic insertion of the date when a check box is ticked

I have a simple sheet that has two columns with checkboxes (columns 5 and 8). The goal is to check the box to insert the date and time in the next column. I make it work correctly with a column with the following code:

function onEdit (e) {
varCell = e.source.getActiveCell (), col = aCell.getColumn ();
if (col == 5) {
var adjacentCell = aCell.offset (0, 1);
var newDate = Utilities.formatDate (new Date (),
"GMT + 1", "dd / mm / yyyy kk: mm: ss");
adjacentCell.setValue (newDate);
}
}

For my life, I do not know how to modify it so that it also works with column 8. Any help will save me from tearing off my hair!

SQL Server – Simple insertion instructions take so long

I have a scenario where a main stored procedure calls a nested procedure, and this nested procedure contains simple insert statements for multiple tables, and almost every insertion takes so long

I know that there are many possibilities, for example disk, processor, memory, indexes and triggers

How do I find that clustered and non-clustered indexes are not the cause of this slowness?

Insert a declaration:

INSERT IN PEDetail with (rowLock) (CID, CustID, PpeID, PeID, SubSys1ID, SubSys2ID, CharacteristicID, cmbID, PETemplateID).
SELECT CID, @ PID, @PpeID, PeID, SubSys1ID, SubSys2ID, CharacteristicID, cmbID, PETemplateID
DEPEDetail with (nolock)
where PpeID = @OldPpeid      

Table structure:

    SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE THE TABLE [dbo].[PEDetail](
    [CID] [int]    NOT NULL,
    [CustID] [int]    NOT NULL,
    [PpeID] [int]    NOT NULL,
    [PeID] [int]    NOT NULL,
    [SubSys1ID] [int]    NOT NULL,
    [SubSys2ID] [int]    NOT NULL,
    [CharacteristicID] [int]    NOT NULL,
    [cmbID] [int]    NOT NULL,
    [PETemplateID] [int]    NOT NULL,
CONSTRAINT [PK_PEDetail] CLUSTERED PRIMARY KEY
(
    [CID] ASC
    [CustID] ASC
    [PpeID] ASC
    [PeID] ASC
    [SubSys1ID] ASC
    [SubSys2ID] ASC
    [CharacteristicID] ASC
    [cmbID] ASC
    [PETemplateID] ASC
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) SURE [PRIMARY]

GO

ALTER TABLE [dbo].[PEDetail]  WITH VERIFY ADD CONSTRAINT [FK_PEDetail_PEHeader] FOREIGN KEY ([PpeID], [PeID])
REFERENCES [dbo].[PEHeader] ([PpeID], [PeID])
GO

ALTER TABLE [dbo].[PEDetail] CHECK OF CONSTRAINT [FK_PEDetail_PEHeader]
GO

ALTER TABLE [dbo].[PEDetail] ADD CONSTRAINT [DF_PEDetail_cmbID]  DEFAULT ((0)) FOR [cmbID]
GO

Nonclustered indexes:

CREATE A NON CLUSTERED INDEX [ix_PEDetail_CID_PeID_6] SURE [dbo].[PEDetail] 
(
    [CID] ASC
    [PeID] ASC
    [SubSys1ID] ASC
    [SubSys2ID] ASC
    [CharacteristicID] ASC
    [PETemplateID] ASC
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_POUR_LOGKS = ON, ALLOW_POUR_LOGKS = ON, ALLOW_PAGE_L, = ON, FILLFACTOR = 90). [PRIMARY]
GO



CREATE A NON CLUSTERED INDEX [IX_CID_CharacteristicID_CID_CharacteristicID] SURE [dbo].[PEDetail] 
(
    [CID] ASC
    [CharacteristicID] ASC
)
UNDERSTAND ( [PpeID]) WITH (PAD_INDEX = OFF, OFFSET_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF 85) [PRIMARY]
GO


CREATE A NON CLUSTERED INDEX [IX_PpeID_PeID] SURE [dbo].[PEDetail] 
(
    [PpeID] ASC
    [PeID] ASC
)
UNDERSTAND ( [CID],
[CustID],
[SubSys1ID],
[SubSys2ID],
[CharacteristicID],
[cmbID],
[PETemplateID]) WITH (PAD_INDEX = OFF, OFFSET_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF 85) [PRIMARY]
GO