问:
How to send multiple files using angular multipart
How to send multiple files using angular.

One file working fine as below without any issue. used multipart file.

```<code>let formdata = new FormData();
formdata.append("file", file);
formdata.append("param", obj);
</code>```

This will go as binary in request.
How can I send multiple files together? if I used list that will go like this - [object File][object File]

and back end cannot resolve

back end server.

```<code> @RequestParam(name = "param", required = true) String param,
 @RequestParam(name = "file", required = false) MultipartFile[] file
</code>```

答:
You can create a common function which can be used for single and multiple image upload and as well you can use it in multiple modules as well

it will be as follows

step 1 : create common functions in your shared service as follows

```<code>/**
 * @description: this function will set the image in form data in returns it in the response
 * @param e : file object
 * @param extention : allowed extentions which allow to upload
 * @param multiple : single or multiple
 */
uploadImage(e, extention = ['png', 'jpeg', 'jpg'], multiple = "") {
    let fileLength = e.target.files.length;
    let response: any = {};
    response.images = [];
    let uploadFile: any;
    if (fileLength > 1 || multiple != "") {
        for (let eachFile of e.target.files) {
            let returnImage = this.setImageInResponse(eachFile, extention);
            if (!returnImage.ImageError) {
                response.images.push(returnImage);
            } else {
                response.ImageError = returnImage.ImageError;
            }
        }
    } else {
        uploadFile = e.target ? e.target.files[0] : null;
        if (uploadFile) {
            response = this.setImageInResponse(uploadFile, extention);
        }
    }
    return response;
}
/**
 * @desc: this function will set individual file object in from data
 * @param uploadFile : object of single file
 * @param extention : allowed extentsions
 */
setImageInResponse(uploadFile, extention) {
    let response: any = {};
    let tmpExtension = extention;
    let tmpFileExtension = uploadFile.name.split('.').pop().toLowerCase();
    if (tmpExtension.indexOf(tmpFileExtension) > -1) {
        response.uploadFile = uploadFile;
        var reader = new FileReader();
        reader.onload = (event: ProgressEvent) => {
            response.uploadImgUrl = reader.result;
        }
        reader.readAsDataURL(uploadFile);
    }
    else {
        let errorString = tmpExtension.toString();
        response.ImageError = "You can upload only " + errorString;
    }
    return response;
}
</code>```

step 2 : call upload Image function with required parameters

so you will receive the whole formdata of single or multiple which you want to get in your module

and then do your next step

Body:
How to send multiple files using angular.

One file working fine as below without any issue. used multipart file.

let formdata = new FormData();
formdata.append("file", file);
formdata.append("param", obj);

This will go as binary in request.
How can I send multiple files together? if I used list that will go like this - [object File][object File]

and back end cannot resolve

back end server.

 @RequestParam(name = "param", required = true) String param,
 @RequestParam(name = "file", required = false) MultipartFile[] file

Body:
You can create a common function which can be used for single and multiple image upload and as well you can use it in multiple modules as well

it will be as follows

step 1 : create common functions in your shared service as follows

/**
 * @description: this function will set the image in form data in returns it in the response
 * @param e : file object
 * @param extention : allowed extentions which allow to upload
 * @param multiple : single or multiple
 */
uploadImage(e, extention = ['png', 'jpeg', 'jpg'], multiple = "") {
    let fileLength = e.target.files.length;
    let response: any = {};
    response.images = [];
    let uploadFile: any;
    if (fileLength > 1 || multiple != "") {
        for (let eachFile of e.target.files) {
            let returnImage = this.setImageInResponse(eachFile, extention);
            if (!returnImage.ImageError) {
                response.images.push(returnImage);
            } else {
                response.ImageError = returnImage.ImageError;
            }
        }
    } else {
        uploadFile = e.target ? e.target.files[0] : null;
        if (uploadFile) {
            response = this.setImageInResponse(uploadFile, extention);
        }
    }
    return response;
}
/**
 * @desc: this function will set individual file object in from data
 * @param uploadFile : object of single file
 * @param extention : allowed extentsions
 */
setImageInResponse(uploadFile, extention) {
    let response: any = {};
    let tmpExtension = extention;
    let tmpFileExtension = uploadFile.name.split('.').pop().toLowerCase();
    if (tmpExtension.indexOf(tmpFileExtension) > -1) {
        response.uploadFile = uploadFile;
        var reader = new FileReader();
        reader.onload = (event: ProgressEvent) => {
            response.uploadImgUrl = reader.result;
        }
        reader.readAsDataURL(uploadFile);
    }
    else {
        let errorString = tmpExtension.toString();
        response.ImageError = "You can upload only " + errorString;
    }
    return response;
}

step 2 : call upload Image function with required parameters

so you will receive the whole formdata of single or multiple which you want to get in your module

and then do your next step


来源: stackexchange

答:
what form is the x_test given in?

you can't do all the years at once because the nn need the data of the previous year in order to accurately predict

so I think you need to feed it the data that it outputs.

I'm not sure if that is right cos I don't know that x_train and x_test are. Are they the dates or something else? I tried to do that but I couldn't access the dataset as it 'failed for unknown reason'

I hope it helps :)

ContentLicense: CC BY-SA 4.0

Title: My RandomForestRegressor Predictive Model gets repetitive

Body:
Data

I have this data that shows Year, Month, and Customers Count

Yr      Mth Cnt
2004    7   8966
2004    8   9564
2004    9   9324
2004    10  9895
2004    11  9689
2004    12  10358
2005    1   9955
2005    2   8840
2005    3   10076
2005    4   9827
2005    5   10710
2005    6   10356
2005    7   10689
2005    8   10772
2005    9   10003
2005    10  10655
2005    11  10360
2005    12  11093
2006    1   10874
2006    2   9616
2006    3   10908
2006    4   10524
2006    5   10602
2006    6   10273
2006    7   11247
2006    8   11072
2006    9   10285
2006    10  11236
2006    11  10702
2006    12  11138
2007    1   10695
2007    2   10040
2007    3   11254
2007    4   11372
2007    5   11630
2007    6   10890
2007    7   11221
2007    8   12411
2007    9   11129
2007    10  10620
2007    11  11078
2007    12  11553
2008    1   10614
2008    2   10235
2008    3   11216
2008    4   10690
2008    5   11214
2008    6   11042
2008    7   10722
2008    8   11216
2008    9   11234
2008    10  10907
2008    11  10628
2008    12  11382
2009    1   10789
2009    2   9908
2009    3   11387
2009    4   10805
2009    5   12096
2009    6   11937
2009    7   11358
2009    8   11490
2009    9   10836
2009    10  11899
2009    11  11565
2009    12  11874
2010    1   11030
2010    2   10488
2010    3   12017
2010    4   11412
2010    5   11990
2010    6   11216
2010    7   11728
2010    8   12131
2010    9   11603
2010    10  12105
2010    11  12152
2010    12  12360
2011    1   11940
2011    2   10739
2011    3   12153
2011    4   11665
2011    5   11886
2011    6   11720
2011    7   11625
2011    8   12257
2011    9   11582
2011    10  11661
2011    11  11437
2011    12  12146
2012    1   11375
2012    2   11228
2012    3   12164
2012    4   11801
2012    5   12058
2012    6   11929
2012    7   12107
2012    8   11728
2012    9   11816
2012    10  11918
2012    11  11835
2012    12  12500
2013    1   11733
2013    2   10916
2013    3   12262
2013    4   11658
2013    5   12357
2013    6   12000
2013    7   11911
2013    8   12353
2013    9   11772
2013    10  11671
2013    11  11546
2013    12  12228
2014    1   11886
2014    2   10985
2014    3   12777
2014    4   11613
2014    5   12358
2014    6   12227
2014    7   12032
2014    8   12800
2014    9   12299
2014    10  12693
2014    11  12520
2014    12  13243
2015    1   12459
2015    2   11998
2015    3   13234
2015    4   12492
2015    5   13081
2015    6   12968
2015    7   12572
2015    8   13475
2015    9   12301
2015    10  13167
2015    11  12885
2015    12  13498
2016    1   12807
2016    2   12904
2016    3   13689
2016    4   13318
2016    5   13813
2016    6   13083
2016    7   13309
2016    8   13688
2016    9   13231
2016    10  13570
2016    11  14195
2016    12  14798
2017    1   13762
2017    2   12839
2017    3   14542
2017    4   13631
2017    5   14640
2017    6   14371
2017    7   14350
2017    8   14725
2017    9   14362
2017    10  14605
2017    11  14174
2017    12  14243
2018    1   13636
2018    2   13099
2018    3   14313
2018    4   13632
2018    5   14284
2018    6   13676
2018    7   13708
2018    8   14018
2018    9   13716
2018    10  14283
2018    11  13902
2018    12  14753
2019    1   14075
2019    2   13369
2019    3   14774
2019    4   13919
2019    5   13715

Which clearly has incline over the time

This is a yearly figure that shows increase in the number every year

at the same time in the monthly figure you can see that Feb has a drop in the number of the customers every year

Code

As data is not 100% inclining I thought LinearRegression is not the right model as it does not show the drop in Feb in the future predictions

I used RandomTreeRegressor

Here is My code

import pymssql
import pandas as pd
from sklearn.ensemble import RandomForestRegressor

conn = pymssql.connect(server="SalesServer", database="Customers")
df = pd.read_sql("EXEC SP_CustomersCount", conn)
conn.close()

#a new column i have created to make data continious
df["YrMth"] = (12 * (df["Yr"] - 2000)) + df["Mth"]

x_test = pd.read_csv(r"c:\temp\MonthlyPred.csv")

#a new column i have created to make data continious
x_test["YrMth"] = (12 * (x_test["Yr"] - 2000)) + x_test["Mth"]

x= df.drop("Cnt", axis=1)
y= df["Cnt"]

x_train = x
y_train = y

rf = RandomForestRegressor(n_estimators=1000)
rf.fit(x_train, y_train)
y_pred = rf.predict(x_test)

y_pred = pd.DataFrame(y_pred)

print(x_test.assign( Pred= y_pred.iloc[:,0]))

Results

I get these predictions

    Yr      Mth YrMth Pred
0   2019    5    233  13872.707
1   2019    6    234  13867.611
2   2019    7    235  13879.211
3   2019    8    236  13970.375
4   2019    9    237  13961.416
5   2019   10    238  14121.583
6   2019   11    239  14107.296
7   2019   12    240  14430.914
8   2020    1    241  13893.945
9   2020    2    242  13529.786
10  2020    3    243  14335.714
11  2020    4    244  13933.575
12  2020    5    245  13872.707
13  2020    6    246  13867.611
14  2020    7    247  13879.211
15  2020    8    248  13970.375
16  2020    9    249  13961.416
17  2020   10    250  14121.583
18  2020   11    251  14107.296
19  2020   12    252  14430.914
20  2021    1    253  13893.945
21  2021    2    254  13529.786
22  2021    3    255  14335.714
23  2021    4    256  13933.575
24  2021    5    257  13872.707
25  2021    6    258  13867.611
26  2021    7    259  13879.211
27  2021    8    260  13970.375
28  2021    9    261  13961.416
29  2021   10    262  14121.583
30  2021   11    263  14107.296
31  2021   12    264  14430.914
32  2022    1    265  13893.945
33  2022    2    266  13529.786
34  2022    3    267  14335.714
35  2022    4    268  13933.575
36  2022    5    269  13872.707
37  2022    6    270  13867.611
38  2022    7    271  13879.211
39  2022    8    272  13970.375
40  2022    9    273  13961.416
41  2022   10    274  14121.583
42  2022   11    275  14107.296
43  2022   12    276  14430.914
44  2023    1    277  13893.945
45  2023    2    278  13529.786
46  2023    3    279  14335.714
47  2023    4    280  13933.575
48  2023    5    281  13872.707
49  2023    6    282  13867.611
50  2023    7    283  13879.211
51  2023    8    284  13970.375
52  2023    9    285  13961.416
53  2023   10    286  14121.583
54  2023   11    287  14107.296
55  2023   12    288  14430.914

which are clearly not right as the same amounts get repeated every year for the same month (May 2019 same as May 2020, same as 2021, etc)

the ideal solution should show incline yearly and drop in Feb

My Question

My understanding is RandomForestRegressor use Tree decision then build regression
Why is that happening?

Expectation

Am I doing anything wrong here?
Is that the right model?


问:
Getting a null object exception when using an interface
I have created a shopping cart via recyclerview. Each viewholder also has a + and - button to add or remove quantity. This functionality is done in the adapter and I have to notify the parent fragment of the updated total amount. This last bit is done via an interface. The problem is, I am getting the following error:

```<code>Process: com.ecomm.market, PID: 6630
    java.lang.NullPointerException: Attempt to invoke interface method 'void com.ecomm.market.SelectionAdapter$OnUpdateCartListener.onUpdateCart(int)' on a null object reference
        at com.ecomm.market.SelectionAdapter$ViewHolder$1.onClick(SelectionAdapter.java:103)
        at android.view.View.performClick(View.java:5637)
        at android.view.View$PerformClick.run(View.java:22429)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
</code>```

The selected item and corresponding quantity are stored in a hashmap that I convert to an array to populate the recycler view cart. This is what the relevant part of my main fragment MenuFragment looks like:

```<code>
                // Using the adapter interface to add items to cart and adding up total amount
                menuItemAdapter.setOnAddToCartListener(new MenuItemAdapter.OnAddToCartListener() {
                    @Override
                    public void onAddToCart(final HashMap selectionItemsHashMap) {

                        setupSelectionRecycler(menuView);
                        totalAmount = mapToArray(selectionItemsHashMap);

                            selectionAdapter = new SelectionAdapter(selectionItemArrayList, selectionItemsHashMap, totalAmount);

                        selectionRecycler.setAdapter(selectionAdapter);
                        cartItemsHashmap = selectionItemsHashMap;

                        selectionAdapter.setUpdateCartListener(new SelectionAdapter.OnUpdateCartListener() {
                            @Override
                            public void onUpdateCart(int updatedTotalAmount) {

                                String stringTotalAmount = Integer.toString(updatedTotalAmount);
                                Log.d(TAG, "received total:" +stringTotalAmount);
                                tvTotalAmount.setText("$"+ stringTotalAmount);
                                totalAmount = updatedTotalAmount;
                            }
                        });
                    }
                });
            }
</code>```

And here is an excerpt from my adapter SelectionAdapter:

```<code>public class SelectionAdapter extends RecyclerView.Adapter<SelectionAdapter.ViewHolder> {

    private static final String TAG = SelectionAdapter.class.getSimpleName();

    private ArrayList<SelectionItem> selectionItemArrayList = new ArrayList<>();
    public HashMap<String, Integer> selectionItemsHashMap = new HashMap<String, Integer>();
    public int totalAmount;

    private OnUpdateCartListener updateCartListener;

    public interface OnUpdateCartListener {
        void onUpdateCart(int totalAmount);
    }

    public void setUpdateCartListener(OnUpdateCartListener updateCartListener) {
        this.updateCartListener = updateCartListener;
    }

    public SelectionAdapter(ArrayList<SelectionItem> selectionItemArrayList, HashMap<String, Integer> selectionItemsHashMap, int currentTotalAmount) {
        this.selectionItemArrayList = selectionItemArrayList;
        this.selectionItemsHashMap = selectionItemsHashMap;
        this.totalAmount = currentTotalAmount;
    }

    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) {
        View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.selection_card, viewGroup, false);
        ViewHolder viewHolder = new ViewHolder(view);
        return viewHolder;
    }

    @Override
    public void onBindViewHolder(@NonNull ViewHolder viewHolder, int position) {
        viewHolder.tvSelectItem.setText(selectionItemArrayList.get(position).getSelectionName());
        String quantity = Integer.toString(selectionItemArrayList.get(position).getSelectionQuantity());
        viewHolder.tvDishQuantity.setText(quantity);
    }

    @Override
    public int getItemCount() {
        return selectionItemArrayList.size();
    }

    public class ViewHolder extends RecyclerView.ViewHolder {

        TextView tvSelectItem, tvDishQuantity;
        ImageView addQuantity, subtractQuantity, deleteItem;

        public ViewHolder(@NonNull View itemView) {
            super(itemView);

            tvSelectItem = itemView.findViewById(R.id.dish_selection);
            tvDishQuantity = itemView.findViewById(R.id.dish_quantity);

            addQuantity = itemView.findViewById(R.id.button_add);
            subtractQuantity = itemView.findViewById(R.id.button_subtract);
            deleteItem = itemView.findViewById(R.id.delete_item);

            addQuantity.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {

                    // Find the name of the menu item
                    int position = getAdapterPosition();
                    String itemName = selectionItemArrayList.get(position).getSelectionName();

                    // Increase quantity
                    int currentQuantity = selectionItemsHashMap.get(itemName);

                    currentQuantity += 1;
                    // Update the hashmap with the new quantity
                    selectionItemsHashMap.put(itemName,currentQuantity);

                    //Update total amount
                    for (Object name: selectionItemsHashMap.keySet()) {
                        String key = (String) name;
                        if (key.equals(selectionItemArrayList.get(position).getSelectionName())) {
                            int eachPrice = Integer.parseInt(selectionItemArrayList.get(position).getSelectionPrice());
                            totalAmount += eachPrice;
                        }
                    }
                    // Display the new quantity
                    String stringCurrentQuantity = Integer.toString(currentQuantity);
                    tvDishQuantity.setText(stringCurrentQuantity);
                    //updateCartListener.onUpdateCart(totalAmount);
                }
            });
}
</code>```

EDIT
A couple of points:
- When the cart is initially filled, I use this same code and it works fine.
- The problem occurs once the user returns to the cart and I have to repopulate it from a bundle. Everything works fine, except when the user goes straight to the cart and attempts to alter the quantity from there.

答:
Pass interface implementation into the constructor of Adapter as follows :

```<code>public SelectionAdapter(ArrayList<SelectionItem> selectionItemArrayList, HashMap<String, Integer> selectionItemsHashMap, int currentTotalAmount,UpdateCartListener updateCartListener ) {
    this.selectionItemArrayList = selectionItemArrayList;
    this.selectionItemsHashMap = selectionItemsHashMap;
    this.totalAmount = currentTotalAmount;
    this.updateCartListener = updateCartListener
}
</code>```

This will provide an implementation of your interface on the initialization of your adapter so it will be not null when you are using it for update cart.

Body:
I have created a shopping cart via recyclerview. Each viewholder also has a + and - button to add or remove quantity. This functionality is done in the adapter and I have to notify the parent fragment of the updated total amount. This last bit is done via an interface. The problem is, I am getting the following error:

Process: com.ecomm.market, PID: 6630
    java.lang.NullPointerException: Attempt to invoke interface method 'void com.ecomm.market.SelectionAdapter$OnUpdateCartListener.onUpdateCart(int)' on a null object reference
        at com.ecomm.market.SelectionAdapter$ViewHolder$1.onClick(SelectionAdapter.java:103)
        at android.view.View.performClick(View.java:5637)
        at android.view.View$PerformClick.run(View.java:22429)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

The selected item and corresponding quantity are stored in a hashmap that I convert to an array to populate the recycler view cart. This is what the relevant part of my main fragment MenuFragment looks like:

                // Using the adapter interface to add items to cart and adding up total amount
                menuItemAdapter.setOnAddToCartListener(new MenuItemAdapter.OnAddToCartListener() {
                    @Override
                    public void onAddToCart(final HashMap selectionItemsHashMap) {

                        setupSelectionRecycler(menuView);
                        totalAmount = mapToArray(selectionItemsHashMap);

                            selectionAdapter = new SelectionAdapter(selectionItemArrayList, selectionItemsHashMap, totalAmount);

                        selectionRecycler.setAdapter(selectionAdapter);
                        cartItemsHashmap = selectionItemsHashMap;

                        selectionAdapter.setUpdateCartListener(new SelectionAdapter.OnUpdateCartListener() {
                            @Override
                            public void onUpdateCart(int updatedTotalAmount) {

                                String stringTotalAmount = Integer.toString(updatedTotalAmount);
                                Log.d(TAG, "received total:" +stringTotalAmount);
                                tvTotalAmount.setText("$"+ stringTotalAmount);
                                totalAmount = updatedTotalAmount;
                            }
                        });
                    }
                });
            }

And here is an excerpt from my adapter SelectionAdapter:

public class SelectionAdapter extends RecyclerView.Adapter<SelectionAdapter.ViewHolder> {

    private static final String TAG = SelectionAdapter.class.getSimpleName();

    private ArrayList<SelectionItem> selectionItemArrayList = new ArrayList<>();
    public HashMap<String, Integer> selectionItemsHashMap = new HashMap<String, Integer>();
    public int totalAmount;

    private OnUpdateCartListener updateCartListener;

    public interface OnUpdateCartListener {
        void onUpdateCart(int totalAmount);
    }

    public void setUpdateCartListener(OnUpdateCartListener updateCartListener) {
        this.updateCartListener = updateCartListener;
    }

    public SelectionAdapter(ArrayList<SelectionItem> selectionItemArrayList, HashMap<String, Integer> selectionItemsHashMap, int currentTotalAmount) {
        this.selectionItemArrayList = selectionItemArrayList;
        this.selectionItemsHashMap = selectionItemsHashMap;
        this.totalAmount = currentTotalAmount;
    }

    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType) {
        View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.selection_card, viewGroup, false);
        ViewHolder viewHolder = new ViewHolder(view);
        return viewHolder;
    }

    @Override
    public void onBindViewHolder(@NonNull ViewHolder viewHolder, int position) {
        viewHolder.tvSelectItem.setText(selectionItemArrayList.get(position).getSelectionName());
        String quantity = Integer.toString(selectionItemArrayList.get(position).getSelectionQuantity());
        viewHolder.tvDishQuantity.setText(quantity);
    }

    @Override
    public int getItemCount() {
        return selectionItemArrayList.size();
    }

    public class ViewHolder extends RecyclerView.ViewHolder {

        TextView tvSelectItem, tvDishQuantity;
        ImageView addQuantity, subtractQuantity, deleteItem;

        public ViewHolder(@NonNull View itemView) {
            super(itemView);

            tvSelectItem = itemView.findViewById(R.id.dish_selection);
            tvDishQuantity = itemView.findViewById(R.id.dish_quantity);

            addQuantity = itemView.findViewById(R.id.button_add);
            subtractQuantity = itemView.findViewById(R.id.button_subtract);
            deleteItem = itemView.findViewById(R.id.delete_item);

            addQuantity.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {

                    // Find the name of the menu item
                    int position = getAdapterPosition();
                    String itemName = selectionItemArrayList.get(position).getSelectionName();

                    // Increase quantity
                    int currentQuantity = selectionItemsHashMap.get(itemName);

                    currentQuantity += 1;
                    // Update the hashmap with the new quantity
                    selectionItemsHashMap.put(itemName,currentQuantity);

                    //Update total amount
                    for (Object name: selectionItemsHashMap.keySet()) {
                        String key = (String) name;
                        if (key.equals(selectionItemArrayList.get(position).getSelectionName())) {
                            int eachPrice = Integer.parseInt(selectionItemArrayList.get(position).getSelectionPrice());
                            totalAmount += eachPrice;
                        }
                    }
                    // Display the new quantity
                    String stringCurrentQuantity = Integer.toString(currentQuantity);
                    tvDishQuantity.setText(stringCurrentQuantity);
                    //updateCartListener.onUpdateCart(totalAmount);
                }
            });
}

EDIT
A couple of points:
- When the cart is initially filled, I use this same code and it works fine.
- The problem occurs once the user returns to the cart and I have to repopulate it from a bundle. Everything works fine, except when the user goes straight to the cart and attempts to alter the quantity from there.

Body:
Pass interface implementation into the constructor of Adapter as follows :

public SelectionAdapter(ArrayList<SelectionItem> selectionItemArrayList, HashMap<String, Integer> selectionItemsHashMap, int currentTotalAmount,UpdateCartListener updateCartListener ) {
    this.selectionItemArrayList = selectionItemArrayList;
    this.selectionItemsHashMap = selectionItemsHashMap;
    this.totalAmount = currentTotalAmount;
    this.updateCartListener = updateCartListener
}

This will provide an implementation of your interface on the initialization of your adapter so it will be not null when you are using it for update cart.


问:
How do I control line endings conversion with LibGit2Sharp?
I am using LibGit2Sharp to access a remote Git repository. The scenario is as follows:

Clone the repository from a remote URL using Repository.Clone method.

Fetch from the remote repository using Commands.Fetch method.

Navigate to a required commit by a tag commit = repo.Tags["myTag"].PeeledTarget as Commit;

Get the commit tree tree = commit.Tree

Navigate the tree and get a file blob blob = tree["my path"].Target as Blob

Get file contents from the blob blob.GetContentStream()

As a result I get the file text with Unix line endings, as it is stored in the repository. But I prefer to have Windows line endings in my local copy.

I need to make Git automatically convert line endings for me, as it does with core.autocrlf config option. How do I do that with LibGit2Sharp?

答:
Check if the LibGit2Sharp.Tests/BlobFixture.cs does prove that core.autocrlf is active:

```<code>    [InlineData("false", "hey there\n")]
    [InlineData("input", "hey there\n")]
    [InlineData("true", "hey there\r\n")]
    public void CanGetBlobAsFilteredText(string autocrlf, string expectedText)
    {
        SkipIfNotSupported(autocrlf);

        var path = SandboxBareTestRepo();
        using (var repo = new Repository(path))
        {
            repo.Config.Set("core.autocrlf", autocrlf);

            var blob = repo.Lookup<Blob>("a8233120f6ad708f843d861ce2b7228ec4e3dec6");

            var text = blob.GetContentText(new FilteringOptions("foo.txt"));

            Assert.Equal(expectedText, text);
        }
    }
</code>```

Note though, as mentioned in libgit2/libgit2sharp issue 1195#:

notes, core.autocrlf is terrible and deprecated and should very much be avoided in favor of a properly configured .gitattributes everywhere.

The OP C-F confirms in the comments:

Apparently I have to check the type of the blob using IsBinary property and use GetContentText or GetContentStream accordingly

Body:
Check if the LibGit2Sharp.Tests/BlobFixture.cs does prove that core.autocrlf is active:

    [InlineData("false", "hey there\n")]
    [InlineData("input", "hey there\n")]
    [InlineData("true", "hey there\r\n")]
    public void CanGetBlobAsFilteredText(string autocrlf, string expectedText)
    {
        SkipIfNotSupported(autocrlf);

        var path = SandboxBareTestRepo();
        using (var repo = new Repository(path))
        {
            repo.Config.Set("core.autocrlf", autocrlf);

            var blob = repo.Lookup<Blob>("a8233120f6ad708f843d861ce2b7228ec4e3dec6");

            var text = blob.GetContentText(new FilteringOptions("foo.txt"));

            Assert.Equal(expectedText, text);
        }
    }

Note though, as mentioned in libgit2/libgit2sharp issue 1195#:

notes, core.autocrlf is terrible and deprecated and should very much be avoided in favor of a properly configured .gitattributes everywhere.

The OP C-F confirms in the comments:

Apparently I have to check the type of the blob using IsBinary property and use GetContentText or GetContentStream accordingly


问:
Node.js: Regular expressions to get e-mail headers and body
I know very little about regular expressions and I'm having trouble getting the information I need from an e-mail so I'd like your help reading the fields: "status", "to", "from", "subject" and "body".

```<code>The e-mail has failed, details:

Action: failed
Status: 5.0.0 (permanent failure)

---------- Forwarded message ----------
From: exp@gmail.com
To: regular_exp@gmail.com
Date: Tue, 12 Apr 2011 13:55:23 +0000
Subject: test
hellloooooo
</code>```

What's the best way to do it using JavaScript?

Thanks

答:
A regular expression is probably not the best tool for this job.  What you really want is a library that properly parses RFC 2822 email messages, especially since you want to extract the body – if you look at the spec, you'll see that there's a lot of complexity involved in parsing an email (text encodings, MIME, etc.)

Using mailparser:

```<code>var mailparser = require("./mailparser"),
    fs = require("fs"),
    sys = require("sys");

fs.readFile('mail.txt', function (err, data) {
    if (err) throw err;

    var mp = new mailparser.MailParser();

    // callback for the headers object
    mp.on("headers", function(headers){
        console.log("HEADERS");
        console.log(sys.inspect(headers, false, 5));
    });

    // callback for the body object
    mp.on("body", function(body){
        console.log("BODY");
        console.log(sys.inspect(body, false, 7));
    });

    mp.feed(data.toString("ascii"));
    mp.end();
});
</code>```

ContentLicense: CC BY-SA 3.0

Body:
I know very little about regular expressions and I'm having trouble getting the information I need from an e-mail so I'd like your help reading the fields: "status", "to", "from", "subject" and "body".

The e-mail has failed, details:

Action: failed
Status: 5.0.0 (permanent failure)

---------- Forwarded message ----------
From: exp@gmail.com
To: regular_exp@gmail.com
Date: Tue, 12 Apr 2011 13:55:23 +0000
Subject: test
hellloooooo

What's the best way to do it using JavaScript?

Thanks

Body:
A regular expression is probably not the best tool for this job.  What you really want is a library that properly parses RFC 2822 email messages, especially since you want to extract the body – if you look at the spec, you'll see that there's a lot of complexity involved in parsing an email (text encodings, MIME, etc.)

Using mailparser:

var mailparser = require("./mailparser"),
    fs = require("fs"),
    sys = require("sys");

fs.readFile('mail.txt', function (err, data) {
    if (err) throw err;

    var mp = new mailparser.MailParser();

    // callback for the headers object
    mp.on("headers", function(headers){
        console.log("HEADERS");
        console.log(sys.inspect(headers, false, 5));
    });

    // callback for the body object
    mp.on("body", function(body){
        console.log("BODY");
        console.log(sys.inspect(body, false, 7));
    });

    mp.feed(data.toString("ascii"));
    mp.end();
});


问:
Getting Response From in Background URLSession Post
I'm executing a post that could take a few seconds to come back and what to enable background mode. I'm trying to figure out if the app goes into the background while waiting on the post to return can I get the response somehow?

```<code>let bgSessionConfig = URLSessionConfiguration.background(withIdentifier: identifier)
bgSessionConfig.sharedContainerIdentifier = "myid"
backgroundSessionManager = SessionManager(configuration: bgSessionConfig)
</code>```

So basically will the completionHandler below ever get called if in the background?

```<code>sessionManager.request(url, method: .post, parameters: dataParameters, encoding: parameterEncoding, headers: finalHeaders)
            .validate()
            .responseJSON(queue: self.dispatchQueue, completionHandler: {response in

func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void) { }
</code>```

答:
The completion handler in handleEventsForBackgroundURLSession is not something that "gets called". It is something that you must call when urlSessionDidFinishEvents arrives. What "gets called" is handleEvents itself. Your job here is to specify the background URL session (possibly creating it if you were just launched) and make yourself its delegate, immediately. That is how you will be contacted, through the normal delegate messages.

You would have received certain delegate messages if this had not been a background session; well, now you will receive those delegate messages when this is a background session.

Body:
I'm executing a post that could take a few seconds to come back and what to enable background mode. I'm trying to figure out if the app goes into the background while waiting on the post to return can I get the response somehow?

let bgSessionConfig = URLSessionConfiguration.background(withIdentifier: identifier)
bgSessionConfig.sharedContainerIdentifier = "myid"
backgroundSessionManager = SessionManager(configuration: bgSessionConfig)

So basically will the completionHandler below ever get called if in the background?

sessionManager.request(url, method: .post, parameters: dataParameters, encoding: parameterEncoding, headers: finalHeaders)
            .validate()
            .responseJSON(queue: self.dispatchQueue, completionHandler: {response in

func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void) { }


问:
Multiselect in Redux Form with Create new tag option
How do I use the Multiselect of React Widgets in Redux Form where I can allow the creation of new option as well which will be stored with redux form state. Redux form documentation do not have example with new tag creation option.</p>

答: I think you mean onCreate={(name)=>data.push(name)} because this.input doesn't contain push method.


问:
Windows command promt
I was asked a question recently in an interview. Can some please help with this

Q: A user types a URL in the browser and the screen turns white and you have access to command prompt what would you do?

答:
● First, it checks the browser cache.

● Second, the browser checks the OS cache.

● Third, it checks the router cache. If it’s not found on your computer.

You can also Press ctrl+shift+n then a black screen will open you can type the url.

Title: Windows command promt


答:
Here, we would use a [\s\S]* which collects all chars including new lines in our expression:

```<code> /(window\.DATA_STORE[\s\S]*var run = function\(\))/m
</code>```

Test

```$re = '/(window\.DATA_STORE[\s\S]*var run = function\(\))/m';
$str = 'window.DATA_STORE = {
        isMobile: false,
        data: {"visitsList":{"data":[{"userId":"NkEQmWDdKzwyXKbGMJZj","userName":"GeroChile","userGender":1,"userAge":36,"userCity":"","userPicId":"axe63o2ak7xhqa6ng86ucxoaxgf75na29bqgw9ol","userPictures":{"small":"\\/content\\/u\\/a\\/x\\/axe63o2ak7xhqa6ng86ucxoaxgf75na29bqgw9ol_12.jpg","medium":"\\/content\\/u\\/a\\/x\\/axe63o2ak7xhqa6ng86ucxoaxgf75na29bqgw9ol_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=NkEQmWDdKzwyXKbGMJZj&c=513cf8852f2a335b5a6b0dbd21c7df5fcf6c543c","userLastVisited":"heute, 02:30 Uhr"},{"userId":"rjLvKgNbDmznPrdmYGWo","userName":"Zuckerstange1","userGender":1,"userAge":56,"userCity":"","userPicId":"5g8cpfsxrlq1689cebzasodzehcyed4wx81ja21z","userPictures":{"small":"\\/content\\/u\\/5\\/g\\/5g8cpfsxrlq1689cebzasodzehcyed4wx81ja21z_12.jpg","medium":"\\/content\\/u\\/5\\/g\\/5g8cpfsxrlq1689cebzasodzehcyed4wx81ja21z_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=rjLvKgNbDmznPrdmYGWo&c=8011959c2842141f6dfb066ee4cfbf46aba59196","userLastVisited":"gestern, 01:44 Uhr"},{"userId":"knjlBZmawrnmMWeMxLpW","userName":"Tom_0990","userGender":1,"userAge":29,"userCity":"","userPicId":"gbjo38nz31a9ahjn11hozj5mh7tzd1tq27re71yc","userPictures":{"small":"\\/content\\/u\\/g\\/b\\/gbjo38nz31a9ahjn11hozj5mh7tzd1tq27re71yc_12.jpg","medium":"\\/content\\/u\\/g\\/b\\/gbjo38nz31a9ahjn11hozj5mh7tzd1tq27re71yc_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=knjlBZmawrnmMWeMxLpW&c=10dd411df2eeeeffb793d9472b842c98c4928ee1","userLastVisited":"gestern, 00:55 Uhr"},{"userId":"qlBWrvxbzBBYkmbKZjPJ","userName":"Lieblingsjunge","userGender":1,"userAge":49,"userCity":"","userPicId":"lsxkyko6ay412dt057zziy3u62umswgxm2e6xwp8","userPictures":{"small":"\\/content\\/u\\/l\\/s\\/lsxkyko6ay412dt057zziy3u62umswgxm2e6xwp8_12.jpg","medium":"\\/content\\/u\\/l\\/s\\/lsxkyko6ay412dt057zziy3u62umswgxm2e6xwp8_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=qlBWrvxbzBBYkmbKZjPJ&c=89da3babf04a621b8474ece8585073b38d1c0c54","userLastVisited":"gestern, 00:24 Uhr"},{"userId":"VWKqlByarzzmRxaNLYjZ","userName":"Triskell","userGender":1,"userAge":48,"userCity":"","userPicId":"co5fzvna3ph464bd1mit9c344pmjf1fxaqf35spz","userPictures":{"small":"\\/content\\/u\\/c\\/o\\/co5fzvna3ph464bd1mit9c344pmjf1fxaqf35spz_12.jpg","medium":"\\/content\\/u\\/c\\/o\\/co5fzvna3ph464bd1mit9c344pmjf1fxaqf35spz_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=VWKqlByarzzmRxaNLYjZ&c=d25c234771e97ba2c348089e09bc1abf6018d693","userLastVisited":"gestern, 19:13 Uhr"}],"count":5,"settings":{"m":1,"g":0,"v":2}},"onlineList":{"data":[{"userId":"wRGYvAQdklgEYJemzENj","userName":"Chaosmak3r","userGender":1,"userAge":24,"userCity":"Chemnitz","userPicId":"ua6mjj8qrrgqwwm9yn64914alfwhv7925oavqjb0","userPictures":{"small":"\\/content\\/u\\/u\\/a\\/ua6mjj8qrrgqwwm9yn64914alfwhv7925oavqjb0_12.jpg","medium":"\\/content\\/u\\/u\\/a\\/ua6mjj8qrrgqwwm9yn64914alfwhv7925oavqjb0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=wRGYvAQdklgEYJemzENj&c=aeb85869ec7398deb60c7e2cc11b5fbc35ff3133","userLastVisited":""},{"userId":"AJDqGPgbQJJXJYdpRWvj","userName":"Sv_Pro","userGender":1,"userAge":26,"userCity":"Freiberg","userPicId":"nbv7opbdtsmtia1phx2zije1plss6fhdkgt34tks","userPictures":{"small":"\\/content\\/u\\/n\\/b\\/nbv7opbdtsmtia1phx2zije1plss6fhdkgt34tks_12.jpg","medium":"\\/content\\/u\\/n\\/b\\/nbv7opbdtsmtia1phx2zije1plss6fhdkgt34tks_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=AJDqGPgbQJJXJYdpRWvj&c=8fabf3ad40118c62f6e5a7b1c78fd0b4bf875941","userLastVisited":""},{"userId":"mZEWKkpbjjNgRPbQRLrD","userName":"Jonas13","userGender":1,"userAge":26,"userCity":"W\\u00fcrzburg","userPicId":"l6w56bjht51xfb82t1v1p8f55o1m81n5auyu7f6e","userPictures":{"small":"\\/content\\/u\\/l\\/6\\/l6w56bjht51xfb82t1v1p8f55o1m81n5auyu7f6e_12.jpg","medium":"\\/content\\/u\\/l\\/6\\/l6w56bjht51xfb82t1v1p8f55o1m81n5auyu7f6e_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=mZEWKkpbjjNgRPbQRLrD&c=80185000c609e075542f2e5275657aae87ee812d","userLastVisited":""},{"userId":"kvgNmRKdGgLjgodLJjlX","userName":"Schrauber-93","userGender":1,"userAge":26,"userCity":"Meerane","userPicId":"kgqueqjcjylct9eovlxgcu1ieyuxmpmovujdpa5j","userPictures":{"small":"\\/content\\/u\\/k\\/g\\/kgqueqjcjylct9eovlxgcu1ieyuxmpmovujdpa5j_12.jpg","medium":"\\/content\\/u\\/k\\/g\\/kgqueqjcjylct9eovlxgcu1ieyuxmpmovujdpa5j_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=kvgNmRKdGgLjgodLJjlX&c=60b0bea55b4bdf6b4d33f3134c51a53ec98d3d6b","userLastVisited":""},{"userId":"YMwlJyRaMroxGPbPLpkW","userName":"Martin993","userGender":1,"userAge":25,"userCity":"Darmstadt","userPicId":"no5aorjkha2h2oo5btwit4ffky1vdao86eehh9b0","userPictures":{"small":"\\/content\\/u\\/n\\/o\\/no5aorjkha2h2oo5btwit4ffky1vdao86eehh9b0_12.jpg","medium":"\\/content\\/u\\/n\\/o\\/no5aorjkha2h2oo5btwit4ffky1vdao86eehh9b0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=YMwlJyRaMroxGPbPLpkW&c=2c5cf6795f85cbc2a6f2b8181fae4aaa427431f0","userLastVisited":""},{"userId":"lvrEojzayvvlyPbPnWBX","userName":"Thommy06","userGender":1,"userAge":21,"userCity":"Chemnitz","userPicId":"3hzs7fw2rnnj86tlanonsd6wmnzj833qxg7o0cqm","userPictures":{"small":"\\/content\\/u\\/3\\/h\\/3hzs7fw2rnnj86tlanonsd6wmnzj833qxg7o0cqm_12.jpg","medium":"\\/content\\/u\\/3\\/h\\/3hzs7fw2rnnj86tlanonsd6wmnzj833qxg7o0cqm_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=lvrEojzayvvlyPbPnWBX&c=84b645c5e04ecc0661aa12c3b1c232ab38c86bec","userLastVisited":""},{"userId":"rmxkNywanlpNEgdAXjpM","userName":"Furkan","userGender":1,"userAge":26,"userCity":"Heppenheim","userPicId":"a4p6qizw6pc8t2x4der3tbh60i7whal3zvfq3hr0","userPictures":{"small":"\\/content\\/u\\/a\\/4\\/a4p6qizw6pc8t2x4der3tbh60i7whal3zvfq3hr0_12.jpg","medium":"\\/content\\/u\\/a\\/4\\/a4p6qizw6pc8t2x4der3tbh60i7whal3zvfq3hr0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=rmxkNywanlpNEgdAXjpM&c=d1e85439cf80704a95d6cbf2eeccc399392f5204","userLastVisited":""},{"userId":"GpgXMNmbxnBQqKeJzqRw","userName":"Keksian","userGender":1,"userAge":24,"userCity":"Leipzig","userPicId":"5uh9dhfe39272oo6ub1wwskfvfvt5jjprqh5aihl","userPictures":{"small":"\\/content\\/u\\/5\\/u\\/5uh9dhfe39272oo6ub1wwskfvfvt5jjprqh5aihl_12.jpg","medium":"\\/content\\/u\\/5\\/u\\/5uh9dhfe39272oo6ub1wwskfvfvt5jjprqh5aihl_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=GpgXMNmbxnBQqKeJzqRw&c=500212e2e649fef4ed13a4d80b601664afdea77e","userLastVisited":""},{"userId":"NqDMnwpapqqmAYbyJQPZ","userName":"Felixmagicetea","userGender":1,"userAge":26,"userCity":"Schwalmstadt","userPicId":"sgps7lk67shsdfgjndqzb8hdgrqlavb06pp74742","userPictures":{"small":"\\/content\\/u\\/s\\/g\\/sgps7lk67shsdfgjndqzb8hdgrqlavb06pp74742_12.jpg","medium":"\\/content\\/u\\/s\\/g\\/sgps7lk67shsdfgjndqzb8hdgrqlavb06pp74742_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=NqDMnwpapqqmAYbyJQPZ&c=212f0a9ab1193108e6a8809b3e84577c9e1c903e","userLastVisited":""},{"userId":"NpEQvGqaWBBWXkewPBAj","userName":"Flint93","userGender":1,"userAge":25,"userCity":"Helmstedt","userPicId":"vmq19yu3kw24u11g4flqzihw6jnlc5m5npndyptx","userPictures":{"small":"\\/content\\/u\\/v\\/m\\/vmq19yu3kw24u11g4flqzihw6jnlc5m5npndyptx_12.jpg","medium":"\\/content\\/u\\/v\\/m\\/vmq19yu3kw24u11g4flqzihw6jnlc5m5npndyptx_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=NpEQvGqaWBBWXkewPBAj&c=97afffd0a631005cd82465ad20b692e82839e63e","userLastVisited":""},{"userId":"GpgXMNmaxrrJqwdJzqRw","userName":"FitteFimmel","userGender":1,"userAge":22,"userCity":"Erlensee","userPicId":"8wttu8sd6iqmyxocfsgr3a8kg8i0cv0tq6f0qty0","userPictures":{"small":"\\/content\\/u\\/8\\/w\\/8wttu8sd6iqmyxocfsgr3a8kg8i0cv0tq6f0qty0_12.jpg","medium":"\\/content\\/u\\/8\\/w\\/8wttu8sd6iqmyxocfsgr3a8kg8i0cv0tq6f0qty0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=GpgXMNmaxrrJqwdJzqRw&c=76d7567c4dc34451240bee64bedaeb3b8a991305","userLastVisited":""},{"userId":"NqDMnwpepjXyyybyJQPZ","userName":"Matatta","userGender":1,"userAge":25,"userCity":"Kirchberg","userPicId":"adv23qwo4rcbosnpwd4wb2bt7kfzksw7v47d10zq","userPictures":{"small":"\\/content\\/u\\/a\\/d\\/adv23qwo4rcbosnpwd4wb2bt7kfzksw7v47d10zq_12.jpg","medium":"\\/content\\/u\\/a\\/d\\/adv23qwo4rcbosnpwd4wb2bt7kfzksw7v47d10zq_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=NqDMnwpepjXyyybyJQPZ&c=1371068df70bcd7bfac071fc9d0584a11e72069e","userLastVisited":""},{"userId":"rjLvKgNbDmmvEPdmYGWo","userName":"LautundDrau\\u00dfen","userGender":1,"userAge":26,"userCity":"Erfurt","userPicId":"5y0d0vzxanjjjgwsprbahdp4i9zxwt9f4tvaxfh0","userPictures":{"small":"\\/content\\/u\\/5\\/y\\/5y0d0vzxanjjjgwsprbahdp4i9zxwt9f4tvaxfh0_12.jpg","medium":"\\/content\\/u\\/5\\/y\\/5y0d0vzxanjjjgwsprbahdp4i9zxwt9f4tvaxfh0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=rjLvKgNbDmmvEPdmYGWo&c=ab801a62580085f365128d564f75b56e9a3fcc62","userLastVisited":""},{"userId":"xENlwKBeJwzMZKaWkLGy","userName":"michi27z","userGender":1,"userAge":21,"userCity":"Gro\\u00df-Zimmern","userPicId":"jmoiu2oa2io99x805sr78b7of261wnj7y60o2r7e","userPictures":{"small":"\\/content\\/u\\/j\\/m\\/jmoiu2oa2io99x805sr78b7of261wnj7y60o2r7e_12.jpg","medium":"\\/content\\/u\\/j\\/m\\/jmoiu2oa2io99x805sr78b7of261wnj7y60o2r7e_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=xENlwKBeJwzMZKaWkLGy&c=8b66ca15c6df77a031b087457c363cf011667403","userLastVisited":""},{"userId":"xENlwKBaJlDVpJdWkLGy","userName":"roger007","userGender":1,"userAge":21,"userCity":"G\\u00f6ttingen","userPicId":"1k64izt75xajcx6ghd8mar4on7skzd0xjmp2jzef","userPictures":{"small":"\\/content\\/u\\/1\\/k\\/1k64izt75xajcx6ghd8mar4on7skzd0xjmp2jzef_12.jpg","medium":"\\/content\\/u\\/1\\/k\\/1k64izt75xajcx6ghd8mar4on7skzd0xjmp2jzef_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=xENlwKBaJlDVpJdWkLGy&c=d9f0b63b9f46d6439bceb99715c49f85592ba8fb","userLastVisited":""},{"userId":"qlBWrvxdzBBAnMdKZjPJ","userName":"Samy20","userGender":1,"userAge":20,"userCity":"Regensburg","userPicId":"fb85lk1osol8cgvga3o7hrfaosa0fbkskpgtmtv2","userPictures":{"small":"\\/content\\/u\\/f\\/b\\/fb85lk1osol8cgvga3o7hrfaosa0fbkskpgtmtv2_12.jpg","medium":"\\/content\\/u\\/f\\/b\\/fb85lk1osol8cgvga3o7hrfaosa0fbkskpgtmtv2_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=qlBWrvxdzBBAnMdKZjPJ&c=e7c6ea2e85059413bdcda620e57282cebfdcf84a","userLastVisited":""},{"userId":"QwrXmEvePrWZnZbPNKYl","userName":"themanno","userGender":1,"userAge":24,"userCity":"Marbach","userPicId":"vj57hx7h6yb47zjarlb1xqnx6grqbd8u7lz8dpo7","userPictures":{"small":"\\/content\\/u\\/v\\/j\\/vj57hx7h6yb47zjarlb1xqnx6grqbd8u7lz8dpo7_12.jpg","medium":"\\/content\\/u\\/v\\/j\\/vj57hx7h6yb47zjarlb1xqnx6grqbd8u7lz8dpo7_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=QwrXmEvePrWZnZbPNKYl&c=36baed1660b0738c8e1d94866761ebb9ba9c1795","userLastVisited":""},{"userId":"rmxkNywenlLpmrbAXjpM","userName":"SlimFelix","userGender":1,"userAge":26,"userCity":"Butzbach","userPicId":"a94xbhq7t6z403n8tjuptn2rekjzrspluotdh5jk","userPictures":{"small":"\\/content\\/u\\/a\\/9\\/a94xbhq7t6z403n8tjuptn2rekjzrspluotdh5jk_12.jpg","medium":"\\/content\\/u\\/a\\/9\\/a94xbhq7t6z403n8tjuptn2rekjzrspluotdh5jk_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=rmxkNywenlLpmrbAXjpM&c=3ec55bd03374bc48410360726626cf2d31d61dbe","userLastVisited":""},{"userId":"xENlwKBeJPkNMAbWkLGy","userName":"Magicdrinkmix","userGender":1,"userAge":23,"userCity":"N\\u00fcrnberg","userPicId":"yc8wzs7c0nrnt8e0mq7ai97vjfszyj93obvj4or0","userPictures":{"small":"\\/content\\/u\\/y\\/c\\/yc8wzs7c0nrnt8e0mq7ai97vjfszyj93obvj4or0_12.jpg","medium":"\\/content\\/u\\/y\\/c\\/yc8wzs7c0nrnt8e0mq7ai97vjfszyj93obvj4or0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=xENlwKBeJPkNMAbWkLGy&c=11154131780def40accd9d70a92d789436fec79d","userLastVisited":""},{"userId":"NkEQmWDbKpLQpNdGMJZj","userName":"Thommy96","userGender":1,"userAge":23,"userCity":"Gotha","userPicId":"7xcgqzna0tp8h3tdk5y95dopad9m85ybmcpckmou","userPictures":{"small":"\\/content\\/u\\/7\\/x\\/7xcgqzna0tp8h3tdk5y95dopad9m85ybmcpckmou_12.jpg","medium":"\\/content\\/u\\/7\\/x\\/7xcgqzna0tp8h3tdk5y95dopad9m85ybmcpckmou_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=NkEQmWDbKpLQpNdGMJZj&c=84861a1ac988775acf71e35c5771cb3ae91664ff","userLastVisited":""},{"userId":"NpEQvGqaWMRBMldwPBAj","userName":"wabb93","userGender":1,"userAge":25,"userCity":"Eltville","userPicId":"7a9n68fm0reo7pwz0yjg4alvas5zxtq2ex5gffe0","userPictures":{"small":"\\/content\\/u\\/7\\/a\\/7a9n68fm0reo7pwz0yjg4alvas5zxtq2ex5gffe0_12.jpg","medium":"\\/content\\/u\\/7\\/a\\/7a9n68fm0reo7pwz0yjg4alvas5zxtq2ex5gffe0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=NpEQvGqaWMRBMldwPBAj&c=4dc1d4de6d84ca82e1e0f7db9ae5956b6ea24b56","userLastVisited":""},{"userId":"VMvxkKXaYJPDywbGrZNA","userName":"ag01","userGender":1,"userAge":25,"userCity":"Bad Rappenau","userPicId":"jpyn10kvo65yzu79yo3bzc97ne2vt5p82xj747ke","userPictures":{"small":"\\/content\\/u\\/j\\/p\\/jpyn10kvo65yzu79yo3bzc97ne2vt5p82xj747ke_12.jpg","medium":"\\/content\\/u\\/j\\/p\\/jpyn10kvo65yzu79yo3bzc97ne2vt5p82xj747ke_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=VMvxkKXaYJPDywbGrZNA&c=7face200cafb74d3258ddc7534fec9924c65a423","userLastVisited":""},{"userId":"lvrEojzaynkpkwbPnWBX","userName":"Ullyses","userGender":1,"userAge":26,"userCity":"Heidelberg","userPicId":"bhugirynumzsshdo810qqtc73kkro7yvaiwna062","userPictures":{"small":"\\/content\\/u\\/b\\/h\\/bhugirynumzsshdo810qqtc73kkro7yvaiwna062_12.jpg","medium":"\\/content\\/u\\/b\\/h\\/bhugirynumzsshdo810qqtc73kkro7yvaiwna062_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=lvrEojzaynkpkwbPnWBX&c=7a35caca31aa4649f7be04e445564eaff40287ff","userLastVisited":""},{"userId":"mZEWKkpejjQnYqeQRLrD","userName":"Tjoram","userGender":1,"userAge":23,"userCity":"Breitenstein","userPicId":"nd9nh79utpmh72ftvmjg7alyb1nyb7zayczefn36","userPictures":{"small":"\\/content\\/u\\/n\\/d\\/nd9nh79utpmh72ftvmjg7alyb1nyb7zayczefn36_12.jpg","medium":"\\/content\\/u\\/n\\/d\\/nd9nh79utpmh72ftvmjg7alyb1nyb7zayczefn36_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=mZEWKkpejjQnYqeQRLrD&c=8cd13591aa66512c9a1e3cb9878130027be2593c","userLastVisited":""},{"userId":"ZVlQXBpeXMmkwwagnzYy","userName":"David1998","userGender":1,"userAge":20,"userCity":"Nordhausen","userPicId":"o12mquwzsb90g38vhqlrihtz0vwqjvt8ds79y5yj","userPictures":{"small":"\\/content\\/u\\/o\\/1\\/o12mquwzsb90g38vhqlrihtz0vwqjvt8ds79y5yj_12.jpg","medium":"\\/content\\/u\\/o\\/1\\/o12mquwzsb90g38vhqlrihtz0vwqjvt8ds79y5yj_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=ZVlQXBpeXMmkwwagnzYy&c=88dff6b62ee053584614d555a19dfeade9e305f1","userLastVisited":""},{"userId":"ZVlQXBpaXMMqkVbgnzYy","userName":"Tong888","userGender":1,"userAge":27,"userCity":"Wendeburg","userPicId":"ld5u2if97c3w7sfbztjqhkpgvs5donba8mbfmmsb","userPictures":{"small":"\\/content\\/u\\/l\\/d\\/ld5u2if97c3w7sfbztjqhkpgvs5donba8mbfmmsb_12.jpg","medium":"\\/content\\/u\\/l\\/d\\/ld5u2if97c3w7sfbztjqhkpgvs5donba8mbfmmsb_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=ZVlQXBpaXMMqkVbgnzYy&c=a949f31628241f4fddef9f7da7609fc15067bb70","userLastVisited":""},{"userId":"GpgXMNmaxrrKzEdJzqRw","userName":"RWa99","userGender":1,"userAge":19,"userCity":"Bad Nauheim","userPicId":"h5yfkebxej1ccbszb5zwki2ve6m7frm4v83428ip","userPictures":{"small":"\\/content\\/u\\/h\\/5\\/h5yfkebxej1ccbszb5zwki2ve6m7frm4v83428ip_12.jpg","medium":"\\/content\\/u\\/h\\/5\\/h5yfkebxej1ccbszb5zwki2ve6m7frm4v83428ip_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=GpgXMNmaxrrKzEdJzqRw&c=c7f302870f6139d66c4de0997ac49bad4a7c1708","userLastVisited":""},{"userId":"qoyVNXZdLRnpnRaPgYWv","userName":"malte99","userGender":1,"userAge":19,"userCity":"Gie\\u00dfen","userPicId":"lmwoo5l3qd5do09suyvsd06ab37qk1qjepoddcy0","userPictures":{"small":"\\/content\\/u\\/l\\/m\\/lmwoo5l3qd5do09suyvsd06ab37qk1qjepoddcy0_12.jpg","medium":"\\/content\\/u\\/l\\/m\\/lmwoo5l3qd5do09suyvsd06ab37qk1qjepoddcy0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=qoyVNXZdLRnpnRaPgYWv&c=cae66604fa7aa6ea514e70d87a215dc43d764ca0","userLastVisited":""},{"userId":"NqDMnwpbpqqmDgdyJQPZ","userName":"MarcSchneider","userGender":1,"userAge":27,"userCity":"Wetzlar","userPicId":"bnpp58irqzwinl2k76oppjesmsp2mpfy72valgne","userPictures":{"small":"\\/content\\/u\\/b\\/n\\/bnpp58irqzwinl2k76oppjesmsp2mpfy72valgne_12.jpg","medium":"\\/content\\/u\\/b\\/n\\/bnpp58irqzwinl2k76oppjesmsp2mpfy72valgne_3.jpg"},"userWasOnline":false,"userIsOnline":true,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=NqDMnwpbpqqmDgdyJQPZ&c=2edb9524fa70168fe93ae247c3833b80e0e7fda4","userLastVisited":""},{"userId":"VWKqlByerzgqqjeNLYjZ","userName":"Erzwo93","userGender":1,"userAge":25,"userCity":"Weiterstadt","userPicId":"47kg45gyoqfs65gklaevshc2dmeieuaa7fclqt34","userPictures":{"small":"\\/content\\/u\\/4\\/7\\/47kg45gyoqfs65gklaevshc2dmeieuaa7fclqt34_12.jpg","medium":"\\/content\\/u\\/4\\/7\\/47kg45gyoqfs65gklaevshc2dmeieuaa7fclqt34_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=VWKqlByerzgqqjeNLYjZ&c=88acd872c5561d9c91427b4fbfc49bb7ff551e10","userLastVisited":""}],"count":199,"ts":"1559181753","settings":{"v":2}},"user":{"hasFavoritesOnline":false,"hasNewMessages":true,"hasNewNotifications":false,"hasNewHearts":false,"hasNewFeed":true,"hasProfilePic":false,"nickname":"sabhbau14","id_pic":"","gender":2,"id":"ogmJyDPalmEqPmbYEVRr","lastlogin":1559167342},"userSettings":{"bubbles":{"feed-visitors":0,"feed-visited":0,"feed-favorites":0,"info-gallery":0,"info-matching":0,"info-search":0,"info-mobile-likes":0,"info-mobile-search-custom":0,"info-mobile-search-newbies":0,"info-mobile-search-online":0,"info-mobile-favorites":0,"info-heart-sent":0,"deprecate-ie":1}},"context":"default","page":1,"pages_total":1,"userlist":[{"userId":"","userName":"vybz-kartel28","userGender":1,"userAge":26,"userCity":"Duisburg","userPicId":"wp24e3tn8m1rqlor90f3ithrwaqzsnoxv5zp6abj","userPictures":{"small":"\\/content\\/u\\/w\\/p\\/wp24e3tn8m1rqlor90f3ithrwaqzsnoxv5zp6abj_12.jpg","medium":"\\/content\\/u\\/w\\/p\\/wp24e3tn8m1rqlor90f3ithrwaqzsnoxv5zp6abj_3.jpg"},"userWasOnline":false,"userIsOnline":true,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=knjlBZmdwrLzvVbMxLpW&c=48e7012db31d2944b912f83ff24af9dbee8fd7c3","userLastVisited":""},{"userId":"","userName":"Hanni89","userGender":1,"userAge":29,"userCity":"Laatzen","userPicId":"xiyx3e1bck1u033278wsp53xonxvhf5l9jy7n56q","userPictures":{"small":"\\/content\\/u\\/x\\/i\\/xiyx3e1bck1u033278wsp53xonxvhf5l9jy7n56q_12.jpg","medium":"\\/content\\/u\\/x\\/i\\/xiyx3e1bck1u033278wsp53xonxvhf5l9jy7n56q_3.jpg"},"userWasOnline":false,"userIsOnline":true,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=rmxkNywbnvvNVAbAXjpM&c=554a87e863f1b8f65a95a91575fed925e775dcca","userLastVisited":""},],"params":{"a1":"18","a2":"30","ct":"100006207","di":"200","g":"1","nm":"1","o":"1","pc":"1","ct_meta":{"id":"100006207","country":"de","city":"Paderborn","state":"Nordrhein-Westfalen","state_short":"NW","locality":"","id_zip_center":"7071","id_city_proxy":"100006207"}},"results_total":9,"max_per_page":30,"position":1,"getvars":{"ct":"100006207","g":"1","a1":"18","a2":"30","di":"200","ec":"","rx":"","sh":"","v1":"","hs":"","hc":"","h1":"","h2":"","ch":"","cp":"","ed":"","sm":"","zo":"","se":"","mo":"","o":"1","nm":"1","im":"","nn":""},"base_url":"\\/Search","nopage_url":"\\/Search\\/?ct=100006207&g=1&a1=18&a2=30&di=200&ec=&rx=&sh=&v1=&hs=&hc=&h1=&h2=&ch=&cp=&ed=&sm=&zo=&se=&mo=&o=1&nm=1&im=&nn=&","msg":"few_results","countries":{"de":"Deutschland","at":"\\u00d6sterreich","ch":"Schweiz","eg":"\\u00c4gypten","gq":"\\u00c4quartorialguinea","et":"\\u00c4thiopien","af":"Afghanistan","al":"Albanien","dz":"Algerien","ad":"Andorra","ao":"Angola","ag":"Antigua und Barbuda","ar":"Argentinien","am":"Armenien","az":"Aserbeidschan","au":"Australien","bs":"Bahamas","bh":"Bahrein","bd":"Bangladesch","bb":"Barbados","by":"Belarus","be":"Belgien","bz":"Belize","bj":"Benin","bt":"Bhutan","bo":"Bolivien","ba":"Bosnien und Herzegowina","bw":"Botsuana","br":"Brasilien","bn":"Brunei","bg":"Bulgarien","bf":"Burkina Faso","bi":"Burundi","cl":"Chile","cn":"China","cr":"Costa Rica","ci":"Cote d\'Ivoire","dk":"D\\u00e4nemark","dm":"Dominica","do":"Dominikanische Republik","dj":"Dschibuti","ec":"Ecuador","sv":"El Salvador","er":"Eritrea","ee":"Estland","fo":"Far\\u00f6er","fj":"Fidschi","fi":"Finnland","fr":"Frankreich","ga":"Gabun","gm":"Gambia","ge":"Georgien","gh":"Ghana","gi":"Gibraltar","gd":"Grenada","gr":"Griechenland","gb":"Gro\\u00dfbritannien","gt":"Guatemala","gn":"Guinea","gw":"Guinea-Bissau","gy":"Guyana","ht":"Haiti","hn":"Honduras","hk":"Hongkong","in":"Indien","id":"Indonesien","iq":"Irak","ir":"Iran","ie":"Irland","is":"Island","il":"Israel","it":"Italien","jm":"Jamaika","jp":"Japan","ye":"Jemen","jo":"Jordanien","kh":"Kambodscha","cm":"Kamerun","ca":"Kanada","cv":"Kap Verde","kz":"Kasachstan","qa":"Katar","ke":"Kenia","kg":"Kirgisistan","ki":"Kiribati","co":"Kolumbien","km":"Komoren","cg":"Kongo (Republik)","cd":"Kongo Dem. Republik","kp":"Korea (Nord) Dem. Volksrep.","kr":"Korea (S\\u00fcd) Republik","hr":"Kroatien","cu":"Kuba","kw":"Kuwait","la":"Laotische Dem. Volksrep.","ls":"Lesotho","lv":"Lettland","lb":"Libanon","lr":"Liberia","ly":"Libysch-Arabische Republik","li":"Liechtenstein","lt":"Litauen","lu":"Luxemburg","mo":"Macao","mg":"Madagaskar","mw":"Malawi","my":"Malaysia","mv":"Malediven","ml":"Mali","mt":"Malta","ma":"Marokko","mh":"Marshallinseln","mr":"Mauretanien","mu":"Mauritius","mk":"Mazedonien","mx":"Mexiko","fm":"Mikronesien","md":"Moldau","mc":"Monaco","mn":"Mongolei","me":"Montenegro","mz":"Mosambik","mm":"Myanmar","na":"Namibia","nr":"Nauru","np":"Nepal","nz":"Neuseeland","ni":"Nicaragua","nl":"Niederlande","ne":"Niger","ng":"Nigeria","nu":"Niue","mp":"N\\u00f6rdliche Marianen","no":"Norwegen","om":"Oman","pk":"Pakistan","pw":"Palau","ps":"Pal\\u00e4stina","pa":"Panama","pg":"Papua-Neuguinea","py":"Paraguay","pe":"Peru","ph":"Philippinen","pl":"Polen","pt":"Portugal","rw":"Ruanda","ro":"Rum\\u00e4nien","ru":"Russische F\\u00f6deration","sb":"Salomonen","zm":"Sambia","ws":"Samoa","sm":"San Marino","st":"Sao Tome und Principe","sa":"Saudi Arabien","se":"Schweden","sn":"Senegal","rs":"Serbien","sc":"Seychellen","sl":"Sierra Leone","zw":"Simbabwe","sg":"Singapur","sk":"Slowakische Republik","si":"Slowenien","so":"Somalia","es":"Spanien","lk":"Sri Lanka","kn":"St. Kitts und Nevis","lc":"St. Lucia","vc":"St. Vincent","sd":"Sudan","za":"S\\u00fcdafrika","sr":"Suriname","sz":"Swasiland","sy":"Syrien","tj":"Tadschikistan","tw":"Taiwan","tz":"Tansania","tl":"Timor-Leste","th":"Thailand","tg":"Togo","to":"Tonga","tt":"Trinidad und Tobago","td":"Tschad","cz":"Tschechische Republik","tr":"T\\u00fcrkei","tn":"Tunesien","tm":"Turkmenistan","tv":"Tuvalu","ug":"Uganda","ua":"Ukraine","hu":"Ungarn","uy":"Uruguay","us":"USA","uz":"Usbekistan","vu":"Vanuatu","va":"Vatikanstadt","ve":"Venezuela","ae":"Vereinigte Arab. Emirate","vn":"Vietnam","cf":"Zentralafrik. Republik"},"requestUri":"\\/Search?ct=100006207&g=1&a1=18&a2=30&di=200&ec=&rx=&sh=&v1=&hs=&hc=&h1=&h2=&ch=&cp=&ed=&sm=&zo=&se=&mo=&o=1&nm=1&im=&nn=","bubble_search":"\\n
\\n    <\\/a>\\n
Sie suchen \\u2013 wir finden f\\u00fcr Sie<\\/div>\\n
\\n        Wie stellen Sie sich Ihren Traumpartner vor? Wie alt, wie jung, wie gro\\u00df? Nutzen Sie die umfangreichen\\n        M\\u00f6glichkeiten der Partnersuche, und lassen Sie sich \\u00fcberraschen.\\n    <\\/p>\\n<\\/div>\\n"},

      };

(function() { var run = function()
';

preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);

// Print the entire match result
var_dump($matches);
```

DEMO

Title: How to match a script using preg_match?

Body:
Here, we would use a [\s\S]* which collects all chars including new lines in our expression:

 /(window\.DATA_STORE[\s\S]*var run = function\(\))/m

Test

$re = '/(window\.DATA_STORE[\s\S]*var run = function\(\))/m';
$str = 'window.DATA_STORE = {
        isMobile: false,
        data: {"visitsList":{"data":[{"userId":"NkEQmWDdKzwyXKbGMJZj","userName":"GeroChile","userGender":1,"userAge":36,"userCity":"","userPicId":"axe63o2ak7xhqa6ng86ucxoaxgf75na29bqgw9ol","userPictures":{"small":"\\/content\\/u\\/a\\/x\\/axe63o2ak7xhqa6ng86ucxoaxgf75na29bqgw9ol_12.jpg","medium":"\\/content\\/u\\/a\\/x\\/axe63o2ak7xhqa6ng86ucxoaxgf75na29bqgw9ol_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=NkEQmWDdKzwyXKbGMJZj&c=513cf8852f2a335b5a6b0dbd21c7df5fcf6c543c","userLastVisited":"heute, 02:30 Uhr"},{"userId":"rjLvKgNbDmznPrdmYGWo","userName":"Zuckerstange1","userGender":1,"userAge":56,"userCity":"","userPicId":"5g8cpfsxrlq1689cebzasodzehcyed4wx81ja21z","userPictures":{"small":"\\/content\\/u\\/5\\/g\\/5g8cpfsxrlq1689cebzasodzehcyed4wx81ja21z_12.jpg","medium":"\\/content\\/u\\/5\\/g\\/5g8cpfsxrlq1689cebzasodzehcyed4wx81ja21z_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=rjLvKgNbDmznPrdmYGWo&c=8011959c2842141f6dfb066ee4cfbf46aba59196","userLastVisited":"gestern, 01:44 Uhr"},{"userId":"knjlBZmawrnmMWeMxLpW","userName":"Tom_0990","userGender":1,"userAge":29,"userCity":"","userPicId":"gbjo38nz31a9ahjn11hozj5mh7tzd1tq27re71yc","userPictures":{"small":"\\/content\\/u\\/g\\/b\\/gbjo38nz31a9ahjn11hozj5mh7tzd1tq27re71yc_12.jpg","medium":"\\/content\\/u\\/g\\/b\\/gbjo38nz31a9ahjn11hozj5mh7tzd1tq27re71yc_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=knjlBZmawrnmMWeMxLpW&c=10dd411df2eeeeffb793d9472b842c98c4928ee1","userLastVisited":"gestern, 00:55 Uhr"},{"userId":"qlBWrvxbzBBYkmbKZjPJ","userName":"Lieblingsjunge","userGender":1,"userAge":49,"userCity":"","userPicId":"lsxkyko6ay412dt057zziy3u62umswgxm2e6xwp8","userPictures":{"small":"\\/content\\/u\\/l\\/s\\/lsxkyko6ay412dt057zziy3u62umswgxm2e6xwp8_12.jpg","medium":"\\/content\\/u\\/l\\/s\\/lsxkyko6ay412dt057zziy3u62umswgxm2e6xwp8_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=qlBWrvxbzBBYkmbKZjPJ&c=89da3babf04a621b8474ece8585073b38d1c0c54","userLastVisited":"gestern, 00:24 Uhr"},{"userId":"VWKqlByarzzmRxaNLYjZ","userName":"Triskell","userGender":1,"userAge":48,"userCity":"","userPicId":"co5fzvna3ph464bd1mit9c344pmjf1fxaqf35spz","userPictures":{"small":"\\/content\\/u\\/c\\/o\\/co5fzvna3ph464bd1mit9c344pmjf1fxaqf35spz_12.jpg","medium":"\\/content\\/u\\/c\\/o\\/co5fzvna3ph464bd1mit9c344pmjf1fxaqf35spz_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=VWKqlByarzzmRxaNLYjZ&c=d25c234771e97ba2c348089e09bc1abf6018d693","userLastVisited":"gestern, 19:13 Uhr"}],"count":5,"settings":{"m":1,"g":0,"v":2}},"onlineList":{"data":[{"userId":"wRGYvAQdklgEYJemzENj","userName":"Chaosmak3r","userGender":1,"userAge":24,"userCity":"Chemnitz","userPicId":"ua6mjj8qrrgqwwm9yn64914alfwhv7925oavqjb0","userPictures":{"small":"\\/content\\/u\\/u\\/a\\/ua6mjj8qrrgqwwm9yn64914alfwhv7925oavqjb0_12.jpg","medium":"\\/content\\/u\\/u\\/a\\/ua6mjj8qrrgqwwm9yn64914alfwhv7925oavqjb0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=wRGYvAQdklgEYJemzENj&c=aeb85869ec7398deb60c7e2cc11b5fbc35ff3133","userLastVisited":""},{"userId":"AJDqGPgbQJJXJYdpRWvj","userName":"Sv_Pro","userGender":1,"userAge":26,"userCity":"Freiberg","userPicId":"nbv7opbdtsmtia1phx2zije1plss6fhdkgt34tks","userPictures":{"small":"\\/content\\/u\\/n\\/b\\/nbv7opbdtsmtia1phx2zije1plss6fhdkgt34tks_12.jpg","medium":"\\/content\\/u\\/n\\/b\\/nbv7opbdtsmtia1phx2zije1plss6fhdkgt34tks_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=AJDqGPgbQJJXJYdpRWvj&c=8fabf3ad40118c62f6e5a7b1c78fd0b4bf875941","userLastVisited":""},{"userId":"mZEWKkpbjjNgRPbQRLrD","userName":"Jonas13","userGender":1,"userAge":26,"userCity":"W\\u00fcrzburg","userPicId":"l6w56bjht51xfb82t1v1p8f55o1m81n5auyu7f6e","userPictures":{"small":"\\/content\\/u\\/l\\/6\\/l6w56bjht51xfb82t1v1p8f55o1m81n5auyu7f6e_12.jpg","medium":"\\/content\\/u\\/l\\/6\\/l6w56bjht51xfb82t1v1p8f55o1m81n5auyu7f6e_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=mZEWKkpbjjNgRPbQRLrD&c=80185000c609e075542f2e5275657aae87ee812d","userLastVisited":""},{"userId":"kvgNmRKdGgLjgodLJjlX","userName":"Schrauber-93","userGender":1,"userAge":26,"userCity":"Meerane","userPicId":"kgqueqjcjylct9eovlxgcu1ieyuxmpmovujdpa5j","userPictures":{"small":"\\/content\\/u\\/k\\/g\\/kgqueqjcjylct9eovlxgcu1ieyuxmpmovujdpa5j_12.jpg","medium":"\\/content\\/u\\/k\\/g\\/kgqueqjcjylct9eovlxgcu1ieyuxmpmovujdpa5j_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=kvgNmRKdGgLjgodLJjlX&c=60b0bea55b4bdf6b4d33f3134c51a53ec98d3d6b","userLastVisited":""},{"userId":"YMwlJyRaMroxGPbPLpkW","userName":"Martin993","userGender":1,"userAge":25,"userCity":"Darmstadt","userPicId":"no5aorjkha2h2oo5btwit4ffky1vdao86eehh9b0","userPictures":{"small":"\\/content\\/u\\/n\\/o\\/no5aorjkha2h2oo5btwit4ffky1vdao86eehh9b0_12.jpg","medium":"\\/content\\/u\\/n\\/o\\/no5aorjkha2h2oo5btwit4ffky1vdao86eehh9b0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=YMwlJyRaMroxGPbPLpkW&c=2c5cf6795f85cbc2a6f2b8181fae4aaa427431f0","userLastVisited":""},{"userId":"lvrEojzayvvlyPbPnWBX","userName":"Thommy06","userGender":1,"userAge":21,"userCity":"Chemnitz","userPicId":"3hzs7fw2rnnj86tlanonsd6wmnzj833qxg7o0cqm","userPictures":{"small":"\\/content\\/u\\/3\\/h\\/3hzs7fw2rnnj86tlanonsd6wmnzj833qxg7o0cqm_12.jpg","medium":"\\/content\\/u\\/3\\/h\\/3hzs7fw2rnnj86tlanonsd6wmnzj833qxg7o0cqm_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=lvrEojzayvvlyPbPnWBX&c=84b645c5e04ecc0661aa12c3b1c232ab38c86bec","userLastVisited":""},{"userId":"rmxkNywanlpNEgdAXjpM","userName":"Furkan","userGender":1,"userAge":26,"userCity":"Heppenheim","userPicId":"a4p6qizw6pc8t2x4der3tbh60i7whal3zvfq3hr0","userPictures":{"small":"\\/content\\/u\\/a\\/4\\/a4p6qizw6pc8t2x4der3tbh60i7whal3zvfq3hr0_12.jpg","medium":"\\/content\\/u\\/a\\/4\\/a4p6qizw6pc8t2x4der3tbh60i7whal3zvfq3hr0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=rmxkNywanlpNEgdAXjpM&c=d1e85439cf80704a95d6cbf2eeccc399392f5204","userLastVisited":""},{"userId":"GpgXMNmbxnBQqKeJzqRw","userName":"Keksian","userGender":1,"userAge":24,"userCity":"Leipzig","userPicId":"5uh9dhfe39272oo6ub1wwskfvfvt5jjprqh5aihl","userPictures":{"small":"\\/content\\/u\\/5\\/u\\/5uh9dhfe39272oo6ub1wwskfvfvt5jjprqh5aihl_12.jpg","medium":"\\/content\\/u\\/5\\/u\\/5uh9dhfe39272oo6ub1wwskfvfvt5jjprqh5aihl_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=GpgXMNmbxnBQqKeJzqRw&c=500212e2e649fef4ed13a4d80b601664afdea77e","userLastVisited":""},{"userId":"NqDMnwpapqqmAYbyJQPZ","userName":"Felixmagicetea","userGender":1,"userAge":26,"userCity":"Schwalmstadt","userPicId":"sgps7lk67shsdfgjndqzb8hdgrqlavb06pp74742","userPictures":{"small":"\\/content\\/u\\/s\\/g\\/sgps7lk67shsdfgjndqzb8hdgrqlavb06pp74742_12.jpg","medium":"\\/content\\/u\\/s\\/g\\/sgps7lk67shsdfgjndqzb8hdgrqlavb06pp74742_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=NqDMnwpapqqmAYbyJQPZ&c=212f0a9ab1193108e6a8809b3e84577c9e1c903e","userLastVisited":""},{"userId":"NpEQvGqaWBBWXkewPBAj","userName":"Flint93","userGender":1,"userAge":25,"userCity":"Helmstedt","userPicId":"vmq19yu3kw24u11g4flqzihw6jnlc5m5npndyptx","userPictures":{"small":"\\/content\\/u\\/v\\/m\\/vmq19yu3kw24u11g4flqzihw6jnlc5m5npndyptx_12.jpg","medium":"\\/content\\/u\\/v\\/m\\/vmq19yu3kw24u11g4flqzihw6jnlc5m5npndyptx_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=NpEQvGqaWBBWXkewPBAj&c=97afffd0a631005cd82465ad20b692e82839e63e","userLastVisited":""},{"userId":"GpgXMNmaxrrJqwdJzqRw","userName":"FitteFimmel","userGender":1,"userAge":22,"userCity":"Erlensee","userPicId":"8wttu8sd6iqmyxocfsgr3a8kg8i0cv0tq6f0qty0","userPictures":{"small":"\\/content\\/u\\/8\\/w\\/8wttu8sd6iqmyxocfsgr3a8kg8i0cv0tq6f0qty0_12.jpg","medium":"\\/content\\/u\\/8\\/w\\/8wttu8sd6iqmyxocfsgr3a8kg8i0cv0tq6f0qty0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=GpgXMNmaxrrJqwdJzqRw&c=76d7567c4dc34451240bee64bedaeb3b8a991305","userLastVisited":""},{"userId":"NqDMnwpepjXyyybyJQPZ","userName":"Matatta","userGender":1,"userAge":25,"userCity":"Kirchberg","userPicId":"adv23qwo4rcbosnpwd4wb2bt7kfzksw7v47d10zq","userPictures":{"small":"\\/content\\/u\\/a\\/d\\/adv23qwo4rcbosnpwd4wb2bt7kfzksw7v47d10zq_12.jpg","medium":"\\/content\\/u\\/a\\/d\\/adv23qwo4rcbosnpwd4wb2bt7kfzksw7v47d10zq_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=NqDMnwpepjXyyybyJQPZ&c=1371068df70bcd7bfac071fc9d0584a11e72069e","userLastVisited":""},{"userId":"rjLvKgNbDmmvEPdmYGWo","userName":"LautundDrau\\u00dfen","userGender":1,"userAge":26,"userCity":"Erfurt","userPicId":"5y0d0vzxanjjjgwsprbahdp4i9zxwt9f4tvaxfh0","userPictures":{"small":"\\/content\\/u\\/5\\/y\\/5y0d0vzxanjjjgwsprbahdp4i9zxwt9f4tvaxfh0_12.jpg","medium":"\\/content\\/u\\/5\\/y\\/5y0d0vzxanjjjgwsprbahdp4i9zxwt9f4tvaxfh0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=rjLvKgNbDmmvEPdmYGWo&c=ab801a62580085f365128d564f75b56e9a3fcc62","userLastVisited":""},{"userId":"xENlwKBeJwzMZKaWkLGy","userName":"michi27z","userGender":1,"userAge":21,"userCity":"Gro\\u00df-Zimmern","userPicId":"jmoiu2oa2io99x805sr78b7of261wnj7y60o2r7e","userPictures":{"small":"\\/content\\/u\\/j\\/m\\/jmoiu2oa2io99x805sr78b7of261wnj7y60o2r7e_12.jpg","medium":"\\/content\\/u\\/j\\/m\\/jmoiu2oa2io99x805sr78b7of261wnj7y60o2r7e_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=xENlwKBeJwzMZKaWkLGy&c=8b66ca15c6df77a031b087457c363cf011667403","userLastVisited":""},{"userId":"xENlwKBaJlDVpJdWkLGy","userName":"roger007","userGender":1,"userAge":21,"userCity":"G\\u00f6ttingen","userPicId":"1k64izt75xajcx6ghd8mar4on7skzd0xjmp2jzef","userPictures":{"small":"\\/content\\/u\\/1\\/k\\/1k64izt75xajcx6ghd8mar4on7skzd0xjmp2jzef_12.jpg","medium":"\\/content\\/u\\/1\\/k\\/1k64izt75xajcx6ghd8mar4on7skzd0xjmp2jzef_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=xENlwKBaJlDVpJdWkLGy&c=d9f0b63b9f46d6439bceb99715c49f85592ba8fb","userLastVisited":""},{"userId":"qlBWrvxdzBBAnMdKZjPJ","userName":"Samy20","userGender":1,"userAge":20,"userCity":"Regensburg","userPicId":"fb85lk1osol8cgvga3o7hrfaosa0fbkskpgtmtv2","userPictures":{"small":"\\/content\\/u\\/f\\/b\\/fb85lk1osol8cgvga3o7hrfaosa0fbkskpgtmtv2_12.jpg","medium":"\\/content\\/u\\/f\\/b\\/fb85lk1osol8cgvga3o7hrfaosa0fbkskpgtmtv2_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=qlBWrvxdzBBAnMdKZjPJ&c=e7c6ea2e85059413bdcda620e57282cebfdcf84a","userLastVisited":""},{"userId":"QwrXmEvePrWZnZbPNKYl","userName":"themanno","userGender":1,"userAge":24,"userCity":"Marbach","userPicId":"vj57hx7h6yb47zjarlb1xqnx6grqbd8u7lz8dpo7","userPictures":{"small":"\\/content\\/u\\/v\\/j\\/vj57hx7h6yb47zjarlb1xqnx6grqbd8u7lz8dpo7_12.jpg","medium":"\\/content\\/u\\/v\\/j\\/vj57hx7h6yb47zjarlb1xqnx6grqbd8u7lz8dpo7_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=QwrXmEvePrWZnZbPNKYl&c=36baed1660b0738c8e1d94866761ebb9ba9c1795","userLastVisited":""},{"userId":"rmxkNywenlLpmrbAXjpM","userName":"SlimFelix","userGender":1,"userAge":26,"userCity":"Butzbach","userPicId":"a94xbhq7t6z403n8tjuptn2rekjzrspluotdh5jk","userPictures":{"small":"\\/content\\/u\\/a\\/9\\/a94xbhq7t6z403n8tjuptn2rekjzrspluotdh5jk_12.jpg","medium":"\\/content\\/u\\/a\\/9\\/a94xbhq7t6z403n8tjuptn2rekjzrspluotdh5jk_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=rmxkNywenlLpmrbAXjpM&c=3ec55bd03374bc48410360726626cf2d31d61dbe","userLastVisited":""},{"userId":"xENlwKBeJPkNMAbWkLGy","userName":"Magicdrinkmix","userGender":1,"userAge":23,"userCity":"N\\u00fcrnberg","userPicId":"yc8wzs7c0nrnt8e0mq7ai97vjfszyj93obvj4or0","userPictures":{"small":"\\/content\\/u\\/y\\/c\\/yc8wzs7c0nrnt8e0mq7ai97vjfszyj93obvj4or0_12.jpg","medium":"\\/content\\/u\\/y\\/c\\/yc8wzs7c0nrnt8e0mq7ai97vjfszyj93obvj4or0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=xENlwKBeJPkNMAbWkLGy&c=11154131780def40accd9d70a92d789436fec79d","userLastVisited":""},{"userId":"NkEQmWDbKpLQpNdGMJZj","userName":"Thommy96","userGender":1,"userAge":23,"userCity":"Gotha","userPicId":"7xcgqzna0tp8h3tdk5y95dopad9m85ybmcpckmou","userPictures":{"small":"\\/content\\/u\\/7\\/x\\/7xcgqzna0tp8h3tdk5y95dopad9m85ybmcpckmou_12.jpg","medium":"\\/content\\/u\\/7\\/x\\/7xcgqzna0tp8h3tdk5y95dopad9m85ybmcpckmou_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=NkEQmWDbKpLQpNdGMJZj&c=84861a1ac988775acf71e35c5771cb3ae91664ff","userLastVisited":""},{"userId":"NpEQvGqaWMRBMldwPBAj","userName":"wabb93","userGender":1,"userAge":25,"userCity":"Eltville","userPicId":"7a9n68fm0reo7pwz0yjg4alvas5zxtq2ex5gffe0","userPictures":{"small":"\\/content\\/u\\/7\\/a\\/7a9n68fm0reo7pwz0yjg4alvas5zxtq2ex5gffe0_12.jpg","medium":"\\/content\\/u\\/7\\/a\\/7a9n68fm0reo7pwz0yjg4alvas5zxtq2ex5gffe0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=NpEQvGqaWMRBMldwPBAj&c=4dc1d4de6d84ca82e1e0f7db9ae5956b6ea24b56","userLastVisited":""},{"userId":"VMvxkKXaYJPDywbGrZNA","userName":"ag01","userGender":1,"userAge":25,"userCity":"Bad Rappenau","userPicId":"jpyn10kvo65yzu79yo3bzc97ne2vt5p82xj747ke","userPictures":{"small":"\\/content\\/u\\/j\\/p\\/jpyn10kvo65yzu79yo3bzc97ne2vt5p82xj747ke_12.jpg","medium":"\\/content\\/u\\/j\\/p\\/jpyn10kvo65yzu79yo3bzc97ne2vt5p82xj747ke_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=VMvxkKXaYJPDywbGrZNA&c=7face200cafb74d3258ddc7534fec9924c65a423","userLastVisited":""},{"userId":"lvrEojzaynkpkwbPnWBX","userName":"Ullyses","userGender":1,"userAge":26,"userCity":"Heidelberg","userPicId":"bhugirynumzsshdo810qqtc73kkro7yvaiwna062","userPictures":{"small":"\\/content\\/u\\/b\\/h\\/bhugirynumzsshdo810qqtc73kkro7yvaiwna062_12.jpg","medium":"\\/content\\/u\\/b\\/h\\/bhugirynumzsshdo810qqtc73kkro7yvaiwna062_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=lvrEojzaynkpkwbPnWBX&c=7a35caca31aa4649f7be04e445564eaff40287ff","userLastVisited":""},{"userId":"mZEWKkpejjQnYqeQRLrD","userName":"Tjoram","userGender":1,"userAge":23,"userCity":"Breitenstein","userPicId":"nd9nh79utpmh72ftvmjg7alyb1nyb7zayczefn36","userPictures":{"small":"\\/content\\/u\\/n\\/d\\/nd9nh79utpmh72ftvmjg7alyb1nyb7zayczefn36_12.jpg","medium":"\\/content\\/u\\/n\\/d\\/nd9nh79utpmh72ftvmjg7alyb1nyb7zayczefn36_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=mZEWKkpejjQnYqeQRLrD&c=8cd13591aa66512c9a1e3cb9878130027be2593c","userLastVisited":""},{"userId":"ZVlQXBpeXMmkwwagnzYy","userName":"David1998","userGender":1,"userAge":20,"userCity":"Nordhausen","userPicId":"o12mquwzsb90g38vhqlrihtz0vwqjvt8ds79y5yj","userPictures":{"small":"\\/content\\/u\\/o\\/1\\/o12mquwzsb90g38vhqlrihtz0vwqjvt8ds79y5yj_12.jpg","medium":"\\/content\\/u\\/o\\/1\\/o12mquwzsb90g38vhqlrihtz0vwqjvt8ds79y5yj_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=ZVlQXBpeXMmkwwagnzYy&c=88dff6b62ee053584614d555a19dfeade9e305f1","userLastVisited":""},{"userId":"ZVlQXBpaXMMqkVbgnzYy","userName":"Tong888","userGender":1,"userAge":27,"userCity":"Wendeburg","userPicId":"ld5u2if97c3w7sfbztjqhkpgvs5donba8mbfmmsb","userPictures":{"small":"\\/content\\/u\\/l\\/d\\/ld5u2if97c3w7sfbztjqhkpgvs5donba8mbfmmsb_12.jpg","medium":"\\/content\\/u\\/l\\/d\\/ld5u2if97c3w7sfbztjqhkpgvs5donba8mbfmmsb_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=ZVlQXBpaXMMqkVbgnzYy&c=a949f31628241f4fddef9f7da7609fc15067bb70","userLastVisited":""},{"userId":"GpgXMNmaxrrKzEdJzqRw","userName":"RWa99","userGender":1,"userAge":19,"userCity":"Bad Nauheim","userPicId":"h5yfkebxej1ccbszb5zwki2ve6m7frm4v83428ip","userPictures":{"small":"\\/content\\/u\\/h\\/5\\/h5yfkebxej1ccbszb5zwki2ve6m7frm4v83428ip_12.jpg","medium":"\\/content\\/u\\/h\\/5\\/h5yfkebxej1ccbszb5zwki2ve6m7frm4v83428ip_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=GpgXMNmaxrrKzEdJzqRw&c=c7f302870f6139d66c4de0997ac49bad4a7c1708","userLastVisited":""},{"userId":"qoyVNXZdLRnpnRaPgYWv","userName":"malte99","userGender":1,"userAge":19,"userCity":"Gie\\u00dfen","userPicId":"lmwoo5l3qd5do09suyvsd06ab37qk1qjepoddcy0","userPictures":{"small":"\\/content\\/u\\/l\\/m\\/lmwoo5l3qd5do09suyvsd06ab37qk1qjepoddcy0_12.jpg","medium":"\\/content\\/u\\/l\\/m\\/lmwoo5l3qd5do09suyvsd06ab37qk1qjepoddcy0_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":false,"userLinkToProfile":"\\/User\\/profile\\/?id=qoyVNXZdLRnpnRaPgYWv&c=cae66604fa7aa6ea514e70d87a215dc43d764ca0","userLastVisited":""},{"userId":"NqDMnwpbpqqmDgdyJQPZ","userName":"MarcSchneider","userGender":1,"userAge":27,"userCity":"Wetzlar","userPicId":"bnpp58irqzwinl2k76oppjesmsp2mpfy72valgne","userPictures":{"small":"\\/content\\/u\\/b\\/n\\/bnpp58irqzwinl2k76oppjesmsp2mpfy72valgne_12.jpg","medium":"\\/content\\/u\\/b\\/n\\/bnpp58irqzwinl2k76oppjesmsp2mpfy72valgne_3.jpg"},"userWasOnline":false,"userIsOnline":true,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=NqDMnwpbpqqmDgdyJQPZ&c=2edb9524fa70168fe93ae247c3833b80e0e7fda4","userLastVisited":""},{"userId":"VWKqlByerzgqqjeNLYjZ","userName":"Erzwo93","userGender":1,"userAge":25,"userCity":"Weiterstadt","userPicId":"47kg45gyoqfs65gklaevshc2dmeieuaa7fclqt34","userPictures":{"small":"\\/content\\/u\\/4\\/7\\/47kg45gyoqfs65gklaevshc2dmeieuaa7fclqt34_12.jpg","medium":"\\/content\\/u\\/4\\/7\\/47kg45gyoqfs65gklaevshc2dmeieuaa7fclqt34_3.jpg"},"userWasOnline":true,"userIsOnline":false,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=VWKqlByerzgqqjeNLYjZ&c=88acd872c5561d9c91427b4fbfc49bb7ff551e10","userLastVisited":""}],"count":199,"ts":"1559181753","settings":{"v":2}},"user":{"hasFavoritesOnline":false,"hasNewMessages":true,"hasNewNotifications":false,"hasNewHearts":false,"hasNewFeed":true,"hasProfilePic":false,"nickname":"sabhbau14","id_pic":"","gender":2,"id":"ogmJyDPalmEqPmbYEVRr","lastlogin":1559167342},"userSettings":{"bubbles":{"feed-visitors":0,"feed-visited":0,"feed-favorites":0,"info-gallery":0,"info-matching":0,"info-search":0,"info-mobile-likes":0,"info-mobile-search-custom":0,"info-mobile-search-newbies":0,"info-mobile-search-online":0,"info-mobile-favorites":0,"info-heart-sent":0,"deprecate-ie":1}},"context":"default","page":1,"pages_total":1,"userlist":[{"userId":"","userName":"vybz-kartel28","userGender":1,"userAge":26,"userCity":"Duisburg","userPicId":"wp24e3tn8m1rqlor90f3ithrwaqzsnoxv5zp6abj","userPictures":{"small":"\\/content\\/u\\/w\\/p\\/wp24e3tn8m1rqlor90f3ithrwaqzsnoxv5zp6abj_12.jpg","medium":"\\/content\\/u\\/w\\/p\\/wp24e3tn8m1rqlor90f3ithrwaqzsnoxv5zp6abj_3.jpg"},"userWasOnline":false,"userIsOnline":true,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=knjlBZmdwrLzvVbMxLpW&c=48e7012db31d2944b912f83ff24af9dbee8fd7c3","userLastVisited":""},{"userId":"","userName":"Hanni89","userGender":1,"userAge":29,"userCity":"Laatzen","userPicId":"xiyx3e1bck1u033278wsp53xonxvhf5l9jy7n56q","userPictures":{"small":"\\/content\\/u\\/x\\/i\\/xiyx3e1bck1u033278wsp53xonxvhf5l9jy7n56q_12.jpg","medium":"\\/content\\/u\\/x\\/i\\/xiyx3e1bck1u033278wsp53xonxvhf5l9jy7n56q_3.jpg"},"userWasOnline":false,"userIsOnline":true,"userIsFavorite":false,"userIsNew":true,"userLinkToProfile":"\\/User\\/profile\\/?id=rmxkNywbnvvNVAbAXjpM&c=554a87e863f1b8f65a95a91575fed925e775dcca","userLastVisited":""},],"params":{"a1":"18","a2":"30","ct":"100006207","di":"200","g":"1","nm":"1","o":"1","pc":"1","ct_meta":{"id":"100006207","country":"de","city":"Paderborn","state":"Nordrhein-Westfalen","state_short":"NW","locality":"","id_zip_center":"7071","id_city_proxy":"100006207"}},"results_total":9,"max_per_page":30,"position":1,"getvars":{"ct":"100006207","g":"1","a1":"18","a2":"30","di":"200","ec":"","rx":"","sh":"","v1":"","hs":"","hc":"","h1":"","h2":"","ch":"","cp":"","ed":"","sm":"","zo":"","se":"","mo":"","o":"1","nm":"1","im":"","nn":""},"base_url":"\\/Search","nopage_url":"\\/Search\\/?ct=100006207&g=1&a1=18&a2=30&di=200&ec=&rx=&sh=&v1=&hs=&hc=&h1=&h2=&ch=&cp=&ed=&sm=&zo=&se=&mo=&o=1&nm=1&im=&nn=&","msg":"few_results","countries":{"de":"Deutschland","at":"\\u00d6sterreich","ch":"Schweiz","eg":"\\u00c4gypten","gq":"\\u00c4quartorialguinea","et":"\\u00c4thiopien","af":"Afghanistan","al":"Albanien","dz":"Algerien","ad":"Andorra","ao":"Angola","ag":"Antigua und Barbuda","ar":"Argentinien","am":"Armenien","az":"Aserbeidschan","au":"Australien","bs":"Bahamas","bh":"Bahrein","bd":"Bangladesch","bb":"Barbados","by":"Belarus","be":"Belgien","bz":"Belize","bj":"Benin","bt":"Bhutan","bo":"Bolivien","ba":"Bosnien und Herzegowina","bw":"Botsuana","br":"Brasilien","bn":"Brunei","bg":"Bulgarien","bf":"Burkina Faso","bi":"Burundi","cl":"Chile","cn":"China","cr":"Costa Rica","ci":"Cote d\'Ivoire","dk":"D\\u00e4nemark","dm":"Dominica","do":"Dominikanische Republik","dj":"Dschibuti","ec":"Ecuador","sv":"El Salvador","er":"Eritrea","ee":"Estland","fo":"Far\\u00f6er","fj":"Fidschi","fi":"Finnland","fr":"Frankreich","ga":"Gabun","gm":"Gambia","ge":"Georgien","gh":"Ghana","gi":"Gibraltar","gd":"Grenada","gr":"Griechenland","gb":"Gro\\u00dfbritannien","gt":"Guatemala","gn":"Guinea","gw":"Guinea-Bissau","gy":"Guyana","ht":"Haiti","hn":"Honduras","hk":"Hongkong","in":"Indien","id":"Indonesien","iq":"Irak","ir":"Iran","ie":"Irland","is":"Island","il":"Israel","it":"Italien","jm":"Jamaika","jp":"Japan","ye":"Jemen","jo":"Jordanien","kh":"Kambodscha","cm":"Kamerun","ca":"Kanada","cv":"Kap Verde","kz":"Kasachstan","qa":"Katar","ke":"Kenia","kg":"Kirgisistan","ki":"Kiribati","co":"Kolumbien","km":"Komoren","cg":"Kongo (Republik)","cd":"Kongo Dem. Republik","kp":"Korea (Nord) Dem. Volksrep.","kr":"Korea (S\\u00fcd) Republik","hr":"Kroatien","cu":"Kuba","kw":"Kuwait","la":"Laotische Dem. Volksrep.","ls":"Lesotho","lv":"Lettland","lb":"Libanon","lr":"Liberia","ly":"Libysch-Arabische Republik","li":"Liechtenstein","lt":"Litauen","lu":"Luxemburg","mo":"Macao","mg":"Madagaskar","mw":"Malawi","my":"Malaysia","mv":"Malediven","ml":"Mali","mt":"Malta","ma":"Marokko","mh":"Marshallinseln","mr":"Mauretanien","mu":"Mauritius","mk":"Mazedonien","mx":"Mexiko","fm":"Mikronesien","md":"Moldau","mc":"Monaco","mn":"Mongolei","me":"Montenegro","mz":"Mosambik","mm":"Myanmar","na":"Namibia","nr":"Nauru","np":"Nepal","nz":"Neuseeland","ni":"Nicaragua","nl":"Niederlande","ne":"Niger","ng":"Nigeria","nu":"Niue","mp":"N\\u00f6rdliche Marianen","no":"Norwegen","om":"Oman","pk":"Pakistan","pw":"Palau","ps":"Pal\\u00e4stina","pa":"Panama","pg":"Papua-Neuguinea","py":"Paraguay","pe":"Peru","ph":"Philippinen","pl":"Polen","pt":"Portugal","rw":"Ruanda","ro":"Rum\\u00e4nien","ru":"Russische F\\u00f6deration","sb":"Salomonen","zm":"Sambia","ws":"Samoa","sm":"San Marino","st":"Sao Tome und Principe","sa":"Saudi Arabien","se":"Schweden","sn":"Senegal","rs":"Serbien","sc":"Seychellen","sl":"Sierra Leone","zw":"Simbabwe","sg":"Singapur","sk":"Slowakische Republik","si":"Slowenien","so":"Somalia","es":"Spanien","lk":"Sri Lanka","kn":"St. Kitts und Nevis","lc":"St. Lucia","vc":"St. Vincent","sd":"Sudan","za":"S\\u00fcdafrika","sr":"Suriname","sz":"Swasiland","sy":"Syrien","tj":"Tadschikistan","tw":"Taiwan","tz":"Tansania","tl":"Timor-Leste","th":"Thailand","tg":"Togo","to":"Tonga","tt":"Trinidad und Tobago","td":"Tschad","cz":"Tschechische Republik","tr":"T\\u00fcrkei","tn":"Tunesien","tm":"Turkmenistan","tv":"Tuvalu","ug":"Uganda","ua":"Ukraine","hu":"Ungarn","uy":"Uruguay","us":"USA","uz":"Usbekistan","vu":"Vanuatu","va":"Vatikanstadt","ve":"Venezuela","ae":"Vereinigte Arab. Emirate","vn":"Vietnam","cf":"Zentralafrik. Republik"},"requestUri":"\\/Search?ct=100006207&g=1&a1=18&a2=30&di=200&ec=&rx=&sh=&v1=&hs=&hc=&h1=&h2=&ch=&cp=&ed=&sm=&zo=&se=&mo=&o=1&nm=1&im=&nn=","bubble_search":"\\n<div class=\\"tooltip tt-scheme1 tt-size2\\" id=\\"bubbleExpireNotice\\" style=\\"margin: 10px 0 20px;\\">\\n    <a href=\\"javascript:void(0);\\" class=\\"tt-close\\" data-closeaction=\\"\\/Ajax\\/hideBubble\\" data-closedata=\\"info-search\\" title=\\"Diesen Hinweis nicht mehr anzeigen\\"><\\/a>\\n    <div class=\\"tt-title tt-title-info\\">Sie suchen \\u2013 wir finden f\\u00fcr Sie<\\/div>\\n    <p>\\n        Wie stellen Sie sich Ihren Traumpartner vor? Wie alt, wie jung, wie gro\\u00df? Nutzen Sie die umfangreichen\\n        M\\u00f6glichkeiten der Partnersuche, und lassen Sie sich \\u00fcberraschen.\\n    <\\/p>\\n<\\/div>\\n"},

      };

(function() { var run = function()
';

preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);

// Print the entire match result
var_dump($matches);

DEMO


问:
How to plot months (in order) using Seaborn bar plot?
I'm unable to display my data that corresponds to each month when using Seaborn barplot.  So please tell me what I'm doing wrong?

I've tried the code below, which does display the months in Seaborn bar plot on the x-axis.  However there is no data displayed.  I can't figure out what I'm doing wrong.

However, I found code via Seaborn Pair Grid, which displays the data (but it's not in order).  I'd like it ordered using either method.

```<code>#Seaborn barplot of categorical values
sns.set(style='whitegrid')
Months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
             'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
sns.barplot(x='LastContactMonth', y='CarInsurance',
                      data=df, order=Months, palette='Set3')
plt.xticks(rotation=-75)
plt.show();

#Pair grid of categorical values
cat_pg = sns.PairGrid(df,
             x_vars=['LastContactMonth'],
             y_vars=['CarInsurance'],
             aspect=.75, size=10)
plt.xticks(rotation=-75)
cat_pg.map(sns.barplot, palette='Set3');
</code>```

答:
Just change the capital letter in Months list & make sure the list is in order that you desire.

```<code>Months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']
sns.barplot(x='LastContactMonth', y='CarInsurance', data=df_new, order=Months, palette='Set3')
plt.xticks(rotation=-75)
plt.show()
</code>```

Body:
I'm unable to display my data that corresponds to each month when using Seaborn barplot.  So please tell me what I'm doing wrong?

I've tried the code below, which does display the months in Seaborn bar plot on the x-axis.  However there is no data displayed.  I can't figure out what I'm doing wrong.

However, I found code via Seaborn Pair Grid, which displays the data (but it's not in order).  I'd like it ordered using either method.

#Seaborn barplot of categorical values
sns.set(style='whitegrid')
Months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
             'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
sns.barplot(x='LastContactMonth', y='CarInsurance',
                      data=df, order=Months, palette='Set3')
plt.xticks(rotation=-75)
plt.show();

#Pair grid of categorical values
cat_pg = sns.PairGrid(df,
             x_vars=['LastContactMonth'],
             y_vars=['CarInsurance'],
             aspect=.75, size=10)
plt.xticks(rotation=-75)
cat_pg.map(sns.barplot, palette='Set3');

Body:
Just change the capital letter in Months list & make sure the list is in order that you desire.

Months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']
sns.barplot(x='LastContactMonth', y='CarInsurance', data=df_new, order=Months, palette='Set3')
plt.xticks(rotation=-75)
plt.show()


问:
IE 7 stops responding
In our asp.net 2.0 web application, there is a user control with validation. For some reason, when the validation fails, the pages looks fine, however, no controls (asp buttons, scroll bars, or third party like Telerik text editor) respond to mouse inputs. The only work around is to resize the browser window which will make the UI responsive.
Has anyone seen this issue before? What could be causing it?</p>

答:
I have seen IE freeze up when resizing if there are expressions in the CSS.

```<code>#container{
    width: expression(document.body.clientWidth > 1100)? "1100px" : "auto";
}
</code>```

It's easy to get yourself into a situation where two elements are resizing based on each other, which can cause an infinite loop where the browser locks. In any case, expressions will stop working in IE8 standards mode, so they should be removed anyway.

ContentLicense: CC BY-SA 2.5

Title: IE 7 stops responding

Body:
I have seen IE freeze up when resizing if there are expressions in the CSS.

#container{
    width: expression(document.body.clientWidth > 1100)? "1100px" : "auto";
}

It's easy to get yourself into a situation where two elements are resizing based on each other, which can cause an infinite loop where the browser locks. In any case, expressions will stop working in IE8 standards mode, so they should be removed anyway.

OwnerDisplayName: Chase Seibert


问:
logout from application but can not able to logout from google account while using google authentication
I do login authentication with google in rails app,I had problem with when I logout it will redirect to my index page but can not able to logout from google account

I was doing first time login authentication,Please can any one help me

Thank you in advance

Here I write my code where i was wrong

```<code>def create
    @user = Authentication.find_or_create_from_auth_hash(request.env["omniauth.auth"])
    session[:user_id] = @user.id
    redirect_to '/'
end
</code>```

```<code>def destroy
    session[:user_id] = nil
    redirect_to '/login'
end
</code>```

答:
This is not how it works.

Consider doing this: Open your rails app -> Login with Google -> You'll see your rails app dashboard -> Now open a new tab and open google.com -> Logout from there -> Now switch back to your rails app and reload the page.

Even though you're logged out of Google, you're still signed in to your Rails app.

This means that your rails app is not exactly your google account. They both are independent. Your rails app(through Omniauth) just requests the Google data with an OAuth API, which will authorize the app and then sends the access token, and with this token, you get the google data(like email), etc.

However, if you still want to log out the user from the Google account, You can use alternatives like in this answer and multiple answers from this thread.

Body:
I do login authentication with google in rails app,I had problem with when I logout it will redirect to my index page but can not able to logout from google account

I was doing first time login authentication,Please can any one help me

Thank you in advance

Here I write my code where i was wrong

def create
    @user = Authentication.find_or_create_from_auth_hash(request.env["omniauth.auth"])
    session[:user_id] = @user.id
    redirect_to '/'
end

def destroy
    session[:user_id] = nil
    redirect_to '/login'
end