text:
Q: scanf and char variable problems Okay, I'm reading C for dummies, and once again I am having scanf problems. I wrote another questioner earlier with the similar problem but the fix will not work here. Every time I compile, gcc always says:

MADLIB1.C: In function 'int main()':
  MADLIB1.C:19:27: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char ()[20]' [-Wformat]
  MADLIB1.C:21:22: warning: format '%s' expects argument of type 'char', but argument 2 has type 'char ()[20]' [-Wformat]
  MADLIB1.C:23:23: warning: format '%s' expects argument of type 'char', but argument 2 has type 'char ()[20]' [-Wformat]
  MADLIB1.C:25:27: warning: format '%s' expects argument of type 'char', but argument 2 has type 'char (*)[20]' [-Wformat]
  MADLIB1.C:31:52: error: expected '}' at end of input

Here's my code:
/*
MADLIBI.C Source Code
Written by Arshad Husain
*/

#include <stdio.h>

int main()
{

    char adjective[20];
    char food[20];
    char chore[20];
    char furniture[20];

    /* Get the words to use in the madlib */

    printf("Enter an adjective");     /* prompt */
    scanf("%s",&adjective);
    printf("Enter a food");
    scanf("%s",&food);
    printf("Enter a household chore (past tense):");
    scanf("%s",&chore);
    printf("Enter an item of furniture");
    scanf("%s",&furniture);

    /* Display the output */

    printf("\n\nDon't touch that %s %s!\n", adjective, food);
    printf("I just %s the %s!\n", chore, furniture);

    return(0);
}

A: You should not use address-of for arrays, they are already pointers:
printf("Enter an adjective");     /* prompt */
scanf("%s",adjective);

When you use address-of, e.i., &, it becomes char **, which is not what scanf expects.
also, for this example it is safer to do:
scanf("%19s",adjective); /* maximum 19 chars */

to protect against overflows.

A:     printf("Enter an adjective");
   /* prompt */ scanf("%s",&adjective);
   printf("Enter a food");
   scanf("%s",&food);
   printf("Enter a household chore (past tense):");
   scanf("%s",&chore);
   printf("Enter an item of furniture");
   scanf("%s",&furniture);

can be
   printf("Enter an adjective");
   /* prompt */ scanf("%s",adjective);
   printf("Enter a food");
   scanf("%s",food);
   printf("Enter a household chore (past tense):");
   scanf("%s",chore);
   printf("Enter an item of furniture");
   scanf("%s",furniture);

No need for prepending a & before them. %s expects a char * which will be satisfied without adding a & itself.

A: No need to pass the address of address of char array. i.e
Just modify the scanf statements as follows
scanf("%s",adjective);
scanf("%s",food);
scanf("%s",chore);
scanf("%s",furniture);

A: the syntax of your code you have written : scanf("%s",&food); doesn't make any sense because to take input in a string(char array) you don't need to prefix the array name with &.
further to avoid buffer overflow you should use
scanf("ONE_LESS_THEN_THE_SIZE_OF_CHAR_ARRAY%s",food);
in case of food you should use
scanf("%19s",food);

A: An array in C is not a separate data type. It is similar to a pointer.
For example, when i write
int a[20];

It reserves 20*4 = 80 bytes for storing 20 integers. Now, 'a' points to the first word of these 20 allocated integers i.e. 'a' contains the address of the first word. It applies similarly to any array which in your case is of type char. Internally, adjective is of type char *.
Now when in scanf you say &adjective, you are actually giving the address of 'char *adjective', which is not a string array and hence data types do not match.
I do not know how far you have progressed with your reading, but these things will become much clearer to you once you read about pointers and arrays.

A: When you read from the keyboard using scanf, characters are placed in a buffer and the arguments to scanf extract from that buffer so in the case of scanf("%s",adjective); when you enter a string "ABC" and press ENTER the ENTER character(s) (CR[LF]) are also placed in the buffer. The %s extracts the string "ABC" but the ENTER remains. Next time you do scanf() the ENTER is still in the buffer and will just return without reading anything.
in the beginning you would be better off using fgets() to read strings to avoid the hassle of working with the input buffer directly and will not crash if you enter a larger string than the array can hold.
if ( fgets( adjective, sizeof(adjective), stdin) )
{
  if ( fgets( ...
  {

A: Don't use an extra '&' during scanf. The name of an array string is itself the base address of string - i.e. adjective == &(adjective[0]). So you don't need the extra '&' before adjective n other arrays.


text:
Q: DynamoDB global index on a field with small amount of distinct values In official Amazon docs there's this text:

For example, suppose you have an Employee table with attributes such
  as Name, Title, Address, PhoneNumber, Salary, and PayLevel. Now
  suppose that you had a global secondary index named PayLevelIndex,
  with PayLevel as the partition key. Many companies only have a very
  small number of pay codes, often fewer than ten, even for companies
  with hundreds of thousands of employees. Such an index would not
  provide much benefit, if any, for an application.

I really don't understand how such index wouldn't be beneficial. What if we need to list all employees with a specific payLevel? Even if we have only 2 distinct payLevels, the index should help, right?

A: Its not really going to help. High cardinality is generally your goal when it comes to indexes in any database.
Consider also that this is their recommendation. Trust the documentation until you see something that conflicting in actual practice.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Amdahl's Law examples Amdahl's Law states that the maximal speedup of a computation where the fraction S of the computation must be done sequentially going from a 1 processor system to an N processor system is at most
                 1 / (S + [(1 - S) / N])

Does anyone know of books or notes where the actual analysis of the code, for some non-trivial computation, for determining the fraction S is done ?

A: There is a very good discussion of Amdahl's law in the Microsoft Patterns and Practices book on Parallel Programming with .NET.
Doing a detailed analysis of the code is going to be quite difficult - as every situation is unique.
However, it should be something that can be easily approximated, provided you have the mechanisms to determine the amount of concurrency.  By changing the usable concurrency and profiling, you should be able to estimate S by solving the equation in reverse.

A: Here are a few links that might help you out:
Microsoft Research | Discussion of Amdahl's Law in the Multicore Age
Evaluation and Analysis of Amadahl's (and Gustafson's) Laws
Abstract on Estimating Speed Multipliers | Discusses Amdahl's Law Briefly
Hope they help you out.

A: The principle involved isn't unique to parallelization.  If 25% of the program's time is spent doing some particular operation, making everything but that 25% happen instantly (without affecting the 25%) would leave a program that took 25% of the original time, and was thus four times as fast.
In cases where an algorithm has clear phases that are or are not parallelizable, the application of the above formula would be simple--figure that N way parallelization will make the parts that are parallelizable run N times as fast, while the parts that aren't parallelizable will run at normal speed.  In practice, I don't think most algorithms consist entirely of parts that are either 100% parallelizable or 100% sequential.  In most interesting cases, algorithms can run largely in parallel, but have various ordering constraints; in some cases, the precise ordering constraints may be data-dependent.  As such, the "percentage of parallelization" could be variable based upon the number of processors, among other things, and so trying to plug it into a formula would not be very helpful.


text:
Q: dot.com/car1 does work, but dot.com/transport/car1 doesn't work index.php
$args = array(
 'posts_per_page' => 5,
 'orderby' => 'post_date',
 'order' => 'DESC',
 'post_type' => array('car', 'bus', 'boat'), //plugin pods
);
$query = new WP_Query($args);
while($query->have_posts()) {
  $query->the_post();
  echo ''
   .get_the_title()
   ."";
 }

1) http://www.dot.com/car1 (and dot.com/car2, dot.com/bus1…)
and http://www.dot.com
This works.
2) http://www.dot.com/transport/car1 (and dot.com/transport/car2, dot.com/transport/bus1…)
and http://www.dot.com/transport
This doesn't work: 404 error.
I have tried "transport" here: (Categories) wp-admin/edit-tags.php?taxonomy=category
and also here: (Permalinks) wp-admin/options-permalink.php http://www.dot.com/%category%
but it doens't work
Ex. This does work: http://www.dot.com/car and http://www.dot.com/boat
OR http://www.dot.com/car/car1 and http://www.dot.com/boat/boat7
This does not work: http://www.dot.com/transport
OR http://www.dot.com/transport/car1 and http://www.dot.com/transport/boat7
Anyone know?


text:
Q: Read json in web service asmx I create web service in c# to receive json and insert it to data base :
public string SaveData(string resultData)
{

DLR service = new DLR();

string filePath = Server.MapPath("~/Error.txt");

using (StreamWriter writer = new StreamWriter(filePath, true))
{
    writer.WriteLine("Json is sent :" + resultData +
       "" + Environment.NewLine + "Date :" + DateTime.Now.ToString());
    writer.WriteLine(Environment.NewLine + "-----------------------------------------------------------------------------" + Environment.NewLine);
}

RootObject obj = JsonConvert.DeserializeObject<RootObject>(resultData,settings);
    foreach (JsonData item in obj.results)
    {
        {
            var connStr = ConfigurationManager.ConnectionStrings["myCon1"].ConnectionString;
            SqlConnection con = new SqlConnection(connStr);
            try
            {
                SqlCommand cmd = new SqlCommand("[insert_RDL]", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@msgId", item.msgId);
                cmd.Parameters.AddWithValue("@to_mobile", item.to);
                cmd.Parameters.AddWithValue("@status", item.status);
                cmd.Parameters.AddWithValue("@ttest", "");
                cmd.Parameters.AddWithValue("@newtest", "");
                con.Open();
                cmd.ExecuteNonQuery();
            }
            finally
            {
                //
            }
        }
    }
    return "OK ";
}

When i post the json by ajax in aspx page the page is sending json without problem . and i see json in error.txt .
when i post the json by php :
<?php
$data = '{"results": [{"msgId": "4000","to": "9665312114","status": "D"},
{"msgId": "859911880","to": "966535112578","status": "N"},
{"msgId":"859911880","to": "966535112579","status": "S"}]}' ;
$phpObj =  json_decode($data);
print_r($phpObj);
$resultData =  json_encode($phpObj);
print_r($resultData);
$client = new SoapClient("http://asdm.sa/DLR.asmx?wsdl");
$response = $client->SaveData($data);
print_r($response);
?>

----------

The json is sending is NULL.
why the page not sending the json.
when i open the error.txt :

Json is sent :{"results": [{"msgId": "001","to": "9665312114","status": "D"}, {"msgId": "859911880","to": "966535112578","status": "N"}, {"msgId": "859911880","to": "966535112579","status": "S"}]}
Date :2/3/2018 6:59:02 PM

Json is sent :
Date :2/3/2018 7:31:35 PM

A: Looks like problem is in sent parameter. Please try next code
<?php
$data = '{"results": [{"msgId": "4000","to": "9665312114","status": "D"},
{"msgId": "859911880","to": "966535112578","status": "N"},
{"msgId":"859911880","to": "966535112579","status": "S"}]}' ;
$phpObj =  json_decode($data);
print_r($phpObj);
$resultData =  json_encode($phpObj);
print_r($resultData);
$client = new SoapClient("http://asdm.sa/DLR.asmx?wsdl");
$param = array('resultData' => $data);
$response = $client->SaveData($param);
print_r($response);
?>


text:
Q: Is there a direct way to get word count in TeXstudio? The Text Analysis tool in TeXstudio is quite useful, but I seems I can not find a direct and accurate way to obtain the total number of words in the compiled PDF file.
As I understood, this tool counts the phrases in text. Even if set the length each phrase to only one word, I do not get an accurate count in comparison with the word count function in Texmaker.
What do you think?
P.s., I'm using the TeXstudio V2.8.6, MAC.

A: menu: Tools\Analyse Text
then: count
From the comments:

In the second drop down box set maximum words per phrase: to 1 (I
  think this is default) then phrase = word.

Also if you have selected a piece of text, for Source choose Selection

A: It is possible to do that by using the utilities pdftotext and wc [1]. Integration in texstudio is possible by

*

*Install pdftotext and wc

*Create a script

*

*Windows: count_pdf_words.bat
Content:

@echo off
  echo Counting words in %1
  echo Result:
  pdftotext %1 - | wc -w

*Linux: count_pdf_words.sh
Content:

#!/bin/bash
  echo Counting words in $1
  echo Result:
  pdftotext $1 - | wc -w

Make script executable with: chmod +x count_pdf_words.sh

*Open texstudio -> Options -> Configure -> Build -> User defined commands -> Add

*

*First field: user#:Count words in pdf

*Second field: <path>/count_pdf_words.<ext> %.pdf

*Replace # with the actual number of your user command (First field)

*Replace <path> with the path to the script (Second field)

*Replace <ext> with the extension of the script (Second field)

*Execute the command with:
texstudio -> Tools -> User -> Count words in pdf

A: Adding onto keocra's solution, here is a PowerShell script that works nicely when used the same way on Windows:
$file=$args[0]
If (-not $file) {
    echo "Please provide a file to query"
    exit 1
}

echo "Counting words in $file"
$result = pdftotext $file - | Measure-Object -Word
$wordCount = $result.Words
echo "Result: $wordCount"

Make sure you prefix the command with either powershell or pwsh in the second (i.e. command) field for your user command, to ensure the script actually runs:
e.g. pwsh "C:\Users\evanjs\scripts\count_pdf_words.ps1" %.pdf
See the Measure-Object documentation for more info on the cmdlet.

Another note: I initially tried using xpdf-utils via Chocolatey, but found that the stdout (-) flag did not work.
While the version of Poppler on Chocolatey seems to be a little outdated, it does output to stdout when given the - flag.


text:
Q: Java autoflush TCP/IP server Hello sorry disturbing everyone here, I need some help coding in Netbeans for TCP/IP Server, the thing is that the implementation I got is creating the socket but I'm using TCP/IP Builder Application to test my program.
The problem comes when I'm trying to receive some data because TCP/IP Builder Needs to close the socket in order to flush to the Netbeans app, please help me (:

package my.protinterface;
import java.awt.Image;
import javax.swing.ImageIcon;
import java.sql.*;
import java.io.*;
import java.net.*;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author mauricio_gonzalez
 */
public class PROTInterface extends javax.swing.JFrame {

    /**
     * Creates new form PROTInterface
     */
    public PROTInterface() {
        initComponents();
    }

    //FRAME LOGO
    Image img =(new ImageIcon(getClass().getResource("logo.png"))).getImage();

    //SQL
    Connection con;

    //TCP/IP
    public static ArrayList clientOutputStreams;
    public static ArrayList<String> users;

    //Classes
    protocols.SQLConnection sqlconnection = new protocols.SQLConnection();
    protocols.TCP_IP tcp_ip = new protocols.TCP_IP();

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        Label_Protocols1 = new javax.swing.JLabel();
        Label_Protocols2 = new javax.swing.JLabel();
        ComboBox_Protocols_Protocol = new javax.swing.JComboBox();
        ComboBox_Protocols_Port = new javax.swing.JComboBox();
        Button_Protocols_Start = new javax.swing.JButton();
        Button_Protocols_Clean = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        ComboBox_Database_Name = new javax.swing.JComboBox();
        ComboBox_Database_Field = new javax.swing.JComboBox();
        Label_Database1 = new javax.swing.JLabel();
        Label_Database2 = new javax.swing.JLabel();
        Button_Database_Connect = new javax.swing.JButton();
        Button_Database_Test = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        TextArea_Protocols = new javax.swing.JTextArea();
        jScrollPane2 = new javax.swing.JScrollPane();
        TextArea_Database = new javax.swing.JTextArea();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Smart Manufacturing Interface");
        setIconImage(img);
        setResizable(false);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Protocols"));

        Label_Protocols1.setText("Protocol");

        Label_Protocols2.setText("Port");

        ComboBox_Protocols_Protocol.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "OPC-UA", "TCP/IP", "UDP" }));

        ComboBox_Protocols_Port.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "7171", "7172" }));

        Button_Protocols_Start.setText("Start Server");
        Button_Protocols_Start.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Button_Protocols_StartActionPerformed(evt);
            }
        });

        Button_Protocols_Clean.setText("Clean Record");
        Button_Protocols_Clean.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Button_Protocols_CleanActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(Label_Protocols1)
                            .addComponent(Label_Protocols2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(ComboBox_Protocols_Port, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(ComboBox_Protocols_Protocol, 0, 130, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(Button_Protocols_Clean)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(Button_Protocols_Start)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Label_Protocols1)
                    .addComponent(ComboBox_Protocols_Protocol, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Label_Protocols2)
                    .addComponent(ComboBox_Protocols_Port, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Button_Protocols_Start)
                    .addComponent(Button_Protocols_Clean)))
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Database"));
        jPanel2.setPreferredSize(new java.awt.Dimension(267, 152));

        ComboBox_Database_Name.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ADA", "Smart_Manufacturing" }));

        ComboBox_Database_Field.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "All", "User Level", "Name", "User Name", "Email", "Employee Number", "Job Title", "MAC", "PC Active", "LAP Active", "Cellphone", "Birthday", "Shoes Number", "Admission Date" }));

        Label_Database1.setText("Database");

        Label_Database2.setText("Field");

        Button_Database_Connect.setText("Connect");
        Button_Database_Connect.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Button_Database_ConnectActionPerformed(evt);
            }
        });

        Button_Database_Test.setText("Test");
        Button_Database_Test.setEnabled(false);
        Button_Database_Test.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Button_Database_TestActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(Label_Database2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(ComboBox_Database_Field, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(Label_Database1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(Button_Database_Test, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(ComboBox_Database_Name, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Button_Database_Connect, javax.swing.GroupLayout.Alignment.TRAILING)))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ComboBox_Database_Name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Label_Database1))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ComboBox_Database_Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Label_Database2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Button_Database_Connect)
                    .addComponent(Button_Database_Test)))
        );

        TextArea_Protocols.setEditable(false);
        TextArea_Protocols.setColumns(20);
        TextArea_Protocols.setLineWrap(true);
        TextArea_Protocols.setRows(5);
        TextArea_Protocols.setToolTipText("Text generated by communicated devices");
        TextArea_Protocols.setSelectionColor(new java.awt.Color(255, 102, 102));
        jScrollPane1.setViewportView(TextArea_Protocols);

        TextArea_Database.setEditable(false);
        TextArea_Database.setColumns(20);
        TextArea_Database.setLineWrap(true);
        TextArea_Database.setRows(5);
        TextArea_Database.setToolTipText("Text generated by Database connection actions");
        TextArea_Database.setSelectionColor(new java.awt.Color(255, 102, 102));
        jScrollPane2.setViewportView(TextArea_Database);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>

    private void Button_Database_ConnectActionPerformed(java.awt.event.ActionEvent evt) {
        try {
            con = sqlconnection.doDatabaseConnection(ComboBox_Database_Name.getSelectedItem().toString());
        } catch (ClassNotFoundException | SQLException ex) {
            Logger.getLogger(PROTInterface.class.getName()).log(Level.SEVERE, null, ex);
        }
        Button_Database_Test.setEnabled(true);
    }

    private void Button_Database_TestActionPerformed(java.awt.event.ActionEvent evt) {
        String textbuffer = "";
        try {
            textbuffer = sqlconnection.getDatabaseTest(con,ComboBox_Database_Field.getSelectedItem().toString());
        } catch (SQLException ex) {
            Logger.getLogger(PROTInterface.class.getName()).log(Level.SEVERE, null, ex);
        }
        if(!"".equals(textbuffer))
            TextArea_Database.setText(textbuffer);
        else
            TextArea_Database.setText("No Textbuffer");
    }

    private void Button_Protocols_CleanActionPerformed(java.awt.event.ActionEvent evt) {
        TextArea_Protocols.setText("");
    }

    private void Button_Protocols_StartActionPerformed(java.awt.event.ActionEvent evt) {
        if("Start Server".equals(Button_Protocols_Start.getText())){
            if("TCP/IP".equals(ComboBox_Protocols_Protocol.getSelectedItem())){
                Thread starter = new Thread(new ServerStart());
                starter.start();
                TextArea_Protocols.append("Server started...\n");

                ComboBox_Protocols_Protocol.setEnabled(false);
                ComboBox_Protocols_Port.setEnabled(false);
                Button_Protocols_Start.setText("End Server");
            }
        }
        else if("End Server".equals(Button_Protocols_Start.getText())){
            if("TCP/IP".equals(ComboBox_Protocols_Protocol.getSelectedItem())){
                tcp_ip.tellEveryone("Server:is stopping and all users will be disconnected.\n:Chat", TextArea_Protocols);
                TextArea_Protocols.append("Server stopping... \n");
                try
                {
                    Thread.sleep(5000);                 //5000 milliseconds is five second.
                }
                catch(InterruptedException ex) {Thread.currentThread().interrupt();}
                TextArea_Protocols.setText("");

                ComboBox_Protocols_Protocol.setEnabled(true);
                ComboBox_Protocols_Port.setEnabled(true);
                Button_Protocols_Start.setText("Start Server");
            }
        }
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(PROTInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(PROTInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(PROTInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(PROTInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new PROTInterface().setVisible(true);
            }
        });
    }

    //TCP/IP
    public class ClientHandler implements Runnable{
        BufferedReader reader;
        Socket sock;
        PrintWriter client;

        public ClientHandler(Socket clientSocket, PrintWriter user) {
            client = user;
            try
            {
                sock = clientSocket;
                InputStreamReader isReader = new InputStreamReader(sock.getInputStream());
                reader = new BufferedReader(isReader);
            }
            catch (Exception ex)
            {
                TextArea_Protocols.append("Unexpected error... \n");
            }
        }

        public void run() {
            String message, connect = "Connect", disconnect = "Disconnect", chat = "Chat" ;
            String[] data;

            try
            {
                while ((message = reader.readLine()) != null){
                    TextArea_Protocols.append("Received: " + message + "\n");
                    data = message.split(":");

                    for (String token:data)
                    {
                        TextArea_Protocols.append(token + "\n");
                    }

                    if (data[2].equals(connect))
                    {
                        tcp_ip.tellEveryone((data[0] + ":" + data[1] + ":" + chat), TextArea_Protocols);
                        tcp_ip.userAdd(data[0], TextArea_Protocols);
                    }
                    else if (data[2].equals(disconnect))
                    {
                        tcp_ip.tellEveryone((data[0] + ":has disconnected." + ":" + chat), TextArea_Protocols);
                        tcp_ip.userRemove(data[0], TextArea_Protocols);
                    }
                    else if (data[2].equals(chat))
                    {
                        tcp_ip.tellEveryone(message, TextArea_Protocols);
                    }
                    else
                    {
                        TextArea_Protocols.append("No Conditions were met. \n");
                    }
                }
            }
            catch (Exception ex)
            {
               TextArea_Protocols.append("Lost a connection. \n");
               //ex.printStackTrace();
               clientOutputStreams.remove(client);
            }
 }
    }

    public class ServerStart implements Runnable {
        @Override
        public void run()
        {
            clientOutputStreams = new ArrayList();
            users = new ArrayList();

            try
            {
                ServerSocket serverSock = new ServerSocket(Integer.parseInt(ComboBox_Protocols_Port.getSelectedItem().toString()));

                while (true)
                {
                    Socket clientSock = serverSock.accept();
                    PrintWriter writer = new PrintWriter(clientSock.getOutputStream());
                    clientOutputStreams.add(writer);

                    Thread listener = new Thread(new ClientHandler(clientSock, writer));
                    listener.start();
                    TextArea_Protocols.append("Got a connection. \n");
                }
            }
            catch (NumberFormatException | IOException ex)
            {
                TextArea_Protocols.append("Error making a connection. \n");
            }
        }
    }
    //TCP/IP

/*
 * The application has been developed and supported by mauricio_gonzalez
 * Automation Development Area of Sanmina P02 has the rights of the application
 * Don't modify the code without permission, please contact us by mauricio.gonzalez@sanmina.com | yair.avalos@sanmina.com
 */
package protocols;

import java.io.*;
import java.util.*;
import javax.swing.JTextArea;

/**
 *
 * @author mauricio_gonzalez
 */
public class TCP_IP {
    public void userAdd (String data, JTextArea textarea)
    {
        String message, add = ": :Connect", done = "Server: :Done", name = data;
        textarea.append("Before " + name + " added. \n");
        my.protinterface.PROTInterface.users.add(name);
        textarea.append("After " + name + " added. \n");
        String[] tempList = new String[(my.protinterface.PROTInterface.users.size())];
        my.protinterface.PROTInterface.users.toArray(tempList);

        for (String token:tempList)
        {
            message = (token + add);
            tellEveryone(message, textarea);
        }
        tellEveryone(done, textarea);
    }

    public void userRemove (String data, JTextArea textarea)
    {
        String message, add = ": :Connect", done = "Server: :Done", name = data;
        my.protinterface.PROTInterface.users.remove(name);
        String[] tempList = new String[(my.protinterface.PROTInterface.users.size())];
        my.protinterface.PROTInterface.users.toArray(tempList);

        for (String token:tempList)
        {
            message = (token + add);
            tellEveryone(message, textarea);
        }
        tellEveryone(done, textarea);
    }

    public void tellEveryone(String message, JTextArea textarea)
    {
 Iterator it = my.protinterface.PROTInterface.clientOutputStreams.iterator();

        while (it.hasNext())
        {
            try
            {
                PrintWriter writer = (PrintWriter) it.next();
  writer.println(message);
  textarea.append("Sending: " + message + "\n");
                writer.flush();
                textarea.setCaretPosition(textarea.getDocument().getLength());

            }
            catch (Exception ex)
            {
  textarea.append("Error telling everyone. \n");
            }
        }
    }
}

A: *SOLVED
After a spent day of investigation and hard work :) I found the problem wasn't at all the code of java.
The key was the following!

BufferedReader.readLine()

Results than BufferedReader has the methode readLine that only reads if a return carriage or commonly known as \r is sent in the buffer
Anyways I was using the program TCP/IP Builder rev 1.9 but I was sending the data without the \r and in this program you hasn't the option to add ASCII code.
I solved this using Hercules and testing TCP communication, and well it works!

BufferReader.read()

.read() doesn't need the \r but it returns the code char by char and the try catch statement don´t leave me include this option.
Rewards, I hope it will be usefull for anyone.
Note:

Not all the communication external programs for TCP/IP needs the \r or \n to communicatie by TCP, it was an special exception for .readList() Java function.


text:
Q: Where function equivalent for eager loading in rails I am trying to optimize my code with eager loading, but when ever where function is called, a query is executed in logs.
@votes_list = Vote.joins(:user => :profile).where(:post_id => post.id)
@male_votes = @votes_list.where(:profiles => { :gender => 1 }).count
@female_votes = @votes_list.where(:profiles => { :gender => 2 }).count

I am trying to make few queries after the first one, without need to fetch from database, how to do it?

A: You want to eagerly load the Users and their Profile for each vote.  Then you can select the sub-set of votes in-memory broken down by gender on the profile.
@votes_list = Vote.where(:post_id => post.id, :include => { :user => :profile })
@male_votes = @votes_list.select {|v| v.user.profile.gender == 1}
@female_votes = @votes_list.select {|v| v.user.profile.gender == 2}


text:
Q: Keep track of UIView position during translation animation I know this has been asked before but all the answers were provided in Objective C and I'm looking for a Swift solution. If I've missed an existing Swift solution, please let me know and I'll close this question.
This is how I'm animating view:
UIView.animate(withDuration: 10.0, animations: { () in
   let translateTransform = CGAffineTransform.init(translationX: 0.0, y: Constants.screenHeight)
   self.icon.transform = translateTransform
})

What I'd like to do is keep track of current frame position throughout the animation. Do I need to take a different approach to achieve that?

A: You may want to try this to get a view's frame during an animation:
let currentFrame = myView.layer.presentation()!.frame

That will get you the frame at the time the code runs so if you wanted a record of the frames throughout the animation you may want to use a Timer (previously NSTimer).
In this example the optional is force unwrapped so if you're not sure if it's nil or not you may want to use an if-let statement.
Hope this helps and let me know if you have any other problems.

A: UIView.frame is observable. Try to use KVO for the frame keyPath:
view.addObserver(self, forKeyPath:"frame", options:.new, context:nil)

override func observeValue(forKeyPath keyPath: String, ofObject object: Any, change: [String: id], context: UnsafeMutableRawPointer) {
    print("value of \(keyPath) changed: \(change[NSKeyValueChangeNewKey])")
}

KVO doesn't work for classes that don't extend NSObject.
In order to use key-value observing with a Swift class you should inherit from NSObject.
Add the dynamic modifier to any property you want to observe.
More on dynamic: https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithObjective-CAPIs.html#//apple_ref/doc/uid/TP40014216-CH4-ID57
class YourClass: NSObject {
    dynamic var view: UIView = ...
}

Full article on KVO:
https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/AdoptingCocoaDesignPatterns.html#//apple_ref/doc/uid/TP40014216-CH7-XID_8


text:
Q: Magento2 : How to setup PWA in Localhost? I want to setup PWA in localhost. I have tried in localhost but at last its giving dynamic staging server URL like below
https://magento-venia.local.pwadev:51828/

How can we change it to our localhost server URL.

A: alright you just need to update .env for variable CUSTOM_ORIGIN_EXACT_DOMAIN
 # vi .env
 # update value
   CUSTOM_ORIGIN_EXACT_DOMAIN="pwa.dev"
 # now run
   yarn buildpack create-custom-origin ./
 # Acquired custom hostname and SSL cert for pwa.dev. Development server will run on port 8626 and staging server will run on port 9626
 # Run server again
   yarn watch
 # Project is running at https://pwa.dev:8626/

Official pwa setup guide And Create custom origin guide
let me know if this works

A: If you checked the steps and results from PWA documentation: https://magento-research.github.io/pwa-studio/venia-pwa-concept/setup/ you will see that actually you got the local dev URL for your PWA development server. Check to add that URL to your hosts file in case that is not working for your setup.

A: Magento 2.3.1 PWA setup on local server
Requirements:
Nodejs > 10.14.1 installed
yarn > 1.13.0 installed
A running instance of Magento 2.3.1 or above
Steps to Setup PWA in local server

*

*Clone the PWA studio repository in the development environment: git clone https://github.com/magento-research/pwa-studio.git

*Install yarn from your pwa-studio root directory yarn install

*Create the .env file at location pwa-studio\packages\venia-concept\ using following command
MAGENTO_BACKEND_URL="https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/" yarn buildpack create-env-file packages/venia-concept

*Set the MAGENTO_BACKEND_URL. You can use the value provided in the example command or use your Magento instance url. This URL points to a cloud instance of Magento 2.3.1 with the Venia sample data installed.

*Generate SSL Certificate using yarn buildpack create-custom-origin packages/venia-concept

*Build artifacts for Venia using the following command from the project root directory
yarn run build

*Start the Venia development environment using the following command
yarn run watch:venia

*You can browse your PWA Magneto application at https://magento-venia-concept-j2188.local.pwadev:8119
Hope this solution will work for you.


text:
Q: Envision vs Envisage Is there a context where envision is not a synonym of envisage, or vice versa?
Envisage's definition:

contemplate or conceive of as a possibility or a desirable future event

Envision's definiton

imagine as a future possibility; visualize:

Visualise's definition seems to be relevant to envision only in so far as it means imagine, which seems to me to be synonymous with "contemplate or conceive of".

A: The definition and usage of both words overlap a lot, but there is one difference I can perhaps think of. Envisage is commonly used as a synonym for predict or anticipate. Envision is less likely to be used for the same.

I do not envisage a growth in telecommunications sector in the next two years.

Envision, on the other hand, could be used when you imagine something fancy or a remote possibility. To quote an example from here,

"I can't envision him on horseback!"

The difference may be one that never exists in practice, but I do feel envisage is commoner in business circles than envision.

A: From OED, we have the earlier "envisage" as

Etymology: < French envisage-r, < en- (see en- prefix1) + visage visage n., face.

*

*transitive. To look in the face of; figurative to face (danger, etc.); to look straight at.
1820   J. Keats Hyperion: a Fragm. ii, in Lamia & Other Poems 178   To envisage circumstance, all calm, That is the top of sovereignty.

This quickly (16  years later) took on a broader meaning

2.a. To obtain a mental view of, set before the mind's eye; to contemplate; chiefly, to view or regard under a particular aspect.
1836   J. Herschel in C. Babbage 9th Bridgewater Treat. (1837) App. I. 211   Envisaging the case algebraically.

This is probably a slight misunderstanding of the original "envisage" justified by the fact that one could not look something in the face without having a mental picture of the whole.
The word "envision" is first recorded a century later,

Etymology: < en- prefix + vision n.

transitive. To see or foresee as in a vision; to envisage; to visualize.
1921   L. Strachey Queen Victoria vii. 221   His blackest hypochondria had never envisioned quite so miserable a Catastrophe.

These demonstrate the transition from the original "envisage" in which one had to envisage (face) something and thus by envisaging it, one could not help but mentally see the whole thing, i.e. to envision which, I suspect, was a misunderstanding or eggcorn of envisage in its slightly later sense.
Any difference that there now is, is in the nuance that envisage is what most people do, and envision is a more formal action with less of the figurative but much the same thing.

A: It seems to be a regional distinction.   British English prefers envisage, but American English prefers envision.  There's a long explanation here as to the history.
British:

American:

As an American English speaker, I don't think I've ever seen envisage in general usage.

A: An amusing Australian site states that "envisage" is to anticipate or contemplate about something real, and "envision" is to imagine or mentally picture anything.  See https://www.writerscentre.com.au/blog/qa-envisage-vs-envision/. It also appears that "envision" is an American invention coming quite a bit later than "envisage" but apparently it is the process of replacing it elsewhere too.

A: Envision could be imagining some future event occurring where envisage could be the liklihood of it happening a reality.

A: I saw the best distinction between the two words I have ever seen at https://grammarist.com/usage/envision-envisage/.


text:
Q: Scaling issues using seaborn 2D kde plotting in jupyter notebooks in vscode I am having an issue using any type of 2D kde plotting in seaborn. The y axis seems to be scaled very off.
I am running this on vscode in a jupyter notebook using the most recent version of seaborn
For example here's a joint plot I made using the following code
sns.jointplot( data=df,x='shear', y='sat_norm')

If I added kind='kde' I get the following plot

Here is the dataframe
df = pd.DataFrame({'shear': {2926: 19.975084119123906,
  2927: 37.18992996260234,
  2928: 51.65416419774487,
  2929: 21.366039009849093,
  2930: 25.88113171541938,
  2931: 22.003321443992395,
  2932: 31.496004487542184,
  2933: 22.806658663854996,
  2934: 18.263753872890693,
  2935: 21.843535334409005,
  2936: 22.251521128568648,
  2937: 17.453526457774004,
  2938: 26.235506324206867,
  2939: 26.08460755717408,
  2940: 21.01288945206868,
  2941: 25.33981656045819,
  2942: 49.85884696525539,
  2943: 19.061595197518667,
  2944: 22.055520930078348,
  2945: 16.054620367398364,
  2946: 26.066791106216126,
  2947: 22.236281781977116,
  2948: 37.80238579544662,
  2949: 51.94723853020805,
  2950: 22.702581581004345,
  2951: 24.4522078028404,
  2952: 17.41624216049658,
  2953: 67.09339642489113,
  2954: 21.96540029445359,
  2955: 24.233579977649505,
  2956: 25.20795121022604,
  2957: 21.6562261240387,
  2958: 27.0494142444042,
  2959: 17.54011287370428,
  2960: 18.697396725806808,
  2961: 49.02470441232235,
  2962: 28.02949303327629,
  2963: 22.674408982927357,
  2964: 26.819193426295584,
  2965: 18.68829418353226,
  2966: 20.292178837509542,
  2967: 23.234931682849908,
  2968: 29.397400989980607,
  2969: 19.95402826389817,
  2970: 24.957673090371784,
  2971: 17.22794143393881,
  2972: 27.22918907908201,
  2973: 16.529767400405497,
  2974: 42.68947747724305,
  2975: 18.83595171533085,
  2976: 64.61656348219817,
  2977: 23.2121326465775,
  2978: 21.816822597662988,
  2979: 23.761938954618433,
  2980: 22.3746860746278,
  2981: 26.600268661739896,
  2982: 21.29366923486611,
  2983: 18.870637650525715,
  2984: 18.0135587737032,
  2985: 28.579495906843647,
  2986: 23.08910506826203,
  2987: 16.991256497257385,
  2988: 21.910669873428414,
  2989: 22.745460577656054,
  2990: 28.087960913333255,
  2991: 24.593572667309093,
  2992: 23.68344996824954,
  2993: 19.56258466373067,
  2994: 20.729275751863117,
  2995: 31.123352426565056,
  2996: 22.69929042259365,
  2997: 17.368592485355563,
  2998: 14.627810074160967,
  2999: 28.823280792433035,
  3000: 19.754066305436545,
  3001: 23.324700614940532,
  3002: 26.47495965529144,
  3003: 21.16875134159095,
  3004: 27.760959873292258,
  3005: 14.348219278854636,
  3006: 30.20594854688264,
  3007: 22.817925468969722,
  3008: 51.31924699875957,
  3009: 24.78894585681497,
  3010: 26.432661518392234,
  3011: 27.89357450514707,
  3012: 26.970093749475357,
  3013: 21.02569280936871,
  3014: 22.12185950151961,
  3015: 24.613641261417587,
  3016: 25.715621215314442,
  3017: 20.139338471731005,
  3018: 63.43726789834157,
  3019: 21.95660274621662,
  3020: 17.57150775922831,
  3021: 22.799002514857296,
  3022: 24.30947115457631,
  3023: 38.78531176909338,
  3024: 17.317025774559223,
  3025: 58.05633075980396,
  3026: 22.40120591638024,
  3027: 16.474196259602476,
  3028: 23.008901508439322,
  3029: 27.052166772402355,
  3030: 16.268267289546664,
  3031: 20.59541270567702,
  3032: 17.576224362281536,
  3033: 21.162922416273123,
  3034: 20.499085680087386,
  3035: 19.494097962357998,
  3036: 24.13206179697415,
  3037: 16.269648726284363,
  3038: 48.58762227953283,
  3039: 29.551299737023633,
  3040: 26.101254128007504,
  3041: 17.317268318386706,
  3042: 32.46629758875325,
  3043: 24.71571228307016,
  3044: 19.35706170986814,
  3045: 20.560136479143942,
  3046: 22.001499305559744,
  3047: 21.59796331294092,
  3048: 23.676277388534153,
  3049: 22.501793272127696,
  3050: 20.94671604929895,
  3051: 15.38574393944058,
  3052: 19.575009700744143,
  3053: 28.646232828103965,
  3054: 27.322101993118178,
  3055: 23.720573186908574,
  3056: 16.074319565349974,
  3057: 33.32134722818074,
  3058: 20.285122238374313,
  3059: 22.295064706926176,
  3060: 34.490917532259495,
  3061: 18.106393765182247,
  3062: 26.079044677691964,
  3063: 21.398745617756557,
  3064: 22.823506303815478,
  3065: 18.47791054171732,
  3066: 24.859219981415045,
  3067: 26.198412760892914,
  3068: 20.267591262597996,
  3069: 21.82305211316018,
  3070: 19.27636620134337,
  3071: 17.478282160164976,
  3072: 19.952696824307043,
  3073: 22.913364440080308,
  3074: 37.76115790007609,
  3075: 20.85346866691609,
  3076: 23.228780193503226,
  3077: 25.50770800398135,
  3078: 154.64968647259533,
  3079: 21.422578662230222,
  3080: 24.966601024976427,
  3081: 25.426154717908243,
  3082: 21.116805232982372,
  3083: 22.632575463152595,
  3084: 22.886517089084677,
  3085: 24.277410967593962,
  3086: 15.699314600829556,
  3087: 22.958603899109278,
  3088: 22.044843305150188,
  3089: 27.56220569609949,
  3090: 43.980673572995606,
  3091: 22.423081772021522,
  3092: 27.182357473367507,
  3093: 33.67803424641848,
  3094: 20.41465981033934,
  3095: 27.248095301815784,
  3096: 22.86151676393441,
  3097: 23.268617642017404,
  3098: 68.30071743446726,
  3099: 26.266923213663986,
  3100: 21.769676487112715,
  3101: 26.287161783054863,
  3102: 18.055580530943597,
  3103: 26.22059105155836,
  3104: 61.651085035714864,
  3105: 57.59925321337013,
  3106: 25.402073418775522,
  3107: 21.87121677749159,
  3108: 23.959520969025416,
  3109: 22.931472901999985,
  3110: 30.664410550165773,
  3111: 24.456447796217944,
  3112: 23.963950839818253,
  3113: 20.494624094194613,
  3114: 24.446386632345067,
  3115: 20.48368219481315,
  3116: 19.036299549814817,
  3117: 41.615518443890416,
  3118: 21.147150668316563,
  3119: 31.580201171143877,
  3120: 19.157016835209966,
  3121: 32.43860010051985,
  3122: 21.260052352198407,
  3123: 22.170805953238176,
  3124: 21.47586064345611,
  3125: 16.90389006567038,
  3126: 22.735171593017142,
  3127: 16.030681426522698,
  3128: 21.652106292110908,
  3129: 18.12806740305722,
  3130: 29.811987353964653,
  3131: 24.43197355182225,
  3132: 21.90778400548135,
  3133: 28.86605821502271,
  3134: 20.112216725955758,
  3135: 23.761281501081843,
  3136: 25.22139920463274,
  3137: 15.203177547688275,
  3138: 30.422763374825394,
  3139: 22.157386112211423,
  3140: 21.69372169366369,
  3141: 21.810987026660584,
  3142: 20.723168500268393,
  3143: 27.74449055745851,
  3144: 24.904457630647638,
  3145: 22.047822385472085,
  3146: 25.01832066089211,
  3147: 22.018276137680388,
  3148: 20.088413342959406,
  3149: 15.993445041072682,
  3150: 21.71371374209615,
  3151: 16.082029619197886,
  3152: 32.05792895322328,
  3153: 17.744407819978754,
  3154: 55.70427987538514,
  3155: 18.362794732645142,
  3156: 22.64426608839357,
  3157: 29.113946969552394,
  3158: 26.757012356152508,
  3159: 25.762261983367296,
  3160: 19.34709788938167,
  3161: 24.18484307769119,
  3162: 22.553476113759842,
  3163: 30.50485094832699,
  3164: 20.694598474306886,
  3165: 28.184680719605062,
  3166: 32.459182537984894,
  3167: 31.03834684697883,
  3168: 24.236856644856644,
  3169: 20.951297414339873,
  3170: 29.06696754419465,
  3171: 18.314385153991775,
  3172: 26.670006256595457,
  3173: 32.33484052517219,
  3174: 35.17548961043394,
  3175: 19.433655030843994,
  3176: 23.426508811737975,
  3177: 29.836281671110537,
  3178: 17.52731479901806,
  3179: 29.664620835401056,
  3180: 27.53450923102898,
  3181: 16.15156454873936,
  3182: 24.047066063357363,
  3183: 24.328812884327533,
  3184: 28.77066063308311,
  3185: 21.294756750733153,
  3186: 32.30092596611739,
  3187: 22.365458703849463,
  3188: 17.71897199732507,
  3189: 20.694747276268178,
  3190: 28.30708238799532,
  3191: 24.550369980039946,
  3192: 22.473263779819728,
  3193: 46.206823904042665,
  3194: 22.84565111792051,
  3195: 24.693088499018018,
  3196: 21.35567940577615,
  3197: 21.772696582437742,
  3198: 15.381351647852547,
  3199: 24.190579213521115,
  3200: 16.39477909929456,
  3201: 17.65643552693443,
  3202: 27.339659660966703,
  3203: 39.5147899418398,
  3204: 18.573252606961827,
  3205: 22.956243874401025,
  3206: 21.30509167881524,
  3207: 18.657391730118253,
  3208: 33.73258147365398,
  3209: 30.563833421719643,
  3210: 14.799722137924599,
  3211: 26.10835192010799,
  3212: 25.761074251010914,
  3213: 25.5305889925765,
  3214: 27.366421153974805,
  3215: 30.298344119217862,
  3216: 20.21500703752887,
  3217: 18.943906561450262,
  3218: 11.110380896712302,
  3219: 21.602907461113226,
  3220: 21.65778690532797,
  3221: 25.092031980476886,
  3222: 22.168242703458173,
  3223: 34.13360960521324,
  3224: 32.85419435056053,
  3225: 24.95964964821845,
  3226: 20.566832343882457,
  3227: 28.902688495336445,
  3228: 25.68032188536316,
  3229: 21.91925322608175,
  3230: 21.74823459622609,
  3231: 30.199148817991183,
  3232: 19.802908344937737,
  3233: 72.59672195495457,
  3234: 19.000731682483977,
  3235: 26.08083305484179,
  3236: 28.172938187947793,
  3237: 28.54592307929016,
  3238: 20.61187922938536,
  3239: 21.439840751993195,
  3240: 24.809915948089255,
  3241: 20.258818907270747,
  3242: 30.82223837747568,
  3243: 21.46849677120921,
  3244: 43.833305153367945,
  3245: 21.48131003434437,
  3246: 18.704356682930246,
  3247: 30.981368592151796,
  3248: 20.74497628133169,
  3249: 25.572729645076663,
  3250: 21.97903261637823,
  3251: 26.41325760933552,
  3252: 25.02905658014098,
  3253: 22.048768823153416,
  3254: 20.405114990567906,
  3255: 26.939996555490225,
  3256: 23.65320440065122,
  3257: 18.681780153173904,
  3258: 19.91990654962736,
  3259: 24.95133883909782,
  3260: 25.224840307263932,
  3261: 22.256798776962746,
  3262: 37.509249463074326,
  3263: 21.592171534041086,
  3264: 24.57329324708115,
  3265: 18.380544415863604,
  3266: 114.30061290307707,
  3267: 69.23295048182472,
  3268: 23.86837415915518,
  3269: 18.524515595838597,
  3270: 14.749481631515712,
  3271: 23.434258303343587,
  3272: 25.45163835536971,
  3273: 23.821170738593644,
  3274: 29.17663302640461,
  3275: 22.54226873382749,
  3276: 18.86399020878391,
  3277: 19.484587514274928,
  3278: 29.477312389168006,
  3279: 27.23898018937548,
  3280: 24.509014800261028,
  3281: 22.87586294995894,
  3282: 21.524909738378014,
  3283: 22.966663902396125,
  3284: 26.199036200324002,
  3285: 17.056243489245443,
  3286: 14.603747715576533,
  3287: 31.391293489119196,
  3288: 21.187947739013048,
  3289: 19.30100760747643,
  3290: 25.669018196775824,
  3291: 20.767744872752417,
  3292: 19.994813234291026,
  3293: 28.324963399397674,
  3294: 89.93470842348952,
  3295: 28.647004367984742,
  3296: 26.358872247057036,
  3297: 22.442202294030963,
  3298: 21.686355650880145,
  3299: 28.114631449515684,
  3300: 22.739398305378515,
  3301: 26.75059398849741,
  3302: 32.54167844768572,
  3303: 22.56411117410378,
  3304: 23.573119890554537,
  3305: 25.199720515052917,
  3306: 21.345180653214243,
  3307: 27.341241105735918,
  3308: 117.38463505412976,
  3309: 29.46200537533208,
  3310: 24.73514038960689,
  3311: 59.342760274246544,
  3312: 20.20119605118326,
  3313: 18.97279682573434,
  3314: 76.3083779165505,
  3315: 19.336077484297142,
  3316: 19.382313787306277,
  3317: 41.11746447704792,
  3318: 23.25954033909042,
  3319: 16.561841804706557,
  3320: 26.11488152513921,
  3321: 21.972389475723073,
  3322: 13.3484253662771,
  3323: 17.71502840090667,
  3324: 37.030297670378474,
  3325: 18.979545174265613,
  3326: 14.563231176914432,
  3327: 14.071220581679503,
  3328: 24.582873740884402,
  3329: 16.249786832275948,
  3330: 20.8743784683285,
  3331: 23.417316001858108,
  3332: 25.790912040097076,
  3333: 24.26677305840325,
  3334: 39.74392359098732,
  3335: 22.57573851125257,
  3336: 23.804236343256964,
  3337: 25.35855648456175,
  3338: 22.660598726926484,
  3339: 26.324218000154065,
  3340: 17.71584115267611,
  3341: 25.878527486449155,
  3342: 30.860662815823805,
  3343: 22.449525974655188,
  3344: 50.66587340148203,
  3345: 21.177853030962115,
  3346: 14.712591426646243,
  3347: 28.677919083705824,
  3348: 15.92788516771436,
  3349: 40.15212384794048,
  3350: 21.662867761976756,
  3351: 39.342084055309584,
  3352: 22.603215231509417,
  3353: 21.48806375218102,
  3354: 22.66197343974102,
  3355: 22.321933646622515,
  3356: 23.84235241970662,
  3357: 14.121553043234858,
  3358: 23.486901283020988},
 'sat_norm': {2926: 1.0141303475223522,
  2927: 0.9733236215139842,
  2928: 0.9756554174237216,
  2929: 1.0099207357530506,
  2930: 0.9975761719630378,
  2931: 1.0129096910475675,
  2932: 0.9786926801475617,
  2933: 0.9908656373164296,
  2934: 0.9970394923514415,
  2935: 1.005674002082544,
  2936: 1.005021497284611,
  2937: 1.0161199804756804,
  2938: 1.0363069106614862,
  2939: 0.9806810927639837,
  2940: 1.0063564631328514,
  2941: 0.9825850865776511,
  2942: 0.9732562949008152,
  2943: 1.0269564194628276,
  2944: 1.003094925512918,
  2945: 0.9671167933414888,
  2946: 1.0013530987500987,
  2947: 1.012620053099494,
  2948: 0.945333204962046,
  2949: 0.9493019269069891,
  2950: 1.0243869876691205,
  2951: 0.9875776394419525,
  2952: 1.014226704779202,
  2953: 1.1441733309012085,
  2954: 1.0098306860788355,
  2955: 1.0112540732797426,
  2956: 1.0009007298514452,
  2957: 1.0031269217775836,
  2958: 1.0278161268448935,
  2959: 1.0281457445784514,
  2960: 1.0115302001302269,
  2961: 0.9467480202845605,
  2962: 0.986573840734246,
  2963: 1.0141667144051463,
  2964: 0.9919068941896825,
  2965: 1.0085470311595268,
  2966: 1.0239054729248376,
  2967: 1.020538594058465,
  2968: 0.9948037348335896,
  2969: 1.0000969952813026,
  2970: 0.9919358997157075,
  2971: 0.9865637322024756,
  2972: 0.9998144518254726,
  2973: 1.0384452044441854,
  2974: 1.0080621690463638,
  2975: 1.0038839891742648,
  2976: 0.7143700621007412,
  2977: 1.0116723180512366,
  2978: 1.002079892535924,
  2979: 0.9808321216512758,
  2980: 1.0087935611047916,
  2981: 0.9932734337994568,
  2982: 1.056053132112779,
  2983: 1.0090579395241217,
  2984: 1.043154291417837,
  2985: 0.9891474778026144,
  2986: 1.0078760421110455,
  2987: 1.0390994458808522,
  2988: 1.021500184811433,
  2989: 0.9820169306265438,
  2990: 0.9847542241091106,
  2991: 1.0023197357830598,
  2992: 0.9881497088210198,
  2993: 1.0007942255306042,
  2994: 0.9868521740426361,
  2995: 0.9976319230889843,
  2996: 0.9808259808345197,
  2997: 1.0089515333435197,
  2998: 1.0388564015901953,
  2999: 1.0394318308487667,
  3000: 0.989429503084552,
  3001: 0.9729318292767275,
  3002: 0.9830549449800551,
  3003: 1.0063864670370668,
  3004: 1.0094163115130153,
  3005: 1.0072721007183743,
  3006: 0.9727134576379306,
  3007: 1.0233183713752592,
  3008: 0.932454854069319,
  3009: 0.9597686813204497,
  3010: 0.9627794479131333,
  3011: 0.9917068792359007,
  3012: 0.9747526520274972,
  3013: 1.0141702137648954,
  3014: 1.014375552871234,
  3015: 0.9973514732748298,
  3016: 1.0189635513949493,
  3017: 1.0266619196435436,
  3018: 0.8471464234451554,
  3019: 1.0065018442787594,
  3020: 1.0340011514739993,
  3021: 0.9964158870473083,
  3022: 0.9994329413763793,
  3023: 0.9380893107563972,
  3024: 1.0314589385302961,
  3025: 0.9584379372366154,
  3026: 0.9812911761201308,
  3027: 1.0154804233431014,
  3028: 1.0101418402805526,
  3029: 0.9697313644706408,
  3030: 1.0151844864590378,
  3031: 1.0036140875531898,
  3032: 0.987943163247401,
  3033: 1.0197577854655344,
  3034: 0.9949138790602514,
  3035: 0.9833904881428734,
  3036: 0.9919522877223199,
  3037: 1.0194947057939645,
  3038: 0.9703447923705733,
  3039: 0.9702700724674647,
  3040: 1.0282465855979164,
  3041: 1.017466431937713,
  3042: 0.9928694050785625,
  3043: 0.9910825382272067,
  3044: 1.0330519034453245,
  3045: 1.0039855182355626,
  3046: 1.0098247317118265,
  3047: 1.0077325171119162,
  3048: 1.0044331430802456,
  3049: 0.9871031077662732,
  3050: 0.9897538066893986,
  3051: 1.0103725841205573,
  3052: 0.9990409444596519,
  3053: 0.9876800873389653,
  3054: 0.9758922018190354,
  3055: 1.0014742094897284,
  3056: 1.0035091361638322,
  3057: 0.9838085247652458,
  3058: 1.0324769301777101,
  3059: 0.9906743386008047,
  3060: 0.9504471794150507,
  3061: 1.0214437719465888,
  3062: 1.0231471558963123,
  3063: 1.0091898090203377,
  3064: 1.007219705537996,
  3065: 1.0181935167382057,
  3066: 1.0084485272843648,
  3067: 0.9977873991311219,
  3068: 0.9967063344866722,
  3069: 1.0186555698079751,
  3070: 1.018630434959776,
  3071: 1.021904062955003,
  3072: 1.0038671326334654,
  3073: 1.0110088914060436,
  3074: 0.9550648309154123,
  3075: 1.0151474203285722,
  3076: 0.9912388582975302,
  3077: 0.9974003801209015,
  3078: 0.9394204743269104,
  3079: 1.005659568554309,
  3080: 0.9852669193908853,
  3081: 0.9868414518060851,
  3082: 1.008418877114411,
  3083: 1.0155361568887487,
  3084: 1.0163444551086582,
  3085: 0.9815060100511532,
  3086: 1.0312826057574334,
  3087: 1.019050022069666,
  3088: 1.0210705312581263,
  3089: 0.9845063655532027,
  3090: 0.9956603434183819,
  3091: 0.9832381568459375,
  3092: 1.0139603153817711,
  3093: 0.969489031901066,
  3094: 1.033757750127164,
  3095: 1.0050231720334837,
  3096: 1.006667766280241,
  3097: 1.0183940525012933,
  3098: 0.9491040222759595,
  3099: 1.0076861164968869,
  3100: 0.9996641797885922,
  3101: 1.0006074369267401,
  3102: 1.00972774629545,
  3103: 1.0270963349754274,
  3104: 0.9578333819209311,
  3105: 0.9714466624884867,
  3106: 0.9885666579064941,
  3107: 1.0113010683219383,
  3108: 0.9992319843784885,
  3109: 1.0004114000629347,
  3110: 1.0138193134401572,
  3111: 1.006525085430953,
  3112: 0.9944118135791852,
  3113: 1.0186248614348443,
  3114: 1.0100135704518438,
  3115: 1.0091167506686884,
  3116: 1.0098806293834064,
  3117: 0.9638557045122921,
  3118: 1.015999870812841,
  3119: 0.9627211115036184,
  3120: 1.0087350427391857,
  3121: 0.9874160935778596,
  3122: 1.0225543680510218,
  3123: 1.0079063171036888,
  3124: 1.009207512327152,
  3125: 0.9911900450767311,
  3126: 1.0236423911979284,
  3127: 0.9355345302307398,
  3128: 0.9985208867670423,
  3129: 1.039289993692001,
  3130: 1.017210237206265,
  3131: 0.9917957615233663,
  3132: 1.003469245023657,
  3133: 0.9908919836132267,
  3134: 1.0137446237364158,
  3135: 1.0147146915697012,
  3136: 0.9962164948924936,
  3137: 0.9755251652614582,
  3138: 1.0135421611010074,
  3139: 0.9925919359103554,
  3140: 1.0214117482048786,
  3141: 1.0162174369083532,
  3142: 1.045039420099494,
  3143: 0.9929976040669614,
  3144: 1.0078929813053041,
  3145: 1.0163671481359722,
  3146: 1.015541542290005,
  3147: 0.9977986941330688,
  3148: 1.038936954445572,
  3149: 1.0062450535988476,
  3150: 1.0241468132695184,
  3151: 1.0091264383157252,
  3152: 0.9968249355229285,
  3153: 1.0236429627787256,
  3154: 0.9884238689893099,
  3155: 1.0045248968201304,
  3156: 1.0035902601720472,
  3157: 1.0419174689892226,
  3158: 0.9940255154909493,
  3159: 0.9915571768309088,
  3160: 1.0307126423593933,
  3161: 1.0011391040200328,
  3162: 1.0204008518722099,
  3163: 1.0072359051911859,
  3164: 1.0221929739190083,
  3165: 0.9893786302985169,
  3166: 1.0054664881635087,
  3167: 1.0087972980055206,
  3168: 1.0138161095745575,
  3169: 1.006951808103303,
  3170: 0.9855570364965628,
  3171: 1.0124769347288143,
  3172: 0.9978266101761321,
  3173: 0.9820386627159355,
  3174: 0.9730491465706549,
  3175: 1.0131329941614906,
  3176: 0.998977323279894,
  3177: 0.991004673628124,
  3178: 1.0143260607788298,
  3179: 0.9850690318852628,
  3180: 0.9754302114147768,
  3181: 1.0060292056464113,
  3182: 0.9917660368872498,
  3183: 1.0154681519605495,
  3184: 0.9877362591474242,
  3185: 1.002035518029517,
  3186: 1.0178364954249204,
  3187: 0.9958208080764865,
  3188: 0.998427014161952,
  3189: 0.9831493142733162,
  3190: 1.0162802077034454,
  3191: 1.0188797765616566,
  3192: 1.018053134612317,
  3193: 0.9779787170153746,
  3194: 1.013345549254806,
  3195: 0.995554419429607,
  3196: 1.0166991661373845,
  3197: 1.0120416698486867,
  3198: 1.0028411553941103,
  3199: 1.0100837947558672,
  3200: 1.069457715568812,
  3201: 1.0172925185264403,
  3202: 1.011646090105101,
  3203: 0.9560110932514179,
  3204: 1.0345736365212173,
  3205: 1.0206104843474877,
  3206: 1.018053409627741,
  3207: 1.0156738634417932,
  3208: 0.9817767220312413,
  3209: 1.0200223585848587,
  3210: 1.0188525480999504,
  3211: 1.0054994185083415,
  3212: 1.002683933261818,
  3213: 1.0236818854994811,
  3214: 1.007368835431748,
  3215: 0.9782865710754324,
  3216: 1.0104499346418758,
  3217: 1.023077999441143,
  3218: 0.9511440757163485,
  3219: 1.0424620452080224,
  3220: 1.0166646841587217,
  3221: 1.0035343229363516,
  3222: 1.0125080592896738,
  3223: 1.0278911167195315,
  3224: 0.9837879385237469,
  3225: 0.9870441337245563,
  3226: 1.0235873161729394,
  3227: 0.98626397530318,
  3228: 1.0267446488796739,
  3229: 1.0174123408298898,
  3230: 1.0220290988911735,
  3231: 0.9766229121500949,
  3232: 1.0086748272798103,
  3233: 0.9506074288899843,
  3234: 1.0204996895032703,
  3235: 0.997829832527079,
  3236: 0.9952501855170656,
  3237: 1.004598925882593,
  3238: 0.9974787334905555,
  3239: 0.9873676631264109,
  3240: 1.0067858410094161,
  3241: 1.0363408093505184,
  3242: 1.0089611853203955,
  3243: 1.0410005419204813,
  3244: 0.9585431825281677,
  3245: 1.0081400264367142,
  3246: 1.0185656307978936,
  3247: 0.9648093042080965,
  3248: 1.0313744189892313,
  3249: 1.0152042063988844,
  3250: 1.020581833964678,
  3251: 1.013291879449966,
  3252: 1.0079281115972072,
  3253: 0.9892044703451868,
  3254: 1.031096675811666,
  3255: 1.0026408625958703,
  3256: 1.0120437396910644,
  3257: 1.025232111592093,
  3258: 1.0379760468945358,
  3259: 0.9786125413157207,
  3260: 0.9959091854575318,
  3261: 1.0126641925726607,
  3262: 0.9743717476406139,
  3263: 1.0188101420626527,
  3264: 1.0012276009917116,
  3265: 1.0040871089301262,
  3266: 0.9392602249783046,
  3267: 0.983829253352768,
  3268: 0.992114714380098,
  3269: 1.0428091969879487,
  3270: 1.000307011002834,
  3271: 0.9794156977776604,
  3272: 1.0072361553783307,
  3273: 0.9954123545611961,
  3274: 1.003138268199814,
  3275: 0.9965033247038982,
  3276: 1.0206345512918558,
  3277: 1.003002521323832,
  3278: 0.9880242666026517,
  3279: 1.0059751708303641,
  3280: 0.9953442087231883,
  3281: 1.0182931842148588,
  3282: 0.990191088298836,
  3283: 0.9923357799685764,
  3284: 0.9979056198697677,
  3285: 0.997596869313116,
  3286: 0.9997538825191563,
  3287: 0.9855305159643193,
  3288: 1.0128441941830526,
  3289: 1.0171713174154866,
  3290: 0.7575820632799466,
  3291: 1.0154779279271842,
  3292: 1.02069786720892,
  3293: 0.9935013258815747,
  3294: 0.9184967126009492,
  3295: 1.0355893001381864,
  3296: 1.0096255735211481,
  3297: 1.0084226444409494,
  3298: 1.0164623046255579,
  3299: 0.9832326054673819,
  3300: 1.0383577722930373,
  3301: 0.9936645827103061,
  3302: 0.9602723779198662,
  3303: 0.9820694743141144,
  3304: 0.9940047435846677,
  3305: 1.0140614637216978,
  3306: 1.0120142759365873,
  3307: 0.9905071379223702,
  3308: 0.9438369749069927,
  3309: 1.0002752796336467,
  3310: 1.0093766088107514,
  3311: 0.9670898290141468,
  3312: 1.0045156345403943,
  3313: 1.012429906660854,
  3314: 0.9791792080756015,
  3315: 1.0215928327278807,
  3316: 1.0333163307198283,
  3317: 0.9676163363302263,
  3318: 0.9957421909542972,
  3319: 1.0032599015206682,
  3320: 0.986158119941354,
  3321: 1.008978645477572,
  3322: 0.9415913535999383,
  3323: 1.0010661362135909,
  3324: 0.9733693780374557,
  3325: 1.0034974061916457,
  3326: 0.9766707493084783,
  3327: 1.0134776833282058,
  3328: 0.982400518650049,
  3329: 1.0157290616233774,
  3330: 1.0230188328338625,
  3331: 1.004055741432238,
  3332: 1.004437034400667,
  3333: 1.014322735968237,
  3334: 0.9589800961037205,
  3335: 0.9946417081016445,
  3336: 0.9928025066700812,
  3337: 1.0072666900782712,
  3338: 1.0052413456023908,
  3339: 0.9840790908456806,
  3340: 1.0460434368869298,
  3341: 1.0071367841640988,
  3342: 0.9899278682622145,
  3343: 0.9914638436015157,
  3344: 0.9286181080089225,
  3345: 1.0038999848854375,
  3346: 0.9603877551330975,
  3347: 0.9954584117385712,
  3348: 1.021201681499136,
  3349: 0.9760175570504956,
  3350: 0.994474734749421,
  3351: 0.9896642647790318,
  3352: 1.0039526663933331,
  3353: 0.9969554739928349,
  3354: 1.0015332166974644,
  3355: 0.9956318753512245,
  3356: 0.9955873808781457,
  3357: 1.0144012026991114,
  3358: 0.9980261364004839}})

I cannot reproduce this error using a sample data set, so I figure it is something with the y data.
I can however get the correct kde plot if it's 1D
This code gives me
sns.kdeplot(data=df, x='sat_norm')


text:
Q: How to prevent HashSet to change my array order that i assign from List? What i trying to achieve is my Set having the same order as my List which is chaging when i assign value from List to Set. Here is what i do :
// in here my array still showing same as my submited front end
List<ShipmentAddressGroupingDtDto> submitedShipmentAddressGroupingDtDto = shipmentAddressGroupingDto.getShipmentAddressGroupingDtDto();

//in here my array start changing, it's not the same order again as my object above
        Set<ShipmentAddressGroupingDtDto> setShipmentAddressGroupingDtDto = new HashSet(submitedShipmentAddressGroupingDtDto);
        List<ShipmentAddressGroupingDtDto> shipmentAddressGroupingDtDto = new ArrayList<ShipmentAddressGroupingDtDto>(setShipmentAddressGroupingDtDto);

here is my value for submitedShipmentAddressGroupingDtDto :
      [
        "id": 0,
        "address": "Jl. Imam Bonjol",
        "isActive": true,
        "partnerShipmentId": 1
      ],
      [
        "id": 0,
        "address": "Jl. Imam Bonjol",
        "isActive": true,
        "partnerShipmentId": 2
      ],
      [
        "id": 0,
        "address": "Jl. Imam Bonjol",
        "isActive": true,
        "partnerShipmentId": 4
      ],
      [
        "id": 0,
        "address": "Jl. Imam Bonjolx",
        "isActive": true,
        "partnerShipmentId": 7
      ]

and what i saw in debug mode, in my setShipmentAddressGroupingDtDto is like this :
      [
        "id": 0,
        "address": "Jl. Imam Bonjol",
        "isActive": true,
        "partnerShipmentId": 2
      ],
      [
        "id": 0,
        "address": "Jl. Imam Bonjolx",
        "isActive": true,
        "partnerShipmentId": 7
      ],
      [
        "id": 0,
        "address": "Jl. Imam Bonjol",
        "isActive": true,
        "partnerShipmentId": 1
      ],
      [
        "id": 0,
        "address": "Jl. Imam Bonjol",
        "isActive": true,
        "partnerShipmentId": 4
      ]

How do i prevent Set ordering my List? or if i can't prevent that, how can i sort it as my submited value?

A: You can use a LinkedHashSet which maintains the ordering of the elements you put into it.


text:
Q: Can't save data from firestore event listener Hello guys and thanks you for your time.
So in my app, I'm trying to fetch data in real time from my firestore database with a SnapshotListener and then save it in a global variable.
The fetching itself works fine, but when I try to save it into an array it fails. It says the array is empty afterwards.
Can you guys explain me what's wrong since I'm still starting on this firestore thing?
Here's the part of the code I think is helpfull:
// Get barbershops nearby from google firestore
        MainActivity.db.collection("barbershops")
                .addSnapshotListener(new EventListener<QuerySnapshot>() {
                    @Override
                    public void onEvent(@Nullable QuerySnapshot value,
                                        @Nullable FirebaseFirestoreException e) {
                        if (e != null) {
                            Log.w(TAG, "Listen failed.", e);
                            return;
                        }

                        for (QueryDocumentSnapshot doc : value) {
                            Log.d(TAG, doc.getId() + " => " + doc.getData());
                            Barbershop bbs = doc.toObject(Barbershop.class);
                            barbershops.add(bbs);
                        }
                    }
                });

        progressBar.setVisibility(View.GONE);

        // Set up the recycler view
        RecyclerView recyclerView = view.findViewById(R.id.recyclerView);

        // use a linear layout manager
        RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());
        recyclerView.setLayoutManager(layoutManager);

        mAdapter = new MyAdapter(barbershops, getContext(), this);
        recyclerView.setAdapter(mAdapter);

        return view;

and then I also have a global variable:
private ArrayList<Barbershop> barbershops;
Thanks!

A: addSnapshotListener is asynchronous and returns immediately.  The callback is invoked some time later with the results of the query.  That means barbershops won't be populated right away.  It's not clear from your question what "the array is empty afterwards" actually means, but if you try to use barbershops before the callback has been invoked, you will not see the data from those documents.  You should only use that list after the callback is invoked.


text:
Q: Continuous Function with Infinite number of Roots Is there a function f that fulfills all of the following:
1) f is continuous on the interval [0,1].
2) f has an infinite number of roots (points for which f(x)=0) in [0,1].
3) f is NOT constantly 0 on any interval inside [0,1]. Meaning: there is no interval [a,b] inside [0,1] such that f(x) is 0 for every x in [a,b].
Thanks a lot!
Ofer

A: $f(x)=x\sin (1/x)$ for $x\ne0$, $f(0)=0$.


text:
Q: Given an expression How do I go from $\displaystyle\frac{\sqrt{b}-\sqrt{a}}{b-a}$ to $\displaystyle\frac{1}{\sqrt{b}+\sqrt{a}}$. The question is how they are equal.

A: Hint:

$$\displaystyle\frac{\sqrt{b}-\sqrt{a}}{b-a}\cdot \frac{\sqrt{b}+\sqrt{a}}{\sqrt{b}+\sqrt{a}}$$

A: Since
$$b-a=(\sqrt b)^2-(\sqrt a)^2=(\sqrt b-\sqrt a)(\sqrt b+\sqrt a),$$
we have
$$\frac{\sqrt b-\sqrt a}{b-a}=\frac{\sqrt b-\sqrt a}{(\sqrt b-\sqrt a)(\sqrt b+\sqrt a)}=\frac{1}{\sqrt b+\sqrt a}.$$


text:
Q: WIF won't work with ASP.NET MVC 4 I have Windows Identity Foundation working well with MVC 3. However, in MVC 4 it seems WIF doesn't get a chance to handle the Not Authorized response and redirect to the STS - instead I get redirected to login.aspx, which is good old forms auth.
In MVC 3 I used to disable forms auth in web.config, but it doesn't work in MVC 4.
I know there have been changes to authentication and authorization in MVC 4, but my Google skills seem to have deserted me and I can't seem to find out how to stop forms auth interfering. Any pointers?

A: Doh! Answering my own question here. All you have to do is remove the forms auth module by adding a remove element in web.config.
<modules>
    <remove name="FormsAuthentication" />
</modules>

I had actually tried this before but had used the wrong string: "FormsAuthenticationModule". I hope this helps some else who is having an off day. :)


text:
Q: Vue.js render a bootstrap-vue component dynamically after a button is pressed I have this as part of my template

 <button class="add" v-on:click="handleAdd(0)"></button>

I am a short description.

       I am a long description.

I am trying to add a new "objective-holder" to the "objective-list" and I am having trouble figuring out how to create new b-button and b-collapse from BootstrapVue in a javascript function that is part of my .vue methods functions.

A: You might be able to use a render function instead of a template, or some type of component utilizing a render function to programmatically create your button element. https://v2.vuejs.org/v2/guide/render-function.html#ad


text:
Q: AJAX File Upload Error 500 with 20MB size file I am trying to upload a file using AJAX Post, but I am getting 500 error when trying to upload a 10Mb file, but uploading a 5Mb file if it works fine.

JS:
function subirArchivos() {
  var formSubirArchivo = $('#frmSubirArchivo')[0];
  var dataSubirArchivo = new FormData(formSubirArchivo);
  $.ajax({
    url: base + '/solicitud?accion=subirDocumento',
    type: "POST",
    enctype: 'multipart/form-data',
    data: dataSubirArchivo,
    processData: false,
    contentType: false,
    cache: false,
    timeout: 60000, //60seg to try!
    success: function(data) {
    ...
    },
    error: function() {
        ...
    }
  });
}

HTML:
<form method="POST" id="frmSubirArchivo" enctype="multipart/form-data">
<input type="hidden" id="idDocumentoSdu" name="idDocumentoSdu"/>
..
  <input type="file" id="file" name="file" style="display: none;">
..

  <button type="button" class="btn btn-default btn-mdl-subir-archivos" onclick="subirArchivos()">Aceptar </button>
  <button type="button" class="btn btn-danger btn-mdl-subir-archivos" data-dismiss="modal" onclick="cancelarModalSubirArchivos()">Cancelar </button>

Controller:
@RequestMapping(params = { "accion=subirDocumento" }, value = { "/solicitud" }, method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> subirDocumento(HttpServletRequest request, @RequestParam("file") MultipartFile file,
    @RequestParam("idDocumentoSdu") String idDocumentoSdu,
                             ....) {
    ...
}

Config:
@Bean(name="multipartResolver")
public CommonsMultipartResolver multipartResolver(){
    CommonsMultipartResolver commonsMultipartResolver=new CommonsMultipartResolver();
    commonsMultipartResolver.setResolveLazily(true);
    commonsMultipartResolver.setMaxUploadSize(20971520);  //20Mb
    commonsMultipartResolver.setMaxUploadSizePerFile(20971520); //20Mb
    return commonsMultipartResolver;
}


text:
Q: Change label's color android keyboard I have to change default color of KeyboardView from white to black,how can I edit that?
I tried with define a key_style, but I have button not regular, so I need to set an image how background...


text:
Q: How can I install "DataMining Adding for Office 2007" as part of my setup? I'm writting a setup program that needs to install the DataMining Adding for Office 2007.
1) How do I detect if it's already installed?
2) If it is not installed, I download and run the MSI (SQLServer2008_DMAddin.msi). But how can I run the Server Configuration (Microsoft.SqlServer.DataMining.Office.ServerConfiguration.exe) tool myself and not have the addin ask questions to the user the first time they open Excel?

A: 1) Check if "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server DMAddins\Config" exists.
2) Use the "InstallPath" value to find and run "Microsoft.SqlServer.DataMining.Office.ServerConfiguration.exe"


text:
Q: Only show button-A when button-B is displayed I'm trying to use jQuery to show a button when an other button is displayed. But I'm not that of a jQuery expert. So I was wondering if there would be anyone that could help me with this one?
I have 2 buttons:

*

*Button ent-step

*Button del-step
What I want to do is to only show button ent-step when button del-step is on screen. Normally this button del-step is hidden with this JavaScript:
function showDellocation($this) {
    var dataLocation = $this.attr("data-location");
        $(".del-step[data-location='" + dataLocation + "']").show();
        $(".add-step[data-location='" + dataLocation + "']").addClass( "blur" );
    }
function hideDellocation($this) {
    var dataLocation = $this.attr("data-location");
        $this.hide();
        $(".add-step[data-location='" + dataLocation + "']").removeClass("blur");
}

The button ent-step is in an other PHP file called by Ajax:

                <button class="ent-step">Entertainment
                    /i>
                </button>

Can I use the blur class to activate this option? For instance:
jQuery(document).ready(function($) {
    if ($(this).hasClass('blur')) {
        $('.ent-step').addClass('clickable');
    }

And then style the button using CSS?
Or is this not the correct way to do this?

A: You can show hide the button based on class of .add-step
if ($('.add-step').hasClass('blur')) {
    $('.ent-step').show();
}

And when you are hiding the .add-step hide the .ent-step button as well
function hideDellocation($this) {
   var dataLocation = $this.attr("data-location");
   $this.hide();
   $(".add-step[data-location='" + dataLocation + "']").removeClass("blur");
   $('.ent-step').hide();
}


text:
Q: spatstat: Multidimensional Space-Time Point Pattern I'm trying to model a Multidimensional Space-Time Point Pattern (ppx object from spatstat package). But I didn't find any way at package documentation.
I tried this:
library(spatstat)
set.seed(2022)
df <- data.frame(x=runif(4),y=runif(4),t=runif(4),
                 age=rep(c("old", "new"), 2),
                 size=runif(4))
X <- ppx(data=df, coord.type=c("s","s","t","m","m"))
ppm(X~1)

And R showed:
Error in ppm.default(Q = X, trend = ~x, data = NULL, interaction = NULL) :
  Argument Q must be a point pattern or a quadrature scheme

Is there any way to convert ppx object to point pattern or a quadrature scheme? Should I need do another thing in order to fit a model?

A: No. The model-fitting function ppm only accepts point patterns in two-dimensional space (class ppp). Model-fitting for higher dimensional point patterns (class ppx) is not yet supported in the spatstat package.


text:
Q: make a div responsive by breaking its elements in two lines I have a div that contains a menu with 8 buttons in the middle of my page. My problem is to make that  responsive.My idea is to rotate it horizontally and to separate in two lines, each  row/line to contain 4 buttons.
I tied to do it like this:
@media (max-width: 767px){
    .icon1{float: left; margin-left: 25px; margin-bottom: 50px;}
    .icon2{float: left; margin-left: 25px; margin-top: 50px;}
     }

Here's me css code:
  .content .middle-content{
    text-align: center;
    }

.content .middle-content .icon1{
    margin-bottom: 15px;
    margin-top: 15px;
}
.content .middle-content .icon2{
    margin-bottom: 15px;
    margin-top: 15px;
}

and my html code:

I created a jsfiddle  just to give the idea how it looks in general, there are three divs left that some text, the middle div with those buttons and the right one also with text.
Can anyone help me to make it responsive and to separate buttons into two rows? DEMO

A: You can use a single class on your all your "icon" divs rather than two and then:
@media screen and (max-width: 767px) {
    .icon1 {
        float: left;
        width: 25%;
    }

JSfiddle Demo

A:


text:
Q: Start ibus on start up
Possible Duplicate:
How to add iBus to start up applications?

I searched many places and found this
killall ibus-daemon and then launch the ibus from dash
but i want to have the ibus launched during the startup. Is there any permanent solutionrt


text:
Q: Ajax sometimes wont return even there is an output I know I'm gonna get a lot of negative points, but cannot describe this better.
There is an url: localhost/mycall.php
The PHP code at this endpoint sleeps a random number of seconds then returns JSON data.
If I call this endpoint directly on via the browser it always works, however if I try to call it via AJAX in a document.ready call like below.
$.ajax({
    method: 'POST',
    url: '/mycall.php?' + new Date().getTime() + Math.random(1, 99999),
    data: dataToSend,
    success: function(data) {
        console.log('success');
        console.log(data);
    },
    error: function(jqXHR, textStatus, errorThrown) {
        console.log('error');
        console.log(textStatus);
    },
    complete: function(jqXHR, textStatus) {
        console.log('complete');
        console.log(textStatus);
    }
});

It returns after a while but with no data and none of the callbacks are fired.
This happens in Opera, Chrome, even in the newest Firefox. Why would this be the case?
I forget to mention, output has "Content-Type":"text/plain; charset=utf-8" headers, mightbe this is the problem... ?

A: It seems there's problem with your url , maybe you should not write localhost?

A: This same thing often happens with me. But when I see this problem,if I define data formate then check coming response is in correct json formate.
Then after encoding json correctly. problem solves.
I don't know what actually happening with you.May be this would be helpful for you.

A: You should prefix your url with /. Without it it will be treated as a relative path.


text:
Q: using 'sed' to trim HTMl tags and unnecessary whitespace so i was looking for a Sed command that extracts HTML tags (without attributes or nested tags) from a text. the text should be converted as follows:

This is a valid HTML tag
.
These <1>invalid tags should be ignored.

Becomes:
This is a valid HTML tag.
These <1>invalid tags should be ignored.

I tried this command sed 's/^.*>\([^<]*\)<.*$/\1/' but it is not completely correct :(
and a sed expression to trim unnecessary white space [space or tab] from the start and
the end of a string.
Thanks in advance!
:)

A: As mentioned by some people, HTML is not a good candidate for regexp.
Nevertheless, this one may be a starting point (tested in vim)
:%s:<\([^>]*\)>\(.*\)</\1>:\2:


text:
Q: drag and drop in PXListView is not working in the Demo App. how to fix it? i am working with PXListView and i am testing with Demo App which came inside the PXListView...while doing the drag and drop it is not working properly... the drop is not working...
i have added the following delegate methods... but still dropping is not happened to the correct row...it is relocate back to its original row...
    - (BOOL)listView:(PXListView*)aListView writeRowsWithIndexes:(NSIndexSet*)rowIndexes toPasteboard:(NSPasteboard*)dragPasteboard
{
    // +++ Actually drag the items, not just dummy data.
    [dragPasteboard declareTypes: [NSArray arrayWithObjects: NSStringPboardType, nil] owner: self];
    [dragPasteboard setString: @"Just Testing" forType: NSStringPboardType];

    return YES;
}

- (NSDragOperation)listView:(PXListView*)aListView validateDrop:(id <NSDraggingInfo>)info proposedRow:(NSUInteger)row
                            proposedDropHighlight:(PXListViewDropHighlight)dropHighlight;
{
    return NSDragOperationCopy;
}

- (BOOL)listView:(PXListView*)aListView acceptDrop:(id <NSDraggingInfo>)info row:(NSUInteger)row dropHighlight:(PXListViewDropHighlight)dropHighlight
{
    return NO;
}

can anyone please help me to fix this problem?
Thanks & Regards,
Muthu

A: Here is your solution. You may want to fine tune it a bit, but it gets the job done.
- (BOOL)listView:(PXListView*)aListView acceptDrop:(id <NSDraggingInfo>)info row:   (NSUInteger)row dropHighlight:(PXListViewDropHighlight)dropHighlight
{
     NSLog(@"Accept Drop");
     NSString *temp = [_listItems objectAtIndex: [listView selectedRow]];
     [_listItems removeObjectAtIndex: [listView selectedRow]];
     [_listItems insertObject: temp atIndex: row];
     [listView reloadData];
     return NO;
}


text:
Q: how to get user-based recommendation with graphaware neo4j-reco I need to get user-based recommendations with graphaware and I don't know how to do that. As far as I can see, all I seem to get from graphaware's neo4j-reco are item-similarities as in 'people who bought a also bought b'. But what I'm interested in is user-based recommendations like 'recommended for you, based on your previous purchases'. Any idea how to do that?

A: GraphAware-Reco is mainly a skeleton helping you build enterprise-grade recommendation engines atop a neo4j database.
This means that it provides base classes and an architecture that you need to extend yourself with your own logic.
If you take your requirements, here purchase history, a very naive approach to get started with is for example to find the characteristics of the products purchased.
Lets say user 1 purchased an iphone and an ipad, that can have those characteristics :
iphone brand : apple, category: electronics
ipad brand: apple, category: electronics

You can create a first engine that will match potential candidates based on those characteristics, this engine will extend the CypherEngine with the following query :
MATCH (n:User {id: 111})-[:PURCHASED]->(product)
WITH distinct product
MATCH (product)-[:HAS_CHARACTERISTIC]->(c)<-[:HAS_CHARACTERISTIC]-(reco)
RETURN reco, count(*) AS score

Another approach you can combine with this one is to find people having bought the same items as the user and find what they also bought, you will then create another engine with the following query :
MATCH (n:User {id: 111})-[:PURCHASED]->(product)
WITH distinct product, user
MATCH (product)<-[:PURCHASED]-(collab)
WHERE collab <> user
MATCH (collab)-[:PURCHASED]->(reco)
RETURN reco, count(*) AS score

When using those two engines, GraphAware Reco will automatically combine the scores from each engine into one.
You can find an example of a CypherEngine in the tests : https://github.com/graphaware/neo4j-reco/blob/master/src/test/java/com/graphaware/reco/neo4j/engine/CypherEngineTest.java
You can also add a blacklist for not recommending items the user already bought.
As I said, this is a first step, if you have a big catalog with lot of purchases, you might consider doing background computations (for eg, similarity between products and only relate top k-nn products between them and same for purchases and related similar users between them)
GraphAware-Reco offers you facilities for having background computation jobs and GraphAware-Reco-Enterprise comes with pre-defined algorithms for the similarity computations between items as well as an Apache Spark integration for moving the similarity computation process outside of the neo4j jvm and write back the results/relationships to neo4j (not open-sourced)


text:
Q: UPDATE TABLE T1 SET COLUMN= SELECT 0 FROM TABLE T1 UPDATE SCPOMGR.DFUVIEW D
     SET D.UDC_NEWDFU  =  (SELECT (CASE WHEN D1.UDC_CREATIONDATE > ADD_MONTHS (TRUNC(SYSDATE),3)
                              THEN 1
                              ELSE 0
                                  END)
                           FROM SCPOMGR.DFUVIEW D1, SCPOMGR.UDT_GEN_PARAM G
                         WHERE D.DMDUNIT = D1.DMDUNIT
                           AND D.DMDGROUP = D1.DMDGROUP
                           AND D.LOC = D1.LOC
                           AND G.REGION=VREGION
                           AND G.JDA_CODE=SUBSTR(D1.DMDUNIT,-2,2)
                           );

WHAT WILL A SELECT 0 DO?
WILL IT SELECT NO ROWS AND UPDATE THE COLUMN WITH A NULL?

A: On the right-hand side of the assignment (the value you want to UPDATE) you have a SELECT statement with a CASE expression. There is a subquery (a join with several additional filters). The SELECT statement will return exactly as many rows as there are in the join and satisfy all the additional filters. For some of those rows the SELECT statement will return 1 and for the others, 0.
Do you expect that the subquery (the join with many WHERE conditions) will return exactly one row, then you check the CREATIONDATE and based on that, you update the value to 1 or 0?
In principle, the SELECT statement may return more than one row - in which case you will get a different error message, something about a scalar query (one that is supposed to be scalar, anyway) returning more than one row.
It is also possible that the subquery returns no rows at all - in that case the SELECT statement will return no rows at all, and in such cases the UPDATE means "assign NULL to the column of the left-hand side of the assignment". This is what seems to have happened here.
That is no reason to raise an exception. However, you would get an exception if the column (UDC_NEWDFU) has a NOT NULL constraint.
Since the CASE expression can ONLY return 0 or 1, never NULL, the ONLY way where a NULL assignment is possible is when the subquery (the join with many conditions) returns no rows. In one of the Comments you said that subquery does return rows. I don't believe you. If it does return rows, then I don't believe you that you have an update to NULL being attempted.


text:
Q: .htaccess Regex to rewrite path I have a very specific requirement and I pretty much suck at regular expressions to put it bluntly.
A program generates images of various sizes and puts them in a folder which is the same name as the image, the various generated images then get a new name based on their dimensions.
eg: /assets/images/waterlilly/0800x0600.jpg,/assets/images/waterlilly/0400x0300.jpg
Due to SEO the filenames are rather undesirable... so I thought if the src attribute of the image tag could be /assets/images/0800x0600/waterlilly.jpg I could "simply" write a regex for a htaccess RewriteRule...
And of course changing the programming of the tool that resizes the images is not currently an option (sadly)
So the regex i have is:
(.*?)+/[0-9]+x[0-9]+/(.*?)+\.(.*?)+

for my test file "/assets/images/0800x0600/waterlilly.jpg",which the regex matches, how do I get the following?
$1 = /assets/images/
$2 = 0800x0600
$3 = waterlilly
$4 = jpg

Thanks in advance!

A: This regex should work for you:
^(.+?)/([^/]+)/([0-9]+x[0-9]+)\.(.*)$

And this is the RewriteRule that will for you:
RewriteRule ^(.+?)/([^/]+)/([0-9]+x[0-9]+)\.(.*)$ /$1/$3/$2.$4 [L]


text:
Q: exe created by cx-freeze gives me a error Log.py
import logging
import logging.handlers
class Log:
    def __init__(self):
        FILENAME='LOG'
        logging.basicConfig(level=logging.INFO)
        root_logger = logging.getLogger('')
        logger = logging.handlers.TimedRotatingFileHandler(FILENAME,'midnight',1)
        root_logger.addHandler(logger)
        logging.getLogger('log')

Main.py
from Log import Log
import time
import logging
log_obj = Log()
log = logging.getLogger('log')
log.info("Service Started")
while 1:
t=1

setup.py
from cx_Freeze import setup, Executable

setup(
    name = "Test",
    version = "0.1",
    description = "Test",
    executables = [Executable("Main.py", base="Win32GUI")])

So this is the final code which I am using. EXE file got created but I am getting an error while running it.The error is "Nonetype object has no attribute type 'write'"
Waiting for you reply.

A: Without a stack trace, i can only advise you to try base="Console".