text:
Q: Using subfloat for the bottom most subfigures ruins alignment I am facing an issue where using a subfloat causes the alignment to go wrong. Below is a snippet and a figure with and without the subfloat on the bottom left figure. How can I fix this issue without making significant changes to the code i.e. using a completely different environment.
\begin{figure*}
    \centering
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = green plate};
        \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = green cup};
        \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}}
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = table};
        \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}}
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = small shelf};
        \end{scope}
    \end{tikzpicture}\\ \vspace{1mm}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}}
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = red cup};
        \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}}
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = red cup};
        \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}}
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = table};
        \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
         {\includegraphics[width=0.22\textwidth]{example-image-a}}
         \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = table};
        \end{scope}
    \end{tikzpicture}\\ \vspace{1mm}
    \subfloat[]{\begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}}
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = red cup};
        \end{scope}
    \end{tikzpicture}}
    \subfloat[]{\begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}}
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = green cup};
        \end{scope}
    \end{tikzpicture}}
    \subfloat[]{\begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}}
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = table};
        \end{scope}
    \end{tikzpicture}}
    \subfloat[]{\begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}}
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = small shelf};
        \end{scope}
    \end{tikzpicture}}\\
     \caption{}
     \label{fig:qualitative}
\end{figure*}

EDIT: Here is a MWE. It uses ieeeconf.cls that can be downloaded here http://ras.papercept.net/conferences/support/files/ieeeconf.zip I cannot paste the contents because it is too large it will crash the page.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%2345678901234567890123456789012345678901234567890123456789012345678901234567890
%        1         2         3         4         5         6         7         8

\documentclass[letterpaper, 10 pt, conference]{ieeeconf}  % Comment this line out if you need a4paper

%\documentclass[a4paper, 10pt, conference]{ieeeconf}      % Use this line for a4 paper

\IEEEoverridecommandlockouts                              % This command is only needed if
                                                          % you want to use the \thanks command

\overrideIEEEmargins                                      % Needed to meet printer requirements.

% The following packages can be found on http:\\www.ctan.org
\usepackage{amssymb}  % assumes amsmath package installed
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{tikz}
\usepackage{float}
\usepackage{subfig}

\title{\LARGE \bf
Preparation of Papers for IEEE Sponsored Conferences \& Symposia*
}

\begin{document}

\begin{figure*}
    \centering
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = green plate};
        \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = green cup};
        \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = table};
        \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = small shelf};
        \end{scope}
    \end{tikzpicture}\\ \vspace{1mm}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = red cup};
        \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = red cup};
        \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = table};
        \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
         {\includegraphics[width=0.22\textwidth]{example-image-a}};
         \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = table};
        \end{scope}
    \end{tikzpicture}\\ \vspace{1mm}
    \subfloat[$s$ = Set the table for 2 persons \\ $a$ = pick ]{\begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = red cup};
        \end{scope}
    \end{tikzpicture}}
    \subfloat[$s$ = Put all cups on the big shelf \\ $a$ = pick]{\begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = green cup};
        \end{scope}
    \end{tikzpicture}}
    \subfloat[$s$ = Set the table for 3 persons \\ $a$ = place]{\begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = table};
        \end{scope}
    \end{tikzpicture}}
    \subfloat[$s$ = Put jug on small shelf \\ $a$ = place]{\begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0)
        {\includegraphics[width=0.22\textwidth]{example-image-a}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node[scale=0.75,fill=white,thick,draw=red!80] at (0.3,0.1) {$O^{(k)}$ = small shelf};
        \end{scope}
    \end{tikzpicture}}\\
     \caption{}
     \label{fig:qualitative}
\end{figure*}

\end{document}

A: The solution to your problem is what @campa said in his/her answer. With that in mind, I'd suggest you some additional changes.

*

*Why not include in the subfloat and the tikzpicture all the items in the same column?

*Use variables for the distances. That way if you need to change them you don't have to do it one by one.

*Declare some styles for the nodes. Same as above, you don't repeat the code and it's easier to change.

*(Edit) Add \struts to the labels. This improves the text vertical alignment.

Something like this:
\documentclass{article}
\usepackage   {lipsum}
\usepackage   {showframe} % just for this example
\usepackage   {subfig}
\usepackage   {tikz}

% styles, to avoid repeating the same code in all the nodes
\tikzset
{%
  image/.style={anchor=south west,inner sep=0},
  label/.style={scale=0.75,fill=white,thick,draw=red!80,anchor=south west}
}

% if you need to change dimensions better not to have to change them one by one, so:
\def\wdt {0.22\textwidth} % width of the figures
\def\vsep{2.2}            % vertical distance between figures
\def\lsep{0.1}            % label distance (you can define differnt x and y distance)

\begin{document}
\lipsum[1]

\begin{figure}[h]
    \centering
    \subfloat[]{% we don't want spaces here
    \begin{tikzpicture}
        \node[image] at (0,0)                 {\includegraphics[width=\wdt]{example-image-a}};
        \node[label] at (\lsep,\lsep)         {\strut$O^{(k)}$ = green plate};
        \node[image] at (0,-\vsep)            {\includegraphics[width=\wdt]{example-image-a}};
        \node[label] at (\lsep,\lsep-\vsep)   {\strut$O^{(k)}$ = red cup};
        \node[image] at (0,-2*\vsep)          {\includegraphics[width=\wdt]{example-image-a}};
        \node[label] at (\lsep,\lsep-2*\vsep) {\strut$O^{(k)}$ = red cup};
    \end{tikzpicture}}{} % <-- see campa's solution
    \subfloat[]{%
    \begin{tikzpicture}
        \node[image] at (0,0)                 {\includegraphics[width=\wdt]{example-image-a}};
        \node[label] at (\lsep,\lsep)         {\strut$O^{(k)}$ = green cup};
        \node[image] at (0,-\vsep)            {\includegraphics[width=\wdt]{example-image-a}};
        \node[label] at (\lsep,\lsep-\vsep)   {\strut$O^{(k)}$ = red cup};
        \node[image] at (0,-2*\vsep)          {\includegraphics[width=\wdt]{example-image-a}};
        \node[label] at (\lsep,\lsep-2*\vsep) {\strut$O^{(k)}$ = green cup};
    \end{tikzpicture}}{}
    \subfloat[]{%
    \begin{tikzpicture}
        \node[image] at (0,0)                 {\includegraphics[width=\wdt]{example-image-a}};
        \node[label] at (\lsep,\lsep)         {\strut$O^{(k)}$ = table};
        \node[image] at (0,-\vsep)            {\includegraphics[width=\wdt]{example-image-a}};
        \node[label] at (\lsep,\lsep-\vsep)   {\strut$O^{(k)}$ = table};
        \node[image] at (0,-2*\vsep)          {\includegraphics[width=\wdt]{example-image-a}};
        \node[label] at (\lsep,\lsep-2*\vsep) {\strut$O^{(k)}$ = table};
    \end{tikzpicture}}{}
    \subfloat[]{%
    \begin{tikzpicture}
        \node[image] at (0,0)                 {\includegraphics[width=\wdt]{example-image-a}};
        \node[label] at (\lsep,\lsep)         {\strut$O^{(k)}$ = small shelf};
        \node[image] at (0,-\vsep)            {\includegraphics[width=\wdt]{example-image-a}};
        \node[label] at (\lsep,\lsep-\vsep)   {\strut$O^{(k)}$ = table};
        \node[image] at (0,-2*\vsep)          {\includegraphics[width=\wdt]{example-image-a}};
        \node[label] at (\lsep,\lsep-2*\vsep) {\strut$O^{(k)}$ = small shelf};
    \end{tikzpicture}}
    \caption{}
    \label{fig:qualitative}
\end{figure}

\lipsum[2]
\end{document}

A: The code of \subfloat ends (after a couple of expansions) with \ignorespaces, so the space after it is gobbled. If you want to preserve it, you should add e.g. an empty group.
\documentclass{article}

\usepackage{graphicx,subfig}

\begin{document}

\begin{figure}
\centering

% space between pictures
\includegraphics[width=.2\linewidth]{example-image}
\includegraphics[width=.2\linewidth]{example-image}
\caption{}

% space is gobbled away
\subfloat[]{\includegraphics[width=.2\linewidth]{example-image}}
\subfloat[]{\includegraphics[width=.2\linewidth]{example-image}}
\caption{}

% empty group reintroduces space
\subfloat[]{\includegraphics[width=.2\linewidth]{example-image}}{}
\subfloat[]{\includegraphics[width=.2\linewidth]{example-image}}
\caption{}
\end{figure}

\end{document}


text:
Q: Ruby - print first part of string in element of array Given an array of strings (full names), I need to print only the first name (hint - I'm required to use an iteration and array method)
Search terms: "ruby print part of element in array", "ruby array split strings", "ruby each array .first", "ruby print element array parameters".
I tested quite a few different possible solutions from stack overflow, I've tried ruby doc and a few other array tutorials and cannot find what I am trying to do. I feel like I am waaaay overthinking this but I cannot get past this one.
Similar WORKING Code:
full_names = ["Alice Smith", "Bob Evans", "Roy Rogers"]
puts "exercise #4 - print names by line"
full_names.each do |name|
  puts name
end

BROKEN CODE - Last Attempted Code:
puts "exercise #4 - print only first"
full_names = ["Alice Smith", "Bob Evans", "Roy Rogers"]
full_names.each do |name|
  puts name.first
end

Error ex_a.rb:78:in block in <main>': undefined methodfirst' for "Alice Smith":String (NoMethodError)
  (line 78 is 'puts name.first')

A: So close:
puts "exercise #4 - print only first"
full_names = ["Alice Smith", "Bob Evans", "Roy Rogers"]
full_names.each do |name|
  puts name.split.first
end

A: This is basically the same as steenslag's answer, but you also can do it in one line like so:
puts "exercise #4 - print only first"
full_names = ["Alice Smith", "Bob Evans", "Roy Rogers"]
full_names.each { |name| puts name.split.first }

or
full_names.each { |name| puts name.split[0] }

The reason you were getting the error undefined method: first is that first is a method for the Enumerable and Array class.
See https://rubyapi.org/2.7/o/array#method-i-first
After you split the strings (in this case, names separated by a space), you turn each of them into an array on their own. So "Alice Smith".split => ["Alice", "Smith"]. You can then access the first item of this array with first or [0], which acesses the first index of any array.
Likewise when you apply [0] to a string, e.g. "Alice"[0], this is the String#slice method which accesses the first item of "Alice".
Therefore, "Alice"[0] => "A" See: https://rubyapi.org/2.7/o/s?q=slice

A: While not a big difference, I would avoid split and prefer the following approach:
puts name[/\S+/] # first word anywhere in the string

or
puts name[/^\S+/] # word must be at the start of the string

The difference could matter if you one day perform the same idea to extract the first word from a long text. With split, the whole string will be scanned and a temporary array with all the words will be created, but you need only the first one. With my approach, the string will only be scanned until the first word is identified.
The difference between my two variations is that the second one would extract the first name even if there are leading spaces, such as "  Alice Smith". Plus, this approach can easily extended to include punctuation characters as word separators.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Rake Aborted syntax error Ruby I've started learning Ruby on Rails using http://guides.rubyonrails.org/getting_started.html.  I'm by no means new to programming but Ruby on Rails is different to what I'm used to.
I'm on step 5 where I need to create a new article resource. When I modify the config/routes.rb file to look like this:
Blog2::Application.routes.draw do
get "welcome/index"

Blog2::Application.routes.draw do

resources :posts

# The priority is based upon order of creation:
# first created -> highest priority.

# Sample of regular route:
#   match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action

# Sample of named route:
#   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# This route can be invoked with purchase_url(:id => product.id)

# Sample resource route (maps HTTP verbs to controller actions automatically):
#   resources :products

# Sample resource route with options:
#   resources :products do
#     member do
#       get 'short'
#       post 'toggle'
#     end
#
#     collection do
#       get 'sold'
#     end
#   end

# Sample resource route with sub-resources:
#   resources :products do
#     resources :comments, :sales
#     resource :seller
#   end

# Sample resource route with more complex sub-resources
#   resources :products do
#     resources :comments
#     resources :sales do
#       get 'recent', :on => :collection
#     end
#   end

# Sample resource route within a namespace:
#   namespace :admin do
#     # Directs /admin/products/* to Admin::ProductsController
#     # (app/controllers/admin/products_controller.rb)
#     resources :products
#

# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
#root :to => 'articles#new'

 root :to => 'welcome#index'

end

I keep getting an error in rake routes and it says:
rake aborted!
SyntaxError: C:/rubygems/blog2/config/routes.rb:68: syntax error, unexpected $en
d, expecting keyword_end
C:in execute_if_updated' C:/rubygems/blog2/config/environment.rb:5:in'
Tasks: TOP => routes => environment
(See full trace by running task with --trace)

I know it's line 68 and has something to do with "end" but I've made sure the "end" is uncommented.
Does anyone know what the issue is?

A: You call method Blog2::Application.routes.draw twice, each time starting block. Though you close only one of these blocks. The solution is to remove 4th line of routes.rb file (Blog2::Application.routes.draw do).


text:
Q: Why won't my nav's bottom border stay solid for my current List item Here's the js fiddle, http://jsfiddle.net/h0hrm8m2/ here's the JSFiddle outside JS fiddle on the hover it changes the color of the bottom to gold.

A: Close the tag:-
nav ul li a:hover {
    border-bottom: solid 0.15em rgb(255,215,0)
}

nav {
    width: 100%;
    margin-top: 3%;
    margin-bottom:3%;
    text-align: center;
}
nav ul li {
    list-style-type: none;
    display: inline;
}
nav ul li a {
    font-family: calibri;
    font-size: 1.1em;
    text-decoration: none;
    color: rgba(0, 0, 0, 0.7);
    border-bottom: solid 1px rgb(0, 0, 0);
    margin: 1%;
    background-color: rgb(255, 255, 255);
    padding: 2%;
    padding-top: 3%;
}
nav ul li a:hover {
    border-bottom: solid 0.15em rgb(255, 215, 0);
}
nav ul li a #current {
    border-bottom:solid 1px rgb(250, 215, 0);
}

HOME

MENU

LOCATION

RESERVATIONS

A: nav ul li a:hover
{
border-bottom: solid 1px gold;
}

A: You have got your selectors slightly wrong.  You should also not be using an id for current.  Use a class instead:

HOME

MENU

LOCATION

RESERVATIONS

and
nav {
    width: 100%;
    margin-top: 3%;
    margin-bottom:3%;
    text-align: center;
}

nav ul li {
    list-style-type: none;
    display: inline;
}

nav ul li a {
    font-family: calibri;
    font-size: 1.1em;
    text-decoration: none;
    color: rgba(0, 0, 0, 0.7);
    border-bottom: solid 1px rgb(0, 0, 0);
    margin: 1%;
    background-color: rgb(255, 255, 255);
    padding: 2%;
    padding-top: 3%;
}

nav ul li a:hover {
    border-bottom: solid 0.15em rgb(255,215,0)
}

nav ul li.active a {
    border-bottom:solid 1px rgb(250,215,0);
}

This last class (nav ul li.active a) is the one that will make your active item keep its coloured border.


text:
Q: Finding where $ f$ is analytic
Find all the $ z \in \Bbb {C}$ where $f (z)=\frac {z+1}{z-1}$ is analytic.

So im getting started with complex analysis, and being used to doing some real analysis im getting messed up. So in the book im reading, they just define the concept of an analytic function and mention Cauchy Riemman conditions for every analytic function. But my question is, how should I treat the functions to see if they are analyitic? Can I use old school derivation rules?

A: The function $g(z)=z+1$ and $h(z)=z-1$ are entire complex function; that is they are holomorphic over the entire complex plane $\mathbb{C}$. In particular they are analytic. Let now $\Omega=\{z\in\mathbb{C} \mid g(z)\neq0\}=\mathbb{C}-\{1\}$. Then the quotient function
$$f(z)= \frac{g(z)}{h(z)}$$
is analytic over $\Omega$. Then the set of complex number such that $f(z)$ is analytic or holomorphic is $\Omega$. In general complex functions over a domain $D$ is an algebra. The invertible elements are those functions such that have not zeros in that domain.
In your case $h(z)$ is invertible iff $z=1$ not belong to the domain.


text:
Q: I am not able to fire command from menuitem.i have list view.i have not binded any thing below is code behind.code for my simple form
In My code behind
 public MainWindow()
 {
    InitializeComponent();
    this.DataContext = new viewModel();
 }

My view model
public class viewModel
 {
   public ICommand TaskmenuCommand = new RelayCommand(_OpenTaskWindow);

       private static void _OpenTaskWindow(object obj)
        {
             /*Some logic for Add,Edit delete*/
        }
 }

Below is my front end.simple list view
<ListView Width="200">
<ListView.ContextMenu>
   <ContextMenu>
<MenuItem Header="Add"   Command="{Binding Path= DataContext.TaskmenuCommand, RelativeSource={RelativeSource Mode=FindAncestor,
                AncestorType={x:Type Window}}}"
                      CommandParameter="Add"/>
   </ContextMenu>
</ListView.ContextMenu>
</ListView>

A: try  like this
<ListView Width="200" VerticalAlignment="Stretch">
  <ListView.Resources>
    <ContextMenu x:Key="ContextMenuResourceKey">
      <MenuItem Header="Add" Command="{Binding Path=DataContext.TaskmenuCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListView}}" />
     </ContextMenu>
   </ListView.Resources>
 <ListView.ItemContainerStyle>
    <Style TargetType="{x:Type ListViewItem}" >
       <Setter Property="ContextMenu" Value="{StaticResource ContextMenuResourceKey}" />
     </Style>
 </ListView.ItemContainerStyle>
 <ListViewItem Content="Coffie"></ListViewItem>
 <ListViewItem Content="Tea"></ListViewItem>
 <ListViewItem Content="Orange Juice"></ListViewItem>
 <ListViewItem Content="Milk"></ListViewItem>
 <ListViewItem Content="Iced Tea"></ListViewItem>
 <ListViewItem Content="Mango Shake"></ListViewItem>

A: There must be some problem with your RelayCommand. I created my own RelayCommand class as below. My code works with your current XAML.
public class ViewModel
    {
        public RelayCommand TaskmenuCommand
        { get; set; }

        private static void _OpenTaskWindow(object param)
        {
            MessageBox.Show("ViewModel  > " + param.ToString());
        }

        public ViewModel()
        {
            TaskmenuCommand = new RelayCommand(_OpenTaskWindow);
        }
    }

public delegate void CustomFuncDelegate(object parameter);

public class RelayCommand:ICommand
    {
        public CustomFuncDelegate FuncToExecute { get; set; }

        public RelayCommand(CustomFuncDelegate func)
        {
            FuncToExecute = new CustomFuncDelegate(func);
        }

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            FuncToExecute(parameter);
        }
    }

A: Chnage your code as:
<ListView Width="200">
<ListView.ContextMenu>
   <ContextMenu>
<MenuItem Header="Add"   Command="{Binding Path= TaskmenuCommand}"
                      CommandParameter="Add"/>
   </ContextMenu>
</ListView.ContextMenu>
</ListView>

You have defined your ContextMenu directly in  ListView. It will get the same DataContext in this case, which is usually not the
  case with ContextMenus.


text:
Q: How to set file paths in ubuntu I'm trying to install an application using the terminal in Ubuntu 9.10. What do I type when a file path is needed?Any tutorials there regarding file paths in ubuntu. Because I tried using C:\ and its not working.

A: Linux has no drive letters and doesn't use the backslash as a directory separator. The root of the directory structure is /. But you should first get acquainted with the directory structure on UNIX and UNIX-like systems. man hier should give you some hints (at least it does on FreeBSD).
Generally, putting software directly into / is strongly discouraged (as is putting something directly into C:\ on Windows as well—it's just that most Windows users don't care).


text:
Q: Função recursiva em Python que retorne o maior e o menor valor dentro de uma lista Alguém poderia me ajudar com uma luz? Consigo fazer a função recursiva para achar o menor valor numa lista, e o maior valor separadamente. Mas uma função retornando os dois juntos não consigo.
O exercício seria:
Escreva uma função, chamada minmax, que recebe uma lista e retorna uma TUPLA
contendo o elemento mínimo e o elemento máximo da lista.
Sua função deve ser recursiva.
Não use o comando "max" ou "min" do Python sobre lista.
EXEMPLOS:
minmax([1,2,3]) = (1, 3)
minmax([49, 1, 6, 10]) = (1, 49)

Meu codigo:
def minmax(lista):

    if(len(lista) == 0):
        raise ValueError('Cannot find the maximum of an empty list.')

    if len(lista) == 1:
        return (lista[0], lista[0])
    else:
        maxValue = minmax(lista[1:])

A: Você chegou muito perto da solução. Faltou somente retornar quando a quantidade de números na lista é maior que 1. Você calcula o mínimo e o máximo do restante da lista, mas não faz nada com o resultado. A ideia aqui é você comparar o mínimo e o máximo que você obteve do resto da lista com o primeiro número da lista, pois este pode ser menor que o mínimo ou maior que o máximo, assim ficaria:
def minmax(lista):

    if(len(lista) == 0):
        raise ValueError('Cannot find the maximum of an empty list.')

    if len(lista) == 1:
        return (lista[0], lista[0])

    _min, _max = minmax(lista[1:])

    if lista[0] < _min:
        _min = lista[0]

    if lista[0] > _max:
        _max = lista[0]

    return (_min, _max)

Desta forma você estará calculando de forma recursiva e obterá os resultados corretos.


text:
Q: Cannot find a node_module in TypeScript I have a problem with reselect package. It has typings inside the package, so if I've understood it correctly, typeScript should handle it itself. But any time I am trying to import it, I see (5,32): error TS2307: Cannot find module 'reselect'.
Code is very simple:
/// <reference path="../../../../node_modules/reselect/src/reselect.d.ts"/>

import { connect } from 'react-redux';
import Actions from '../../redux/actions';
import { createSelector } from 'reselect';
import { MapDispatchToPropsObject } from 'react-redux';

import { SearchCity } from './index';

const mapStateToProps = (state) => ({
  places: state.searchPlaces,
});

const mapDispatchToProps: MapDispatchToPropsObject = {
  search: Actions.searchPlaces.searchPlace,
};

export default connect(mapStateToProps, mapDispatchToProps)(SearchCity);

Here I've added reference manually, but it doesn't work anyway.
I use webpack with ts-loader.
Thanks!

A: I've come to the same error and the no-unused-variable tslint rule was the cause, reselect works after removing it.
After some googling it seems that rule causes many various problems, so I recommend using --noUnusedLocals (or "noUnusedLocals": true) typescript directive instead. The only problem is if you use some unused vars intentionally somewhere, you have to replace tslint:disable with // @ts-ignore there. https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-6.html#suppress-errors-in-ts-files-using--ts-ignore-comments


text:
Q: Bootstrap 4 Dropdown menu when resized - color change So as you can see the dropdown menu doesn't have any background color. How can i change this? Which class should i target so i can give a color to the dropdown menu?
Image:
https://i.stack.imgur.com/5dh88.png

A: I am usign wordpress and this is the code in the header.php
       <nav id="mainNav" class="navbar navbar-expand-md navbar-dark fixed-top">

    <?php if ( 'container' == $container ) : ?>
    <div class="container">
    <?php endif; ?>

            <?php wp_nav_menu(
                array(
                    'theme_location'  => '',
                    'container_class' => 'collapse navbar-collapse',
                    'container_id'    => 'navbarNavDropdown',
                    'menu_class'      => 'navbar-nav ml-auto',
                    'fallback_cb'     => '',
                    'menu_id'         => 'main-menu',
                    'walker'          => new WP_Bootstrap_Navwalker(),
                )
            ); ?>

</div>
        </nav>


text:
Q: NodeJS Api gives Internal Server Error on AWS Lambda I have developed a serverless API that works well on serverless-offline. It returns the rows from AWS RDS DB. But when same is deployed on AWS Lambda the route gives me internal server error. I have tried:

*

*Have done the deploy API for my gateway.

*Have also returned status for success calls.

Below is my code:
app.js file:
const express = require('express');
const app = express();
const bodyParser = require("body-parser");
app.use(bodyParser.json());
const cors = require('cors')
app.use(cors());
const client = require('./connection.js')

client.connect();
app.get('/',  (req, res) => {
    res.send('Welcome to API that helps connect with Recruitment DB')
})

app.get('/users', async function (req, res) {
    try {
        const allProfiles = await client.query("SELECT * FROM public.portal_users");
        res.status(200).send(allProfiles.rows);
      } catch (error) {
          res.status(500).send("Error received: "+ error.message);
      }

  })

module.exports = app

serverless.yml file:
service: portalserver

frameworkVersion: '3'

provider:
  name: aws
  memorySize: 2048
  stage: dev
  timeout: 15
  runtime: nodejs12.x
  region: ap-south-1

functions:
  hello:
    handler: handler.hello
    events:
      - http:
          path: /
          method: get
          cors: true
      - http:
          path: /{proxy+}
          method: any
          cors: true

plugins:
  - serverless-offline

custom:
  serverless-offline:
    noPrependStageInUrl: true

The get / works well but /users return Internal Server Error

A: Ok so the problem was related to access. I created a VPC for my lambda function to access the secured AWS RDS DB and it worked.


text:
Q: Fetch latest updates from different tables MYSQL +PHP I would like to make somehow latest updates script for my webpage.
I have several tables in my MySQL database:
TABLES:

*

*latest_updates

*images

*gallery_images

*profile_info

*questions

Example:

*

*User1 adds new image to "images" table

*User2 adds new question in "questions" table

*User1 adds changes his profile info in "profile info" table

All these tables are containing user_id which is connected to certain user.
Now what is the best solution to make this status updates script when some user updates or inserts new row to any of these tables
I would like to have some sort of script saying:

*

*User1 has added new image to his gallery

*User2 has created new question

*User3 changed his profile information

Is it to make another table and every new insert in any tables above, also insert the update in that table or try to make some sort of SQL query to join the tables and read the latest?
If the second option is the best could you please give an example?
Cheerz

A: Create new table user_updates (or some else) with fields:

*

*id (autoinc, primary)

*id_user

*id_dest (destination table id)

*table_dest (destination table name)

*action (modify/create)

*changed (timestamp, when happened)

Then you can retrieve all newest rows from this table and show recent updates. You can also join this table to "real" data and show what has been modified.

A: The easiest way would be to create a new table which would record when things are created/edited. If you prefer the harder route.. I would break down each section into it's own SQL query, and order it by the latest SQL timestamp.
e.g to display the latest updates to images:
$sql="select * from images ORDER BY TIMESTAMP ASC";
$stmt = $connection->prepare($sql);
$stmt->execute();
$res = $stmt->get_result();
$latestimages = $res->fetch_array(MYSQLI_ASSOC);
echo $latestimages['user'] . " has uploaded a new image!";

Doing it this way has some advantages, for example if you had content boxes on your page each with its own header e.g. Latest Images, Latest Forum Posts, Latest Blog Updates etc you could use code similar to this and just add a LIMIT to the SQL query. (to display latest 5 results, add a LIMIT of 5)


text:
Q: publishing website in webmatrix with web deploy How can I publish my website in Webmatrix that uses a database, using Web Deploy?
My connection string has the configuraions of my local database. Should I change the configurations before publish using the webmatrix publisher?
Is there any best practice to avoid the need to change the connection in web config in all publish times?

A: Please follow this article
http://www.microsoft.com/web/post/web-development-101-part-9-deploying-your-site
You need to set the connectionstring of your server database instead of your local database on your computer.
Take a look on Using different Web.config in development and production environment to set configuration for both enviornment dev and production.


text:
Q: Aspx page has content of size in MB while calling I have an issue. On calling a page "treatmentreq.aspx?key=&refno=0452-85198&user=admin" downloads a page with 12mb of contents. attached is the screenshot below.
Click here to go to image.
How can I solve this issue as it takes 8-10 mintues to load the page?
Note: I have been using devexpress as reporting tool.

A: disabling the view state can solve this problem. It can be done by adding EnableViewState="false" in the page directive itself.


text:
Q: xfce4 can't create keyboard shortcut with PrintScreen+letter I used the XFCE GUI tool and every time I input printscreen + u as my shourtcut, xfce ignores the printscreen button in the shortcut.
I also tried to edit the XML conf file with name="&alt;Print>u" but it ignores the u.

A: You can only define shortcuts on keychords consisting of one "normal" key and a set of modifiers. The classical modifiers are Shift, Ctrl, Meta, Alt, Hyper and Super. The first four are already taken on a PC keyboard — for historical reasons, Meta is more or less an alias of Alt. By default the "Windows" key is Super, which leaves Hyper free. So assign Hyper to PrintScreen. Additionally you need to assign it a modifier name; by default Mod3 is free (the possibilities are Mod1 through Mod5).
The simplest way to do this is through xmodmap. Create a file called ~/.Xmodmap (i..e .Xmodmap in your home directory) containing
keysym Print = Hyper_L
clear Mod3
add Mod3 = Hyper_L

Some distributions load this file automatically during login. If yours doesn't, add the command xmodmap <~/.Xmodmap to your startup applications.


text:
Q: Watchkit "The extension took too much time to initialize" Crash:"LAUNCH_HANG Exception" I am stuck at a point, there is a crash in WatchKit Extension and I looked around in internet but failed to find the reason or any help to fix it.
As per the crash log it says

The extension took too much time to initialize

Watch App is designed for Watch OS1, and I think the user is running the app in Watch OS2, after spending hours in debugging and time profiling now I can't analyze more. even I am not able to reproduce this again  ......
I also tried time profiling through instruments in low memory constrain but no clue in method call or system library.

- (void)awakeWithContext:(id)context {
[super awakeWithContext:context];

if (context!=nil)
{
    NSString *contextString = (NSString *)context ;

    if ([contextString isEqualToString:@"fromHomeScreen"])
    {
        isFromHomeScreen = YES;
    }
    else
        isFromHomeScreen = NO;
}

NSLog(@"[iWatch]Performance Logs: Main class app First method %@",[NSDate date]);

[self.welcomeLabel setText:NSLocalizedString(@"Welcome", @"")];
[self.tipsLabel setText:NSLocalizedString(@"To control speakers with your watch, set up Wireless Audio Multiroom on your mobile.", @"")];

 }

- (void)willActivate {
[super willActivate];
[self setTitle:@""];
[self configureWelcomeForFirstLaunch];}

- (void)configureWelcomeForFirstLaunch {
[self setNotificationObserverForName:kVDWearableSpeakerNoMusic object:nil selector:@selector(checkAndDisplayNextScreenFromWelcomeScreen) observer:self];
[self setNotificationObserverForName:kVDWearableInitialSetupCompleted object:nil selector:@selector(showTipsScreenAfterInitialSetupFinished) observer:self];
[self setNotificationObserverForName:kVDWearableSpeakerCurrentFunctionChanged object:nil selector:@selector(handleOtherSourcesCase) observer:self];
[self setNotificationObserverForName:kVDWearableSpeakerDataUpdated object:nil selector:@selector(UpdateScreenWithCurrentNotification) observer:self];

NSUserDefaults *tempDefault = [[NSUserDefaults alloc] initWithSuiteName:kVDSharedAppGroup];
NSArray *speakerArray =  [NSKeyedUnarchiver unarchiveObjectWithData:[tempDefault objectForKey:kVDGetWearableSpeakerData]];
NSDictionary *requst = @{@"firstLaunchStatus":@"currentPlaying", };

NSLog(@"will activate called");
[VDWelcomeInterfaceController openParentApplication:requst reply:^(NSDictionary *replyInfo, NSError *error) {
    NSLog(@"replyInfo=%@",replyInfo);

    NSLog(@"replyBlockCalled");
    if (replyInfo!=nil) {

        NSLog(@"gor valid reply without error");
        if ([speakerArray count]  > 0)
        {
            if(([replyInfo objectForKey:@"firstLaunchStatus"]) )
            {
                VDWearableSpeakerData *noMusicDict = [NSKeyedUnarchiver unarchiveObjectWithData:[tempDefault objectForKey:kVDGetWearableSpeakerDataNoMusic]];

                VDWearableSpeakerData *speakerData =  [NSKeyedUnarchiver unarchiveObjectWithData:[tempDefault objectForKey:kVDGetWearableSelectedSpeakerData]];

                if ([speakerData.speakerType isEqualToString:@"Phone speaker"] )
                {
                    return ;
                }
                if (speakerData.currentFunction.integerValue !=0) {
                    [VDWelcomeInterfaceController reloadRootControllersWithNames:@[@"HomeInterface", @"VolumeInterface", @"SpeakerInterface"] contexts:[NSArray arrayWithObject:@"noMusic"]];
                }

               else  if ([noMusicDict.noMusic boolValue])
                {
                    // [VDInitialInterfaceController reloadRootControllersWithNames:@[@"VDTipsInterface"] contexts:nil];
                    [VDWelcomeInterfaceController reloadRootControllersWithNames:@[@"HomeInterface", @"VolumeInterface", @"SpeakerInterface"] contexts:[NSArray arrayWithObject:@"noMusic"]];

                    NSLog(@"1");
                }
                else
                {
                    // [VDInitialInterfaceController reloadRootControllersWithNames:@[@"HomeInterface", @"VolumeInterface", @"SpeakerInterface"] contexts:nil];
                    [VDWelcomeInterfaceController reloadRootControllersWithNames:@[@"HomeInterface", @"VolumeInterface", @"SpeakerInterface"] contexts:[NSArray arrayWithObject:@"music"]];

                    NSLog(@"2");
                }
            }
        }

    }
}];

}
Any clarity on this exception and its handling would be much appreciated.

Crash Log: Incident Identifier: 5C977759-3AE7-4701-A414-E4E7A27DB34E
  Hardware Model:      iPhone6,2   Path:
  /private/var/mobile/Containers/Bundle/Application/93509EEB-9945-45CD-9DBD-60E5D1717F4A/Multiroom2-Phone.app/PlugIns/MultiRoom
  WatchKit Extension.appex/MultiRoom WatchKit Extension Identifier:
  com.samsung.MultiRoom.watchkitextension Version:             3167
  (3167) Code Type:           ARM-64 (Native) Parent Process:
  launchd 1
      Date/Time:           2015-10-27 17:30:02.02 +0100 Launch Time:         2015-10-27 17:29:57.57 +0100 OS Version:          iOS 9.1 (13B143)
  Report Version:      105
      Exception Type:  EXC_CRASH (SIGABRT) Exception Subtype: LAUNCH_HANG Exception Message: The extension took too much time to
  initialize Exception Note:  EXC_CORPSE_NOTIFY Triggered by Thread:  0
      Thread 0 name: Thread 0 Crashed: 0   libsystem_kernel.dylib         0x000000019a8e0a40 mach_msg_trap + 8 (syscall_sw.h:105) 1
  libsystem_kernel.dylib         0x000000019a8e08bc mach_msg + 72
  (mach_msg.c:103) 2   CoreFoundation                 0x0000000185484108
  __CFRunLoopServiceMachPort + 196 (CFRunLoop.c:2345) 3   CoreFoundation                 0x0000000185481e0c __CFRunLoopRun + 1032 (CFRunLoop.c:727) 4
  CoreFoundation                 0x00000001853b0ca0 CFRunLoopRunSpecific
  + 384 (CFRunLoop.c:2814) 5   Foundation                     0x00000001863292bc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 308
  (NSRunLoop.m:367) 6   Foundation
  0x000000018637e8f4 -[NSRunLoop(NSRunLoop) run] + 88 (NSRunLoop.m:388)
  7   libxpc.dylib                   0x000000019aa00dac _xpc_objc_main +
  660 (main.m:177) 8   libxpc.dylib                   0x000000019aa02ae0
  xpc_main + 200 (init.c:1369) 9   Foundation
  0x00000001864fb194 service_connection_handler + 0
  (NSXPCListener.m:129) 10  PlugInKit
  0x000000019376ecc4 -[PKService run] + 544 (PKService.m:104) 11
  WatchKit                       0x000000018b7250c0 main + 872
  (main.m:55) 12  libdyld.dylib                 0x000000019a7de8b8 start
  + 4 (start_glue.s:80)
      Thread 1: 0   libsystem_kernel.dylib         0x000000019a8fbb6c __workq_kernreturn + 8 1   libsystem_pthread.dylib       0x000000019a9c1530 _pthread_wqthread + 1284 (pthread.c:1930) 2
  libsystem_pthread.dylib       0x000000019a9c1020 start_wqthread + 4
  (pthread_asm.s:191)
      Thread 2 name: Thread 2: 0   libsystem_kernel.dylib         0x000000019a8fc4fc kevent_qos + 8 1   libdispatch.dylib
  0x000000019a7c0a04 _dispatch_mgr_invoke + 232 (source.c:2545) 2
  libdispatch.dylib             0x000000019a7af874
  _dispatch_source_invoke + 0 (source.c:777)
      Thread 3: 0   libsystem_kernel.dylib         0x000000019a8fbb6c __workq_kernreturn + 8 1   libsystem_pthread.dylib       0x000000019a9c1530 _pthread_wqthread + 1284 (pthread.c:1930) 2
  libsystem_pthread.dylib       0x000000019a9c1020 start_wqthread + 4
  (pthread_asm.s:191)
      Thread 4:
      Thread 0 crashed with ARM Thread State (64-bit):
      x0: 0x0000000010004005   x1: 0x0000000007000806   x2: 0x0000000000000000   x3: 0x0000000000000c00
      x4: 0x0000000000002507   x5: 0x00000000ffffffff   x6: 0x0000000000000000   x7: 0x00000000000000b0
      x8: 0x00000000fffffbbf   x9: 0x0000000007000000  x10: 0x0000000007000100  x11: 0x00000000fff0bdc0    x12: 0x0000000000000001
  x13: 0x0000050000000603  x14: 0x0000000000000000  x15:
  0x0000060000000600    x16: 0xffffffffffffffe1  x17: 0x0000000000000000
  x18: 0x0000000000000000  x19: 0x0000000000000000    x20:
  0x00000000ffffffff  x21: 0x0000000000002507  x22: 0x0000000000000c00
  x23: 0x000000016fdfaaf8    x24: 0x0000000007000806  x25:
  0x0000000000000000  x26: 0x0000000007000806  x27: 0x0000000000000c00
  x28: 0x0000000000000001  fp: 0x000000016fdfaa00   lr:
  0x000000019a8e08bc
      sp: 0x000000016fdfa9b0   pc: 0x000000019a8e0a40 cpsr: 0x60000000

Any clarity on this exception and its handling would be much appreciated.
Thanks in advance


text:
Q: XCode - file not found in document directory I am having random error while reading saved photos from document directory in iPhone. I save photos taken from my app to document directory and then read it from there next time when user come back. However, after XCode 6 & base SDK change to 8.1, this document directory path keeps changing. So sometime I found photos and sometime not.
I read few posts online thats says that not Apple differentiate App from Data and that's why this issue coming up.  Anyone has any thoughts on this? Any solution?
This is how I save file to document Directory
NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentDirectory = [path firstObject];
NSString *filePath = [documentDirectory stringByAppendingPathComponent:@"key"];
[image writeToFile:path atomically:YES];

And this is how I read it:
NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentDirectory = [path firstObject];
NSString *filePath = [documentDirectory stringByAppendingPathComponent:@"key"];
UIImage *cellImage = [[UIImage alloc] initWithContentsOfFile:filePath];

A: Go to Product - Scheme - Edit Scheme - Options - Working Directory and specify working directory


text:
Q: If I have an open tab with some page, can I find out where did I found link to that page? If I have an open tab with some page, can I find out where did I found link to that page?
I want answers like:

*

*You opened this tab from page XXX

*You pasted URL in address bar manually

Is there an extension for this?

A: You could do it crudely using the referrer (if present).

*

*Menu -> Tools -> Developer Tools

*Network -> Scroll to the top item -> Select it

*Request Headers -> Referrer: the link you came from here

For Firefox there is an extension called FromWheretoWhere that shows the full history of where each link came from.
It's explained in detail by Ghacks.


text:
Q: Insert commant into python ''' string I have this  string
my_str = '''
Hi!
EveryOne
'''
print (my_str)

How can i add a comment into line without print it, for example
my_str = '''
Hi!  #DO NOT SHOW THIS STRING
EveryOne
'''

A: We have a few issues here.
1: The triple quote you're using here (''') is generally reserved for docstrings, not for strings within the code. You'll want to use either single (') or double (") quotes, and keep it on the same line.
2: The pound (#) is used to comment out code, but I personally don't know of a reason why you'd do that within a line like you have it here.
The format you'd want to go for is this:
#DO NOT SHOW THIS STRING
my_str = 'Hi!\nEveryOne'
print(my_str)

Is there a specific reason you might want to add a comment like this in-line instead of outside of that specific block?

A: You could use Python's multiline string syntax:
my_str = (''
          'Hi!\n' #DO NOT SHOW THIS STRING
          'EveryOne'
          ''
          )
print (my_str)

A: its not really useful but

my_str = ('''
Hi!  ''' #comment
'''\nEveryOne
''')
print (my_str)

A: If you decide to ignore everything from #to the end of the line, you can use regex:
import re

my_str = '''
Hi!  #DO NOT SHOW THIS STRING
EveryOne
'''

my_str = re.sub("#.*\n", "\n", my_str)

# Result

'''
Hi!
EveryOne
'''

EDIT: If you want to get rid of the spaces before # also:
my_str = re.sub(" ?#.*\n", "\n", my_str)


text:
Q: Caused by: org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection with EmbeddedDerby I'm using Embedded Derby Derby 10.15.2.0   with Hibernate  5.4.14
Driver and c3p0 jars are added to project classpath but don't know why I'm getting

ERROR: An SQLException was provoked by the following failure: com.mchange.v2.resourcepool.NoGoodResourcesException: After checking so many resources we blew the stack, no resources tested acceptable for checkout. See logger com.mchange.v2.resourcepool.BasicResourcePool output at FINER/DEBUG for information on individual failures.

And

Caused by: org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection

Here is Hibernate.cfg.xml
<hibernate-configuration>
    <session-factory>
        <property name="hibernate.dialect">org.hibernate.dialect.DerbyTenSevenDialect</property>
        <property name="hibernate.connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
        <property name="hibernate.connection.url">jdbc:derby:/home/.netbeans/11.0/derby/clientieFX</property>
        <property name="hibernate.connection.username">app</property>
        <property name="hibernate.connection.password">app</property>
        <property name="hibernate.default_schema">APP</property>
        <property name="hibernate.enable_lazy_load_no_trans">true</property>
        <property name="current_session_context_class">thread</property>

        <property name="hibernate.c3p0.acquire_increment">1</property>
        <property name="hibernate.c3p0.min_size">5</property>
        <property name="hibernate.c3p0.max_size">20</property>
        <property name="hibernate.c3p0.timeout">300</property>
        <property name="hibernate.c3p0.maxIdleTimeExcessConnections">300</property>
        <property name="hibernate.c3p0.numHelperThreads">6</property>
        <property name="hibernate.c3p0.unreturnedConnectionTimeout">3600</property>
        <property name="hibernate.c3p0.debugUnreturnedConnectionTimeout">true</property>
        <property name="hibernate.c3p0.max_statements">1000</property>
        <property name="hibernate.c3p0.preferredTestQuery">/* ping */</property>
        <property name="hibernate.c3p0.testConnectionOnCheckout">true</property>
        <property name="hibernate.connection.release_mode">on_close</property>

        <mapping resource="com/clientie/pojo/Order.hbm.xml"/>
        <mapping resource="com/clientie/pojo/Client.hbm.xml"/>
        <mapping resource="com/clientie/pojo/Product.hbm.xml"/>
        <mapping resource="com/clientie/pojo/User.hbm.xml"/>
    </session-factory>
</hibernate-configuration>

I tried change properties but it doesn't work.
Why it is not able to connect ?


text:
Q: Unable to install platformio-ide-terminal in Atom I am a beginner in python and just started learning it since yesterday and I am facing this below error:
Installing "platformio-ide-terminal@2.10.0" failed.

> node-pty-prebuilt-multiarch@0.9.0-beta21.legacy install C:\Users\***\AppData\Local\Temp\apm-install-dir-2020914-12224-l2dhgv.ez4lo\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt-
multiarch
> prebuild-install || node scripts/install.js

C:\Users\***\AppData\Local\Temp\apm-install-dir-2020914-12224-l2dhgv.ez4lo\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt-multiarch>if not defined npm_config_node_gyp (node "C:\Users\***\AppData\Local\atom\app-1.52.0\resources\app\apm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\***\AppData\Local\atom\app-1.52.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\***\AppData\Local\Temp\apm-install-dir-2020914-12224-l2dhgv.ez4lo\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt-multiarch\build\conpty.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\***\AppData\Local\Temp\apm-install-dir-2020914-12224-l2dhgv.ez4lo\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt-multiarch\build\conpty_console_list.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\***\AppData\Local\Temp\apm-install-dir-2020914-12224-l2dhgv.ez4lo\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt-multiarch\build\deps\winpty\src\winpty.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\***\AppData\Local\Temp\apm-install-dir-2020914-12224-l2dhgv.ez4lo\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt-multiarch\build\deps\winpty\src\winpty-agent.vcxproj]

prebuild-install WARN install No prebuilt binaries found (target=6.1.12 runtime=electron arch=x64 libc= platform=win32)
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\***\AppData\Local\atom\app-1.52.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Users\\***\\AppData\\Local\\atom\\app-1.52.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\indra\\AppData\\Local\\atom\\app-1.52.0\\resources\\app\\apm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\***\AppData\Local\Temp\apm-install-dir-2020914-12224-l2dhgv.ez4lo\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt-multiarch
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\indra\AppData\Local\Temp\apm-install-dir-2020914-12224-l2dhgv.ez4lo\package.json'
npm WARN apm-install-dir-2020914-12224-l2dhgv.ez4lo No description
npm WARN apm-install-dir-2020914-12224-l2dhgv.ez4lo No repository field.
npm WARN apm-install-dir-2020914-12224-l2dhgv.ez4lo No README data
npm WARN apm-install-dir-2020914-12224-l2dhgv.ez4lo No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty-prebuilt-multiarch@0.9.0-beta21.legacy install: `prebuild-install || node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty-prebuilt-multiarch@0.9.0-beta21.legacy install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\***\.atom\.apm\_logs\2020-10-14T12_05_28_400Z-debug.log

Atom Version: 1.52.0
platformio-ide-terminal Version: 2.10.0
Please help me here.

A: Firstly
Same issue happened to me today. Now after uninstalling it i can't install it back. In some github discussion, i've seen some were suggesting to uninstall atom and then reinstall previous version of atom.
Check out more here:
https://discuss.atom.io/t/cannot-install-platformio-ide-terminal-2-9-1-on-atom/67012/7
Second Option:
(Uninstall whatever package you are using for terminal [optional].)
Now,

*

*Open Atom and Go to File -> Setting -> install

*Search for terminus and click install

*After installing terminus, find Shell Override and write C:\WINDOWS\System32\cmd.exe in it

*Restart Atom

*Find a plus (+) sign at the left-bottom of Atom window. Then click on it! Hurray! Terminal is opened!

I've followed the second option and now working in terminal on Atom!

A: Close and uninstall the Atom editor and then, delete the 'atom' directory in 'C:\Users\current_user\AppData'.
Now re-install the Atom editor again and it should work.
(PS: "AppData" is a hidden directory)


text:
Q: How to enable ALL controls on a form? Currently I have most of my form's controls disabled at launch because you cannot use them until a file is loaded. However, once the file is loaded the controls should become enabled.
I was using bindings but I don't think they're a good solution. For one, it is unnecessary complexity. Secondly, you cannot use bindings for everything. For example, MenuStrip items cannot have their Enabled property bound to the fileLoaded property. Only the entire menu can and I don't want to disable the entire menu at launch, only certain menu operations that operate on the file.
I'm really just looking for a way to enable EVERYTHING. Most when asked that would answer with this:
foreach (Control c in Controls)
{
    c.Enabled = true;
}

However, that does not work for enabling MenuStrip items or controls within other controls (like a Panel or custom control). Therefore it would not enable scrollbars within containers.
I suppose I could use that line and manually enable everything else but I could have always just manually enabled everything. I'm looking for a way to automatically enable everything.

A: Put all controls in a panel;
panel.enable = false -> all controls in the panel will be disabled
panel.enable = true -> all controls in the panel will be enabled (if they are in default enabled, shortly fill your panel with enabled controls, let your panel disabled so that your controls will be disabled, too. After enabling panel, your controls will be enabled )

A: For menustrip items you can do it recursively, it's very simple.
Just set the item.Enabled Flag to true or false.
You can use my class, it's just a few lines code, easy to use. You can also create a Search Function and just pass the name want to disable.
Enjoy:
namespace Test_MenuItemIteration
{
    using System.Collections.Generic;
    using System.Windows.Forms;

    public static class GetAllMenuStripItems
    {
        #region Methods

        /// <summary>
        /// Gets a list of all ToolStripMenuItems
        /// </summary>
        /// <param name="menuStrip">The menu strip control</param>
        /// <returns>List of all ToolStripMenuItems</returns>
        public static List<ToolStripMenuItem> GetItems(MenuStrip menuStrip)
        {
            List<ToolStripMenuItem> myItems = new List<ToolStripMenuItem>();
            foreach (ToolStripMenuItem i in menuStrip.Items)
            {
                GetMenuItems(i, myItems);
            }
            return myItems;
        }

        /// <summary>
        /// Gets the menu items.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="items">The items.</param>
        private static void GetMenuItems(ToolStripMenuItem item, List<ToolStripMenuItem> items)
        {
            items.Add(item);
            foreach (ToolStripItem i in item.DropDownItems)
            {
                if (i is ToolStripMenuItem)
                {
                    GetMenuItems((ToolStripMenuItem)i, items);
                }
            }
        }

        #endregion Methods
    }
}

Use in your app:
List<ToolStripMenuItem> myItems = GetAllMenuStripItems.GetItems(this.menuStrip1);
foreach (var item in myItems)
{
    MessageBox.Show(item.Text);
    item.Enabled = false;
}

A: Do this:
var Enable = (Control c) =>
             {
                 c.Enabled = true;
                 if(c.Controls != null)
                     foreach(Control c2 in c.Controls)
                         Enable(c2);
             }

Enable(YourForm);

A: Recursion
private void enableControls(Control.ControlCollection Controls)
{
    foreach (Control c in Controls)
    {
        c.Enabled = true;
        if (c is MenuStrip)
        {
           foreach(var item in ((MenuStrip)c).Items)
           {
              item.Enabled = true;
           }
        }
        if (c.ControlCollection.Count > 0)
            enableControls(c.Controls);

    }
}

Edit
Should have been checking the control Collection count instead of HasControls Which is Webcontrols

A: Recursively iterating over your menu is necessary to Disable every item in your menus.  However, there is a simpler solution for all of your form controls-- embed them in a panel that spans across the entire form and disable the form in the VS Designer.  When your user selects a file, enable the Panel and viola!  No extra recursion (or overhead) necessary.
If you still want to go the recursive route, I would change the Enable method by first renaming it to ChangeEnabledState and, second, I would a a bool parameter that would allow you use to assign to the Enabled property.  That way you can enable/disable the controls as necessary.  Remember, however, you will need to add a check to see if the control is the button (or what ever control you are using to open the OpenFileDialog) is skipped in a disable operation.


text:
Q: Security policy on Applets I want to code an applet wich needs a special security permissions, ie: network access to do an http GET to a site.
I signed the applet myself and did a simple test with this result:

java.security.AccessControlException: access denied
  ("java.net.SocketPermission" "www.google.com:80" "connect,resolve")

I also try to add the security policy inside the manifest file with no luck.
I dont really understand what should be the correct producedure,

*

*Should i use a policy file inside the jar? where exactly it should be located?

*Should i put some policy definition on the APPLET tag on the HTML?

*Should i do something inside the code to ask for privileges/permission?

*Should i use other launch method like JNLP? does this make any difference?
Thanks

A: The behavior depends on java Version. Starting from java 7u51 both jws and applet need to be signed with a valid certificate (not self signed). http://www.oracle.com/technetwork/java/javase/7u51-relnotes-2085002.html#newft
There are only two security levels sandbox and all-permissions. The attribute permissions must be specified in the manifest and in the jnlp file. To perform http request sandbox is enough. Read this article http://docs.oracle.com/javase/tutorial/deployment/applet/security.html

A: I answer similar question here: Warning on Permissions attribute when running an applet with JRE 7u45
you need to make a right manifest file. or you use the command line
jar ufm jarfile.jar confmanifest.txt
or you use maven.(Simpliest way to add an attribute to a jar Manifest in Maven)
inside your manifest you'll edit permissions that its needed (socket, file, etc) and its codBase.(cross-origin and security purposes)
Then for running locally without a true CA signed certificate you'll need to edit your jvm java.policy file with policytool
JNLP is for signed jars/applets. But you can use this, its only an applet descriptor and you can excute it from everywhere, like you desktop.
With HTML5 you should use the <object> tag. I rather prefer deploy the applet via javascript and invoke applet methods with javascript methods.
See http://docs.oracle.com/javase/tutorial/deployment/applet/invokingAppletMethodsFromJavaScript.html
cy@.


text:
Q: How can I set formatting for just a time duration in a Google Sheet using Google Apps Script? In another program, I calculate the duration of an event. The result is in seconds. In the outside program (using LuaScript), I convert this seconds result into a string as "hh:mm:ss.SSS" format. I then POST this to Google Sheets via Google Apps Script, and I want to write this into the next available row (ss.appendRow). It mostly appears correctly, except it is rounded to the nearest whole second, instead of keeping the milliseconds.
Google Sheets correctly identifies this string as a date/time, but thinks it is an actual time instead of a duration. For example, if the event took 5.75 seconds, the output in the cell shows "00:00:05", and when I select the cell, it actually shows "12:00:05 AM".
Following recommendations I found on this site, I have tried this code:
function doPost(e) {
  var s = SpreadsheetApp.openById(myID);
  var ss = s.getSheetByName("TimeResults");
  var params = JSON.parse(e.postData.contents);

  ss.appendRow([Utilities.formatDate(new Date(params.draftDuration), s.getSpreadsheetTimeZone(), 'hh:mm:ss.SSS'));

  return ContentService.createTextOutput('{"status":"ok"}').setMimeType(ContentService.MimeType.JSON);
}

But this resulted in unexpected output, showing "5:00:00 AM". Clearly, I'm using the Date object incorrectly. What should I do instead to make this work as intended, to show a duration, such as "00:00:05.75"?
Here is a snippet of the JSON that is contained in e.postData.contents:
  "gameDate": 05/07/2022
  "draftDuration": 0:0:3.75
  "gameDuration": 0:0:5.323

A: If the original value is in seconds as in 5.323 for five seconds and 323 milliseconds, you can convert it to a dateserial value by dividing it like this:
dataserial = seconds / 24 / 60 / 60
Append the resulting value to the spreadsheet and format the cell or the whole column as duration, say [h]:mm:ss.SSS where [h] signifies elapsed hours.
The hours field needs to be expressed as elapsed hours to correctly handle durations that exceed 24 hours. Minutes and seconds never exceed 60 and can be handled the same way regardless of whether they express calendar time or elapsed time.
See this answer for an explanation of how date and time values work in spreadsheets.


text:
Q: Gradle zip task with lazy include property includes itself Hi I got this zip task which works great:
def dir = new File("${projectDir.parentFile}/test/")

task testZip(type: Zip) {
    from dir
    destinationDirectory = dir
    include 'toast/**'

    archiveFileName = 'test.zip'
}

but then when I make the include property lazy (because I need to in my real case)
def dir = new File("${projectDir.parentFile}/test/")

task testZip(type: Zip) {
    from dir
    destinationDirectory = dir
    include {
        'toast/**'
    }

    archiveFileName = 'test.zip'
}

then it creates a zip that includes everything in the folder, (so the generated archive too). In this test case the inner zip is just corrupted (doesn't run infinitely) but in the real world case it does make an infinite zip. (Not sure why, maybe my best case has too few or small files). Either way the test case shows the problem, the generated zip contains a zip even though it should only contain the toast directory and all of its content.
How do I fix this? I need a lazy include because the directory I want to include is computed by other tasks. I get the exact same problem with Tar except it refuses to create the archive since it includes itself.
Using exclude '*.zip' is a dumb workaround which makes the archive include other folders I don't want. I only want to include a specific folder, lazyly.
Here's what the monster looks like in the real world case. I basically need to retrieve the version of the project from Java to then use that version to name the folders I'm packaging. (Making a libGDX game and packaging it with a jre using packr). The problematic tasks are 'makeArchive_' + platform.

String jumpaiVersion;

task fetchVersion(type: JavaExec) {
    outputs.upToDateWhen { jumpaiVersion != null }

    main = 'net.jumpai.Version'
    classpath = sourceSets.main.runtimeClasspath
    standardOutput new ByteArrayOutputStream()
    doLast {
        jumpaiVersion = standardOutput.toString().replaceAll("\\s+", "")
    }
}

def names = [
    'win64' : "Jumpai-%%VERSION%%-Windows-64Bit",
    'win32' : "Jumpai-%%VERSION%%-Windows-32Bit",
    'linux64' : "Jumpai-%%VERSION%%-Linux-64Bit",
    'linux32' : "Jumpai-%%VERSION%%-Linux-32Bit",
    'mac' : "Jumpai-%%VERSION%%-Mac.app"
]

def platforms = names.keySet() as String[]

def jdks = [
    'win64' : 'https://cdn.azul.com/zulu/bin/zulu9.0.7.1-jdk9.0.7-win_x64.zip',
    'win32' : 'https://cdn.azul.com/zulu/bin/zulu9.0.7.1-jdk9.0.7-win_i686.zip',
    'linux64' : 'https://cdn.azul.com/zulu/bin/zulu9.0.7.1-jdk9.0.7-linux_x64.tar.gz',
    'linux32' : 'https://cdn.azul.com/zulu/bin/zulu9.0.7.1-jdk9.0.7-linux_i686.tar.gz',
    'mac' : 'https://cdn.azul.com/zulu/bin/zulu9.0.7.1-jdk9.0.7-macosx_x64.zip'
]

def formats = [
    'win64' : 'ZIP',
    'win32' : 'ZIP',
    'linux64' : 'TAR_GZ',
    'linux32' : 'TAR_GZ',
    'mac' : 'ZIP'
]
File jdksDir = new File(project.buildscript.sourceFile.parentFile.parentFile, 'out/jdks')
File gameJar = new File("${projectDir.parentFile}/desktop/build/libs/Jumpai.jar")
File gameData = new File("${projectDir.parentFile}/desktop/build/libs/Jumpai.data")

File packrDir = new File("${projectDir.parentFile}/out/packr/")

File minimalTmpDir = new File("${projectDir.parentFile}/desktop/build/libs/minimal-tmp")

task minimizeGameJar {
    dependsOn ':desktop:dist'
    doFirst {
        minimalTmpDir.mkdirs()
        copy {
            from zipTree(gameJar)
            into minimalTmpDir
        }

        for(file in minimalTmpDir.listFiles())
            if(file.getName().contains("humble"))
                file.delete()
    }
}

task makeMinimal(type: Zip) {
    dependsOn minimizeGameJar
    dependsOn fetchVersion

    from minimalTmpDir
    include '**'
    archiveFileName = provider {
        "Jumpai-${->jumpaiVersion}-Minimal.jar"
    }
    destinationDir packrDir

    doLast {
        minimalTmpDir.deleteDir()
    }
}

task copyGameJar(type: Copy) {
    outputs.upToDateWhen { gameData.exists() }

    dependsOn ':desktop:dist'
    from gameJar.getAbsolutePath()
    into gameData.getParentFile()
    rename("Jumpai.jar", "Jumpai.data")
}

task setWindowsIcons(type: Exec) {
    dependsOn fetchVersion
    workingDir '.'
    commandLine 'cmd', '/c', 'set_windows_icons.bat', "${->jumpaiVersion}"
}

for(platform in platforms) {
    task("getJdk_" + platform) {
        String url = jdks[platform]
        File jdkDir = new File(jdksDir, platform + "-jdk")
        File jdkFile = new File(jdkDir, url.split("/").last())
        outputs.upToDateWhen { jdkFile.exists() }

        doFirst {

            if(!jdkDir.exists())
                jdkDir.mkdirs()

            if(jdkFile.exists())
            {
                println jdkFile.getName() + " is already present"
                return
            }
            else
            {
                println "Downloading " + jdkFile.getName()
                new URL(url).withInputStream {
                    i -> jdkFile.withOutputStream { it << i }
                }
            }

            for(file in jdkDir.listFiles()) {
                if(file.equals(jdkFile))
                    continue

                if(file.isFile()) {
                    if (!file.delete())
                        println "ERROR: could not delete " + file.getAbsoluteFile()
                } else if(!file.deleteDir())
                    println "ERROR: could not delete content of " + file.getAbsoluteFile()
            }

            if(url.endsWith(".tar.gz"))// don't mix up archive type of what we downloaded vs archive type of what we compress (in formats)
            {
                copy {
                    from tarTree(resources.gzip(jdkFile))
                    into jdkDir
                }
            }
            else if(url.endsWith(".zip"))
            {
                copy {
                    from zipTree(jdkFile)
                    into jdkDir
                }
            }
        }
    }

    File packrInDir = new File(packrDir, platform)
    String platformRawName = names[platform]

    task("packr_" + platform, type: JavaExec) {
        outputs.upToDateWhen { new File(packrDir, platformRawName.replace("%%VERSION%%", jumpaiVersion)).exists() }

        dependsOn fetchVersion
        dependsOn copyGameJar
        dependsOn 'getJdk_' + platform

        main = 'com.badlogicgames.packr.Packr'
        classpath = sourceSets.main.runtimeClasspath
        args 'tools/res/packr_config/' + platform + '.json'

        workingDir = project.buildscript.sourceFile.parentFile.parentFile
        doLast {
            File packrOutDir = new File(packrDir, platformRawName.replace("%%VERSION%%", jumpaiVersion));
            packrOutDir.deleteDir()

            if(packrOutDir.exists())
            {
                println "ERROR Could not delete packr output " + packrOutDir.getAbsolutePath()
                return
            }

            if(!packrInDir.renameTo(packrOutDir))
                println "ERROR Could not rename packr output dir for " + packrInDir.getName()
        }
    }

    if(formats[platform] == 'ZIP')
    {
        task('makeArchive_' + platform, type: Zip) {
            if(platform.contains("win"))
                dependsOn setWindowsIcons
            dependsOn fetchVersion
            dependsOn 'packr_' + platform

            from packrDir
            destinationDirectory = packrDir

            include {
                platformRawName.replace("%%VERSION%%", jumpaiVersion) + "/"
            }

            archiveFileName = provider {
                platformRawName.replace("%%VERSION%%", jumpaiVersion) + ".zip"
            }
        }
    }
    else if(formats[platform] == 'TAR_GZ')
    {
        task('makeArchive_' + platform, type: Tar) {
            dependsOn 'packr_' + platform
            from packrDir
            destinationDirectory = packrDir
            include {
                platformRawName.replace("%%VERSION%%", jumpaiVersion) + '/**'
            }
            archiveFileName = provider {
                platformRawName.replace("%%VERSION%%", jumpaiVersion) + ".tar.gz"
            }
            extension 'tar'
            compression = Compression.GZIP
        }
    }
    else
        println 'Unsupported format for ' + platform
}

task deploy {
    dependsOn makeMinimal
    for(platform in platforms)
        dependsOn 'makeArchive_' + platform
}

A:
How do I fix this? I need a lazy include because the directory I want to include is computed by other tasks. I get the exact same problem with Tar except it refuses to create the archive since it includes itself.

You can get what you want by using the doFirst method and modifiying the tasks properties with the passed action.
task('makeArchive_' + platform, type: Zip) {
    if(platform.contains("win"))
        dependsOn setWindowsIcons
    dependsOn fetchVersion
    dependsOn 'packr_' + platform

    from packrDir
    destinationDirectory = packrDir

    archiveFileName = provider {
        platformRawName.replace("%%VERSION%%", jumpaiVersion) + ".zip"
    }

    doFirst {
        def includeDir = platformRawName.replace("%%VERSION%%", jumpaiVersion)
        // Include only files and directories from 'includeDir'
        include {
            it.relativePath.segments[ 0 ].equalsIgnoreCase(includeDir)
        }
    }
}

Please have also a look at this answer to a similar question. My solution is just a workaround. If you know your version at configuration phase you can achieve what you want more easily. Writing your own custom tasks or plugins can also help to clean up your build script.


text:
Q: react material along with react infinite scroll component table body I'm trying to use react infinite scroll inside react material table.
I tried using it but i could only wrap the whole table and the scrolling effects the whole page and i want the headers to stay sticky and only the table body to infinite scroll
any solution? thanks

A: <TableContainer>
     <Table sx={{
          height: '80vh' // set a height
       }}>
        <TableHeader stickyHeader> // to stick header to the top of table container
             // header
         </TableHeader>
        <TableBody>
            //body
        </TableBody>
     </Table>
</TableContainer>


text:
Q: WKWebview [Warning] [blocked] The page at https://www.myurl.com was not allowed to display insecure content from mycustomscheme://?path=somepath I've recently replaced my UIWebview to a WKWebview in my hybrid app. I'm using a custom scheme to load images from the native part of the app as it's recommended by Apple here:
https://developer.apple.com/videos/play/wwdc2017/220/
I'm loading the images from a url that look like mycustomscheme://?path=somepath
I've added Content-Security-Policy header to allow for the mixed content, and it looks like this (irrelevant parts were removed):
Content-Security-Policy: default-src 'self' www.myurl.com ; img-src 'self' mycustomscheme: ; script-src 'self' 'unsafe-inline' 'unsafe-eval' ; report-uri https://www.myreporturl.com/

This works for most devices and lets the request to mycustomscheme go through, and report to myreporturl if anything was blocked. However, on some devices the custom requests are blocked with this error:
[Warning] [blocked] The page at https://www.myurl.com was not allowed to display insecure content from mycustomscheme://?path=somepath and no report is being sent to myreporturl, as if the header was not loaded at all.
I've confirms that the header is actually sent, and that the problematic devices are running the latest iOS (12.1.4).
Any advice on how to prevent my custom requests from getting blocked would be much appreciated!

A: Try the following for loading image policy:
img-src 'self' 'unsafe-inline' 'unsafe-eval' data: http: https: mycustomscheme: filesystem: file:;

A: Cause: Since iOS 9, iOS will only allow your application to communicate with servers that implement best-practice security by default. Values must be set in Info.plist to enable communication with insecure servers.
Solution: Add the following code in your info.plist to trust your domain.
<key>NSAppTransportSecurity</key>
 <dict>
 <key>NSExceptionDomains</key>
 <dict>
  <key>www.myurl.com</key>
  <dict>
   <key>NSExceptionRequiresForwardSecrecy</key>
   <false/>
   <key>NSExceptionAllowsInsecureHTTPLoads</key>
   <true/>
   <key>NSIncludesSubdomains</key>
   <true/>
 </dict>
</dict>

A: Its https and http issue Make sure all your content are https:.
Using Multiple website resources inside one another mixes it.
Try not to do CORS.

A: Try this:
Add following line in your info.plist file:
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>mycustomscheme</string>
</array>

Make sure to change mycustomscheme to your own scheme.


text:
Q: How do I route the default debug path to the actual path in asp.net mvc? When I click run on my vs2008 to try out a page it tries to load
http://localhost:14092/Views/Employee/Index.aspx
which should be
http://localhost:14092/Employee/Index
or http://localhost:14092/
How do I add these 2 routes? (I want to know how to do both so I can swap them as desired.
Here's my current routing code:
 public static void RegisterRoutes(RouteCollection routes)
    {

        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            "Default",                                              // Route name
            "{controller}/{action}/{id}",                           // URL with parameters
            new { controller = "Home", action = "Index", id = "" }  // Parameter defaults
        );

    }

A: Have you changed the debugging options to always start at a specific page?  If not, go to your project's properties and change the debugging properties to have your debugger to always start the project at the root page.  I typically also tell it to always use the same port -- so that I can use FF or IE and the history works to give me the right URL.  See Steven Walther's article on how to run an ASP.NET MVC application for alternatives.


text:
Q: TouchGFX with hardware encoder wheel Trying to implement touchGFX on ARM with the UI controlled from a push-button encoder wheel, often seen in cars.
The problem I encounter is that the low-level, encoder wheel part is handled from the main backend application in C.
TouchGFX, is in C++. The designer app allows to implement hardware button directly, that is directly handled by the stack, but an encoder wheel needs to have some logic implemented, preferably on the backend.
Usually, the way to interact from the backend to touchGFX is through the model class where data are polled (about 60Hz according to the documentation).
However, for a physical encoder, it would be preferable to have a trigger-based communication between the backend and GFX, however, it isn't clear on the doc or examples how to get GFX context and how to integrate triggers from the backend, either by direct call or by callbacks rather than polling.
I tried to implement a C->C++ callback but couldn't find the GFX context.
After digging through documentation and plenty of post, I have yet to find a solution.

A: You could do the following:

*

*Add a function to the frontend application which returns a pointer to the model

*Add a C++ source file with a function which is called from C and which calls a function in the model:
 #include <gui/common/FrontendApplication.hpp>

 #ifdef __cplusplus
 extern "C" {
 #endif

 void func1()
 {
     Model * model = static_cast<FrontendApplication*>(Application::getInstance())->getModelPtr();
     if (model)
     {
         model->funcOnModel();
     }
 }

 #ifdef __cplusplus
 }
 #endif

*call func1() from your C backend
From funcOnModel the touchgfx widgets can be accessed via the ModelListener or the derived Presenters.


text:
Q: My date format : 09/28/2012 16:35:34 , I want the date format like : 2012-09-28T16:35:34 , using gsub
Possible Duplicate:
Ruby - Change string in a date format to another format

My date format : 09/28/2012 16:35:34, I want the date to be formatted like: 2012-09-28T16:35:34, I need to compile the code in jruby.

A: You probably want to convert the date to something more useful:
require 'date'
dt = DateTime.strptime "09/28/2012 16:35:34", '%m/%d/%Y %H:%M:%S'
# => #<DateTime: 2012-09-28T16:35:34+00:00 (106107805067/43200,0/1,2299161)>

Now you can do any transformation:
dt.strftime '%FT%T'
# => "2012-09-28T16:35:34"

This also raises an exception when the date format is wrong, which is useful to notice when things break.
For more Information see the Apidocs for Date.

A: Find
(\d+)\/(\d+)\/(\d+) ([\d:]+)

replace with
$3-$1-$2T$4

Here you can see the groups (which in the regex are the parts in ()), $1 is the first group, $2 the second and so on. Basically you need to reorder the groups putting - in the middle and T before the hour.


text:
Q: Cannot upload the GeoJSON file in new iTunes Connect I am trying to upload a Routing App Coverage File in the NEW iTunes Connect.
The file name is example.geojson. I get the following error:
Invalid file extension: Your routing app coverage file must use the .geojson extension

I tried in Chrome and Safari even changed the name to example.GeoJSON.
I validated the contents of the file in http://geojsonlint.com/
Any ideas?

A: When uploading a .geojson I found that you newlines may cause it to not be saved on iTunes Connect but still be validated on geojsonlint.
For example:
FAILS:
{ "type": "MultiPolygon",
  "coordinates": [
    [[[14.094369,36.060248],
    [14.138314, 35.869068],
    [14.428181,35.746154],
    [14.744622,35.782218],
    [14.648492,36.028047],
    [14.181083, 36.192884],
    [14.094369,36.060248]
    ]]]
}

SUCCEEDS:
{ "type": "MultiPolygon",
  "coordinates": [
    [[[14.094369,36.060248], [14.138314, 35.869068], [14.428181,35.746154], [14.744622,35.782218], [14.648492,36.028047], [14.181083, 36.192884], [14.094369,36.060248]]]
    ]
}

A: Actually I solved this by taking the default geojson file provided by Apple at:
Providing directions
(Listing 7-2)
and then i took the coordinates from github project:
Countries
It worked by saving the file as example.GeoJSON

A: I have the same error message about .geojson extension. I opened it in BBEdit, delete leading spaces and tab and reformat it with JSBeautifier. After that I can upload it to iTunes Connect. The problem was not related to .geojson extension but to the content of the file (probably a mix of space and tab)

A: Last night I got the same error persistently. This morning, however, the same file uploaded without issues.
I'm hoping this has nothing to do with it, but I finally renamed the file so that the letter casing was the same as the name of the standard (.GeoJSON). The file wasn't fit yesterday despite all the effort.

A: I had the same problem, but there is an easy solution.
Use Xcode an make your file. You can add an geojson to your project, insert your data. After all load this file to iTunes.

If your content is valid (check it here: geojsonlint), you get it to iTunes.
best regards

A: I was having and the same issue but when I export screenshot without alpha, issue solved and upload to Itunes.


text:
Q: Problems with ComboBox bound to static xml ressource that viewmodel does not know of I have a view with a ComboBox like this
<ComboBox Name="cmbPurpose" DisplayMemberPath="@value" SelectedValuePath="@key"
         ItemsSource="{Binding Source={StaticResource Purposes}, XPath=purpose}"
         SelectedItem="{Binding Path=Purpose, Mode=TwoWay}" />

I also set the DataContext of the view to my viewmodel. On my viewmodel i have a property 'Purpose' of type 'XmlElement' bound to SelectedItem. I would have liked it to be a string that corresponded to the @key in my xml, but i can live with this since it makes sence in a view-viewmodel context.
When i change the ComboBox, i can observe that the value in my viewmodel changes accordingly - which is as expected (and good).
When i populate my view with the viewmodel, i need some defaults set (also it will be used to edit a model later so i will need to be able to set all properties on my viewmodel). How do i set the correct value on my viewmodel's 'Purpose' property? The data from my model is really equal to the @key of my xml, but the viewmodel or whatever populates my viewmodel have no way of knowing what resource to look in since it needs to set an XmlElement.
So what is best practise here? Should i move the static resource to my viewmodel or is there another way of solving this? How is this normally done? Is static resources just bad in this situation? It would be perfect if i could just make the viewmodel.Purpose into a string and have it bind to the @key instead of the whole object - that should solve the problem as i could both set and read viewmodel.Purpose without having to think of the source being xml, right?
EDIT: If there was a way to do SelectedKey="{Binding Path=Purpose, Mode=TwoWay}" and changing the viewmodel.Purpose to a string, then the problem would be sovled.

A: You can set the selected value to the key.... simply use SelectedValue instead of SelectedItem, and bind it to a string value which corresponds with the an @key in your ItemsSource
<ComboBox Name="cmbPurpose" DisplayMemberPath="@value" SelectedValuePath="@key"
         ItemsSource="{Binding Source={StaticResource Purposes}, XPath=purpose}"
         SelectedValue="{Binding Path=PurposeKey, Mode=TwoWay}" />

It should be noted that ComboBoxes compare items by reference, so if you do use SelectedItem then the item that is bound needs to contain the exact same reference in memory as the item in the ItemsSource.
For example,
SelectedItem = new SomeItem(Key = 1); // Won't work
SelectedItem = SomeStaticList.FirstOrDefault(p => p.Key == 1); // Will work


text:
Q: Error While converting CSV file to DataTable Adding .txt to the csv file name Below is my code to convert a csv file into DataTabel.
 public static DataTable ImportCSVtoDatatable(string filepath, string strQuery )
    {
        //strQuery = "Select * From [GJ20150417044150]";
        //string filepath= @"h$\\Data\\GJ20150417044150.csv";

        DataSet ds = new DataSet();
        var constring = string.Format(@"Provider=Microsoft.Jet.OleDb.4.0; Data Source={0};Extended Properties=""Text;HDR=YES;FMT=Delimited""", Path.GetDirectoryName(filepath));

        OleDbConnection con = new OleDbConnection(constring);

        OleDbDataAdapter da = new OleDbDataAdapter(strQuery, con);

        //Error Occuring on this step
        da.Fill(ds);
        DataTable dt = ds.Tables[0];
        return dt;
    }

my program got crashed and the error I am getting is as follows:

The Microsoft Jet database engine could not find the object 'GJ20150417044150.txt'.  Make sure the object exists and that you spell its name and the path name correctly.

what I guess is ,it's trying to search for "GJ20150417044150.txt" file but could not get it as it is actually "GJ20150417044150.csv" file and there is no "GJ20150417044150.txt" in the given path.
please help me in:
1: How to get rid of this error and select the desired .csv file to convert into datatable.
2: Why this .txt is Added to the GJ20150417044150 in the process

A: So the solution to this problem is, to change these lines:
//strQuery = "Select * From [GJ20150417044150]";
//string filepath= @"h$\\Data\\GJ20150417044150.csv";

to this
var fileName = Path.GetFileName(filepath);
strQuery = @"SELECT * FROM " + fileName;

The issue being that the value for strQuery that was being used did not contain the full filename, but only the GJ20150417044150 part, to which the Jet engine tried to append the default text extension .txt, when it could not find a file with the name GJ20150417044150.


text:
Q: What is the behaviour of the first $n$ digits of ${\underbrace{99\dots99}_{n\text{ nines}}}^{\overbrace{99\dots99}^{n\text{ nines}}}$ as $n\to\infty$ For a natural number $n$, let $f(n)$ denote the first $n$ digits of the decimal expansion of $${\underbrace{99\dots99}_{n\text{ nines}}}^{\overbrace{99\dots99}^{n\text{ nines}}}=(10^n-1)^{10^n-1}.$$ So we have $10^{n-1}\le f(n)<10^n$. Then what can we say about $\lim_{n\to\infty} \frac{f(n)}{10^n}$ ?

For simplicity, let $y_n=(10^n-1)^{10^n-1}$. Then we have $$y_n=10^{\log_{10}(y_n)}=\underbrace{10^{\lfloor \log_{10}(y_n)\rfloor}}_{\text{integer}}\cdot 10^{\{ \log_{10}(y_n)\}},$$
where $\lfloor\cdot\rfloor$ denotes flooring and $\{\cdot\}$ denotes the fractional part.
So the first $n$ digits of $y_n$ are given by $$f(n)=10^{n-1}\cdot 10^{\{ \log_{10}(y_n)\}}.$$
Using this (somewhat) closed form, I can do numerical experiments in Mathematica, which suggest that $\lim_{n\to\infty}\frac{f(n)}{10^n}=\frac1e$:

Indeed, it would be enough to understand the bevahiour of $\{ \log_{10}(y_n)\}$ as $n\to\infty$.

A: I figured it out: We can indeed study the asymptotic behaviour of $f(n)$ using Taylor series:
Observe that $$\log_{10}(y_n)=(10^n-1)\cdot\log_{10}(10^n-1).$$ When I first saw this, I was tempted to write $$\log_{10}(y_n)=(10^n-1)\cdot\log_{10}(10^n-1)\approx(10^n-1)\cdot n.$$
Although this approximation is very tight, I am still making an error big enough such that the first $n$ digits of $10^{\text{approximation}}$ are completely different from those of $y_n$. (Indeed, the approximation just yields an integer power of $10$.)
However, there is an easy way to quantify the error in this approximation:
\begin{split}\log_{10}(y_n)&=(10^n-1)\cdot\left(\color{orange}{\log_{10}(10^n)}+\log_{10}(10^n-1)-\color{orange}{\log_{10}(10^n)}\right)\\
&=(10^n-1)\cdot\left(n+\log_{10}\left(1-\frac1{10^n}\right)\right)\\
&=(10^n-1)\cdot\left(n-\frac{10^{-n}}{\ln(10)}+O(10^{-2n})\right)\\
&=10^n n-\frac1{\ln(10)}-n+O(10^{-n}),
\end{split}
where I am using the big $O$ notation as $n\to\infty$. (The second last equality is a series of the logarithm.)
It follows that $$y_n=10^{\log_{10}(y_n)}=10^{10^n n-n}\cdot 10^{-\frac1{\ln(10)}}\cdot10^{O(10^{-n})}.$$
Notice that $$10^{-\frac1{\ln(10)}}=\exp\left(-\frac{\ln(10)}{\ln(10)}\right)=\frac1e,$$ and that $10^{O(10^{-n})}$ converges to $1$ very quickly (in fact, the speed of convergence doesn't matter, $10^{O(10^{-n})}$ could be replaced by any function that converges to $1$.) So for $n$ large enough, we have $\frac1e 10^{O(10^{-n})}\in]0,1[$.
Since $10^{10^n n-n}$ is an integer power of $10$, it follows that the first $n$ digits of $y_n$ are $$\bbox[15px,border:1px groove navy]{f(n)=\left\lfloor \frac{10^n}{e}\cdot10^{O(10^{-n})}\right\rfloor.}$$
A corollary of this result is that $$\lim_{n\to\infty} \frac{f(n)}{10^n}=\frac1e.$$
Remark 1. We don't have to consider the first $n$ digits only. For example, we also have $$\lim_{n\to\infty} \frac{y_n}{10^{10^n-n}}=\frac1e$$ and I think that we could verbatim look at for example the first $2n$ digits of $y_n$. (Or, more generally, at the first $d(n)$ digits where $d(n)$ is a sequence of natural numbers that converges to $\infty$.)
Remark 2. My procedure indicates a rather rapid convergence: Indeed we have $10^{O(10^{-n})}=\exp(O(10^{-n})\ln(10))=1+O(10^{-n})$ so that $10^{O(10^{-n})}-1$ has an asymptotic error that behaves like $10^{-n}$.
Here is a plot of the ratio of $y_n$ and the approximation given above (i.e. this is a plot of the $10^{O(10^{-n})}$ term):

A: (Short version of Maximilian Janisch's answer)
We have
$$x_n:=\bigl(10^n-1)^{10^n -1}=\bigl(10^n)^{10^n -1}\>z_n$$
with
$$z_n:=\bigl(1- 10^{-n}\bigl)^{10^n}\cdot\bigl(1-10^{-n}\bigr)^{-1}\ \to\ {1\over e}\cdot 1\qquad(n\to\infty)\ .$$
As $x_n$ and $z_n$ have the same first digits in base $10$ it follows that in the limit the first digits of $x_n$ are the first digits of ${1\over e}$, namely $367879\ldots \ $.


text:
Q: Watir::Safari js eval equivalent? I've seen and tried many incantations of js eval in the various Watir's out there. firewatir for ffox, as well as safariwatir. In firefox, I got things working but need Safari as my project is webkit based. For example, in the firefox version I can do stuff like:
@browser.document.parentWindow.eval('window.resizeTo(800,600)')

In any event, my question is there any equivalent to js_eval, execute_script, or access to document and/or window objects from the Watir::Safari object? I would like to do things like clear the local storage, etc.
EDIT:
Went ahead and used watir-webdriver
require "rubygems"
require "watir-webdriver"

#browser = Watir::Browser.new :ie
#browser = Watir::Browser.new :firefox
@browser = Watir::Browser.new :chrome
@browser.goto "http://google.com"
@browser.text_field(:name, 'q').set "watir-webdriver"
@browser.button(:name, 'btnG').click
@browser.div(:id => "resultStats").wait_until_present
puts "Displaying page: '#{@browser.title}' with results: '#{@browser.div(:id => "resultStats").text}'"
@browser.execute_script('alert("hi");')

A: Chrome is webkit based, and works with Watir-Webdriver.  More importantly to the user, security wise it is not as porous as chickenwire. (there's a reason Safari has an unblemished record for the last 4 years running as the first browser to fall at pwn2own.)  Chrome also has (depending on what source you want to believe) between 2.5 to 6 times the market share that Safari does.
If you need a webkit based browser, why not use chrome?
I'm not kidding about the security aspect either, one security expert I happen to know with a published textbook on how to do security testing has said "The only good use for Safari is to download Firefox or Chrome"


text:
Q: IPython notebook cannot load files with cython code My IPython notebook works fine yesterday then today for some reason it cannot load files with Cython code in it. I got the following warning:

WARNING:tornado.access:404 GET
  /static/components/codemirror/mode/text/x-cython/ text/x-cython.js

After waiting for 5 or 10 minutes, IPython notebook usually collapses.
Anyone knows what caused this problem? I tried other files. As long as the files don't have Cython code in it, they can be loaded without any problem.
Really appreciate it if anyone can help.


text:
Q: Unable to load css/js files in a spring project I have tried 2 ways to load external css or js files in my spring project but neither of them is working fine.
Home.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css"
href="/resources/css/font-awesome.min.css" />//NOT LOADING
 <link rel="stylesheet" href="<c:url value="resources/css/style.css"/>" />//Not loading Method tried 1
 <link rel="stylesheet"
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="/resources/css/style.css">//Not loading Method tried 2
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js">      </script>