text:
Q: Creating a Table with Grouping using Laravel Blade I have the following data in a database
salesperson_id   | item      |   value
1                   112         100
1                   199         100
2                   155         50

this is stored in a array as so
[
  {
  "salesperson_id":"1",
  "ITEM":"112",
  "TOTAL":100
  },
{
  "salesperson_id":"1",
  "ITEM":"199",
  "TOTAL":100
},
{
  "salesperson_id":"2",
  "ITEM":"155",
  "TOTAL":50
}
]

using laravel blade how would i get the data to display similar to below
|Sales Person - 1 |
                  | ITEM   |  value |
                    112       100
                    199       100
                                      total £200
 | Sales Person 2 |
                  | ITEM   |  value |
                    155         50
                                     total £50

I can print each line to a table row but i want to change it to the above grouping, it would be great if someone could point me in the right direction, i'm not looking for the code to be done for me.

A: This is a good use case for Collection::groupBy

    @foreach($data->groupBy('salesperson_id') as $salesperson)

            {{ $salesperson[0]['salesperson_id] }}
            @foreach($salesperson as $item)
                {{ $item['ITEM'] }}
                {{ $item['TOTAL'] }}
            @endforeach

            Total: £ {{ $salesperson->sum('TOTAL') }}

    @endforeach

Just make sure $data is passed to your view as a collection instead of as a plain array.


text:
Q: getting data from multiple tables in single query -mysql I use these query to select user_ids of users who have similar selection of books read.
SELECT r2.user_id
FROM `read` r1
JOIN `read` r2
ON r1.user_id <> r2.user_id AND r1.book_id = r2.book_id
WHERE r1.user_id = 1
GROUP BY r2.user_id
HAVING count(*) >= 5

But I don't want to simply display user_id. But also data about this user_id from other tables!
Query above uses only this table:
CREATE TABLE `read` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) unsigned NOT NULL,
  `book_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `No duplicates` (`user_id`,`book_id`),
  KEY `book_id` (`book_id`),
  CONSTRAINT `connections_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `connections_ibfk_2` FOREIGN KEY (`book_id`) REFERENCES `books` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

But I also have:
CREATE TABLE `users` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `email` char(255) NOT NULL DEFAULT '',
  `password` char(12) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

and
CREATE TABLE `books` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `book` char(55) NOT NULL DEFAULT '',
  `user_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `book` (`book`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `books_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

So for every user_id in the list generated by my query, I want also to have email from users. And all book_ids from read for that user, but these book_ids are ids and I want that to show book from books based on book_ids.
Wow, will anyone understand what I wrote?
:L)

A: Try this
    SELECT r2.user_id,u1.email,b1.books
    FROM `read` r1
    JOIN `read` r2
    ON r1.user_id <> r2.user_id AND r1.book_id = r2.book_id
    JOIN `users` u1
    ON r2.user_id =u1.id
    JOIN `books` b1
    ON r1.book_id=b1.id
    WHERE r1.user_id = 1
    GROUP BY r2.user_id
    HAVING count(*) >= 5

A: Try this.  Hopefully no syntax errors.  If it doesn't work, please go to SQLFiddle.com and load up some test data
SELECT users.id, users.email, book.books
FROM (
  SELECT r2.user_id
  FROM `read` r1
  JOIN `read` r2
    ON r1.user_id <> r2.user_id
      AND r1.book_id = r2.book_id
  WHERE r1.user_id = 1
  GROUP BY r2.user_id
  HAVING count(*) >= 5) as t1
 JOIN users
   ON t1.user_id = users.id
 JOIN read
   ON read.user_id = t1.user_id
 JOIN books
   ON books.id = read.book_id
 WHERE EXISTS(SELECT *
              FROM read
              WHERE read.user_id = 1
                AND read.book_id = book.id)

To summarize with a list - sorted by books in common descending:
SELECT users.id, users.email, t1.qty, GROUP_CONCAT(book.books)
FROM (
  SELECT r2.user_id, COUNT(*) AS qty
  FROM `read` r1
  JOIN `read` r2
    ON r1.user_id <> r2.user_id
      AND r1.book_id = r2.book_id
  WHERE r1.user_id = 1
  GROUP BY r2.user_id
  HAVING count(*) >= 5) as t1
 JOIN users
   ON t1.user_id = users.id
 JOIN read
   ON read.user_id = t1.user_id
 JOIN books
   ON books.id = read.book_id
 WHERE EXISTS(SELECT *
              FROM read
              WHERE read.user_id = 1
                AND read.book_id = book.id)
 GROUP BY users.id, users.email, t1.qty
 ORDER BY t1.qty DESC, users.email ASC

redpajama_set_name: RedPajamaStackExchange


text:
Q: Merging CSV tables with Ruby I'm trying to join CSV files containing stock indexes with Ruby, and having a surprisingly hard time understanding the documentation out there. It's late, and I could use a friend, so go easy on me:
I have several files, with identical headers:
["Date", "Open", "High", "Low", "Close", "Volume"]

I would like my ruby script to read each "Date" column, and write to a new CSV compiling an all encompassing date range from the earliest date to the latest.
Bonus:
Ideally, I would like to add all of the other column data ("Open", "High", etc.) into this new CSV file, split by a column simply containing the following CSV's filename for reference.
Thanks for any consideration given to this. What I'd really like to do is sit down with a Ruby sensei to help me make sense of the documentation. How can I use the CSV.read() or CSV.foreach() do |x| methods to create arrays / hashes to perform upon?
(Theoretical and intelligent responses welcomed)
hypothetical:
CSV.read("data/DOW.csv") do |output|
    puts output
end

returns:
[["Date", "Open", "High", "Low", "Close", "Volume"], ["2014-07-14", "71.35", "71.52", "70.82", "71.28", "823063.0"], ["2014-07-15", "71.32", "71.76", "71.0", "71.28", "813861.0"], ["2014-07-16", "71.34", "71.58", "70.68", "71.02", "843347.0"], ["2014-07-17", "70.54", "71.46", "70.54", "71.13", "1303839.0"], ["2014-07-18", "71.46", "72.95", "71.09", "72.46", "1375922.0"], ["2014-07-21", "72.21", "73.46", "71.88", "73.38", "1603854.0"], ["2014-07-22", "73.46", "74.76", "73.46", "74.57", "1335305.0"], ["2014-07-23", "74.54", "75.1", "73.77", "74.88", "1834953.0"]]

How can I identify rows, columns, etc? I'm looking for methods or ways to transform this array into hashes etc. Honestly, an overarching theoretical approach would suit my needs.

A: I've been playing with Ruby and CSV most of this day, I might be able to help (even though I am beginner myself) but I don't understand what do you want as output (little example would help).
This example would load only columns "Date", "High" and "Volume" into "my_array".
my_array = []
CSV.foreach("data.csv") do |row|
  my_array.push([row[0], row[2], row[5]])
end

If you want every column try:
my_array = []
CSV.foreach("data.csv") do |row|
  my_array.push(row)
end

If you want to access element of array inside array:
puts my_array[0][0].inspect #=> "Date"
puts my_array[1][0].inspect #=> "2014-07-14"

When you finally get what you want as output, if you are on Windows you can do this from command prompt to save it:
my_file.rb > output_in_text_form.txt

A: You can do something like this:
#!/usr/bin/env ruby

require 'csv'

input = ARGV.shift
output = ARGV.shift

File.open(output, 'w') do |o|
  csv_string = File.read(input)
  CSV.parse(csv_string).each do |r|
    # r is an array of columns. Do something with it.
    ...
    # Generate string version.
    new_csv_row = CSV.generate_line(r, {:force_quotes => true})
    # Write to file
    o.puts new_csv_row
  end
end

*

*Using files is optional. You can use shell redirection and directly read from STDIN and/or directly write to STDOUT.


text:
Q: Cells with drag gesture overwrite the list scrolling using SwiftUI I have a SwiftUI List with cells that are able to recognize drag gestures in order to swipe them.
The problem is that the drag gesture overlaps the scroll recognition of the list, so I only can swipe the cells. I can not scroll the list.
Is there a way in SwiftUI to tell the List that have to handle multiple gestures?

A: You can set minimumDistance to some value (for instance 30) on your cell item. Then the drag only works when you drag horizontally and reach the minimum distance, otherwise, the scrollview or list gesture override the view gesture
.gesture(DragGesture(minimumDistance: 30, coordinateSpace: .local))


text:
Q: WFP binding ViewModel to listbox nested in another listbox, both listboxes using DataTemplates I am working on an app in C# using WPF 4.0 and Caliburn Micro. I need to bind a ViewModel to a listbox which is one of the controls in a DataTemplate. This DataTemplate is used as ItemTemplate in an outer listbox and... No, I guess that is not very clear.
Let me try to explain what I need to do using an example with a hotel with several rooms, where each room has several guests.
The hotel screen has a listbox named Rooms which is bound to an ObservableCollection also named Rooms containing RoomViewModel items. The Rooms listbox has an ItemTemplate named RoomTemplate, looking like this:
<ListBox x:Name="Rooms" ItemTemplate="{DynamicResource RoomTemplate}"/>

With RoomTemplate looking something like this (highly simplified):
<DataTemplate x:Key="RoomTemplate">
    <DockPanel VerticalAlignment="Top">
        <TextBlock x:Name="RoomDescription" Text="{Binding Path=RoomDescr}" />
        <ListBox x:Name="Guests" ItemTemplate="{DynamicResource GuestTemplate}"/>
    </DockPanel>
</DataTemplate>

RoomViewModel contains an ObservableCollection named Guests containing GuestViewModel items. RoomTemplate contains a listbox named Guests that should display the GuestViewModel items in the Guests collection. The GuestTemplate would contain several TextBlocks that needs bindings to the GuestViewModels.
The first binding for listbox Rooms to collection Rooms is handled by CM's conventions binder and works just fine. My problem is the second binding for listbox Guests in the GuestTemplate. How can I bind it to the Guest items in the RoomViewModels contained in Rooms collection?

A: <ListBox ItemsSource="{Binding Guests}" ItemTemplate="{DynamicResource GuestTemplate}"/>


text:
Q: universal C* algebras Is there a standard reference which has a discussion on universal $C^*$-algebras ?
(definition, properties, examples, etc)
Searching on the internet has led me to tidbits of information but I would like to read the initial papers or some standard references which introduced these ideas.

A: Blackadar's "Operator Algebras : Theory of C* algebras and Von-Neumann Algebras" has a section on universal C* algebras. So does Blackadar's paper on "Shape Theory for C* algebras".

A: A good place to start is with C*-algebras generated by isometries: See Coburn's 1967 paper for the case of a single isometry. See Cuntz's 1977 paper for the case of several isometries whose range projections partition the identity.
An even simpler case is the universal C-algebra generated by a single unitary which is just $C(\mathbb{T})$, as follows from functional calculus. It is instructive to convince yourself that there does not exist, for instance, a universal C-algebra generated by a single self-adjoint.
Group C-algebras and, more generally, crossed products constitute important examples of universal C-algebras. A 1986 paper of Ian Raeburn makes the universality of crossed-products precise.
Semigroup crossed products are also popular, see the classical case of Toeplitz algebras. Even more generally, one has graph C*-algebras.

A: Depends what you want to know exactly. There's some relatively elementary (but still useful) information in Davidson's `C$^*$-algebra's by Example' in Chapter 7 on Group C$^*$-algebras. It also goes into the related reduced C$^*$-algebras.
As I say it depends on your interest's I suspect. I had to learn about them for C$^*$-algebraic quantum groups for which Timmerman's book `An Invitation to Quantum Groups and Duality' has various bits of information scattered plus some brief (though again useful) information in the appendix.


text:
Q: Why doesn't implementing IObjectSafety make a difference? we have an activex object which implements IObjectSafety to indicate that it is safe for scripting.  It installs from a trusted site. but we still get the IE complaint that the control on this page is not safe for scripting.
The admins for the site that are running our activex are reluctant to enable controls not marked safe for scripting even though its the trusted zone.
our cab and all its components are signed (we finally made the uverified publisher go away by signing every dll that went into the msi installer)
anybody have any thoughts on how to bludgeon IObjectSafety into working?

A: Make sure that you are using the correct GUID for IObjectSafety. Your interface should look like this, with the specific GUID:
[ComImport]
// This GUID matters!
[Guid("CB5BDC81-93C1-11CF-8F20-00805F2CD064")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IObjectSafety
{
    [PreserveSig]
    int GetInterfaceSafetyOptions(ref Guid riid, out int pdwSupportedOptions, out int pdwEnabledOptions);

    [PreserveSig]
    int SetInterfaceSafetyOptions(ref Guid riid, int dwOptionsMask, int dwEnabledOptions);
}

There are a few links out there that outline how to implement IObjectSafety, but here's the only one I found that calls out the fact that the Guid matters. After making that change in my code, IE no longer complained.


text: Q: Does self-demodulation occur in air when ultrasonic waves are modulated and transmitted with audible sound? I have heard that there is a technology that modulates ultrasonic waves into audible sound through multiple paths and sends them out. The reason for using this technology to send the voice as much as possible in a specific direction is because ultrasonic waves have sharp directivity and straight-line properties. However, as the frequency increases, the attenuation in the air is severe, and I do not understand how it can be transmitted farther. Also, it is said that it is self-demodulating without a demodulation signal, but how do you know the demodulation distance? I would like to ask those who have data or experience related to it.


text:
Q: Compile time error "final variable is not initialized" I have an issue, while trying few code snippets i came across a code
class O
{
    final int i;
    O()
    {
        i=10;
    }
    O(int j)// error here as THE BLANK FINAL FIELD i IS NOT INITIALIZED
    {
        j=20;
        System.out.println(j);
    }
}
class Manager3
{
    public static void main(final String[] args)
    {
        O n1=new O();
        //O n2=new O(10);
        //n1.i=20;
        //System.out.println(j1.i);
    }
}

but if i comment the constructor with parameter i do not get any errors.
My question is why am i getting this compile time error when i put both the constructor in code and why i dont get any error when i remove parameterized constructor.
I know that we have to initialize my final variable, but i am initializing it in constructor thus if i write this code :-
class O
{
    final int i;
    O()
    {
        i=10;
    }

}
class Manager3
{
    public static void main(final String[] args)
    {
        O n1=new O();

    }
}

every this is working fine and code is compiling.
My question is what is the issue if i introduce another constructor. Even the error is at the line where i write parameterized cons.
I have understanding of JAVA but i am confused in this code.

A: final int i;

You have defined i as final. You can assign values to final variables only in constructors.
 O(int j)// error here as THE BLANK FINAL FIELD i IS NOT INITIALIZED
    {
        j=20;
        System.out.println(j);
    }

Here you are not assigning value for i. If someone uses this constructor (constructor with parameter) to create an object, i value won't be assigned.
How to resolve this?
As you said, either you have to comment this constructor (or) assign i value inside this constructor as you did in other constructor.

A:    O(int j){
        this(); // <----- you can add this line.
        j=20;
        System.out.println(j);
    }

A: A final variable has to be initialized on declaration or assigned to a value in the constructors body.
If you don't initialize the final variable you get a compiler error.
If you invoke the second constructor the variable never gets assigned to a value.

A: "i" is a instance final variable thus we need to initialize it in each and every constructor i define.


text:
Q: Specific use of reflection principle for Brownian motion Let $B$ be a Brownian motion with $B(0)=0$, $x,y>0$ and $B^*$ the Brownian motion reflected at $-x$.
I came across the following:
$$  \mathbb P_0(\inf_{s\in [0,t]}B(s)<-x, B(t)\geq y-x) = \mathbb P_0(B^*(t)\leq -x-y) $$
How does the use of the reflected Brownian motion get rid of the infimum condition?

A: If $B^*(t)$ is less than $-x-y$, in particular it is less than $-x$, so by continuity it had to cross the level $-x$ at some time.  At this time, $B$ also reached the level $-x$, so $\inf B(s) \le -x$.  It is possible that $\inf B(s) = -x$, i.e. that $B$ reached the level $-x$ but never crossed it, but this event has probability 0.


text:
Q: What is an open surface bounded by a closed contour Can someone tell me what an open surface bounded by a closed contour is please? I have difficulties to imagine something.

A: How bout $D^o = \{x \in \mathbb{R}^2 : \|x\| < 1\}$?  This is an open set, and the closed contour bounding it is precisely $S^1 = \{x \in \mathbb{R}^2 : \|x\| = 1\}$.


text:
Q: Sum of values in Python, excluding equal values Return the sum of 3 numbers, but if they're the same, they dont count towards the total. Can you help me find what's wrong in my code please?
def lone_sum(a,b,c):
    t=0
    if a==b and a!=c:
        t=a+c
    elif a==c and a!=b:
        t=a+b
    elif b==a and b!=c:
        t=b+c
    elif b==c and b!=a:
        t=b+a
    elif c==a and c!=b:
        t=a+b
    elif c==b and c!=a:
        t=b+a
    elif a==b and b==c:
        t=a
    return t

A: A simpler solution:
def lone_sum(a, b, c):
    return sum({a, b, c})

A: You can achieve it within two lines of code by using set like this
def lone_sum(a,b,c):
    return sum(set([a,b,c]))

This much more efficient than all the above codes. I suggested this because i believe programming is meant to solve problems efficiently.

A: def lone_sum(a,b,c):
    if a==b and a!=c:
        t=a+c
    elif a==c and a!=b:
        t=a+b
    elif b==a and b!=c:
        t=b+c
    elif b==c and b!=a:
        t=b+a
    elif c==a and c!=b:
        t=a+b
    elif c==b and c!=a:
        t=b+a
    elif a==b and b==c:
        t=a
    else:
        t = a + b + c
    return t
print (lone_sum(21, 32, 32))

There's nothing wrong with your code, I think you forgot to call the function.
I also added some small features to your code.


text:
Q: How can I export to HDF5 with a specific Datatype ("DataFormat") I am trying to export some largish integer arrays to HDF5 and know that every entry in them would fit into an unsigned 8 bit integer array. As the default "DataFormat" for export that Mathematica is using is a 32bit integer array the resulting files are unnecessarily large. Does anyone know the correct syntax to export such an integer array as an 8 bit integer dataset?
I found the following suggestions in this answer and a comment to this answer:
Export["int8.h5",
  RandomInteger[{2^8 - 1}, {100, 100}],
  "DataFormat" -> {"UnsignedInteger8"}
]

Export["int8.h5",
  RandomInteger[{2^8 - 1}, {100, 100}],
  {"UnsignedInteger8", "DataFormat"}
]

but they both seem to not work at all or not create the expected data representation in the files, which can be checked by either HDFView (which I consider authorative) or Mathematica itself with:
Import["int8.h5","DataFormat"]

A: The following seems to work, but I'd also be interested in other, possibly simpler or clearer versions...
Export["int8.h5",
  {
    "Datasets" -> {"/data" -> RandomInteger[{2^8 - 1}, {100, 100}]},
    "DataFormat" -> {"UnsignedInteger8"}
  },
  "Rules"
]

Two notes:

*

*Unfortunately I could not create a generalization of these which make the (both documented but obviously broken) features compression ("DataEncoding" element) or attributes ("Attributes" element) work. So if someone has a solution for those, I'd appreciate and accept answers which solve those.

*I now found that in a comment to this answer Szabolcs has the working syntax (for the not working "DataEncoding" element), but unfortunately that is quite hard to find so I hope this question (and answers) is acceptable anyway...

A: Thie syntax has slightly changed in Mathematica 12. Now it can be done like this:
In[2]:= Export["test.h5", "path/to/dataset" -> {
   "Data" -> RandomInteger[{2^8 - 1}, {100, 100}],
   "DataFormat" -> "UnsignedInteger8"
   }]

Out[2]= "test.h5"

In[4]:= Import["test.h5", {{"DataFormat", "Dimensions"}, "path/to/dataset"}]

Out[4]= {"UnsignedInteger8", {100, 100}}

For large data, when possible, I recommend using NumericArray (new in 12). In that case information about the type is included in the NumericArray object and is respected by the HDF5 Export:
In[7]:= Export["test.h5", NumericArray @ RandomInteger[{2^8 - 1}, {100, 100}]]

Out[7]= "test.h5"

In[8]:= Import["test.h5", {{"DataFormat", "Dimensions"}, "Dataset1"}]

Out[8]= {"UnsignedInteger8", {100, 100}}

In the example above NumericArray type was automatically deduced as "UnsignedInteger8" but you can also specify it manually as the second argument.

A: You can see:
https://github.com/scotmartin1234/HDF5Mathematica
The package has the functionality you need for writing at low level. The high level functions are designed more for reading. The package could be expanded as open source project to develop the writing part. It's straight forward to assemble the low level functions into a more Mathematica-friendly format (i.e., the higher level functions), but it would take a volunteer to do so. My efforts and work have been on developing the reading side of the equation into a Mathematica friendly format.
This is version 2.00 (August 2016) of the package that was originally provided as version 1.00 in July 2011


text:
Q: Updating a state array while avoid rerenders in React I'm building a project in react native. I have a dynamic list of players, that I want the user to be able to edit.
const [players, setPlayers] = useState(['']);

function addPlayer() {
  setPlayers([...players, '']);
}

...

<List>
  { players.map(player => (
    <MyInput ...>
  )}
</List>

What I want to achieve is this:

*

*User enters name

*User presses enter

*We call addPlayer which adds a player

*New input appears and gets focused on (by other functions).

What I get is this:

*

*User enters name

*User presses enter

*We call addPlayer which adds a player

*The Keyboard starts closing for a split second and then opens back up when the new input appears.

I have set blurOnSubmit to false on my inputs. In my opinion what happens is that the list gets rerendered, causing the keyboard to dismiss itself. Then when the setPlayers finishes executing (it's async), the focus function gets called
useEffect(() => {
  if (lastRef.current) {
    lastRef.current.focus();
  }
}, [players]);

What is the best way to stop the list from rerendering so that the keyboard can stay open the whole time ? Thanks !

A: In the end I cheated, I added an input that's sitting right outside the list. I can control whether it's shown or not, it's content, as well as it's color with other state variables.
That way when a player is added the list rerenders but doesn't affect my input, and my keyboard doesn't move.
From a users POV it looks exactly the same as it did before, as if he's editing items directly in the list.


text:
Q: Solving for an integrated variable from a black box distribution I have a function:
$$ f(x)=\int_0^m g(z)p(\frac{z}{x})\,dz $$
where $m > 0$ and $p(x)$ is an unknown probability distribution (where $x > 0$). $g(x)$ could be anything (I've been using $g(x)=\frac{1}{2+2x}$ as a generic not-super-trivial function, in case there are some restrictions on this function). I can query the distribution to get the PDF, CDF, and quantile.
My goal is to solve for $x$ given some output $f(x)=y$.
I've tried some pretty basic things like:
$$ y=g(m)C(\frac{m}{x})-\int_0^mg'(z)C(\frac{z}{x})\,dz $$
However, nothing I can think of seems to get me much closer than that to solving it.
I'm currently able to search over the domain to find an approximate answer, but I'm hoping there's a way to get a definite answer. Basically I don't really know if solving this is even possible or where I should be looking to figure that sort of thing out since it's just something I've come up with while playing with math in programming (with no real math background), so any information about where to look for an answer, or if it's not solvable either advice about what information I would need to get from the probability distribution in order to solve it, or an explanation of how it's impossible would be very helpful!
(This question seems to address something vaguely similar, but that's the only relevant thing I've found on my search.)


text:
Q: Why doesn't my "REM PrintBoxAt 1 1 25 80 2 " code work properly? I want to draw a neet little box in batch so that it looks good, I used this code for that:
Title Test
rem PrintBoxAt 1 1 25 80 2
rem wait 200
PAUSE >NUL
EXIT

And the result is this.
I wanted to modify this code so that I could make the box bigger but the moment I do modify it like this:
Title Test
rem PrintBoxAt 1 1 26 81 2
rem wait 200
PAUSE >NUL
EXIT

The box ends up breaking and I get This.
Am I doing something wrong? Is there something that I'm missing? The help is much appreciated.
The Compiler that I'm using is "Advanced BAT to EXE Converter v4.2"


text:
Q: Why is my Static Image map not working in OpenLayers 6.3.1? I am trying to build the Static Image map in OpenLayers 6.3.1 directly from the example they provide. It will not work. The console is giving an error of, "Uncaught ReferenceError: Projection is not defined."
The line it is referring to is the instantiation of the projection object.
var projection = new Projection({
  code: 'xkcd-image',
  units: 'pixels',
  extent: extent
});

I have made a jsFiddle with my code. Can anyone offer any insight as to why it is not working?

A: You can refer to the OL build directly by using the full class name, as it is done in the quickstart doc,
 new ol.proj.Projection

The example is using the recommended approach that import the required modules and output a custom OL build. You can read more here.
The example page has import Projection from 'ol/proj/Projection'; at the top, which gives access to the projection module. In your jsfiddle, this import statement is not there so you can't refer to Projection directly, but rather to the available ol.proj.Projection


text:
Q: preg_match and regex error while parsing string? I need to scrap a part of a url using preg_match but I never got what I need.
Here the example:
$item = "http://example.com/0229883504/?r=2-OR1&p=1";
$item = preg_match_all("/href[^\"]+/i",$item,$matches);
print_r($matches)

I need to return this number

0229883504

I tried a lot but when I var_dump the matches array, it gives:
Array ( [0] => Array ( [0] => href= ) )

I know that the problem is within the pattern but I'm not so good in this part :)

A: This is the code you need:
$item = "http://example.com/0229883504/?r=2-OR1&p=1";
$item = preg_match_all("#http://.*?/(.*?)/.*#i",$item,$matches);
print_r($matches);

If you need to extract the value 0229883504, you can add these lines:
$result = $matches[1][0];
echo $result;

and it will work as you can see here: http://ideone.com/H2E9I

A: This will do the trick for example above.
 preg_match_all("/http:\/\/example.com\/([a-zA-Z0-9]+)\//",$item,$matches)

or even better:
 preg_match_all("/http:\/\/example.com\/(.+)\//",$item,$matches)

However if your domains can vary use the example of the code from Aurelio :).


text:
Q: How can I make the latest version of skyrim work with my 3 monitors? I have been looking into how I can make Skyrim support my 3 monitors in nVidia surround mode. Though I have hit a snag.
I was able to find many people talking about how there are fixes that work. Most people refer to this link.
It seems Hayden's patch is the one everyone likes.
The problem is his patch tool stopped supporting Skyrim at v1.6.89.0. They stopped patching the game at 1.9.x so I am thinking that tool will not work for me.
So my question is simple. How can I make Skyrim work on my 3 monitor setup? I have all of the DLCs for the game too, any fix has to work with the whole game.
Any suggestions?

A: The following was taken from Here
This works if you have your screens set to extend

*

*If you installed Skyrim via Steam, go to
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Skyrim – this path could be different depending on where exactly you installed Steam. If you do not have Steam, open up your Skyrim folder

*Right-click on Skyrim.Prefs.ini and click on Open With, then select "notepad" or "notepad++"

*Scroll down until you find [Display] then look for iSize H and iSize W

*Replace the entries iSize with the size of your desktop. Simply multiply your current resolution e.g. with the number of your monitors e.g. 1920 x 3 = 5760
If this doesn't work i would use Haydens fix, but of course back up your game first, but there should be no reason why it wouldn't still work. I unfortunately can't test it because I no longer have 3 monitors but the first method mentioned is how i did it when i played skyrim, (i stopped playing shortly after the most recent DLC and i had a 3 monitor setup then so it really should work)


text:
Q: Dynamic, Table-ish rows of List Items using CSS and jQuery I have a list of content items, each with a set width but different (variable) heights. Each item in the list will be floated left. The HTML and CSS are as follows:

Item One

First item content here

Item Two

Second item content here

Item Three

Third item content here

Item Four

Fourth item content here

Item Five

Fifth item content here

</style>

The problem I have has to do with the way the items float left if there is enough space in a row for 3 items and the second item is taller than then fourth item. The fourth item won't start a new row but will instead place to the right of the second item like this:

What I want is for the list-items to form a sort of table-like structure that will align each row nicely after the previous row at a height equal to the tallest item of the previous row. Instead of what I have above, I want it to look like this:

I would also like to be able to scale the width of the containing div such that the items-per-row adjust as necessary. For example, if a containing div is made wider (ie. if the user re-sizes the window) the number of items per row increases to fill the space. Here is an example of the related problem on a wider container:

And here is what I want it to do:

Based on a previous question, I don't think there is an easy solution to this so I want to use jQuery to get it done.
What I'm thinking is using jQuery to do something like:
Step 1. Set the width of each element to elementWidth
var elementWidth = 200; // 200px

Step 2. Set a variable containerWidth to the width of the overall container
var containerWidth = $('#container').width();

Step 3. Divide the containerWidth by the elementWidth to determine the number of elements per row
var elementsPerRow = containerWidth / elementWidth;

Step 4. Add the property clear:left; each elementsPerRow-ith list item
for(x = 0, x < (total number of all elements), x + elementsPerRow){
  // set clear:left to this

}

I'm not very good (a complete beginner) with JavaScript and jQuery. Can someone please help me put this together into a nice piece of code I can copy and paste (and learn from).

A: The problem is that you're trying to use float: left when you should be using display: inline-block. There's no need for using javascript either.
li {
    vertical-align: top;
    display: inline-block; }

See: http://jsfiddle.net/Wexcode/zgNkA/


text:
Q: Как вызывать call handler из message handler [telebot] У меня есть message handler:
def to_pay_handler_2(message):
    if type(int(message.text))==str:
        users[message.chat.id]['FIO']=message.text
    else:
        bot.send_message(message.chat.id, text='Извините, похоже вы ошиблись, попробуйте еще.',
                         parse_mode="Markdown")
        to_pay_handler(message)

В последней строчке, я пытаюсь вызвать call handler, но вылезает ошибка 'Message' object has no attribute 'message', я не понимаю как вызвать call функцию в message функции, так как когда я пытаюсь вызвать из call функции call функцию, то все хорошо, а когда пытаюсь из message функции в call функцию, то возникают проблемы:
def to_pay_handler(call: types.CallbackQuery):
    bot.send_message(call.message.chat.id, text='*Для заполнения данных заказа введите необходимую информацию.*', parse_mode="Markdown")
    bot.send_message(call.message.chat.id, text='Введите полное *ФИО*:',parse_mode="Markdown")
    bot.register_next_step_handler(call.message,to_pay_handler_2)

Весь код:
@bot.callback_query_handler(func=lambda call: call.data == "to_pay")
def to_pay_handler(call: types.CallbackQuery):
    try:
        bot.send_message(call.message.chat.id, text='*Для заполнения данных заказа введите необходимую информацию.*', parse_mode="Markdown")
        bot.send_message(call.message.chat.id, text='Введите полное *ФИО*:',parse_mode="Markdown")
        bot.register_next_step_handler(call.message,to_pay_handler_2)
    except KeyError:
        back_to_start_handler(call.message)
def to_pay_handler_2(message):
    users[message.chat.id]['FIO']=message.text
    bot.send_message(message.chat.id, text='Введите свой *номер телефона*:', parse_mode="Markdown")
    bot.register_next_step_handler(message, to_pay_handler_3)


text:
Q: Ajax data form serialize prevent double submit I'm struggeling making my form to preven double submision if i press rly fast the button that triggers the click call. I tried to disable the button after succes but it still send it twice. Here is my code:

A: I would suggest changing the handler from an onclick to onsubmit and using e.preventDefault.
$("#formid").on('submit', function(e){
    e.preventDefault();
    //the rest of your code
});

A: I would bind the event listener to the form's submit event rather than the button's click. I know you didn't ask at it in your question, but binding to the form's submit event will give a much better user experience since your user's will still be able to press enter in the form to submit it.
Now, as to your issue, it looks like the problem is with your use of Ajax. The form still submits even though your ajax request hasn't return yet. What you need to do is:
$(function () {
    $('#myform').submit(function (e) {
          e.preventDefault();

          // continue on with your business logic
    });
});

Of course the click event works the same way, so if you need to bind to the submit button's click event you can do the following as well:
$(function () {
    $("button#rezerva").click(function (e) {
        e.preventDefault();

        // continue on with business logic
    });
});

A: you must disable immediatly when clicked  on subbmit not in the succes
selected = chkArray.join(",");
 $('#rezerva"]').attr('disabled','disabled')//ADD THIS
 $.ajax({
            type: "POST",
            url: "http://rezerv.city/engine/app/add_rezervare.php?mese="+selected,
            data: $("form#formular_rezervare").serialize(),
            success: function(data){
            switch(data) {
                    case "nume_error":
                         $(".msg").html("
Vă rugăm completați numele
").fadeIn("slow");
 $('#rezerva"]').attr('enable','enable')//ADD THIS
                        break;


text:
Q: ¿Como puedo contar espacios de un String? tengo el siguiente codigo en c++ y desarrolle una funcion para contar los espacios que aparecen en la cadena, pero me retorna 0, y no se porque,estuve revisando la guia de string y no encontre alguna funcion que me permita contar los espacios en c++,creo que tambien podria ser un error quizas de como este enviando los datos a la funcion,tambien voy a llamar a la funcion varias veces, asi que ¿no se si deberia pasar los parametros como puntero o como referencia?
void contador_de_palabras(string s,int espacios){

    for (int i = 0; i <= (int) s.length(); ++i){

        if (s[i] == ' '){

            espacios++;

         }

     }

 }
int main( ){

    int espacios = 0;
    string s;
    getline(cin,s);

    cout<<s<<endl;

    contador_de_palabras(s,espacios);

    cout<<"espacios:"<<espacios;

    return 0;
 }

A: Tal como tú dices al final de tu pregunta, debes pasar ìnt espacios por referencia, para esto usas el sufijo &:
void contador_de_palabras(string s,int& espacios){
//Todo el resto del código se mantiene igual

Debes recordar que un int, por default se pasa por valor. Entonces el parametro espacios es una "copia" local dentro la función, que no modifica la original. Caso contrario sucede cuando pasas por referencia.
En todo caso, me parece mejor opción retornar el valor:
int contador_de_palabras(string s){
   int espacios=0;
    for (int i = 0; i <= (int) s.length(); ++i){
        if (s[i] == ' '){
            espacios++;
         }
     }
    return espacios;
 }
int main()
{
    string s;
    getline(cin,s);
    cout<<s<<endl;
    int espacios = contador_de_palabras(s);
    cout<<s<<endl;
    cout<<"espacios:"<<espacios;
    return 0;
}

A: Para casos como este, siempre es mejor usar algoritmos estándar en lugar de implementarlos uno mismo (son más fáciles de usar y casi siempre son más eficientes). Para contar elementos dentro de un contenedor tienes std::count (definido en <algorithm>).
Es tan sencillo que en una sola línea ya tienes el numero de espacios:
#include <iostream>
#include <string>
#include <algorithm>

int main() {
    std::string s;
    std::getline(std::cin, s);
    int espacios = std::count(s.begin(), s.end(), ' ');
    std::cout << "Espacios: " << espacios;
    return 0;
}


text:
Q: How to organize the data of type `List>` I have a List<List<String>> from Map<String, dynamic>.
Here is the code of List<List<String>>
tab is an object of type Tablet Class.
Map<String, dynamic> demo = {'Uses': [tab.usesTitle, tab.usesBody], 'Safety Advices': [tab.safetyAdvTitle, tab.safetyAdvBody]};

Tablet Object
Tablet tab = Tablet(
    usesTitle:  ['Pain Relief', 'Fever'],
    usesBody:  ['Pain Relief Details.....', 'Fever Details.....'],
    safetyAdvTitle:  ['Alcohol','Kidney' ],
    safetyAdvBody:  ['Alcohol Details...', 'Kidney Details...'],
);

What I Tried
demo.forEach((k, v){
    v.forEach((y){
      print(y.join('\n'));
    });
});

Current Output
Uses
Pain Relief
Fever
Pain Relief Details.....
Fever Details.....
Safety Advices
Alcohol
Kidney
Alcohol Details...
Kidney Details...

I Want Like this
Uses
Pain Relief
Pain Relief Details.....
Fever
Fever Details.....

Safety Advices
Alcohol
Alcohol Details...
Kidney
Kidney Details...

Actually It's demo So just printing values. In real World, I am going to use Widgets. So At that time forEach won't work. So solution without forEach needed.

Updated
I can do the functionality of drop-down but the Text() widgets are aligned one by one should be in this order.
Below this one more card with Safety Advices with same design.

A: why exactly are you looking to avoid forEach, wherever you have array, you can also have forEach, map etc.,
Try this,
Map<String, dynamic> demo = {
  'Uses': [
    ['Pain Relief', 'Fever'],
    ['Pain Relief Details.....', 'Fever Details.....'],
  ],
  'Safety Advices': [
    ['Alcohol', 'Kidney'],
    ['Alcohol Details...', 'Kidney Details...']
  ]
};

List<Widget> widgets = [];

demo.forEach((key, value) {
  for (int i = 0; i < value[0].length; i++) {
    for (int j = 0; j < value.length; j++) {
      // Inside this loop, j = 0 means your Heading and j = 1 means the content
      widgets.add(Text(
        (value[j] as List)[i],
        style: TextStyle(fontWeight: j == 0 ? FontWeight.bold : null),
      ));
    }
  }
});

Then, use the widgets array you made as the children to a Column.
This will be the output.


text:
Q: erlang common test: how to start iconv application? In my application I'm using this implementation of erlang-iconv.
Simple test suite:
-module(example_SUITE).

-include_lib("common_test/include/ct.hrl").

-export([all/0, suite/0, init_per_suite/1, end_per_suite/1,
         simple_test_case/1]).

all() ->
    [simple_test_case].

suite() ->
    [{timetrap, {minutes, 1}}].

init_per_suite(Config) ->
    application:start(iconv),
    Config.

end_per_suite(Config) ->
    application:stop(iconv),
    Config.

simple_test_case(_Config) ->
    ok.

On attempt to run this suite:
ct_run -pa ebin/ deps/*/ebin/ deps/*/deps/*/ebin/ -dir test/ -logdir logs/ -suite example_SUITE

...
=INFO REPORT==== 23-Mar-2014::19:45:30 ===
    application: iconv
    exited: {{shutdown,
                 {failed_to_start_child,iconv,
                     {{case_clause,{error,{open_error,-10}}},
                      [{iconv,init,1,[{file,"src/iconv.erl"},{line,49}]},
                       {gen_server,init_it,6,
                           [{file,"gen_server.erl"},{line,304}]},
                       {proc_lib,init_p_do_apply,3,
                           [{file,"proc_lib.erl"},{line,239}]}]}}},
             {iconv_app,start,[normal,[]]}}
    type: temporary
Testing web.wasearch.example_SUITE: TEST COMPLETE, 1 ok, 0 failed of 1 test cases
....

This error is kind of obvious because erlang-iconv depend on C drive in its priv_dir:
init([]) ->
    case erl_ddll:load_driver(get_so_path(), iconv_drv) of
        ok -> ok;
        {error, already_loaded} -> ok
    end,
    Port = open_port({spawn, "iconv_drv"}, []),
    ets:new(iconv_table, [set, public, named_table]),
    ets:insert(iconv_table, {port, Port}),
    {ok, Port}.

get_so_path() ->
    case code:priv_dir(iconv) of
        {error, _} -> "./priv";
        Path -> Path

How can I trick erlang-iconv and force it to look up C driver in other location (absoulute path to iconv's priv_dir in my project's deps directories)?

A: Shot from the hip: Set ERL_LIBS appropriately.
Your priv_dir should be set up correctly and belong to the iconv application, but since the Erlang system did not pick that up, I am guessing your -pa adds doesn't track this. Setting ERL_LIBS to include deps might do the trick for the build.


text:
Q: How can I determine the highest GPU-supported DirectX version? On Windows 7 / Vista how can I determine what DirectX version is really supported by the GPU?

A: Use GPU-Z though it will only tell you for what type of DirectX it was designed, so that's often the DirectX version at the time of release.

In case you were wondering if it also supports older versions, here's a quote from Wikipedia on DirectX:

Various releases of Windows have
  included and supported various
  versions of DirectX, allowing newer
  versions of the operating system to
  continue running applications designed
  for earlier versions of DirectX until
  those versions can be gradually phased
  out in favor of newer APIs, drivers,
  and hardware.
APIs such as Direct3D and DirectSound
  need to interact with hardware, and
  they do this through a device driver.
  Hardware manufacturers have to write
  these drivers for a particular DirectX
  version's device driver interface (or
  DDI), and test each individual piece
  of hardware to make them DirectX
  compatible. Some hardware devices only
  have DirectX compatible drivers (in
  other words, one must install DirectX
  in order to use that hardware). Early
  versions of DirectX included an
  up-to-date library of all of the
  DirectX compatible drivers currently
  available. This practice was stopped
  however, in favor of the web-based
  Windows Update driver-update system,
  which allowed users to download only
  the drivers relevant to their
  hardware, rather than the entire
  library.
Prior to DirectX 10, DirectX runtime
  was designed to be backward compatible
  with older drivers, meaning that newer
  versions of the APIs were designed to
  interoperate with older drivers
  written against a previous version's
  DDI. The application programmer had to
  query the available hardware
  capabilities using a complex system of
  "cap bits" each tied to a particular
  hardware feature. For example, a game
  designed for and running on Direct3D 9
  with a graphics adapter driver
  designed for Direct3D 6 would still
  work, albeit most likely with degraded
  functionality.
However, the Direct3D 10 runtime in
  Windows Vista cannot run on older
  hardware drivers due to the
  significantly updated DDI, which
  requires a unified feature set and
  abandons the use of "cap bits".
Direct3D 11 runtime will introduce
  Direct3D 9, 10, and 10.1 "feature
  levels", compatibility modes which
  only allow the use of hardware
  features defined in the specified
  version of Direct3D. For Direct3D 9
  hardware, there will be three
  different feature levels, grouped by
  common capabilities of "low", "med"
  and "high-end" video cards; the
  runtime will directly use Direct3D 9
  DDI provided in all WDDM drivers.

A: The best way is to just go to the manufacturer website and find your video card specs. You'll find all the information you need there. You could also try and run dxdiag from the Run menu; that will also give you a bit of information about the video card and its drivers. Look for the "DDI version" on the "Display" tab:


text:
Q: Why the bibliography url does not show in color? Here is what I wrote
\documentclass[12pt, a4paper]{book}
\usepackage[colorlinks=true,breaklinks]{hyperref}
\usepackage[hyphenbreaks]{breakurl}
\usepackage{xcolor}
\definecolor{c1}{rgb}{0,0,1}
\definecolor{c2}{rgb}{0,0.3,0.9}
\definecolor{c3}{rgb}{0.3,0,0.9}
\hypersetup{linkcolor={c1},citecolor={c2},urlcolor={c3}}
\begin{document}
\begin{thebibliography}{}
\bibitem{beta}BetaFunction:https://en.wikipedia.org/wiki/Beta function
\end{thebibliography}
\end{document}

and the outcome is
and when I compile the file, the urls in bibliography do not show in blue color. How can I fix this?
Thank you.

A: You need to tell LaTeX that you are writing a URL:
\url{https://en.wikipedia.org/wiki/Beta function}

If you are serious about using bibliographies, you should consider using biblatex instead of typing them manually, though.


text:
Q: How do I add up values for columns based on repeating row column value? I have a table of values that I am selecting from the database using sql.
SELECT

  a.Chapter, a.price, b.book

FROM

  Table1 a, Table2 b, Table3 c

WHERE

  a.id = c.id and b.id = c.id2

GROUP BY

  a.Chapter, a.price

ORDER BY

  a.Chapter

The values it brings back are:
|Chapter|Price|book|
|_______|_____|____|
|01     | 25  |eg1 |
|01     | 23  |eg2 |
|01     | 9   |eg3 |
|02     | 15  |eg4 |
|02     | 89  |eg5 |
|02     | 11  |eg6 |
|02     | 3   |eg7 |
|02     | 25  |eg8 |

How do I take the prices of every repeating 01 (Which is in string format btw because it's not the chapter of a book) and add them together and make them the new price? For example:
Chapter   Price
   01      57
   02      143

The book part isn't really important at the moment so it can be excluded

A: What you are doing is wrong. You group by chapter and price, but you also select the book. This book will be one of the books matching the chapter and price arbitrarily chosen. So with this data

book chapter price
eg1  01      25
eg1  02      30
eg2  01      25
eg3  01      30

you might get

book chapter price
eg1  01      25
eg1  02      30
eg3  01      30

thus surpressing book eg2.
Anyway, you get a result row per chapter with GROUP BY chapter. You get a sum with SUM.
select chapter, sum(price)
from chapters
group by chapter;
order by chapter;

A: Have you tried DISTINCT?
SELECT DISTINCT x
from table1
where example = example2

A: SELECT a.Chapter, sum(a.price)
FROM Table1 a
INNER JOIN Table3 c on c.id = a.id
INNER JOIN Table2 b on b.id = c.id
GROUP BY
  a.Chapter
ORDER BY
  a.Chapter

A: It can achieve with one table only
SELECT
  a.Chapter, SUM(a.price) as price
FROM
  Table1 a
GROUP BY
  a.Chapter
ORDER BY
  a.Chapter


text:
Q: Syntax highlighting html tags in doxygen comments in emacs I currently use doxymacs to syntax highlight doxygen comments and keywords in the C++ files on a collaborative project I'm working on.
However, in the project, there are "plans" files which are basically very long doxygen comments with lots of todos, bugs etc, all using html tags for organisation and presentation.
At present doxymacs only highlights keywords like "todo" and "bug" etc. How can I make it also syntax highlight the html tags within the doxygen comment?
I can do this by switching to "html-mode" but then I lose the standard doxymacs highlighting of "todo" etc. Just being able to use both modes together or combine them would be useful.
So for example, if I had:
/*!
    \todo Test todo
    <ul>
     <li> Some text. </li>
     <li> Some more text. </li>
    </ul>

*/

I'd like the <ul> tags etc to be coloured a different colour to the normal text within the /*! */ comments.

A: This will font-lock anything in <> as keywords in comments in c-derived modes:
(defun my-c-font-lock-doxy-html (limit)
  (while (re-search-forward "<.+?>" limit 'move)
    (let ((beg (match-beginning 0))
          (end (match-end 0)))
      (if (nth 4 (syntax-ppss beg))
          (when (nth 4 (syntax-ppss end))
            (c-put-font-lock-face beg end 'font-lock-keyword-face))
        (goto-char end))))
  nil)

(defun my-c-mode-common-hook ()
  (font-lock-add-keywords nil '((my-c-font-lock-doxy-html))))

(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)


text:
Q: How to Alight table texts in email template How do I update email template to align the all table sections texts left, see image link. The table columns title and contents are not aligned, the title top is centered and bottom is left. I am not sure where to correct the issue. Any assistance will be very welcomed. Please let me know if you have any questions, or would like the image resent.

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Learning Assignment Update</title>

Learning Assignment Update

Hi <FIRST_NAME/>,

<LOOP>

<CPNTS_ADDED_ROLLUP/>

Type
Course ID
Course Title
Due Date

<LOOP>

<CPNT_TYPE_ID_ADDED/>
<CPNT_ID_ADDED/>
<CPNT_TITLE_ADDED/>
<CPNT_DUE_DATE_ADDED/>

</LOOP>
</LOOP>

<LOOP>

<CPNTS_MODIFIED_ROLLUP/>

Type
Course ID
Course Title

<LOOP>

<CPNT_TYPE_ID_MODIFIED/>
<CPNT_ID_MODIFIED/>
<CPNT_TITLE_MODIFIED/>

</LOOP>
</LOOP>

<LOOP>

<CPNTS_DELETED_ROLLUP/>

Type
Course ID
Course Title

<LOOP>

<CPNT_TYPE_ID_DELETED/>
<CPNT_ID_DELETED/>
<CPNT_TITLE_DELETED/>

</LOOP>
</LOOP>

Click below to get started or to visit Team Member Central:

Get Started!

Contact your Human Resources for Questions. This email address in unattended. Please Do Not Reply.

A: You need to start over and follow proper table structure. Your tables are a mess and until you clean that up, it's really hard to help.
As an example, this is not valid table structure:

The reason it's not valid is you started a table row without a parent
. You did not close the
, the  or the
.
This is a valid basic table:

        table cell a
        table cell b

Either start from scratch and rebuild or use an html code validator like this one:
http://jonaquino.blogspot.com/2013/05/unclosed-tag-finder.html
I recommend starting over. I just find it's easier.
By default, a  will text align left, a  will text align center. You're not seeing that behavior because the structure is a mess.
Also, <LOOP> is not a valid html tag. Even if it was, you're not closing it anywhere <LOOP></LOOP>.
Good luck.


text:
Q: Let $f$ be a non-constant entire function such that $\left \lvert f(z) \right\lvert=1$ for every $z$ with $\left \lvert z \right\lvert=1$. I was thinking about the problem that says:
Let $f$ be a non-constant entire function such that $\left | f(z) \right |=1$  for every $z$ with $\left \lvert z \right \lvert =1$. Then which of the following option(s) is/are correct?

*

*(a) $f$ has a zero in the open unit disc,

*(b) $f$ always has a zero outside the closed unit disc,

*(c) $f$ need not have any zero,

*(d) any such $f$ has exactly one zero in the open unit disc.

If we take $f(z)=z^n$, then the given condition is satisfied and I think option (a) is correct. But I can not predict anything about the other options.
Please help. Thanks in advance for your time.

A: For (a), if it was not true, apply maximum modulus principle to $1/f$ and the unit disk.
(b) $f(z)=z$ gave a counter-example.
(c) Refers to (a).
(d) Think about a factorization of $f$ (with elements of the form $f(z)=\prod\frac{z-\alpha_j}{1-\bar \alpha_jz}g(z)$, where $g$ doesn't vanish in the open unit disk. As $f$ needs to be entire, what can we say about $\alpha_j$?


text:
Q: Swift NSBlockOperation() Leak: cannot make NSBlockOperation() weak To avoid a memory leak when using NSBlockOperation in Objective-C, we would have to declare the variable as weak to be able to reference the block operation inside the block (to cancel if needed), typically like this:
__weak NSBlockOperation *blockOp  = [NSBlockOperation blockOperationWithBlock:^{
     if (blockOp.cancelled) {
         ...
     }
}];

But in Swift, when I try declare my NSBlockOpeartion as weak, it is always nil.
weak var blockOp = NSBlockOperation()

Without the weak reference, all is fine except it is leaking a little bit of memory each time. How can I reference the block inside the block without leaking memory in Swift?

A: You can use an explicit capture list to capture an unowned reference to the operation. (This is one of the only times I'd actually suggest using unowned references, since the operation will be retained as long as its block is executing. If you're still uncomfortable with that guarantee, you could use weak instead.)
let op = NSBlockOperation()
op.addExecutionBlock { [unowned op] in
    print("hi")
    if op.cancelled { ... }
}
Note that this has to be split into two lines, because the variable can't be referenced from its own initial value.


text:
Q: Reading already loaded properties in a jsp? My JSP pages need to display different information depending on which environment they're in (dev, production, sandbox, etc). I want to have a properties file for each of these environments that contain all the parameters they might need. How can I reference the properties from this file in a JSP page? I am using spring and loading the properties as below. i have it in applicationcontext.xml file.
How can i get already loaded properties into jsp?
<bean id="proConfigPropertyFactory" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
        <property name="locations">
            <list>
                <value>file:/someFolder/some.properties</value>
            </list>
        </property>
    </bean>

A: Inject the properties in your controller, and store it in the model:
@Autowired
@Qualifier("proConfigPropertyFactory")
private Properties configProperties;

public ModelAndView someMethod() {
    return new ModelAndView("TheJspName", "configProperties", configProperties);
}


text:
Q: Required String parameter 'email' is not present I can't make a request via postman, I checked everything, my email is represented as varchar(255) in my database. I use postgresql. Error: Required String parameter 'email' is not present. I used response and set it like this: @RequestParam(value = "params", required = false) String params for each received value, but this didn't help, as the program reported that we didn't send anything. What does this have to do with? The request is correct, as well as the accepted parameters are correct.
What the request looks like:
{
    "email" : "qwerty@mail.ru",
    "name" : "Vasya",
    "surname" : "Puk",
    "phone" : 1234562,
    "role":"ADMIN"
}

Entity USER
@Data
@Entity
@Table(name = "user", schema = "task")
public class User {

    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    @OneToMany(cascade = {CascadeType.DETACH, CascadeType.MERGE, CascadeType.PERSIST,
            CascadeType.REFRESH
    })
    @JoinColumn(name = "id")
    private List<Role> role;

    @OneToMany(mappedBy = "user")
    private Set<Contract> contract;

    @Column(name = "surname", nullable = false)
    private String surname;
    @Column(name = "name", nullable = false)
    private String name;
    @Column(name = "email", nullable = false, unique = true)
    private String email;
    @Column(name = "phone", nullable = false, unique = true)
    private Integer phone;
}

The controller that accepts:
@PostMapping
    public String userPostAdd(@RequestParam String email, @RequestParam Integer phone, @RequestParam String name, @RequestParam String surname, @RequestParam String role) {
        Roles roles = null;
        System.out.println("TEST");
        System.out.println(roles.equalsName(role));
        System.out.println("TEST");
        //if ()
        //userRepository.save(requestUserDetails);
        return "User add;
    }

Repo:
@Repository
public interface UserRepository extends CrudRepository<User, Long> {
}

Adding logs
"C:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\jbr\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\lib\idea_rt.jar=55224:C:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\VGilenko\IdeaProjects\taskspring\target\classes;C:\Users\VGilenko\.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\2.2.0.RELEASE\spring-boot-starter-data-jpa-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\boot\spring-boot-starter-aop\2.2.0.RELEASE\spring-boot-starter-aop-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\boot\spring-boot-starter\2.2.0.RELEASE\spring-boot-starter-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\boot\spring-boot\2.2.0.RELEASE\spring-boot-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.2.0.RELEASE\spring-boot-autoconfigure-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.2.0.RELEASE\spring-boot-starter-logging-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;C:\Users\VGilenko\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;C:\Users\VGilenko\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.12.1\log4j-to-slf4j-2.12.1.jar;C:\Users\VGilenko\.m2\repository\org\apache\logging\log4j\log4j-api\2.12.1\log4j-api-2.12.1.jar;C:\Users\VGilenko\.m2\repository\org\slf4j\jul-to-slf4j\1.7.28\jul-to-slf4j-1.7.28.jar;C:\Users\VGilenko\.m2\repository\org\yaml\snakeyaml\1.25\snakeyaml-1.25.jar;C:\Users\VGilenko\.m2\repository\org\springframework\spring-aop\5.2.0.RELEASE\spring-aop-5.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\aspectj\aspectjweaver\1.9.4\aspectjweaver-1.9.4.jar;C:\Users\VGilenko\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\2.2.0.RELEASE\spring-boot-starter-jdbc-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\com\zaxxer\HikariCP\3.4.1\HikariCP-3.4.1.jar;C:\Users\VGilenko\.m2\repository\org\springframework\spring-jdbc\5.2.0.RELEASE\spring-jdbc-5.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\jakarta\activation\jakarta.activation-api\1.2.1\jakarta.activation-api-1.2.1.jar;C:\Users\VGilenko\.m2\repository\jakarta\persistence\jakarta.persistence-api\2.2.3\jakarta.persistence-api-2.2.3.jar;C:\Users\VGilenko\.m2\repository\jakarta\transaction\jakarta.transaction-api\1.3.3\jakarta.transaction-api-1.3.3.jar;C:\Users\VGilenko\.m2\repository\org\springframework\data\spring-data-jpa\2.2.0.RELEASE\spring-data-jpa-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\data\spring-data-commons\2.2.0.RELEASE\spring-data-commons-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\spring-orm\5.2.0.RELEASE\spring-orm-5.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\spring-context\5.2.0.RELEASE\spring-context-5.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\spring-expression\5.2.0.RELEASE\spring-expression-5.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\spring-tx\5.2.0.RELEASE\spring-tx-5.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\spring-beans\5.2.0.RELEASE\spring-beans-5.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\spring-core\5.2.0.RELEASE\spring-core-5.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\spring-jcl\5.2.0.RELEASE\spring-jcl-5.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\slf4j\slf4j-api\1.7.28\slf4j-api-1.7.28.jar;C:\Users\VGilenko\.m2\repository\org\springframework\spring-aspects\5.2.0.RELEASE\spring-aspects-5.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\boot\spring-boot-starter-data-rest\2.2.0.RELEASE\spring-boot-starter-data-rest-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.2.0.RELEASE\spring-boot-starter-web-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.2.0.RELEASE\spring-boot-starter-json-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.10.0\jackson-datatype-jdk8-2.10.0.jar;C:\Users\VGilenko\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.10.0\jackson-datatype-jsr310-2.10.0.jar;C:\Users\VGilenko\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.10.0\jackson-module-parameter-names-2.10.0.jar;C:\Users\VGilenko\.m2\repository\org\springframework\boot\spring-boot-starter-validation\2.2.0.RELEASE\spring-boot-starter-validation-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\jakarta\validation\jakarta.validation-api\2.0.1\jakarta.validation-api-2.0.1.jar;C:\Users\VGilenko\.m2\repository\org\hibernate\validator\hibernate-validator\6.0.17.Final\hibernate-validator-6.0.17.Final.jar;C:\Users\VGilenko\.m2\repository\org\springframework\spring-web\5.2.0.RELEASE\spring-web-5.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\spring-webmvc\5.2.0.RELEASE\spring-webmvc-5.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\data\spring-data-rest-webmvc\3.2.0.RELEASE\spring-data-rest-webmvc-3.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\data\spring-data-rest-core\3.2.0.RELEASE\spring-data-rest-core-3.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\springframework\hateoas\spring-hateoas\1.0.0.RELEASE\spring-hateoas-1.0.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\com\jayway\jsonpath\json-path\2.4.0\json-path-2.4.0.jar;C:\Users\VGilenko\.m2\repository\net\minidev\json-smart\2.3\json-smart-2.3.jar;C:\Users\VGilenko\.m2\repository\net\minidev\accessors-smart\1.2\accessors-smart-1.2.jar;C:\Users\VGilenko\.m2\repository\org\ow2\asm\asm\5.0.4\asm-5.0.4.jar;C:\Users\VGilenko\.m2\repository\org\springframework\plugin\spring-plugin-core\2.0.0.RELEASE\spring-plugin-core-2.0.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\org\atteo\evo-inflector\1.2.2\evo-inflector-1.2.2.jar;C:\Users\VGilenko\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.10.0\jackson-databind-2.10.0.jar;C:\Users\VGilenko\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.10.0\jackson-core-2.10.0.jar;C:\Users\VGilenko\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.10.0\jackson-annotations-2.10.0.jar;C:\Users\VGilenko\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.2.0.RELEASE\spring-boot-starter-tomcat-2.2.0.RELEASE.jar;C:\Users\VGilenko\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;C:\Users\VGilenko\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.27\tomcat-embed-core-9.0.27.jar;C:\Users\VGilenko\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.27\tomcat-embed-el-9.0.27.jar;C:\Users\VGilenko\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.27\tomcat-embed-websocket-9.0.27.jar;C:\Users\VGilenko\.m2\repository\org\postgresql\postgresql\42.2.16\postgresql-42.2.16.jar;C:\Users\VGilenko\.m2\repository\org\checkerframework\checker-qual\3.5.0\checker-qual-3.5.0.jar;C:\Users\VGilenko\.m2\repository\org\hibernate\hibernate-core\5.4.20.Final\hibernate-core-5.4.20.Final.jar;C:\Users\VGilenko\.m2\repository\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;C:\Users\VGilenko\.m2\repository\javax\persistence\javax.persistence-api\2.2\javax.persistence-api-2.2.jar;C:\Users\VGilenko\.m2\repository\org\javassist\javassist\3.24.0-GA\javassist-3.24.0-GA.jar;C:\Users\VGilenko\.m2\repository\net\bytebuddy\byte-buddy\1.10.1\byte-buddy-1.10.1.jar;C:\Users\VGilenko\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\VGilenko\.m2\repository\org\jboss\spec\javax\transaction\jboss-transaction-api_1.2_spec\1.1.1.Final\jboss-transaction-api_1.2_spec-1.1.1.Final.jar;C:\Users\VGilenko\.m2\repository\org\jboss\jandex\2.1.3.Final\jandex-2.1.3.Final.jar;C:\Users\VGilenko\.m2\repository\com\fasterxml\classmate\1.5.0\classmate-1.5.0.jar;C:\Users\VGilenko\.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;C:\Users\VGilenko\.m2\repository\org\dom4j\dom4j\2.1.3\dom4j-2.1.3.jar;C:\Users\VGilenko\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.1.0.Final\hibernate-commons-annotations-5.1.0.Final.jar;C:\Users\VGilenko\.m2\repository\javax\xml\bind\jaxb-api\2.3.1\jaxb-api-2.3.1.jar;C:\Users\VGilenko\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.2\jaxb-runtime-2.3.2.jar;C:\Users\VGilenko\.m2\repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.2\jakarta.xml.bind-api-2.3.2.jar;C:\Users\VGilenko\.m2\repository\org\glassfish\jaxb\txw2\2.3.2\txw2-2.3.2.jar;C:\Users\VGilenko\.m2\repository\com\sun\istack\istack-commons-runtime\3.0.8\istack-commons-runtime-3.0.8.jar;C:\Users\VGilenko\.m2\repository\org\jvnet\staxex\stax-ex\1.8.1\stax-ex-1.8.1.jar;C:\Users\VGilenko\.m2\repository\com\sun\xml\fastinfoset\FastInfoset\1.2.16\FastInfoset-1.2.16.jar innotechnum.task.Application

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.0.RELEASE)

2020-09-25 19:26:12.934  INFO 7764 --- [           main] innotechnum.task.Application             : Starting Application on VGilenko with PID 7764 (C:\Users\VGilenko\IdeaProjects\taskspring\target\classes started by VGilenko in C:\Users\VGilenko\IdeaProjects\taskspring)
2020-09-25 19:26:12.939  INFO 7764 --- [           main] innotechnum.task.Application             : No active profile set, falling back to default profiles: default
2020-09-25 19:26:14.198  INFO 7764 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2020-09-25 19:26:14.265  INFO 7764 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 59ms. Found 4 repository interfaces.
2020-09-25 19:26:14.930  INFO 7764 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-09-25 19:26:15.691  INFO 7764 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2020-09-25 19:26:15.707  INFO 7764 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-09-25 19:26:15.707  INFO 7764 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.27]
2020-09-25 19:26:15.845  INFO 7764 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-09-25 19:26:15.845  INFO 7764 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2770 ms
2020-09-25 19:26:16.224  INFO 7764 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2020-09-25 19:26:16.296  INFO 7764 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.4.20.Final
2020-09-25 19:26:16.512  INFO 7764 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-09-25 19:26:16.745  INFO 7764 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2020-09-25 19:26:16.882  INFO 7764 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2020-09-25 19:26:16.907  INFO 7764 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL10Dialect
Hibernate: alter table if exists task.city add constraint FKtjrg7h2j3ehgycr3usqjgnc2u foreign key (id) references task.house
2020-09-25 19:26:17.915  WARN 7764 --- [           main] o.h.t.s.i.ExceptionHandlerLoggedImpl     : GenerationTarget encountered exception accepting command : Error executing DDL "alter table if exists task.city add constraint FKtjrg7h2j3ehgycr3usqjgnc2u foreign key (id) references task.house" via JDBC Statement

org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "alter table if exists task.city add constraint FKtjrg7h2j3ehgycr3usqjgnc2u foreign key (id) references task.house" via JDBC Statement
    at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67) ~[hibernate-core-5.4.20.Final.jar:5.4.20.Final]
    at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlString(AbstractSchemaMigrator.java:559) ~[hibernate-core-5.4.20.Final.jar:5.4.20.Final]
    at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlStrings(AbstractSchemaMigrator.java:504) ~[hibernate-core-5.4.20.Final.jar:5.4.20.Final]
    at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applyForeignKeys(AbstractSchemaMigrator.java:433) ~[hibernate-core-5.4.20.Final.jar:5.4.20.Final]
    at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:249) ~[hibernate-core-5.4.20.Final.jar:5.4.20.Final]
    at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:114) ~[hibernate-core-5.4.20.Final.jar:5.4.20.Final]
    at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:184) ~[hibernate-core-5.4.20.Final.jar:5.4.20.Final]
    at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:73) ~[hibernate-core-5.4.20.Final.jar:5.4.20.Final]
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:316) ~[hibernate-core-5.4.20.Final.jar:5.4.20.Final]
    at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:469) ~[hibernate-core-5.4.20.Final.jar:5.4.20.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1259) ~[hibernate-core-5.4.20.Final.jar:5.4.20.Final]
    at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:391) ~[spring-orm-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:378) ~[spring-orm-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1862) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1799) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.0.RELEASE.jar:5.2.0.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) ~[spring-boot-2.2.0.RELEASE.jar:2.2.0.RELEASE]
    at innotechnum.task.Application.main(Application.java:15) ~[classes/:na]
Caused by: org.postgresql.util.PSQLException: ОШИБКА: INSERT или UPDATE в таблице "city" нарушает ограничение внешнего ключа "fktjrg7h2j3ehgycr3usqjgnc2u"
  Подробности: Ключ (id)=(1) отсутствует в таблице "house".
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:322) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:308) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:284) ~[postgresql-42.2.16.jar:42.2.16]
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:279) ~[postgresql-42.2.16.jar:42.2.16]
    at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95) ~[HikariCP-3.4.1.jar:na]
    at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-3.4.1.jar:na]
    at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54) ~[hibernate-core-5.4.20.Final.jar:5.4.20.Final]
    ... 33 common frames omitted

2020-09-25 19:26:17.957  INFO 7764 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-09-25 19:26:17.963  INFO 7764 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-09-25 19:26:19.150  INFO 7764 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2020-09-25 19:26:19.635  INFO 7764 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2020-09-25 19:26:19.639  INFO 7764 --- [           main] innotechnum.task.Application             : Started Application in 7.149 seconds (JVM running for 7.817)
2020-09-25 19:26:35.874  INFO 7764 --- [nio-8080-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-09-25 19:26:35.875  INFO 7764 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2020-09-25 19:26:35.904  INFO 7764 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet        : Completed initialization in 29 ms
2020-09-25 19:26:35.958  WARN 7764 --- [nio-8080-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.bind.MissingServletRequestParameterException: Required String parameter 'email' is not present]

A: This controller seems to be incorrect.
@PostMapping
public String userPostAdd(@RequestParam String email, @RequestParam Integer phone, @RequestParam String name, @RequestParam String surname, @RequestParam String role) {
     //body
}

It should be like this :
@PostMapping
public String userPostAdd(@RequestBody User user) {
     //body
}

User is your object request, similar as your User entity
Error executing DDL "alter table if exists task.city add check your entities then update your database schema accrodingly


text:
Q: Spring Boot with Docker and Maven - manifest is missing in JAR I'm currently try to run a Java Spring Boot project with multiple pom files in Docker. I have the following project structure:
.
├── application1
|   |── src
│   └── pom.xml
|── application2
|   |── src
│   └── pom.xml
|── shared
|   └── src
|   └── pom.xml
|
└── pom.xml

My goal is to run Docker containers for application1 and application2. Both applications are dependent on the shared module which is included as a dependency through the pom.xml file.
Pom.xml file in root directory:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
         http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example.parent</groupId>
    <artifactId>com-example-parent</artifactId>
    <packaging>pom</packaging>
    <version>1.0</version>

    <!-- sub modules -->
    <modules>
        <module>application1</module>
        <module>application2</module>
        <module>shared</module>
    </modules>

    <properties>
        <java.version>1.8</java.version>
        <maven.plugins.version>2.22.1</maven.plugins.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <!-- Import dependency management from Spring Boot -->
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>2.1.4.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                        <configuration>
                            <classifier>exec</classifier>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven.plugins.version}</version>
                <configuration>
                    <useSystemClassLoader>false</useSystemClassLoader>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.plugins.version}</version>
                <configuration>
                    <useSystemClassLoader>false</useSystemClassLoader>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

Pom.xml in shared directory:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
         http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.example.parent</groupId>
        <artifactId>com-example-parent</artifactId>
        <version>1.0</version>
    </parent>

    <groupId>com.example.shared</groupId>
    <artifactId>com-example-shared</artifactId>
    <packaging>jar</packaging>
    <version>1.0</version>

</project>

Pom.xml file in application1 directory:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
         http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.example.parent</groupId>
        <artifactId>com-example-parent</artifactId>
        <version>1.0</version>
    </parent>

    <groupId>com.example.application1</groupId>
    <artifactId>com-example-application1</artifactId>
    <packaging>jar</packaging>
    <version>1.0</version>

    <dependencies>
        <dependency>
            <groupId>com.example.shared</groupId>
            <artifactId>com-example-shared</artifactId>
            <version>1.0</version>
        </dependency>
    </dependencies>

</project>

My Dockerfile:
FROM maven:3-jdk-8 as builder

WORKDIR /app
ADD ./ /app
RUN mvn install -pl application1 -am

FROM openjdk:8-jre-alpine AS runtime
COPY --from=builder /app/application1/target .
ENTRYPOINT ["java", "-jar", "com-example-application1-1.0.jar"]

Building the image goes without any problems. However, when I try to execute docker run to start a container I get an error: no main manifest attribute, in com-example-application1-1.0.jar. Does anyone know what I'm doing wrong? Should I run a different mvn command in the Dockerfile or is there a problem in the pom.xml files? (full example project on Github)

A: With help of @khmarbaise I managed to get it working. I did the following to the code in the question:

*

*Removed failsafe and surefire plugins from root pom.xml

*Moved Spring Boot maven build plugin to both application1 and application2. The Maven plugin should not be used within the pom.xml in the root directory

*Changed the entrypoint the Dockerfile to: ENTRYPOINT ["java", "-jar", "com-example-application1-1.0-exec.jar"]


text:
Q: how to redirect 404 (bad urls) to the homepage I am using asp.net and when I type a bad url manually(in the browser) it gives me:
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.
I want a bad url that doesn't exist to be re-directed to the home page.
How do I do this? I am using sitemap.

A: If you have no intentions of letting the users know, they are being redirected. Then, you could just turn custom errors on and do something like this:
<configuration>
  <system.web>
    <customErrors defaultRedirect="default.aspx" mode="On">
      <error statusCode="404" redirect="default.aspx"/>
    </customErrors>
  </system.web>
</configuration>

A: As others have already answered, web.config is one way to go.
The other is to catch unhandled exceptions from within your application. This gives you more control of the redirect.
protected void Application_Error(object sender, EventArgs e)
{
    HttpException httpException = Server.GetLastError() as HttpException;
    if (httpException.GetHttpCode() == 404)
       Response.Redirect("/MainPage.aspx");
}
Remember that if you create your own 404-page you must:

*

*Add 404-code to the Response manually.

*Keep the reply body above 512 bytes or the browser will show its default error message instead.

A: Add this section to your web.config:
<customErrors mode="On" defaultRedirect="{yourDefaultErrorPage}">
    <error statusCode="404" redirect="{yourhomePage}"/>
</customErrors>

customErrors Element on MSDN.

A: If you can, try have your 404 pages permanent redirect to a similar URL.
So instead of 404 response, make a 301 response to a similar URL on your site. Best SEO wise


text:
Q: Symfony2 DomCrawler each Loop, will not add new StdClass object to object outside the loop     use Goutte\Client;

    $results = new StdClass;

    $client = new Client();
    $crawler = $client->request('GET', $url);
    $crawler->filter('.div')->each(function ($node)
    {
        $item = new StdClass;
        $item->test = 'hello';

        $results->data[] = $item;
    });

    var_dump($results);

The output of var_dump($results) is always a totally empty object:
object(stdClass)[176]

The URL is correct and the filter is correct, the class is working, but if I make use of $node and pull text form the HTML it works within the loop, but the data is not saved within it to the $results Object.
As in the example above, the text 'hello' in the $item class is not even present in the final $results object.

A: You may try this:
$client = new Client();
$crawler = $client->request('GET', $url);
$results = $crawler->filter('.div')->each(function (Crawler $node, $i) {
    return $node->text();
});
var_dump($results);

Check the reference on Symfony website.

A: You need to allow the anonymous function to access local variable, btw I don't see that you are using $node inside your closure
function ($node) use ($results)
{
    $item = new StdClass;
    $item->test = 'hello';

    $results->data[] = $item;
}


text:
Q: Git not tracking existing files in repo I have no clue what else to do. I have looked all over stackoverflow and tried multiple solutions with no luck. Git will not track my existing files. I have reinstalled git as well as git desktop check gitconfig as well as remove gitignore. Cloning the exact same repo on my macbook pro works fine.
This is the repo im cloning: https://github.com/DevonJerothe/ED-Discovery.git
note cloning in android studio also doesnt work.
git status shows no changes even after changing, deleting. Only new files added are tracked but nothing in the file, only the creation of it.

A: Try first to change a file, confirm that git status does not pick that change, and do a
git check-ignore -v -- file/you/just/changed.

That way, you will see if there is any global exclude/gitignore file which would be, on Windows, responsible for ignoring your local changes.


text:
Q: Remove last certain number of elements from a list I have a ArrayList of values that I add on to based on certain conditions. I have a Button called back whose function is to clear the last added elements from the ArrayList. I keep track of how many elements were added by use of a counter variable.
So I have this skeleton function where itemList is the list that I want to remove the elements from and howManyElementsToRemove is the number (counter) of elements I want to remove from the parsed list. I have looked at the function options I get when using itemList.remove(), but I don't know which one will be the best option.
  private fun removeElements(itemList: ArrayList<Int>, howManyElementsToRemove: Int){

        //I am not sure how to approach this
    }

Any help or advice will be highly appreciated.

A: If you just want to remove the last added you can use removeLast() or removeLastOrNull()
For example:
val itemList = arrayListOf(1, 2, 3, 4, 5, 6, 7, 8)
val howManyElementsToRemove = 3

 repeat(howManyElementsToRemove){itemList.removeLastOrNull()}

 print(itemList)
//[1, 2, 3, 4, 5]

if you use removeLast() with howManyElementsToRemove when it size is greater than itemList size  you might get  NoSuchElementException("List is empty.")

A: A simple for loop (or repeat) should be enough:
private fun removeElements(list: ArrayList<Int>, numberOfRemovals: Int){
    for(count in 0 until numberOfRemovals){
        list.removeLast() //Or as Ben Shmuel mentioned, removeLastOrNull()
    }
}

We can test this using an input:
val primes = arrayListOf(2, 3, 5, 7, 11, 13, 17, 23)
val numberOfRemovals = 3
removeElements(primes, numberOfRemovals)
println(primes)

Result:
[2, 3, 5, 7, 11]

A: If you track the size of List each time, then best option is:
itemList.subList(prevSize, curSize).clear()

where  curSize  = current size of List and prevSize = previous Size


text:
Q: How to send an email through iOS simulator? I want to know if it's possible to send email through iPhone simulator. I have seen the
tutorial for sending an email through iphone as below:
http://www.edumobile.org/iphone/iphone-programming-tutorials/compose-mail-application-in-iphone/
Now to test it is it necessary to have real device? What is the way if I want to send email
through iPhone simulator?

A: As per the discussion on apple forum, to test the functionality we really need a device, simulator does not support this functionality.
A part from discussion:

sptrakesh
  Chicago Re: IOS SIMULATOR
MAIL APP Mar 26, 2012 7:09 AM (in response to davemac75)
The mail application is not available on the simulator.  You will need
  to test your application on a device to test that part.

A: You have to rely on the iOS that the MFMailComposeResult that is handed back in mailComposeController:didFinishWithResult:error: is correct. The simulator fakes that result; no actual mail is sent although it says MFMailComposeResultSent.
The tutorial mentioned misses an important point: The first thing you should do before using MFMailComposeViewController is to check [MFMailComposeViewController canSendMail]. That will return NO, if the user hasn't configured mail on their device. If you must support an iOS version prior to 3.0 the correct way is to check if the class MFMailComposeViewController exists:
Class mailClass = (NSClassFromString(@"MFMailComposeViewController"));
if (mailClass != nil)
{
    if ([mailClass canSendMail])
    {
        [self displayComposerSheet];
    }
    else
    {
        [self launchMailAppOnDevice];
    }
}
else
{
    [self launchMailAppOnDevice];
}

The canSendMail-issue can only be tested on a real device though. It will crash if you don't check canSendMail and the user has no mail account configured.

A: Yes it is necessary if you want to actually send the email.
in most of the cases there is no need for you to worry as the mail is going to be sent by apple app, so you will need only to verify that your app is responding and launches the mail composer. The only thing i can think as problematic is if you want to make sure that attachments and images are sent properly. In this case you can send a beta to someone with iphone and ask him to check it for you.
important
having a device is critic to developing, your simulator does not behave exactly as the device. he is a forgiver and in my experience i always had issues with the device that weren't with the  simulator.

A: You can use the MessageUI framework on the simulator to compose and 'send' messages, but I don't believe there's a way to actually send the message. Once the user hits the Send button in the message composition view, though, your code doesn't have any role in sending the message. So the simulator does enough that you can develop and test your app.
As for whether it's necessary to have a real device, I'd say that at some point you need to test on one or more devices no matter what. The simulator is a great tool, but after a certain point it's no substitute for running your app on the real thing.


text:
Q: FTPs Password Encryption in FTPS the password is encrypted when it tries to connect the server over internet. This is what i understood, pl correct if my understanding has any missing points.
My question is when i tired to simulate it ( FTPs and FTP) I am just getting a message which says SSL is established ( and port change based on implicit and explicit invocation).
Is there any way other to confirm the password is really encrypted, or we can see the password when its plain FTP.
Below is the log which i am seeing in server side
Server Logs when FTPs enabled -
Status:             TLS/SSL connection established, waiting for welcome message...
Command:    USER ftp
Command:    PASS **
Server Logs when FTP enabled -
Status:   Connection established, waiting for welcome message...
Command:    USER ftp
Command:    PASS **

A: FTPS is essentially FTP protocol with an added layer of TLS/SSL security. Your understanding that the password is encrypted during communication between client and server is absolutely correct.
You see the same logs with just a small difference in the first line because you have access to the server and have a complete log. The reason FTPS was brought into existence is because it disallows all the third parties to snoop on our user credentials. With FTP , this is quite possible.
Lets try and understand the part about Explicit FTPS.
The server lets you connect using and unencrypted FTP connection. Prior to sending user
credentials, the client then requests that the server switch the command channel to an
SSL encrypted channel using the client AUTH TLS or AUTH SSL commands.  Upon successful
setup of the SSL channel the client then sends user credentials to the FTP server.  These
credentials along with any other commands sent to server during the FTP session are
automatically encrypted by the SSL channel.

According to Wikipedia, here is the description for the channels.

*

*Secure command channel
The secure command channel mode can be entered through the issue of either the AUTH TLS or AUTH SSL commands. After such time, all command control between the FTPS client and server are assumed to be encrypted. It is generally advised to enter such a state prior to user authentication and authorization in order to avoid the eavesdropping of user name and password data by third parties.

*

*Secure data channel
The secure data channel can be entered through the issue of the PROT command. It is not enabled by default when the AUTH TLS command is issued. After such time, all data channel communication between the FTPS client and server is assumed to be encrypted.
The FTPS client may exit the secure data channel mode at any time by issuing a CDC (clear data channel) command.
References:

*

*FTPS

*FTP and FTPS

*RFC 2228