问:
Rewrite rules: Remove www | Enforce HTTPS | Append ?<number>
I would like to accomplish the following for my site:

Remove www

Enforce HTTPS

Append ?number at the end to enforce page content reload

Use different 404 page according to language (en, el). Separate 404 pages have been already created

My .htaccess is the following:

```<code>RewriteOptions inherit
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\.
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule ^ https://%1%{REQUEST_URI}?521 [NE,L,R]
ErrorDocument 404 /404.html
</code>```

The behavior is the below:

The www is removed

HTTPS is enforced

The ?number is appended ONLY if the url is not HTTPS

I cannot figure how to redirect to the proper 404 page. Please note that /el/ is part of the url if the selected language is Greek

Could you please help me with points 3, 4 above?

Thank you

答:
I have the answer for removing www and enforce HTTPS but thats it.
hope this helps.

WWW & HTTPS

```<code>#Remove WWW
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L]

#Ensure https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</code>```

Body:
I would like to accomplish the following for my site:

Remove www

Enforce HTTPS

Append ?number at the end to enforce page content reload

Use different 404 page according to language (en, el). Separate 404 pages have been already created

My .htaccess is the following:

RewriteOptions inherit
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\.
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule ^ https://%1%{REQUEST_URI}?521 [NE,L,R]
ErrorDocument 404 /404.html

The behavior is the below:

The www is removed

HTTPS is enforced

The ?number is appended ONLY if the url is not HTTPS

I cannot figure how to redirect to the proper 404 page. Please note that /el/ is part of the url if the selected language is Greek

Could you please help me with points 3, 4 above?

Thank you

Body:
I have the answer for removing www and enforce HTTPS but thats it.
hope this helps.

WWW & HTTPS

#Remove WWW
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L]

#Ensure https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


来源: stackexchange

问:
Need to add prefix to captured names, based on given lists
I have two arrays @Mister and @Mrs and need to add prefix based on the   values.

```<code>@Mister = qw(Parasuram Raghavan Srivatsan);
@Mrs = qw(Kalai Padmini Maha);

my $str = "I was invited the doctor Parasuram and Kalai and civil Engineer Raghavan and Padmini and finally Advocate Srivatsan and Maha";

#Mr. Parasuram Mr. Raghavan Mr. Srivatsan
if(grep ($_ eq $str), @Mister)
{ $str=~s/($_)/Mr. $1/g; }

#Mrs. Kalai Mrs. Padmini Mrs. Maha`
if(grep ($_ eq $str), @Mrs)
{ $str=~s/($_)/Mrs. $1/g; }
</code>```

Output Should be:

I was invited the doctor Mr. Parasuram and Mrs. Kalai and civil Engineer Mr. Raghavan and Mrs. Padmini and finally Advocate Mr. Srivatsan and Mrs. Maha

Could someone simplify the way I am doing and whats wrong in this code.

答:
"Could someone simplify the way I am doing and whats wrong in this code."

The first part is addressed by zdim in a way I would do it too, but the "what's wrong" part could get some more addressing, in my opinion (just nitpicking, but maybe useful for someone):

if(grep ($_ eq $str), @Mister)
 { $str =~ s/($_)/Mr. $1/g; }

Your list entries will never equal the $str, I think you meant $str =~/$_/

Either use an additional pair of parenthesis around both condition and @list or use the block form of grep (grep { $str =~ /$_/ } @Mister) - otherwise grep will miss the list as argument, since it takes the one existing pair as limiter for it's argument list right now.

the $_ used in the grep command is not available outside of the command, so the $str-substitution would use whatever the value of $_ is currently. In the example it would most likely be undef, so that between each character in the former $str 'Mr. ' is inserted.

Like I said: A perfectly good solution to your problem is given in zdim's answer, but you also asked "what's wrong in this code".

ContentLicense: CC BY-SA 4.0

Body:
I have two arrays @Mister and @Mrs and need to add prefix based on the   values.

@Mister = qw(Parasuram Raghavan Srivatsan);
@Mrs = qw(Kalai Padmini Maha);

my $str = "I was invited the doctor Parasuram and Kalai and civil Engineer Raghavan and Padmini and finally Advocate Srivatsan and Maha";

#Mr. Parasuram Mr. Raghavan Mr. Srivatsan
if(grep ($_ eq $str), @Mister)
{ $str=~s/($_)/Mr. $1/g; }

#Mrs. Kalai Mrs. Padmini Mrs. Maha`
if(grep ($_ eq $str), @Mrs)
{ $str=~s/($_)/Mrs. $1/g; }

Output Should be:

I was invited the doctor Mr. Parasuram and Mrs. Kalai and civil Engineer Mr. Raghavan and Mrs. Padmini and finally Advocate Mr. Srivatsan and Mrs. Maha

Could someone simplify the way I am doing and whats wrong in this code.

ContentLicense: CC BY-SA 3.0


问:
That A-Ha Moment for Understanding OO Design in C#
I've been studying C# for a couple of years, reading voraciously, even taking a few C# data access courses from Microsoft.  I've also been reading books on OOP.  I'm coding a web-based database application at work.  While my job title is not "programmer", I'm fortunate enough to be able to work on this as a side project.  I coded in Basic in the early 80's and was even good at utilizing pokes and peeks to manipulate the Apple ][ + and the TRS-80 to astound and amaze my friends.  But that was a very linear approach to coding.

All this being said, something is just not clicking with me.  I haven't had that a-ha moment with either C# or OOP that gives me the ability to sit down, open up VS2008, and start coding.  I have to study other people's code so much that it simply seems like I'm not doing anything on my own.  I'm getting discouraged.

It's not like I'm not capable of it.  I picked up t-sql really quickly.  Someone can tell me what information they want out of the database and I can code out the tsql in a matter of a few minutes to give them what they want.  SQL is something that I get.  This isn't happening for me with OOP or C#.  Granted, C# is inherently more complex, but at some point it has to click.  Right?

I read over stackoverflow and I'm overwhelmed at how infinitely smart you all are.

What was it for you that made it click?

Edited to add:
A lot of the answers here were outstanding.  However, one in particular seemed to have risen to the top and that's the one I marked as the "answer".  I also hate not marking my questions with the answer.

答:
The first steps into any language should be the "Hello World" tutorial. The magic behind this method of learning, also called learning by doing, is the fact that it puts a immediate necessity as the main learning motivator.
 I am myself a C#.NET developer, and I am currently struggling to learn F#. The steps I should take after writing my HelloWorldApp is set small and easy goals like

Write an console application that downloads some page on the net and display its HTML content.

Do it again, but now asynchronously.

Do it again, but now multiple pages in parallel.

etc

That's how I learn something. For OOP the things get a bit more complicated, you should read other people's code and articles too. One thing that helps you to lear OOP and refactoring by yourself is reusing your own code. In my example above, you'll note that the code written to download a page synchronously is very similar to the one used to do it asynchronously, they have even some lines that are 100% equal. What you should do to learn OOP is refactor and encapsulate your code, so you can choose wether type of download do you want (sync or async) with the minimum repetition in the code written for both options. If you use TDD (Test Driven Development) the learning curve will improve.

OwnerDisplayName: GregD

ContentLicense: CC BY-SA 2.5

LastEditorDisplayName: GregD

OwnerDisplayName: Vernicht

LastEditorDisplayName: Vernicht


问:
Query post based on month and date

I'm building company intranet on WordPress. I'm trying to get upcoming birthday list (for the next 30 days from current day), the birthdays' value is coming from a custom field with the Ymd format.

This code is returning all birthdays:

```<code>$args = array(
            'post_type' => 'employees',
               'meta_key'  => 'birthday',
               'orderby'   => 'meta_value_num',
               'order'     => 'ASC',
               'compare' => '>=',
               'type' => 'DATE',
            );
</code>```

I want to get only upcoming birthdays for one month period.

答:
I've found a current month solution. </p>

```<code>                $current_month = date('m');
                $filter_month = $current_month; // show current month only

                $args = array (
                  'post_type'      => 'employees', // your custom post type
                  'meta_key'       => 'birthday',  // your custom date field name
                  'orderby'        => 'meta_value_num',
                  'order'          => 'ASC',
                  'meta_query' => array(
                    array(
                      'key'      => 'birthday',
                      'compare'  => 'REGEXP',
                      'value'    => '[0-9]{4}' . $filter_month . '[0-9]{2}',
                    ),
                  )
                );

                $posts = get_posts($args);
</code>```

Title: Query post based on month and date

Body:
I'm building company intranet on WordPress. I'm trying to get upcoming birthday list (for the next 30 days from current day), the birthdays' value is coming from a custom field with the Ymd format.

This code is returning all birthdays:

$args = array(
            'post_type' => 'employees',
               'meta_key'  => 'birthday',
               'orderby'   => 'meta_value_num',
               'order'     => 'ASC',
               'compare' => '>=',
               'type' => 'DATE',
            );

I want to get only upcoming birthdays for one month period.

Body:
I've found a current month solution.

                $current_month = date('m');
                $filter_month = $current_month; // show current month only

                $args = array (
                  'post_type'      => 'employees', // your custom post type
                  'meta_key'       => 'birthday',  // your custom date field name
                  'orderby'        => 'meta_value_num',
                  'order'          => 'ASC',
                  'meta_query' => array(
                    array(
                      'key'      => 'birthday',
                      'compare'  => 'REGEXP',
                      'value'    => '[0-9]{4}' . $filter_month . '[0-9]{2}',
                    ),
                  )
                );

                $posts = get_posts($args);


问:
Can't set activity's variable from class method
Note: I'm not doing great with terminology as it's my first go on object-oriented programming and android studio.

In the android studio, I have created a class for a JSON fetching task.
(I don't include the do in background override).

```<code>public class jsonTasks extends AsyncTask<String, String, String> {

public interface AsyncResponse {
    void processFinish(String output);
}

private AsyncResponse delegate = null;

jsonTasks(AsyncResponse delegate){
    this.delegate = delegate;
}

@Override
protected void onPostExecute(String result) {
    delegate.processFinish(result);
}
</code>```

In my activity now:

```<code>public class activity extends Activity {
    // in here I've declared the string variable
    String valuableInfo;

    // FIRST TASK
    jsonTasks asyncTask = new jsonTasks(new jsonTasks.AsyncResponse() {

        @Override
        public void processFinish(String output) {
            String TAG = activity.class.getSimpleName();
            JSONObject info;

            //i do stuff with the json here
            //i set the textboxes normally
            txtSumName.setText(sumInfo.getString("name"));

            //but setting the string valuableInfo is not working
            valuableInfo = "info I took from json operation"

        });
    // and here I execute
    asyncTask.execute("url");

    // SECOND TASK
    jsonTasks asyncTask2 = new .... {
    .................
    }
    asyncTask2.execute("https://example.com/" + valuableInfo);
}
</code>```

Where I want to use that variable is in another "asyncTask2" that with use the valuableInfo on the URL to continue fetching.

The variable is always null when I run the second "asyncTask2".

答:
An AsyncTask performs operations asynchronously. This means that you won't get the result immediately, you have to wait until it finished before you can use valueableInfo. There is a method which you can override, it's called onPostExecute. This will trigger after your task is done and when the info is available. Execute your second task here and it won't be null at that point.

You could alternatively also merge the two tasks perhaps?

Body:
Note: I'm not doing great with terminology as it's my first go on object-oriented programming and android studio.

In the android studio, I have created a class for a JSON fetching task.
(I don't include the do in background override).

public class jsonTasks extends AsyncTask<String, String, String> {

public interface AsyncResponse {
    void processFinish(String output);
}

private AsyncResponse delegate = null;

jsonTasks(AsyncResponse delegate){
    this.delegate = delegate;
}

@Override
protected void onPostExecute(String result) {
    delegate.processFinish(result);
}

In my activity now:

public class activity extends Activity {
    // in here I've declared the string variable
    String valuableInfo;

    // FIRST TASK
    jsonTasks asyncTask = new jsonTasks(new jsonTasks.AsyncResponse() {

        @Override
        public void processFinish(String output) {
            String TAG = activity.class.getSimpleName();
            JSONObject info;

            //i do stuff with the json here
            //i set the textboxes normally
            txtSumName.setText(sumInfo.getString("name"));

            //but setting the string valuableInfo is not working
            valuableInfo = "info I took from json operation"

        });
    // and here I execute
    asyncTask.execute("url");

    // SECOND TASK
    jsonTasks asyncTask2 = new .... {
    .................
    }
    asyncTask2.execute("https://example.com/" + valuableInfo);
}

Where I want to use that variable is in another "asyncTask2" that with use the valuableInfo on the URL to continue fetching.

The variable is always null when I run the second "asyncTask2".


问:
SQL Select Like Keywords in Any Order
I am building a Search function for a shopping cart site, which queries a SQL Server database.  When the user enters "Hula Hoops" in the search box, I want results for all records containing both "Hula" and "Hoop", in any order.  Furthermore, I need to search multiple columns (i.e. ProductName, Description, ShortName, MaufacturerName, etc.)

All of these product names should be returned, when searching for "Hula hoop":

Hula hoop

Hoop Hula

The Hoopity of xxhula sticks

(Bonus points if these can be ordered by relevance!)

答:
You might want to check out SOLR too - if you're going to be doing this type of searching.  Super cool.

http://lucene.apache.org/solr/

Title: SQL Select Like Keywords in Any Order


问:
wpf c# progress bar wont update untill after work is done when in background worker
below is some code i am using to show a progress bar on window1. However when work is done on my main window the progress bar freezes then jumps to what ever stage the background worker is in. Is there anyway to have the progress bar constantly update. Even if work is being done in other windows      </p>

```<code>public SplashScreen()
        {
            InitializeComponent();
            //Timer();

            CreateBackGroundWorker();
           // int shareProgressBarValue = MainSharePage.shareProgressBarValue;

            LoginPage LoginPage = new LoginPage();
            LoginPage.Show();

        }

        private void CreateBackGroundWorker()
        {
            BackgroundWorker worker = new BackgroundWorker();
            worker.RunWorkerCompleted += worker_RunWorkerCompleted;
            worker.WorkerReportsProgress = true;
            worker.DoWork += worker_DoWork;
            worker.ProgressChanged += worker_ProgressChanged;
            worker.RunWorkerAsync();
        }

        private void worker_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
           this.ProgressBar.Value = e.ProgressPercentage;
            //ShareProgressBarText.Text = (string)e.UserState;
        }

        private void worker_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker worker = sender as BackgroundWorker;
            worker.ReportProgress(0, String.Format("Processing Iteration 1."));
            for (int i = 0; i < 100; i++)
            {
                Thread.Sleep(1000);
                worker.ReportProgress((i + 1), String.Format("Processing Iteration {0}.", i + 2));
            }

            worker.ReportProgress(100, "Done Processing.");
        }
</code>```

答:
I copy-pasted your code and removed the two lines dealing with your LoginPage, and it works flawlessly for me.

I then created and empty window as a replacement for LoginPage, added the same two lines to show it, and it still works.

I'd guess the problem is in your LoginPage, which must be blocking the UI thread one way or another.

Body:
below is some code i am using to show a progress bar on window1. However when work is done on my main window the progress bar freezes then jumps to what ever stage the background worker is in. Is there anyway to have the progress bar constantly update. Even if work is being done in other windows

public SplashScreen()
        {
            InitializeComponent();
            //Timer();

            CreateBackGroundWorker();
           // int shareProgressBarValue = MainSharePage.shareProgressBarValue;

            LoginPage LoginPage = new LoginPage();
            LoginPage.Show();

        }

        private void CreateBackGroundWorker()
        {
            BackgroundWorker worker = new BackgroundWorker();
            worker.RunWorkerCompleted += worker_RunWorkerCompleted;
            worker.WorkerReportsProgress = true;
            worker.DoWork += worker_DoWork;
            worker.ProgressChanged += worker_ProgressChanged;
            worker.RunWorkerAsync();
        }

        private void worker_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
           this.ProgressBar.Value = e.ProgressPercentage;
            //ShareProgressBarText.Text = (string)e.UserState;
        }

        private void worker_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker worker = sender as BackgroundWorker;
            worker.ReportProgress(0, String.Format("Processing Iteration 1."));
            for (int i = 0; i < 100; i++)
            {
                Thread.Sleep(1000);
                worker.ReportProgress((i + 1), String.Format("Processing Iteration {0}.", i + 2));
            }

            worker.ReportProgress(100, "Done Processing.");
        }


问:
Data Attrbute - get and set in jquery
I have a number of tables on my page with the data attribute that I need to access in my document ready function, as follows, and also I show the HTML.

```<code>$('.accountsHoldingTable').DataTable({
    dom: 'tB',
    responsive: true,
    "lengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
    buttons: [
        {
            extend: 'excelHtml5',
            filename: "Positions " +  $(this).data("ttitle") + " " + today.toDateString()
        }
    ],
});
</code>```

```

However, this gives me a result of

"Positions undefined Mon Dec 04 2017 (2).xlsx"

How do I do this properly so that undefined is replaced by the data-ttitle value?

答:
I would guess that you are using this in the wrong context. See if this code accomplishes what you are are attempting to achieve:

```<code>$('.accountsHoldingTable').each(function(i, val) {
   $(this).DataTable({
     dom: 'tB',
     responsive: true,
     lengthMenu: [[25, 50, 100, -1], [25, 50, 100, "All"]],
     buttons: [
       {
          extend: 'excelHtml5',
          filename: "Positions " +  $(this).data("ttitle") + " " + today.toDateString()
       }
     ]
  });
});
</code>```

Title: Data Attrbute - get and set in jquery

Body:
I have a number of tables on my page with the data attribute that I need to access in my document ready function, as follows, and also I show the HTML.

$('.accountsHoldingTable').DataTable({
    dom: 'tB',
    responsive: true,
    "lengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
    buttons: [
        {
            extend: 'excelHtml5',
            filename: "Positions " +  $(this).data("ttitle") + " " + today.toDateString()
        }
    ],
});

However, this gives me a result of

"Positions undefined Mon Dec 04 2017 (2).xlsx"

How do I do this properly so that undefined is replaced by the data-ttitle value?

Body:
I would guess that you are using this in the wrong context. See if this code accomplishes what you are are attempting to achieve:

$('.accountsHoldingTable').each(function(i, val) {
   $(this).DataTable({
     dom: 'tB',
     responsive: true,
     lengthMenu: [[25, 50, 100, -1], [25, 50, 100, "All"]],
     buttons: [
       {
          extend: 'excelHtml5',
          filename: "Positions " +  $(this).data("ttitle") + " " + today.toDateString()
       }
     ]
  });
});


问:
Reordering nodes in increasing order in pandas dataframe
```<code>data1 = { 'node1': [2,2,3,6],
     'node2': [6,7,7,28],
     'weight': [1,2,1,1], }
df1 = pd.DataFrame(data1, columns = ['node1','node2','weight'])
</code>```

I want to rename the node1 and node 2 in the data1 according in increasing order.
Nodes are 2 3 6 7 28 so they become 1 2 3 4 5 respectively.

So the dataframe becomes-

```<code>data1 = { 'node1': [1,1,2,3],
     'node2': [3,4,4,5],
     'weight': [1,2,1,1], }
df1 = pd.DataFrame(data1, columns = ['node1','node2','weight'])
</code>```

The data looked like this before

but now looks like this

答:
Or we can using replace :-) </p>

```<code>ary=np.concatenate(df1.iloc[:,:2].values)
mapdf=pd.DataFrame({'data':pd.Series(ary).astype('category').cat.codes.add(1),'maper':ary}).set_index('maper')
df1[['node1','node2']]=df1[['node1','node2']].replace(mapdf.data.to_dict())

df1
Out[1631]:
   node1  node2  weight
0      1      3       1
1      1      4       2
2      2      4       1
3      3      5       1
</code>```

Body:
data1 = { 'node1': [2,2,3,6],
     'node2': [6,7,7,28],
     'weight': [1,2,1,1], }
df1 = pd.DataFrame(data1, columns = ['node1','node2','weight'])

I want to rename the node1 and node 2 in the data1 according in increasing order.
Nodes are 2 3 6 7 28 so they become 1 2 3 4 5 respectively.

So the dataframe becomes-

data1 = { 'node1': [1,1,2,3],
     'node2': [3,4,4,5],
     'weight': [1,2,1,1], }
df1 = pd.DataFrame(data1, columns = ['node1','node2','weight'])

The data looked like this before

but now looks like this

Body:
Or we can using replace :-)

ary=np.concatenate(df1.iloc[:,:2].values)
mapdf=pd.DataFrame({'data':pd.Series(ary).astype('category').cat.codes.add(1),'maper':ary}).set_index('maper')
df1[['node1','node2']]=df1[['node1','node2']].replace(mapdf.data.to_dict())

df1
Out[1631]:
   node1  node2  weight
0      1      3       1
1      1      4       2
2      2      4       1
3      3      5       1


问:
How to add GENERATED BY DEFAULT AS IDENTITY in MySQL table?
I have a DB2 Table and i am trying to convert into  MySQL table . This is the DB2 table :

```<code>CREATE TABLE MY_TABLE (
  ID BIGINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1 INCREMENT BY 1 NO MAXVALUE NO CYCLE CACHE 100),
  ACTIVE SMALLINT NOT NULL,
  PRIMARY KEY (ID)
)#
</code>```

i have converted to MySQL like :

```<code>CREATE TABLE MY_TABLE (
  ID BIGINT ,
  ACTIVE SMALLINT NOT NULL,
  PRIMARY KEY (ID)
);
</code>```

and i am running one procedure

```<code>create procedure test_proced(
    in to_create bigint,
    out created bigint
)
begin
     set created = (select count(vnr.id) from MY_TABLE vnr);
    while (created < to_create) do
      insert into MY_TABLE (active) values(0);
      set created = created + 1;
    end while;
end;
</code>```

But after adding with above procedure on this table , I am getting some error like :

```<code>Caused by: java.sql.SQLException: Field 'id' doesn't have a default value
</code>```

Now i am suspecting the GENERATED BY DEFAULT AS IDENTITY . Is this error due to this problem ?  If it is , How to convert to corresponding MySQL Table ?

答:
In MySQL you can use AUTO_INCREMENT:

CREATE TABLE MY_TABLE (
  ID BIGINT NOT NULL AUTO_INCREMENT,
  ACTIVE SMALLINT NOT NULL,
  PRIMARY KEY (ID)
);
```

A new value is going to be automatically generated for column ID every time a new row is inserted in MY_TABLE. Each auto-generated value is by default equal to the value of the immediately preceding (in order of insertion) record plus 1.

Note: The default is to start at 1 with a 1 step value.

Body:
I have a DB2 Table and i am trying to convert into  MySQL table . This is the DB2 table :

CREATE TABLE MY_TABLE (
  ID BIGINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1 INCREMENT BY 1 NO MAXVALUE NO CYCLE CACHE 100),
  ACTIVE SMALLINT NOT NULL,
  PRIMARY KEY (ID)
)#

i have converted to MySQL like :

CREATE TABLE MY_TABLE (
  ID BIGINT ,
  ACTIVE SMALLINT NOT NULL,
  PRIMARY KEY (ID)
);

and i am running one procedure

create procedure test_proced(
    in to_create bigint,
    out created bigint
)
begin
     set created = (select count(vnr.id) from MY_TABLE vnr);
    while (created < to_create) do
      insert into MY_TABLE (active) values(0);
      set created = created + 1;
    end while;
end;

But after adding with above procedure on this table , I am getting some error like :

Caused by: java.sql.SQLException: Field 'id' doesn't have a default value

Now i am suspecting the GENERATED BY DEFAULT AS IDENTITY . Is this error due to this problem ?  If it is , How to convert to corresponding MySQL Table ?

Body:
In MySQL you can use AUTO_INCREMENT:

CREATE TABLE MY_TABLE (
  ID BIGINT NOT NULL AUTO_INCREMENT,
  ACTIVE SMALLINT NOT NULL,
  PRIMARY KEY (ID)
);

A new value is going to be automatically generated for column ID every time a new row is inserted in MY_TABLE. Each auto-generated value is by default equal to the value of the immediately preceding (in order of insertion) record plus 1.

Note: The default is to start at 1 with a 1 step value.


问:
Rhino Mock 3.6 Repository Expected #0, Actual#1
I'm using Rhino Mock 3.6 Repository and Nhibernate. But I'm getting ExpectationViolationException Expected#0, Actual #1. I've spent two days on it. I don't know what i'm doing wrong. Here is my code. I'm getting error on mockRepository.Save(user) line.

```<code>        var username = "abcdef";
        var mocks = new MockRepository();
        var validationResults = new ValidationResults();
        IDataQuery query = mocks.StrictMock<IDataQuery>();
        UserRepository mockRepository = mocks.StrictMock<UserRepository>(query);
        var user = mocks.StrictMock<User>();

        user.FirstName = "javed";
        user.LastName = "ahmad";
        user.UserName = "abc";
        user.Password = "password";
        user.Email = "nadeem@test.com";
        user.IsActive = true;
        user.CreatedBy = 1000000;
        user.CreatedDate = DateTime.Today;
        user.ModifiedBy = 1000000;
        user.ModifiedDate = DateTime.Today;

        Expect.Call(user.Validate()).Return(validationResults);
        mocks.ReplayAll();

        mockRepository.Save(user);
</code>```

Thanks in Advance.

Thanks
Imran

答: You're using a StrickMock which means the only calls to be considered valid are the calls you set Expectations for.  Since you didn't set an Expectation that Save would be called, you're getting an error.

Body:
I'm using Rhino Mock 3.6 Repository and Nhibernate. But I'm getting ExpectationViolationException Expected#0, Actual #1. I've spent two days on it. I don't know what i'm doing wrong. Here is my code. I'm getting error on mockRepository.Save(user) line.

        var username = "abcdef";
        var mocks = new MockRepository();
        var validationResults = new ValidationResults();
        IDataQuery query = mocks.StrictMock<IDataQuery>();
        UserRepository mockRepository = mocks.StrictMock<UserRepository>(query);
        var user = mocks.StrictMock<User>();

        user.FirstName = "javed";
        user.LastName = "ahmad";
        user.UserName = "abc";
        user.Password = "password";
        user.Email = "nadeem@test.com";
        user.IsActive = true;
        user.CreatedBy = 1000000;
        user.CreatedDate = DateTime.Today;
        user.ModifiedBy = 1000000;
        user.ModifiedDate = DateTime.Today;

        Expect.Call(user.Validate()).Return(validationResults);
        mocks.ReplayAll();

        mockRepository.Save(user);

Thanks in Advance.

Thanks
Imran


问:
Image is not visible in android project with XAML forms - Xamarin even though provided solutions applied
I tried solutions from the following links but none worked.

where-to-put-images-for-xamarin-froms-application

developer.xamarin.com/guides/xamarin-forms/user-interface/images/#Local_Images

image-not-showing-in-xamarin-forms-app.html

I used below syntax

```<code><Image Source="lock.png" HeightRequest="20" WidthRequest="20" HorizontalOptions="Center" VerticalOptions="Center"  Grid.Row="0" Grid.Column="0"></Image>
</code>```

Here is the image for where i've kept image

No image displays

Edit

These are the only things in my XAML page.

答:
Right click the lock.png image and see if there is an option "include in project"

If there is, project cannot find image

Body:
I tried solutions from the following links but none worked.

where-to-put-images-for-xamarin-froms-application

developer.xamarin.com/guides/xamarin-forms/user-interface/images/#Local_Images

image-not-showing-in-xamarin-forms-app.html

I used below syntax

<Image Source="lock.png" HeightRequest="20" WidthRequest="20" HorizontalOptions="Center" VerticalOptions="Center"  Grid.Row="0" Grid.Column="0"></Image>

Here is the image for where i've kept image

No image displays

Edit

These are the only things in my XAML page.


问:
SBT cannot find bash while creating a Scala seed project in Play 2.6
I'm trying to create a new scala seed project in Play 2.6. From play's website I can see that they dropped the use of activator and switched to sbt commands.

I'm getting a "bash" file not found message (see below), even though I'm running SBT on Windows. Any help will be greatly appreciated.

I installed SBT version 1.0.4.

```<code>C:\test>sbt new playframework/play-scala-seed.g8
"C:\Users\pablo\.sbt\preloaded\org.scala-sbt\sbt\"1.0.4"\jars\sbt.jar"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Set current project to test (in build file:/C:/test/)
10:29:52.037 [main] ERROR org.eclipse.jgit.util.FS - Caught exception in FS.readPipe()
java.io.IOException: Cannot run program "bash" (in directory "C:\Users\pablo"): CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(Unknown Source) ~[?:1.8.0_151]
        at java.lang.Runtime.exec(Unknown Source) ~[?:1.8.0_151]
        at org.eclipse.jgit.util.FS.readPipe(FS.java:431) ~[?:?]
        at org.eclipse.jgit.util.FS_Win32.discoverGitPrefix(FS_Win32.java:113) ~[?:?]
        at org.eclipse.jgit.util.FS.gitPrefix(FS.java:517) ~[?:?]
        at org.eclipse.jgit.util.SystemReader$Default.openSystemConfig(SystemReader.java:92) ~[?:?]
        at org.eclipse.jgit.internal.storage.file.FileRepository.<init>(FileRepository.java:171) ~[?:?]
        at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:577) ~[?:?]
        at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:113) ~[?:?]
        at org.eclipse.jgit.api.CloneCommand.init(CloneCommand.java:161) ~[?:?]
        at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:132) ~[?:?]
        at giter8.JgitHelper$.clone(JgitHelper.scala:116) ~[?:?]
        at giter8.JgitHelper$.run(JgitHelper.scala:67) ~[?:?]
        at giter8.JgitHelper$.run(JgitHelper.scala:80) ~[?:?]
        at giter8.Giter8.$anonfun$run$2(giter8.scala:34) ~[?:?]
        at scala.Option.map(Option.scala:146) ~[scala-library.jar:1.0.2]
        at giter8.Giter8.run(giter8.scala:33) ~[?:?]
        at sbtgiter8resolver.Giter8TemplateResolver.run(Giter8TemplateResolver.scala:31) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_151]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_151]
        at sbt.TemplateCommandUtil$.call(TemplateCommand.scala:93) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.TemplateCommandUtil$.runTemplate(TemplateCommand.scala:71) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.TemplateCommandUtil$.$anonfun$run$1(TemplateCommand.scala:51) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.TemplateCommandUtil$.$anonfun$run$1$adapted(TemplateCommand.scala:47) ~[main_2.12-1.0.4.jar:1.0.4]
        at scala.collection.LinearSeqOptimized.find(LinearSeqOptimized.scala:111) ~[scala-library.jar:1.0.2]
        at scala.collection.LinearSeqOptimized.find$(LinearSeqOptimized.scala:108) ~[scala-library.jar:1.0.2]
        at scala.collection.immutable.List.find(List.scala:86) ~[scala-library.jar:1.0.2]
        at sbt.TemplateCommandUtil$.run(TemplateCommand.scala:47) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.TemplateCommandUtil$.runTemplate(TemplateCommand.scala:34) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.TemplateCommandUtil$.$anonfun$templateCommand$2(TemplateCommand.scala:17) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.Command$.$anonfun$applyEffect$4(Command.scala:125) ~[command_2.12-1.0.4.jar:1.0.4]
        at sbt.Command$.$anonfun$applyEffect$2(Command.scala:121) ~[command_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.processCommand(MainLoop.scala:121) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:105) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.State$$anon$1.runCmd$1(State.scala:227) ~[command_2.12-1.0.4.jar:1.0.4]
        at sbt.State$$anon$1.process(State.scala:233) ~[command_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:105) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16) ~[util-control_2.12-1.0.3.jar:1.0.3]
        at sbt.MainLoop$.next(MainLoop.scala:105) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.run(MainLoop.scala:98) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:76) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.io.Using.apply(Using.scala:22) ~[io_2.12-1.0.2.jar:1.0.2]
        at sbt.MainLoop$.runWithNewLog(MainLoop.scala:70) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.runAndClearLast(MainLoop.scala:52) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:37) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.runLogged(MainLoop.scala:29) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.StandardMain$.runManaged(Main.scala:104) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.xMain.run(Main.scala:71) ~[main_2.12-1.0.4.jar:1.0.4]
        at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109) ~[?:?]
        at xsbt.boot.Launch$.withContextLoader(Launch.scala:128) ~[?:?]
        at xsbt.boot.Launch$.run(Launch.scala:109) ~[?:?]
        at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35) ~[?:?]
        at xsbt.boot.Launch$.launch(Launch.scala:117) ~[?:?]
        at xsbt.boot.Launch$.apply(Launch.scala:18) ~[?:?]
        at xsbt.boot.Boot$.runImpl(Boot.scala:41) ~[?:?]
        at xsbt.boot.Boot$.main(Boot.scala:17) ~[?:?]
        at xsbt.boot.Boot.main(Boot.scala) ~[?:?]
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method) ~[?:1.8.0_151]
        at java.lang.ProcessImpl.<init>(Unknown Source) ~[?:1.8.0_151]
        at java.lang.ProcessImpl.start(Unknown Source) ~[?:1.8.0_151]
        ... 59 more
</code>```

答:
In windows you need to to use sbt.bat instead of sbt (which is for *nix systems).

https://github.com/playframework/playframework/issues/7768

Also as mentionned in this issue, please try to add the certificate of https://dl.bintray.com/ to the java keystore. The java keystore location is the cacerts file inside jdk_version\jre\security\

Body:
I'm trying to create a new scala seed project in Play 2.6. From play's website I can see that they dropped the use of activator and switched to sbt commands.

I'm getting a "bash" file not found message (see below), even though I'm running SBT on Windows. Any help will be greatly appreciated.

I installed SBT version 1.0.4.

C:\test>sbt new playframework/play-scala-seed.g8
"C:\Users\pablo\.sbt\preloaded\org.scala-sbt\sbt\"1.0.4"\jars\sbt.jar"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Set current project to test (in build file:/C:/test/)
10:29:52.037 [main] ERROR org.eclipse.jgit.util.FS - Caught exception in FS.readPipe()
java.io.IOException: Cannot run program "bash" (in directory "C:\Users\pablo"): CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(Unknown Source) ~[?:1.8.0_151]
        at java.lang.Runtime.exec(Unknown Source) ~[?:1.8.0_151]
        at org.eclipse.jgit.util.FS.readPipe(FS.java:431) ~[?:?]
        at org.eclipse.jgit.util.FS_Win32.discoverGitPrefix(FS_Win32.java:113) ~[?:?]
        at org.eclipse.jgit.util.FS.gitPrefix(FS.java:517) ~[?:?]
        at org.eclipse.jgit.util.SystemReader$Default.openSystemConfig(SystemReader.java:92) ~[?:?]
        at org.eclipse.jgit.internal.storage.file.FileRepository.<init>(FileRepository.java:171) ~[?:?]
        at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:577) ~[?:?]
        at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:113) ~[?:?]
        at org.eclipse.jgit.api.CloneCommand.init(CloneCommand.java:161) ~[?:?]
        at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:132) ~[?:?]
        at giter8.JgitHelper$.clone(JgitHelper.scala:116) ~[?:?]
        at giter8.JgitHelper$.run(JgitHelper.scala:67) ~[?:?]
        at giter8.JgitHelper$.run(JgitHelper.scala:80) ~[?:?]
        at giter8.Giter8.$anonfun$run$2(giter8.scala:34) ~[?:?]
        at scala.Option.map(Option.scala:146) ~[scala-library.jar:1.0.2]
        at giter8.Giter8.run(giter8.scala:33) ~[?:?]
        at sbtgiter8resolver.Giter8TemplateResolver.run(Giter8TemplateResolver.scala:31) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_151]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_151]
        at sbt.TemplateCommandUtil$.call(TemplateCommand.scala:93) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.TemplateCommandUtil$.runTemplate(TemplateCommand.scala:71) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.TemplateCommandUtil$.$anonfun$run$1(TemplateCommand.scala:51) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.TemplateCommandUtil$.$anonfun$run$1$adapted(TemplateCommand.scala:47) ~[main_2.12-1.0.4.jar:1.0.4]
        at scala.collection.LinearSeqOptimized.find(LinearSeqOptimized.scala:111) ~[scala-library.jar:1.0.2]
        at scala.collection.LinearSeqOptimized.find$(LinearSeqOptimized.scala:108) ~[scala-library.jar:1.0.2]
        at scala.collection.immutable.List.find(List.scala:86) ~[scala-library.jar:1.0.2]
        at sbt.TemplateCommandUtil$.run(TemplateCommand.scala:47) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.TemplateCommandUtil$.runTemplate(TemplateCommand.scala:34) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.TemplateCommandUtil$.$anonfun$templateCommand$2(TemplateCommand.scala:17) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.Command$.$anonfun$applyEffect$4(Command.scala:125) ~[command_2.12-1.0.4.jar:1.0.4]
        at sbt.Command$.$anonfun$applyEffect$2(Command.scala:121) ~[command_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.processCommand(MainLoop.scala:121) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:105) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.State$$anon$1.runCmd$1(State.scala:227) ~[command_2.12-1.0.4.jar:1.0.4]
        at sbt.State$$anon$1.process(State.scala:233) ~[command_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:105) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16) ~[util-control_2.12-1.0.3.jar:1.0.3]
        at sbt.MainLoop$.next(MainLoop.scala:105) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.run(MainLoop.scala:98) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:76) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.io.Using.apply(Using.scala:22) ~[io_2.12-1.0.2.jar:1.0.2]
        at sbt.MainLoop$.runWithNewLog(MainLoop.scala:70) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.runAndClearLast(MainLoop.scala:52) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:37) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.MainLoop$.runLogged(MainLoop.scala:29) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.StandardMain$.runManaged(Main.scala:104) ~[main_2.12-1.0.4.jar:1.0.4]
        at sbt.xMain.run(Main.scala:71) ~[main_2.12-1.0.4.jar:1.0.4]
        at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109) ~[?:?]
        at xsbt.boot.Launch$.withContextLoader(Launch.scala:128) ~[?:?]
        at xsbt.boot.Launch$.run(Launch.scala:109) ~[?:?]
        at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35) ~[?:?]
        at xsbt.boot.Launch$.launch(Launch.scala:117) ~[?:?]
        at xsbt.boot.Launch$.apply(Launch.scala:18) ~[?:?]
        at xsbt.boot.Boot$.runImpl(Boot.scala:41) ~[?:?]
        at xsbt.boot.Boot$.main(Boot.scala:17) ~[?:?]
        at xsbt.boot.Boot.main(Boot.scala) ~[?:?]
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method) ~[?:1.8.0_151]
        at java.lang.ProcessImpl.<init>(Unknown Source) ~[?:1.8.0_151]
        at java.lang.ProcessImpl.start(Unknown Source) ~[?:1.8.0_151]
        ... 59 more


问:
android intent extra data retrieval problem
I have a wierd problem. I have the following code:

```<code>if (fbIntent.hasExtra("Link")) {
            try{
            postData[0]= fbIntent.getStringExtra("Link");
            } catch (Exception e) {Log.d("fbIntent error",e.getMessage() );}
        }
</code>```

fbIntent.hasExtra("Link") is true. So the compiler goes into the if statement. But I am not able to get the string using fbIntent.getStringExtra("Link"). This I know from debugging in eclipse. When I run it, I get :

```<code>01-21 14:12:01.030: ERROR/AndroidRuntime(311): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.examples.Kikin/com.examples.Kikin.FacebookLogin}: java.lang.NullPointerException: println needs a message
</code>```

Please help me.

答:
1) Your current issue is in

```<code>Log.d("fbIntent error", e.getMessage());
</code>```

e.getMessage() may return null, so you get the java.lang.NullPointerException: println needs a message. Use e.toString() instead. Or the best way would be:

```<code>Log.e("some tag", "some comment", e);
</code>```

2) When you fix this, you will be able to see the actual error to go further in fixing your root/real issue. So feel free to update your post with new log data.

Body:
I have a wierd problem. I have the following code:

if (fbIntent.hasExtra("Link")) {
            try{
            postData[0]= fbIntent.getStringExtra("Link");
            } catch (Exception e) {Log.d("fbIntent error",e.getMessage() );}
        }

fbIntent.hasExtra("Link") is true. So the compiler goes into the if statement. But I am not able to get the string using fbIntent.getStringExtra("Link"). This I know from debugging in eclipse. When I run it, I get :

01-21 14:12:01.030: ERROR/AndroidRuntime(311): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.examples.Kikin/com.examples.Kikin.FacebookLogin}: java.lang.NullPointerException: println needs a message

Please help me.

Body:
1) Your current issue is in

Log.d("fbIntent error", e.getMessage());

e.getMessage() may return null, so you get the java.lang.NullPointerException: println needs a message. Use e.toString() instead. Or the best way would be:

Log.e("some tag", "some comment", e);

2) When you fix this, you will be able to see the actual error to go further in fixing your root/real issue. So feel free to update your post with new log data.


问:
SQL COUNT returns "Null value eliminated" error on left join
I have a bit of code that looks roughly like this:

```<code>DECLARE @Test int, @LookupVal varchar(50) = 'test'
SELECT @Test = COUNT(M.MembershipID)
FROM dbo.Users U WITH (NOLOCK)
LEFT JOIN dbo.UserMemberships M WITH (NOLOCK) ON M.UserID = U.UserID
AND M.MembershipID = @LookupVal
SELECT @Test
</code>```

This works fine when the lookup returns multiple rows; the second SELECT returns the number of rows. If there are no MembershipIDs with value 'test' it correctly shows 0, but the system log also show the error message "Warning: Null value is eliminated by an aggregate or other SET operation."

I know I could disable this with SET ANSI_WARNINGS OFF. However, I am convinced this must be some setting I (or a coworker) have accidentally changed on our instance of SQL Server. I have written lots of statements in this format throughout a large code base, and I have never before seen this error until today. I want to know what setting might have changed, so I can switch that back.

Another change that fixes it is removing the LEFT; as a regular JOIN this correctly returns the value 0 with no other errors. Also if I simply SELECT COUNT(M.MembershipID) without putting it into the @Test variable, then it simply displays 0 and no error. It is only on a LEFT JOIN with the variable that the error occurs.

NOTE: I am not simply asking about this message, or looking for a way to disable it in this specific case. I want to know why it has suddenly started happening in an old bit of code, specifically caused by the combination of a left join and selecting into a variable.

答:
Q: "I want to know what setting might have changed"

If there was a SQL Server setting that changed (which is now causing the "NULL value is eliminated" warning to be issued when it wasn't before...)

I think you answered you own question.

Maybe the ANSI_WARNINGS database option that was enabled. Or possibly the ANSI_DEFAULTS database option.

These database options are default values, they aren't enforced in the database. These can be overridden and ignored by the client connection to the database. So its also possible that the connection string was changed.

I think this may all be barking up the wrong tree, about a setting change.

There are a variety of simple query changes will eliminate the warning, and at the same time, make the intent of the query more clear.

Body:
I have a bit of code that looks roughly like this:

DECLARE @Test int, @LookupVal varchar(50) = 'test'
SELECT @Test = COUNT(M.MembershipID)
FROM dbo.Users U WITH (NOLOCK)
LEFT JOIN dbo.UserMemberships M WITH (NOLOCK) ON M.UserID = U.UserID
AND M.MembershipID = @LookupVal
SELECT @Test

This works fine when the lookup returns multiple rows; the second SELECT returns the number of rows. If there are no MembershipIDs with value 'test' it correctly shows 0, but the system log also show the error message "Warning: Null value is eliminated by an aggregate or other SET operation."

I know I could disable this with SET ANSI_WARNINGS OFF. However, I am convinced this must be some setting I (or a coworker) have accidentally changed on our instance of SQL Server. I have written lots of statements in this format throughout a large code base, and I have never before seen this error until today. I want to know what setting might have changed, so I can switch that back.

Another change that fixes it is removing the LEFT; as a regular JOIN this correctly returns the value 0 with no other errors. Also if I simply SELECT COUNT(M.MembershipID) without putting it into the @Test variable, then it simply displays 0 and no error. It is only on a LEFT JOIN with the variable that the error occurs.

NOTE: I am not simply asking about this message, or looking for a way to disable it in this specific case. I want to know why it has suddenly started happening in an old bit of code, specifically caused by the combination of a left join and selecting into a variable.


问:
excel report generate with dynamic pages
I'm trying to print a report in excel for every division of a company to get a single report containing the appendix reports of the sections below them. I.e. Human Resources Division has sections of recruiting, staffing, compliance, inclusion and diversity, leadership development, etc. </p>

<p>I want the report to have the static pages followed by the four dynamic pages of each of that division's sections behind it. Right now, only a single section is printed/generated when I run the code. </p>

```<code>Sub GenerateReports()
Dim intRowDiv as Integer
Dim intRowSec as Integer

intRowDiv = 13
intRowSec = 13

Do While Sheets("LOOKUP_VALUES").Cells(2,2).Value = Sheets("LOOKUP_VALUES").Cells(intRowDiv,1).Value

Application.Calculate

'file naming
tempFileName = Sheets("LOOKUP_VALUES").Cells(7,2).Value & " - CLIMATE.pdf"
tempFileName = Replace(tempFileName, "/", "_")
tempFileName = Replace(tempFileName, "\", "_")
tempFileName = Replace(tempFileName, "&", "_")
tempFileName = Replace(tempFileName, ":", "_")

'Select Static Pages
Sheets(Array("2018 CoverPage", "intro", "table of contents", "division snapshot", "engagement snapshot", "action planning", "resources", "branch TOC", "branch intro")).Select

'Select Dynamic Pages
Sheets(2018 CoverPage").Activate

Do While Sheets("LOOKUP_VALUES").Cells(intRowSec, 4).Value <> ""

Sheets("LOOKUP_VALUES").Cells(8,2).Value = Sheets("LOOKUP_VALUES").Cells(intRowSec,4).Value

Sheets(Array("2018 Page10", "2018 Page11", "2018 Page12", "2018 Page13")).Select

'print to local location on comp
tempFileName = "C:\Users\sslattery\Documents\clim_reports\reports\" & TempFileName

'print full
ActiveSheet.ExportAsFixedFormat Type:xlTypePDF, Filename:= _
tempFileName _
, Quality:=xlQUalityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False

'next section
intRowSec = IntRowSec + 1
Loop

'next division
intRowDiv = intRowDiv + 1
Loop

End Sub
</code>```

答:
If only one section is being printed, this means that your logic is broken somewhere. You have two loops - an inner and an outer loop. Make sure that each one is looping correctly with something as simple as this one:

```<code>Sub GenerateReports()
    Dim intRowDiv As Integer
    Dim intRowSec As Integer

    intRowDiv = 13
    intRowSec = 13

    Do While Sheets("LOOKUP_VALUES").Cells(2, 2).Value = Sheets("LOOKUP_VALUES").Cells(intRowDiv, 1).Value
        Debug.Print "Loop A " & Sheets("LOOKUP_VALUES").Cells(2, 2).Value
        Do While Sheets("LOOKUP_VALUES").Cells(intRowSec, 4).Value <> ""
            Debug.Print "Loop B " & Sheets("LOOKUP_VALUES").Cells(2, 2).Value
            intRowSec = intRowSec + 1
        Loop
        intRowDiv = intRowDiv + 1
    Loop

End Sub
</code>```

You should get some information on the Immediate Window (press Ctrl + G to see it) and try to make sure that it is exactly the way you want it to be.

Body:
I'm trying to print a report in excel for every division of a company to get a single report containing the appendix reports of the sections below them. I.e. Human Resources Division has sections of recruiting, staffing, compliance, inclusion and diversity, leadership development, etc.

I want the report to have the static pages followed by the four dynamic pages of each of that division's sections behind it. Right now, only a single section is printed/generated when I run the code.

Sub GenerateReports()
Dim intRowDiv as Integer
Dim intRowSec as Integer

intRowDiv = 13
intRowSec = 13

Do While Sheets("LOOKUP_VALUES").Cells(2,2).Value = Sheets("LOOKUP_VALUES").Cells(intRowDiv,1).Value

Application.Calculate

'file naming
tempFileName = Sheets("LOOKUP_VALUES").Cells(7,2).Value & " - CLIMATE.pdf"
tempFileName = Replace(tempFileName, "/", "_")
tempFileName = Replace(tempFileName, "\", "_")
tempFileName = Replace(tempFileName, "&", "_")
tempFileName = Replace(tempFileName, ":", "_")

'Select Static Pages
Sheets(Array("2018 CoverPage", "intro", "table of contents", "division snapshot", "engagement snapshot", "action planning", "resources", "branch TOC", "branch intro")).Select

'Select Dynamic Pages
Sheets(2018 CoverPage").Activate

Do While Sheets("LOOKUP_VALUES").Cells(intRowSec, 4).Value <> ""

Sheets("LOOKUP_VALUES").Cells(8,2).Value = Sheets("LOOKUP_VALUES").Cells(intRowSec,4).Value

Sheets(Array("2018 Page10", "2018 Page11", "2018 Page12", "2018 Page13")).Select

'print to local location on comp
tempFileName = "C:\Users\sslattery\Documents\clim_reports\reports\" & TempFileName

'print full
ActiveSheet.ExportAsFixedFormat Type:xlTypePDF, Filename:= _
tempFileName _
, Quality:=xlQUalityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False

'next section
intRowSec = IntRowSec + 1
Loop

'next division
intRowDiv = intRowDiv + 1
Loop

End Sub

Body:
If only one section is being printed, this means that your logic is broken somewhere. You have two loops - an inner and an outer loop. Make sure that each one is looping correctly with something as simple as this one:

Sub GenerateReports()
    Dim intRowDiv As Integer
    Dim intRowSec As Integer

    intRowDiv = 13
    intRowSec = 13

    Do While Sheets("LOOKUP_VALUES").Cells(2, 2).Value = Sheets("LOOKUP_VALUES").Cells(intRowDiv, 1).Value
        Debug.Print "Loop A " & Sheets("LOOKUP_VALUES").Cells(2, 2).Value
        Do While Sheets("LOOKUP_VALUES").Cells(intRowSec, 4).Value <> ""
            Debug.Print "Loop B " & Sheets("LOOKUP_VALUES").Cells(2, 2).Value
            intRowSec = intRowSec + 1
        Loop
        intRowDiv = intRowDiv + 1
    Loop

End Sub

You should get some information on the Immediate Window (press Ctrl + G to see it) and try to make sure that it is exactly the way you want it to be.


问:
git remote -v not showing remote after git fetch --all
I'm working with a git project and I need to add a remote repository.

In the PC1 I added the remote repo with:
git remote add new_repo https://192.168.2.223 (this is the IP of my PC1 within the network).

Then, in another pc (PC2) within the same network, I tried to fetch the new_repo I've just created:
git fetch --all.

Now in the PC2, if I type: git remote -v I can't see the new_repo.

What's wrong?

答:
Remotes must be configured on each local repo.

Remote configuration is not shared among repos.  In a typical setup, for example, the origin repo does not know itself as a remote (and may or may not not have any configured remotes); when a user clones from this central repo, the default behavior sets origin itself as a remote (because it's what was cloned), but even if the central repo does have other remotes, they are not copied.

This is almost always the desired behavior.  In cases where it is not, the problem can be addressed the same as for any other local git configuration that you might want to share: by committing a script that the developer may run to set up those configuration values you want to share.


问:
Bootstrap trying to load map file. How to disable it? Do I need to do it?
I'm recently playing with bootsrap3. I compiled it from sources and included distr js and css to my project. The thing is, I see in GH dev tools, that it's trying to get .map.css file. Why does it want to do so? How to disable it? Do I need to disable it? To not to have an error mark in dev tools, I added that map file, after which all styles are displayed as they defined in less files, which doesn't help me much.</p>

答:
Deleting this line fixes it, but the problem is the boostrap files are in bower_components and not checked into source control.

So, every developer on the team will get the css file with the map reference when they pull the repo and do bower install (which is part of using a new repo).

The file should not have the reference to a map that is not there.


问:
Areogear unifiedPush console is not responding
I have installed an aerogear unified push server on my Windows 7-system, did create and update the unifiedpush-database, created a keystore, configured the 'standalone-full.xml' of my wildfly-11.0.0 and finally deployed the 'unifiedpush-server-wildfly.war' beside my 'otherApplication.war'.

But, although there are no more errors on startup of the JBoss and info 'Deployed "unifiedpush-server-wildfly.war" (runtime-name : "unifiedpush-server-wildfly.war")' is given, the call of the push-server-console by http://localhost:8080/ag-push gives an 404-error.

The start-commandline of the wildfly is :

C:\[PathToWildfly]\wildfly-11.0.0.Final\bin\standalone.bat -c standalone-full.xml -Dups.realm.name=aerogear -Dups.auth.server.url=http://127.0.0.1:8080/auth -b 0.0.0.0

What did I miss? Please help!

My (partly) 'standalone-full.xml':

```<code><?xml version='1.0' encoding='UTF-8'?>

<server xmlns="urn:jboss:domain:5.0">
    <extensions>
        ...
    </extensions>
    <management>
        <security-realms>
            <security-realm name="ManagementRealm">
                ...
            </security-realm>
            <security-realm name="ApplicationRealm">
                <server-identities>
                    <ssl>
                        <keystore path="apps.keystore\\keystoreFile.jks" relative-to="jboss.server.config.dir" keystore-password="martin123" alias="serverkey" key-password="martin123" generate-self-signed-certificate-host="localhost"/>
                    </ssl>
                </server-identities>
                <authentication>
                    <local default-user="$local" allowed-users="*" skip-group-loading="true"/>
                    <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
                </authentication>
                <authorization>
                    <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
                </authorization>
            </security-realm>
            <security-realm name="AeroGearRealm">
                <server-identities>
                    <ssl>
                        <keystore path="apps.keystore\\keystoreFile.jks" relative-to="jboss.server.config.dir" keystore-password="martin123" alias="serverkey" key-password="martin123" generate-self-signed-certificate-host="localhost"/>
                    </ssl>
                </server-identities>
            </security-realm>
        </security-realms>
        <audit-log>
            ...
        </audit-log>
        <management-interfaces>
            <http-interface security-realm="ManagementRealm">
                <http-upgrade enabled="true"/>
                <socket-binding http="management-http"/>
            </http-interface>
        </management-interfaces>
        <access-control provider="simple">
            <role-mapping>
                <role name="SuperUser">
                    <include>
                        <user name="$local"/>
                    </include>
                </role>
            </role-mapping>
        </access-control>
    </management>
    <profile>
        <subsystem xmlns="urn:jboss:domain:logging:3.0">
            ...
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:batch-jberet:2.0">
            ...
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>
        <subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
        <subsystem xmlns="urn:jboss:domain:datasources:5.0">
            <datasources>
                <datasource jndi-name="java:/OtherAppDS" pool-name="OtherAppDS" enabled="true">
                    ...
                </datasource>
                <datasource jndi-name="java:jboss/datasources/UnifiedPushDS" pool-name="UnifiedPushDS" enabled="true" use-ccm="false">
                    <connection-url>jdbc:mysql://localhost:3306/unifiedpush?useUnicode=true&characterEncoding=UTF-8</connection-url>
                    <driver>mysql</driver>
                    <pool>
                        <max-pool-size>25</max-pool-size>
                    </pool>
                    <security>
                        <user-name>unifiedpush</user-name>
                        <password>unifiedpush</password>
                    </security>
                    <timeout>
                        <blocking-timeout-millis>5000</blocking-timeout-millis>
                    </timeout>
                </datasource>
                <drivers>
                    <driver name="mysql" module="com.mysql">
                        <driver-class>com.mysql.jdbc.Driver</driver-class>
                    </driver>
                    <driver name="h2" module="com.h2database.h2">
                        <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                    </driver>
                </drivers>
            </datasources>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
            <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:ee:4.0">
            ...
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:ejb3:5.0">
            ...
        </subsystem>
        <subsystem xmlns="urn:wildfly:elytron:1.2" final-providers="combined-providers" disallowed-providers="OracleUcrypto">
            ...
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:io:2.0">
            <worker name="default"/>
            <buffer-pool name="default"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:infinispan:4.0">
            <cache-container name="server" default-cache="default" module="org.wildfly.clustering.server">
                <local-cache name="default">
                    <transaction mode="BATCH"/>
                </local-cache>
            </cache-container>
            <cache-container name="web" default-cache="passivation" module="org.wildfly.clustering.web.infinispan">
                <local-cache name="passivation">
                    <locking isolation="REPEATABLE_READ"/>
                    <transaction mode="BATCH"/>
                    <file-store passivation="true" purge="false"/>
                </local-cache>
            </cache-container>
            <cache-container name="ejb" aliases="sfsb" default-cache="passivation" module="org.wildfly.clustering.ejb.infinispan">
                <local-cache name="passivation">
                    <locking isolation="REPEATABLE_READ"/>
                    <transaction mode="BATCH"/>
                    <file-store passivation="true" purge="false"/>
                </local-cache>
            </cache-container>
            <cache-container name="hibernate" module="org.hibernate.infinispan">
                <local-cache name="entity">
                    <transaction mode="NON_XA"/>
                    <eviction strategy="LRU" max-entries="10000"/>
                    <expiration max-idle="100000"/>
                </local-cache>
                <local-cache name="local-query">
                    <eviction strategy="LRU" max-entries="10000"/>
                    <expiration max-idle="100000"/>
                </local-cache>
                <local-cache name="timestamps"/>
            </cache-container>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:iiop-openjdk:2.0">
            <orb socket-binding="iiop"/>
            <initializers security="identity" transactions="spec"/>
            <security server-requires-ssl="false" client-requires-ssl="false"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
        <subsystem xmlns="urn:jboss:domain:jca:5.0">
            <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
            <bean-validation enabled="true"/>
            <default-workmanager>
                <short-running-threads>
                    <core-threads count="50"/>
                    <queue-length count="50"/>
                    <max-threads count="50"/>
                    <keepalive-time time="10" unit="seconds"/>
                </short-running-threads>
                <long-running-threads>
                    <core-threads count="50"/>
                    <queue-length count="50"/>
                    <max-threads count="50"/>
                    <keepalive-time time="10" unit="seconds"/>
                </long-running-threads>
            </default-workmanager>
            <cached-connection-manager/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
        <subsystem xmlns="urn:jboss:domain:jmx:1.3">
            <expose-resolved-model/>
            <expose-expression-model/>
            <remoting-connector/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:jpa:1.1">
            <jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:jsf:1.0"/>
        <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>
        <subsystem xmlns="urn:jboss:domain:mail:3.0">
            <mail-session name="default" jndi-name="java:jboss/mail/Default">
                <smtp-server outbound-socket-binding-ref="mail-smtp" ssl="false" username="xxxxxxx" password="xxxxxxx"/>
                <pop3-server outbound-socket-binding-ref="mail-pop3" username="xxxxxxx" password="xxxxxxx"/>
            </mail-session>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:messaging-activemq:2.0">
            <server name="default">
                <security-setting name="#">
                    <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
                </security-setting>
                <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/>
                <address-setting name="jms.queue.AdmPushMessageQueue" max-redelivery-delay="5000" max-delivery-attempts="-1" redelivery-multiplier="1.5" redelivery-delay="1500"/>
                <address-setting name="jms.queue.AdmTokenBatchQueue" address-full-policy="FAIL" max-size-bytes="40000"/>
                <address-setting name="jms.queue.APNsPushMessageQueue" max-redelivery-delay="5000" max-delivery-attempts="-1" redelivery-multiplier="1.5" redelivery-delay="1500"/>
                <address-setting name="jms.queue.APNsTokenBatchQueue" address-full-policy="FAIL" max-size-bytes="40000"/>
                <address-setting name="jms.queue.GCMPushMessageQueue" max-redelivery-delay="5000" max-delivery-attempts="-1" redelivery-multiplier="1.5" redelivery-delay="1500"/>
                <address-setting name="jms.queue.GCMTokenBatchQueue" address-full-policy="FAIL" max-size-bytes="40000"/>
                <address-setting name="jms.queue.MPNSPushMessageQueue" max-redelivery-delay="5000" max-delivery-attempts="-1" redelivery-multiplier="1.5" redelivery-delay="1500"/>
                <address-setting name="jms.queue.MPNSTokenBatchQueue" address-full-policy="FAIL" max-size-bytes="40000"/>
                <address-setting name="jms.queue.SimplePushMessageQueue" max-redelivery-delay="5000" max-delivery-attempts="-1" redelivery-multiplier="1.5" redelivery-delay="1500"/>
                <address-setting name="jms.queue.SimplePushTokenBatchQueue" address-full-policy="FAIL" max-size-bytes="40000"/>
                <address-setting name="jms.queue.WNSPushMessageQueue" max-redelivery-delay="5000" max-delivery-attempts="-1" redelivery-multiplier="1.5" redelivery-delay="1500"/>
                <address-setting name="jms.queue.WNSTokenBatchQueue" address-full-policy="FAIL" max-size-bytes="40000"/>
                <address-setting name="jms.queue.MetricsQueue" max-delivery-attempts="-1"/>
                <address-setting name="jms.queue.TriggerMetricCollectionQueue" max-delivery-attempts="-1" redelivery-delay="1000"/>
                <address-setting name="jms.queue.BatchLoadedQueue" max-delivery-attempts="-1"/>
                <address-setting name="jms.queue.AllBatchesLoadedQueue" max-delivery-attempts="-1"/>
                <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
                <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
                    <param name="batch-delay" value="50"/>
                </http-connector>
                <in-vm-connector name="in-vm" server-id="0">
                    <param name="buffer-pooling" value="false"/>
                </in-vm-connector>
                <http-acceptor name="http-acceptor" http-listener="default"/>
                <http-acceptor name="http-acceptor-throughput" http-listener="default">
                    <param name="batch-delay" value="50"/>
                    <param name="direct-deliver" value="false"/>
                </http-acceptor>
                <in-vm-acceptor name="in-vm" server-id="0">
                    <param name="buffer-pooling" value="false"/>
                </in-vm-acceptor>
                <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
                <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
                <jms-queue name="InstitutionInterfaceReceiverQueue" entries="java:/jms/queue/InstitutionInterfaceReceiverQueue"/>
                <jms-queue name="MailQueue" entries="java:/jms/queue/mail"/>
                <jms-queue name="AdmPushMessageQueue" entries="queue/AdmPushMessageQueue"/>
                <jms-queue name="AdmTokenBatchQueue" entries="queue/AdmTokenBatchQueue"/>
                <jms-queue name="APNsPushMessageQueue" entries="queue/APNsPushMessageQueue"/>
                <jms-queue name="APNsTokenBatchQueue" entries="queue/APNsTokenBatchQueue"/>
                <jms-queue name="GCMPushMessageQueue" entries="queue/GCMPushMessageQueue"/>
                <jms-queue name="GCMTokenBatchQueue" entries="queue/GCMTokenBatchQueue"/>
                <jms-queue name="MPNSPushMessageQueue" entries="queue/MPNSPushMessageQueue"/>
                <jms-queue name="MPNSTokenBatchQueue" entries="queue/MPNSTokenBatchQueue"/>
                <jms-queue name="SimplePushMessageQueue" entries="queue/SimplePushMessageQueue"/>
                <jms-queue name="SimplePushTokenBatchQueue" entries="queue/SimplePushTokenBatchQueue"/>
                <jms-queue name="WNSPushMessageQueue" entries="queue/WNSPushMessageQueue"/>
                <jms-queue name="WNSTokenBatchQueue" entries="queue/WNSTokenBatchQueue"/>
                <jms-queue name="MetricsQueue" entries="queue/MetricsQueue"/>
                <jms-queue name="TriggerMetricCollectionQueue" entries="queue/TriggerMetricCollectionQueue"/>
                <jms-queue name="TriggerVariantMetricCollectionQueue" entries="queue/TriggerVariantMetricCollectionQueue"/>
                <jms-queue name="BatchLoadedQueue" entries="queue/BatchLoadedQueue"/>
                <jms-queue name="AllBatchesLoadedQueue" entries="queue/AllBatchesLoadedQueue"/>
                <jms-queue name="FreeServiceSlotQueue" entries="queue/FreeServiceSlotQueue"/>
                <jms-topic name="MetricsProcessingStartedTopic" entries="topic/MetricsProcessingStartedTopic"/>
                <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
                <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/>
                <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
            </server>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:naming:2.0">
            <remote-naming/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
        <subsystem xmlns="urn:jboss:domain:remoting:4.0">
            <endpoint/>
            <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:resource-adapters:5.0"/>
        <subsystem xmlns="urn:jboss:domain:request-controller:1.0"/>
        <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
        <subsystem xmlns="urn:jboss:domain:security-manager:1.0">
            <deployment-permissions>
                <maximum-set>
                    <permission class="java.security.AllPermission"/>
                </maximum-set>
            </deployment-permissions>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:security:2.0">
            ...
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:transactions:4.0">
            ...
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:undertow:4.0">
            <buffer-cache name="default"/>
            <server name="default-server">
                <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<!--                <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>-->
                <https-listener name="https" socket-binding="https" security-realm="AeroGearRealm"/>
                <host name="default-host" alias="localhost">
                    <location name="/" handler="welcome-content"/>
                    <filter-ref name="server-header"/>
                    <filter-ref name="x-powered-by-header"/>
                    <http-invoker security-realm="ApplicationRealm"/>
                </host>
            </server>
            <servlet-container name="default">
                <jsp-config/>
                <websockets/>
            </servlet-container>
            <handlers>
                <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
            </handlers>
            <filters>
                <response-header name="server-header" header-name="Server" header-value="WildFly/11"/>
                <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
            </filters>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:webservices:2.0">
            <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
            <endpoint-config name="Standard-Endpoint-Config"/>
            <endpoint-config name="Recording-Endpoint-Config">
                <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
                    <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
                </pre-handler-chain>
            </endpoint-config>
            <client-config name="Standard-Client-Config"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:weld:4.0"/>
    </profile>
    <interfaces>
        <interface name="management">
            <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
        </interface>
        <interface name="public">
            <any-address/>
        </interface>
        <interface name="unsecure">
            <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
        </interface>
    </interfaces>
    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9980}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9983}"/>
        <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
        <socket-binding name="http" port="${jboss.http.port:8080}"/>
        <socket-binding name="https" port="${jboss.https.port:8443}"/>
        <socket-binding name="iiop" interface="unsecure" port="3528"/>
        <socket-binding name="iiop-ssl" interface="unsecure" port="3529"/>
        <socket-binding name="txn-recovery-environment" port="4712"/>
        <socket-binding name="txn-status-manager" port="4713"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="mail.kontent.com" port="25"/>
        </outbound-socket-binding>
        <outbound-socket-binding name="mail-pop3">
            <remote-destination host="pop.kontent.com" port="110"/>
        </outbound-socket-binding>
    </socket-binding-group>
</server>
</code>```

答:
Your console will first talk to KeyCloak for authentication. Aerogear is just one piece of the puzzle, you have to also ensure standalone Keycloak server is up and running (assuming you are using Aerogear 1.2.0-Final)

Have you set up KeyCloak server correctly? Try to test http://127.0.0.1:8080/auth and make sure it is ready for Aerogear/JBoss to authenticate users and a realm is also set up for this purpose.

The documentation is not up to par at this moment. Post your question if you still have the issues.

Body:
I have installed an aerogear unified push server on my Windows 7-system, did create and update the unifiedpush-database, created a keystore, configured the 'standalone-full.xml' of my wildfly-11.0.0 and finally deployed the 'unifiedpush-server-wildfly.war' beside my 'otherApplication.war'.

But, although there are no more errors on startup of the JBoss and info 'Deployed "unifiedpush-server-wildfly.war" (runtime-name : "unifiedpush-server-wildfly.war")' is given, the call of the push-server-console by http://localhost:8080/ag-push gives an 404-error.

The start-commandline of the wildfly is :

C:\[PathToWildfly]\wildfly-11.0.0.Final\bin\standalone.bat -c standalone-full.xml -Dups.realm.name=aerogear -Dups.auth.server.url=http://127.0.0.1:8080/auth -b 0.0.0.0

What did I miss? Please help!

My (partly) 'standalone-full.xml':

<?xml version='1.0' encoding='UTF-8'?>

<server xmlns="urn:jboss:domain:5.0">
    <extensions>
        ...
    </extensions>
    <management>
        <security-realms>
            <security-realm name="ManagementRealm">
                ...
            </security-realm>
            <security-realm name="ApplicationRealm">
                <server-identities>
                    <ssl>
                        <keystore path="apps.keystore\\keystoreFile.jks" relative-to="jboss.server.config.dir" keystore-password="martin123" alias="serverkey" key-password="martin123" generate-self-signed-certificate-host="localhost"/>
                    </ssl>
                </server-identities>
                <authentication>
                    <local default-user="$local" allowed-users="*" skip-group-loading="true"/>
                    <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
                </authentication>
                <authorization>
                    <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
                </authorization>
            </security-realm>
            <security-realm name="AeroGearRealm">
                <server-identities>
                    <ssl>
                        <keystore path="apps.keystore\\keystoreFile.jks" relative-to="jboss.server.config.dir" keystore-password="martin123" alias="serverkey" key-password="martin123" generate-self-signed-certificate-host="localhost"/>
                    </ssl>
                </server-identities>
            </security-realm>
        </security-realms>
        <audit-log>
            ...
        </audit-log>
        <management-interfaces>
            <http-interface security-realm="ManagementRealm">
                <http-upgrade enabled="true"/>
                <socket-binding http="management-http"/>
            </http-interface>
        </management-interfaces>
        <access-control provider="simple">
            <role-mapping>
                <role name="SuperUser">
                    <include>
                        <user name="$local"/>
                    </include>
                </role>
            </role-mapping>
        </access-control>
    </management>
    <profile>
        <subsystem xmlns="urn:jboss:domain:logging:3.0">
            ...
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:batch-jberet:2.0">
            ...
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>
        <subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
        <subsystem xmlns="urn:jboss:domain:datasources:5.0">
            <datasources>
                <datasource jndi-name="java:/OtherAppDS" pool-name="OtherAppDS" enabled="true">
                    ...
                </datasource>
                <datasource jndi-name="java:jboss/datasources/UnifiedPushDS" pool-name="UnifiedPushDS" enabled="true" use-ccm="false">
                    <connection-url>jdbc:mysql://localhost:3306/unifiedpush?useUnicode=true&characterEncoding=UTF-8</connection-url>
                    <driver>mysql</driver>
                    <pool>
                        <max-pool-size>25</max-pool-size>
                    </pool>
                    <security>
                        <user-name>unifiedpush</user-name>
                        <password>unifiedpush</password>
                    </security>
                    <timeout>
                        <blocking-timeout-millis>5000</blocking-timeout-millis>
                    </timeout>
                </datasource>
                <drivers>
                    <driver name="mysql" module="com.mysql">
                        <driver-class>com.mysql.jdbc.Driver</driver-class>
                    </driver>
                    <driver name="h2" module="com.h2database.h2">
                        <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                    </driver>
                </drivers>
            </datasources>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
            <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:ee:4.0">
            ...
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:ejb3:5.0">
            ...
        </subsystem>
        <subsystem xmlns="urn:wildfly:elytron:1.2" final-providers="combined-providers" disallowed-providers="OracleUcrypto">
            ...
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:io:2.0">
            <worker name="default"/>
            <buffer-pool name="default"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:infinispan:4.0">
            <cache-container name="server" default-cache="default" module="org.wildfly.clustering.server">
                <local-cache name="default">
                    <transaction mode="BATCH"/>
                </local-cache>
            </cache-container>
            <cache-container name="web" default-cache="passivation" module="org.wildfly.clustering.web.infinispan">
                <local-cache name="passivation">
                    <locking isolation="REPEATABLE_READ"/>
                    <transaction mode="BATCH"/>
                    <file-store passivation="true" purge="false"/>
                </local-cache>
            </cache-container>
            <cache-container name="ejb" aliases="sfsb" default-cache="passivation" module="org.wildfly.clustering.ejb.infinispan">
                <local-cache name="passivation">
                    <locking isolation="REPEATABLE_READ"/>
                    <transaction mode="BATCH"/>
                    <file-store passivation="true" purge="false"/>
                </local-cache>
            </cache-container>
            <cache-container name="hibernate" module="org.hibernate.infinispan">
                <local-cache name="entity">
                    <transaction mode="NON_XA"/>
                    <eviction strategy="LRU" max-entries="10000"/>
                    <expiration max-idle="100000"/>
                </local-cache>
                <local-cache name="local-query">
                    <eviction strategy="LRU" max-entries="10000"/>
                    <expiration max-idle="100000"/>
                </local-cache>
                <local-cache name="timestamps"/>
            </cache-container>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:iiop-openjdk:2.0">
            <orb socket-binding="iiop"/>
            <initializers security="identity" transactions="spec"/>
            <security server-requires-ssl="false" client-requires-ssl="false"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
        <subsystem xmlns="urn:jboss:domain:jca:5.0">
            <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
            <bean-validation enabled="true"/>
            <default-workmanager>
                <short-running-threads>
                    <core-threads count="50"/>
                    <queue-length count="50"/>
                    <max-threads count="50"/>
                    <keepalive-time time="10" unit="seconds"/>
                </short-running-threads>
                <long-running-threads>
                    <core-threads count="50"/>
                    <queue-length count="50"/>
                    <max-threads count="50"/>
                    <keepalive-time time="10" unit="seconds"/>
                </long-running-threads>
            </default-workmanager>
            <cached-connection-manager/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
        <subsystem xmlns="urn:jboss:domain:jmx:1.3">
            <expose-resolved-model/>
            <expose-expression-model/>
            <remoting-connector/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:jpa:1.1">
            <jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:jsf:1.0"/>
        <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>
        <subsystem xmlns="urn:jboss:domain:mail:3.0">
            <mail-session name="default" jndi-name="java:jboss/mail/Default">
                <smtp-server outbound-socket-binding-ref="mail-smtp" ssl="false" username="xxxxxxx" password="xxxxxxx"/>
                <pop3-server outbound-socket-binding-ref="mail-pop3" username="xxxxxxx" password="xxxxxxx"/>
            </mail-session>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:messaging-activemq:2.0">
            <server name="default">
                <security-setting name="#">
                    <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
                </security-setting>
                <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/>
                <address-setting name="jms.queue.AdmPushMessageQueue" max-redelivery-delay="5000" max-delivery-attempts="-1" redelivery-multiplier="1.5" redelivery-delay="1500"/>
                <address-setting name="jms.queue.AdmTokenBatchQueue" address-full-policy="FAIL" max-size-bytes="40000"/>
                <address-setting name="jms.queue.APNsPushMessageQueue" max-redelivery-delay="5000" max-delivery-attempts="-1" redelivery-multiplier="1.5" redelivery-delay="1500"/>
                <address-setting name="jms.queue.APNsTokenBatchQueue" address-full-policy="FAIL" max-size-bytes="40000"/>
                <address-setting name="jms.queue.GCMPushMessageQueue" max-redelivery-delay="5000" max-delivery-attempts="-1" redelivery-multiplier="1.5" redelivery-delay="1500"/>
                <address-setting name="jms.queue.GCMTokenBatchQueue" address-full-policy="FAIL" max-size-bytes="40000"/>
                <address-setting name="jms.queue.MPNSPushMessageQueue" max-redelivery-delay="5000" max-delivery-attempts="-1" redelivery-multiplier="1.5" redelivery-delay="1500"/>
                <address-setting name="jms.queue.MPNSTokenBatchQueue" address-full-policy="FAIL" max-size-bytes="40000"/>
                <address-setting name="jms.queue.SimplePushMessageQueue" max-redelivery-delay="5000" max-delivery-attempts="-1" redelivery-multiplier="1.5" redelivery-delay="1500"/>
                <address-setting name="jms.queue.SimplePushTokenBatchQueue" address-full-policy="FAIL" max-size-bytes="40000"/>
                <address-setting name="jms.queue.WNSPushMessageQueue" max-redelivery-delay="5000" max-delivery-attempts="-1" redelivery-multiplier="1.5" redelivery-delay="1500"/>
                <address-setting name="jms.queue.WNSTokenBatchQueue" address-full-policy="FAIL" max-size-bytes="40000"/>
                <address-setting name="jms.queue.MetricsQueue" max-delivery-attempts="-1"/>
                <address-setting name="jms.queue.TriggerMetricCollectionQueue" max-delivery-attempts="-1" redelivery-delay="1000"/>
                <address-setting name="jms.queue.BatchLoadedQueue" max-delivery-attempts="-1"/>
                <address-setting name="jms.queue.AllBatchesLoadedQueue" max-delivery-attempts="-1"/>
                <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
                <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
                    <param name="batch-delay" value="50"/>
                </http-connector>
                <in-vm-connector name="in-vm" server-id="0">
                    <param name="buffer-pooling" value="false"/>
                </in-vm-connector>
                <http-acceptor name="http-acceptor" http-listener="default"/>
                <http-acceptor name="http-acceptor-throughput" http-listener="default">
                    <param name="batch-delay" value="50"/>
                    <param name="direct-deliver" value="false"/>
                </http-acceptor>
                <in-vm-acceptor name="in-vm" server-id="0">
                    <param name="buffer-pooling" value="false"/>
                </in-vm-acceptor>
                <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
                <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
                <jms-queue name="InstitutionInterfaceReceiverQueue" entries="java:/jms/queue/InstitutionInterfaceReceiverQueue"/>
                <jms-queue name="MailQueue" entries="java:/jms/queue/mail"/>
                <jms-queue name="AdmPushMessageQueue" entries="queue/AdmPushMessageQueue"/>
                <jms-queue name="AdmTokenBatchQueue" entries="queue/AdmTokenBatchQueue"/>
                <jms-queue name="APNsPushMessageQueue" entries="queue/APNsPushMessageQueue"/>
                <jms-queue name="APNsTokenBatchQueue" entries="queue/APNsTokenBatchQueue"/>
                <jms-queue name="GCMPushMessageQueue" entries="queue/GCMPushMessageQueue"/>
                <jms-queue name="GCMTokenBatchQueue" entries="queue/GCMTokenBatchQueue"/>
                <jms-queue name="MPNSPushMessageQueue" entries="queue/MPNSPushMessageQueue"/>
                <jms-queue name="MPNSTokenBatchQueue" entries="queue/MPNSTokenBatchQueue"/>
                <jms-queue name="SimplePushMessageQueue" entries="queue/SimplePushMessageQueue"/>
                <jms-queue name="SimplePushTokenBatchQueue" entries="queue/SimplePushTokenBatchQueue"/>
                <jms-queue name="WNSPushMessageQueue" entries="queue/WNSPushMessageQueue"/>
                <jms-queue name="WNSTokenBatchQueue" entries="queue/WNSTokenBatchQueue"/>
                <jms-queue name="MetricsQueue" entries="queue/MetricsQueue"/>
                <jms-queue name="TriggerMetricCollectionQueue" entries="queue/TriggerMetricCollectionQueue"/>
                <jms-queue name="TriggerVariantMetricCollectionQueue" entries="queue/TriggerVariantMetricCollectionQueue"/>
                <jms-queue name="BatchLoadedQueue" entries="queue/BatchLoadedQueue"/>
                <jms-queue name="AllBatchesLoadedQueue" entries="queue/AllBatchesLoadedQueue"/>
                <jms-queue name="FreeServiceSlotQueue" entries="queue/FreeServiceSlotQueue"/>
                <jms-topic name="MetricsProcessingStartedTopic" entries="topic/MetricsProcessingStartedTopic"/>
                <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
                <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/>
                <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
            </server>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:naming:2.0">
            <remote-naming/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
        <subsystem xmlns="urn:jboss:domain:remoting:4.0">
            <endpoint/>
            <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:resource-adapters:5.0"/>
        <subsystem xmlns="urn:jboss:domain:request-controller:1.0"/>
        <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
        <subsystem xmlns="urn:jboss:domain:security-manager:1.0">
            <deployment-permissions>
                <maximum-set>
                    <permission class="java.security.AllPermission"/>
                </maximum-set>
            </deployment-permissions>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:security:2.0">
            ...
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:transactions:4.0">
            ...
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:undertow:4.0">
            <buffer-cache name="default"/>
            <server name="default-server">
                <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>

                <https-listener name="https" socket-binding="https" security-realm="AeroGearRealm"/>
                <host name="default-host" alias="localhost">
                    <location name="/" handler="welcome-content"/>
                    <filter-ref name="server-header"/>
                    <filter-ref name="x-powered-by-header"/>
                    <http-invoker security-realm="ApplicationRealm"/>
                </host>
            </server>
            <servlet-container name="default">
                <jsp-config/>
                <websockets/>
            </servlet-container>
            <handlers>
                <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
            </handlers>
            <filters>
                <response-header name="server-header" header-name="Server" header-value="WildFly/11"/>
                <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
            </filters>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:webservices:2.0">
            <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
            <endpoint-config name="Standard-Endpoint-Config"/>
            <endpoint-config name="Recording-Endpoint-Config">

                    <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>

            </endpoint-config>
            <client-config name="Standard-Client-Config"/>
        </subsystem>
        <subsystem xmlns="urn:jboss:domain:weld:4.0"/>
    </profile>
    <interfaces>
        <interface name="management">
            <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
        </interface>
        <interface name="public">
            <any-address/>
        </interface>
        <interface name="unsecure">
            <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
        </interface>
    </interfaces>
    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9980}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9983}"/>
        <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
        <socket-binding name="http" port="${jboss.http.port:8080}"/>
        <socket-binding name="https" port="${jboss.https.port:8443}"/>
        <socket-binding name="iiop" interface="unsecure" port="3528"/>
        <socket-binding name="iiop-ssl" interface="unsecure" port="3529"/>
        <socket-binding name="txn-recovery-environment" port="4712"/>
        <socket-binding name="txn-status-manager" port="4713"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="mail.kontent.com" port="25"/>
        </outbound-socket-binding>
        <outbound-socket-binding name="mail-pop3">
            <remote-destination host="pop.kontent.com" port="110"/>
        </outbound-socket-binding>
    </socket-binding-group>
</server>