text:
Q: Floating header row I've been trying to freeze my top row but I end up with just "Test3" header floating about.
I used position: fixed; under table th {}, but no luck.
Any suggestions?

html body {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 12px;
  height: 100%;
  margin: 0;
}
#header {
  background: #0066a1;
  color: #ffffff;
  width: 100%
}
#headerTop {
  padding: 10px;
}
.logo1 {
  float: left;
  font-size: 25px;
  font-weight: bold;
  padding: 0 7px 0 0;
}
.logo2 {
  float: left;
  font-size: 25px;
}
.logo3 {
  float: right;
  font-size: 12px;
  text-align: right;
}
.headerRow1 {
  background: #66a3c7;
  height: 10px;
}
.serverRow {
  background: #000000;
  color: #ffffff;
  font-size: 32px;
  padding: 10px;
  text-align: center;
  text-transform: uppercase;
}
.sectionRow {
  background: #0066a1;
  color: #ffffff;
  font-size: 13px;
  padding: 1px 5px!important;
  font-weight: bold;
  height: 15px!important;
}
table {
  background: #eaebec;
  border: #cccccc 1px solid;
  border-collapse: collapse;
  margin: 0;
  width: 100%;
}
table th {
  background: #ededed;
  border-top: 1px solid #fafafa;
  border-bottom: 1px solid #e0e0e0;
  border-left: 1px solid #e0e0e0;
  padding: 2px 2px;
  text-transform: capitalize;
  position: fixed
}
table tr {
  text-align: center;
  font-size: 13px;
}
table td {
  background: #fafafa;
  border-top: 1px solid #ffffff;
  border-bottom: 1px solid #e0e0e0;
  border-left: 1px solid #e0e0e0;
  padding: 2px 2px;
  font-size: 11px;
}
table td:first-child {
  text-align: left;
}
table tr:last-child td {
  border-bottom: 0;
}
table tr:hover td {
  background: #f2f2f2;
}
table tr:hover td.sectionRow {
  background: #0066a1;
}

Logo 1

date and time

Header

  <colgroup>
    <col/>
    <col/>
    <col/>
    <col/>
    <col/>
    <col/>
    <col/>
    <col/>
    <col/>
    <col/>
    <col/>
    <col/>
    <col/>
    <col/>
    <col/>
  </colgroup>

    test1
    test2
    test3
    test3
    test3
    test3
    test3
    test3
    test3
    test3
    test3
    test3
    test3
    test3
    test3

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

    data
    data
    data
    data
    data
    data
    data
    data
    data
    data
    <tddata17
      data
      data
      data
      data

View on JSFiddle

A: I don't sure about your question, but seems that you want to create a header fixed with scroll , other option is wrap all your content to be fixed on one div and apply for all of that.
Other example of table with header fixed:  codepen.io/tjvantoll/pen/JEKIu

A: All of your  tags that you fixed are stacked on top of each other.  Apply fixed to the
 that you want fixed instead.
Also if the top
 that you want fixed is the headers to the columns they should be in a
. Then your other
s should be in a
. This will also allow you to target the  that you want to fix in your CSS with thead tr.
Or even better, just fix the entire
 with thead {position: fixed}


text:
Q: Allow multiple values to BDC Column I have added a column called Customer to my documents library, this is a business data column.
What I want to do is relate a document to multiple customers by entering customer codes into this box.
Currently I can add 'FLC' for example, but I want to put 'FLC, MFT, SAL' for a specified document as it relates to many customers.
Any ideas?
Cheers,
Albert

A: You might need to develop a Custom Field Control derived from the BDC column to make this Possible.
I dont see any out of the Box Solution that is available to achieve what you want.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Hazelcast Jet - Pattern matching Does hazelcast jet support pattern matching use cases like few of the even stream processors support.
If not, will this be included in the future release.
Here is an use ase for pattern matching
Find the trader who sold 'AAA'  stock followed by bought
'BBB'  stock in 10 seconds time frame.


text:
Q: AJAX micropost's comments on the user page On the user's page there are microposts and each of them have it's own comment form and comments. Using "Endless Page" railscast i'm trying to create "show more comments" button, which will load comments by AJAX. But it's not working.
The problem is in show.js.erb file because:
1) common pagination of comments (without AJAX) is working well
2) "show more button" is working well too. I tested it on the users list page
I think "show more comments" not working because it don'understand <%= j render(comments) %> , <%= j will_paginate(comments) %> and i should have here variables like <%= j render(@comments) %> , <%= j will_paginate(@comments) %>.
But when i try to write in my users_controller.rb
def show
    @micropost = Micropost.find(params[:micropost_id])
    @comments = @micropost.comments
end

it's not working because on my user's page there are many microposts and i have an error "Couldn't find micropost without an id". So in my microposts/_micropost.html.erb i had to use this
<% comments = micropost.comments.paginate(:per_page => 5, :page => params[:page]) %>

<%= render comments %>

Can anyone please help? How should i change my show.js.erb?
users/show.html.erb
<%= render @microposts %>

microposts/_micropost.html.erb
...
micropost's content
...

    <%= render 'comments/form', micropost: micropost %>

    <% comments = micropost.comments.paginate(:per_page => 5, :page => params[:page]) %>

      <%= render comments %>

      <%= will_paginate comments, :class =>"pagination", :page_links => false %>

javascripts/users.js.coffee
jQuery ->
  if $('.pagination').length
    $('#append_and_paginate').prepend('Show more');
    $('#append_more_results').click ->
      url = $('.pagination .next_page').attr('href')
      if url
        $('.pagination').text('Fetching more...')
        $.getScript(url)

users/show.js.erb
$('.commentaries').append('<%= j render(comments) %>');
<% if comments.next_page %>
  $('.pagination').replaceWith('<%= j will_paginate(comments) %>');
<% else %>
  $('.pagination').remove();
<% end %>
<% sleep 0.3 %>

A: Bennington, in users/show.html.erb you have
But @microposts is not defined in your controller. What I think you want is to define @microposts as all the microposts associated with what, a User?
If so, you'd want something like `@microposts = Micropost.where(:user_id => current_user.id) or something.


text:
Q: Running PHP in shell line gives issues Anytime I try to run a PHP file (such as one I'm going to be using for a cron task) I get the following errors:
[root@server1 ~]# php
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr//20100525/apc.so' -        /usr//20100525/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr//20100525/curl.so' - /usr//20100525/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr//20100525/fileinfo.so' - /usr//20100525/fileinfo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr//20100525/imap.so' - /usr//20100525/imap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr//20100525/json.so' - /usr//20100525/json.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr//20100525/mcrypt.so' - /usr//20100525/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr//20100525/mysqli.so' - /usr//20100525/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr//20100525/phar.so' - /usr//20100525/phar.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr//20100525/sqlite3.so' - /usr//20100525/sqlite3.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr//20100525/wddx.so' - /usr//20100525/wddx.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr//20100525/zip.so' - /usr//20100525/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0

I'm assuming it has something to do with the fact it's trying to load the extensions from /usr//20100525 but I'm not sure where the extensions are
EDIT:
There must have been something wrong in one of my configurations somewhere for PHP. I reinstalled PHP and everything seems to be working how it should now!

A: You need to use symlink:
ln -s /usr/lib64/php/modules /usr/20100525

A: I also faced this error so i have solved it with this way try this
I went to PHP Config, in CPanel, and restored my php.ini master file clicking on "install php.ini master file". Then it's created a file in your public_html home directory called php.ini.default I just made a backup of the old php.ini file, and renamed php.ini.default to php.ini.
After that, I went to the directories where broken WP instances were installed and renamed their own php.ini files to php.ini.back so the main php.ini file is used instead.
That's it. Hope it helps.

A: Have you edited the extension_dir setting in your php.ini file? By default it's blank, and php finds its extensions at the right location. You can force it by adding the line:
extension_dir = "/usr/lib64/php/modules"

You say you don't have the problem when it runs in Apache, only when it runs as script. Keep in mind that there are separate php.init files for each, for example:
$ locate /php.ini | grep ini$
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini


text:
Q: Dense sequence in $[0,1]$ There is the theorem proved by Liouville which states that if $x$ is irrational then there are infinitely many fractions $\frac{p}{q}$ such that $|x-\frac{p}{q}|<\frac{1}{q^2}$, i.e. $|qx-p|<\frac{1}{q}$. It means that the fractional part of $qx$ (let's denote it by $\{qx\}$) is either close to $0$ or close to $1$. I guess it can help me to prove that the set $\{\{mx\}:m\in \mathbb{N}\}$ for irrational $x$ is dense in $[0,1]$. Could you help me to prove that?

A: You can use the Euclidean algorithm to prove that. Run it on $x$ and $1$.
If $x$ is irrational, it never stops and produces arbitrarily small positive values $ax+b$, where $a,b\in\mathbb Z$.
So say $1>ax+b=\varepsilon>0$ (so $a\ne0)$.
If $a>0$, then $\{kax\}=\{kax+kb\}=\{k\varepsilon\}=k\varepsilon$ as long as $k\varepsilon<1$.
If $a<0$, then $\{-kax\}=1-\{kax\}=1-\{kax+kb\}=1-\{k\varepsilon\}=1-k\varepsilon$ as long as $k\varepsilon<1$.
This gives you subsets of $[0,1]$ such that every number is at most $\varepsilon$ away from some $\{mx\}$, where $m\ge1$ is an integer.


text:
Q: Drawing stacked-bar chart using d3 I'm trying to adapt this code:
http://bl.ocks.org/anupsavvy/9513382
To plot a stacked-bar chart using custom data. I don't need any transitions, just a simple plot.
I end up with this code:
data = jsonArr;

var margin = {
    top: 40,
    right: 40,
    bottom: 40,
    left: 40
  },
  width = 600 - margin.left - margin.right,
  height = 400 - margin.top - margin.bottom;

var color = d3.scale.ordinal()
  .range(colorrange);

var stack = d3.layout.stack();

stack(data);

var xScale = d3.time.scale()
  .domain([new Date(0, 0, 0, data[0][0].label, 0, 0, 0), new Date(0, 0, 0, data[0][data[0].length - 1].label, 0, 0, 0)])
  .rangeRound([0, width - margin.left - margin.right]);

var yScale = d3.scale.linear()
  .domain([0,
    d3.max(data, function(d) {
      return d3.max(d, function(d) {
        return d.y0 + d.value;
      });
    })
  ])
  .range([height - margin.bottom - margin.top, 0]);

var xAxis = d3.svg.axis()
  .scale(xScale)
  .ticks(d3.time.hour, 1)
  .tickFormat(d3.time.format("%H"));

var yAxis = d3.svg.axis()
  .scale(yScale)
  .orient("left")
  .ticks(10);

var svg = d3.select("#info")
  .append("svg")
  .attr("width", width)
  .attr("height", height);

var groups = svg.selectAll("g")
  .data(data)
  .enter()
  .append("g")
  .attr("class", "rgroups")
  .attr("transform", "translate(" + margin.left + "," + (height - margin.bottom) + ")")
  .style("fill", function(d, i) {
    return colorrange[i];
  });

var rects = groups.selectAll("rect")
  .data(function(d) {
    return d;
  })
  .enter()
  .append("rect")
  .attr("width", 6)
  .attr("height", function(d) {
    return -yScale(d.value) + (height - margin.top - margin.bottom);
  })
  .attr("x", function(d) {
    return xScale(new Date(0, 0, 0, d.label, 0, 0, 0));;
  })
  .attr("y", function(d) {
    return -(-yScale(d.y0) - yScale(d.value) + (height - margin.top - margin.bottom) * 2);
  });

console.log(rects);

svg.append("g")
  .attr("class", "x axis")
  .attr("transform", "translate(40," + (height - margin.bottom) + ")")
  .call(xAxis);

svg.append("g")
  .attr("class", "y axis")
  .attr("transform", "translate(" + margin.left + "," + margin.top + ")")
  .call(yAxis);

svg.append("text")
  .attr("transform", "rotate(-90)")
  .attr("y", 0 - 5)
  .attr("x", 0 - (height / 2))
  .attr("dy", "1em")
  .text("Number of complaints");

svg.append("text")
  .attr("class", "xtext")
  .attr("x", width / 2 - margin.left)
  .attr("y", height - 5)
  .attr("text-anchor", "middle")
  .text("Hour of day");

More specifically:
yScale(d.y0) is returning NaN.
If I comment this piece of code, I can see the axes:
After a while, I managed to see the and some data (among errors):

I guess I'm not understanding the properly way to plot the data itself.
Any help would be appreciated.
My json label attribute is related to the y coordinate, while value is related to the x coordinate.
EDIT:
It seems that the problem begins when I call stack. The first array has y0 values as 0, but the second and third ones have y0 = NaN. I don't know how to fix this.
This is the relative jsfiddle:
https://jsfiddle.net/rhzkz9gb/13/

A: You need to provide the accessor functions for the data (because it is not keyed with 'x' and 'y').
var stack = d3.layout.stack().x(function(d,i){return i;}).y(function(d){return d.value;});

https://jsfiddle.net/ermineia/rhzkz9gb/14/


text:
Q: PDO bindParam not working in IN binding for sql query I'm trying to get some videos according to some attributes (age, year, countries). For some reason, even though I'm binding parameters to the query properly and have specified the query properly (u.country NOT IN ($countries_count)), I still get results for the country = U.S.A. Is there something work with my bindParam. Please Help.
<?php
    $parameters = json_decode(file_get_contents('php://input'), true);
    $age = $parameters["age"];
    $year = $parameters["year"];
    $countries = sizeof($parameters["countries"]) == 0 ? array("0") : $parameters["countries"];
    $countries_count = implode(",", array_fill(0, sizeof($countries), "?"));

    $sql = "SELECT
                v.title, u.name
            FROM
                video AS v JOIN user AS u ON v.id_user = u.id
            WHERE
                u.age <= ? AND YEAR(v.upload_date) >= ? AND
                u.country NOT IN ($countries_count);";

    $connection = new PDO("mysql:host=localhost;dbname=data_base", "root", "");
    $statement = $connection->prepare($sql);
    $statement->bindParam(1, $age, PDO::PARAM_INT);
    $statement->bindParam(2, $year, PDO::PARAM_INT);
    foreach ($countries as $k => $x) {
        $statement->bindParam($k+3, $x, PDO::PARAM_STR);
    }
    $statement->execute();
    echo json_encode($statement->fetchAll());
?>

A: Change bindParam to bindValue
If you want to use bindParam, change your sql to
u.age <= :age and
YEAR(v.upload_date) >= :year
...

Then bind param:
->bindParam(':age', $age)
->bindParam(':year', $year)

A: Your problem is that you are binding all the IN parameters to the same variable ($x) so they all end up with the same value. You can work around that by either changing to bindValue or by binding to the actual array value I.e.
$statement->bindParam($k+3, $countries[$k], PDO::PARAM_STR);


text:
Q: Webapp data for multiple users with MongoDB I've seen some tutorials on how to make web apps using MongoDB, but they are quite simple and only work for one user. The database structure is as follows:
-> myApp (database)
  |-> collection1
  |  |-> document1
  |  |-> document2
  |  ...
  |-> collection2
  ...

If I want to make this app available to many different users, what would be the best way to do it? Each user would have its own private data.
I could use the same collections for all users, but then every query would have to filter results for one user each time. It doesn't sound optimal to me.
Starting a new Docker container for each user sounds complicated.
Is there any other way to structure the database to make this work?


text:
Q: Uncaught TypeError: Object [object Object] has no method 'datepicker' this is the error i get when trying to use the datepicker widget: *has no method
<script type="text/javascript" language="javascript">
    $(function () {
        $("#from").datepicker({
            ....
            }
        });
        $("#to").datepicker({
           ....
            }
        });
    });
</script>

This is the include file i'm using.
The confusing part of this is that I use this same includes file on 3 pages and I only get the error on the one page. so it cant really be the script itself...I think
<!-- Datepicker widget -->
<script src="js/jquery-1.9.1.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.10.1.custom.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>
<link href="css/jquery-ui-1.10.1.custom.min.css" rel="stylesheet" type="text/css" />

any Ideas?

A: Fixed there was a jQuery conflict on $
added a jQuery(function($){ which did the trick

A: I also had the same issue, it was caused by incorrectly using a mix of primefaces and richfaces - specifically when using p:calendar inside a4j:outputPanel.
Using p:outputPanel instead and removing the a4j namespace resolved the issue.

A: Yes, the above solution worked for me too!  Here is the complete code for anyone not completely sure...   jQuery(function ($) {
    $("#datepicker").datepicker();
});


text:
Q: ie8 overflow-y: auto; scroll bar locked by PIE.htc PIE.htc seems to be causing the issue, however I need to keep it for several other effects.
ie8(works fine in FF & webkit)
I have a nested div set with css overflow-y: auto; when the scroll bar shows I can use the scroll wheel, click the up/dn arrows and it works fine, however the scroll grab bar is locked, ie when I left click it flashes blue but then back to normal grey and I can not drag it.
Anyone have a work around suggestion
thx
Art
.outterDiv{
  position:absolute;
  min-width: 1000px;
  min-height: 600px;
  width:99%;
  height:50%;
  z-index:100;

  background-color:#212121;
  color:#fff;
  text-shadow:1px 1px 1px #000;

  border:1px solid #303030;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px;

  -moz-box-shadow:0px 0px 10px #000;
  -webkit-box-shadow:0px 0px 10px #000;
  box-shadow:0px 0px 10px #000;
  behavior: url(PIE.htc);
}

innerDiv with scroll bar
.innerDiv{
  position:absolute;
  overflow-x:hidden;
  overflow-y: auto;
  -ms-overflow-y : auto;

  left: 0%;
  width:25%;
  margin-left:0;

  top: 5.5%;
  height:91%;
  z-index:900;
  margin: 0% 0% 0% 0%;
  padding: .5% 0% 0.1% 0%;

  background-color:#ababab;

  text-shadow:1px 1px 1px #000;

  border:1px solid #303030;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;

  -moz-box-shadow:0px 0px 4px #000;
  -webkit-box-shadow:0px 0px 4px #000;
  box-shadow:0px 0px 4px #000;
}


text:
Q: Can't SSH to Ubuntu server with Putty but able to do with IP I setup a Ubuntu instance and I am trying to access from a windows system it via SSH with PuTTy.
I can SSH with the IP address but I am unable to do so with the hostname.
I checked the /etc/hosts file on the Ubuntu server and it has the IP address and the hostname -
127.0.0.1       localhost
172.xx.xx.xx7   riz-7.xxxxxxxx.NET   riz-7

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

When I try to SSH with the hostname I get this error-
Unable to to open connection to riz-7. Host does not exist

What can be the reason? I was able to SSH with hostname earlier but not anymore.

A: You also need to update your hostnames in /etc/hosts in your client machine.

A: The following are required to access devices via their local hostname:

*

*Router's local domain name must be set (for example: .local)

*

*Login to router's WebUI > Generally found under router's System settings

*Static IP must be set on the router for the device to be accessed via hostname.local

*

*Router's WebUI > Generally found under Network settings

*OS' local domain must be set to router's local domain

*

*Windows: Workgroup name is Windows' local domain  sysdm.cpl > Computer Name - Change... > Workgroup > OK > Reboot

*BSD/Linux: Varies by distro  google: "distro name" change "local domain name"

*hosts file entry for the device to be accessed via hostname.local
# Windows  : C:\Windows\System32\drivers\etc\hosts
# BSD/Linux: /etc/hosts (can vary by DNS program being used)

  192.168.1.10       hostname         hostname.local

To access the device: hostname.local


text:
Q: Android recyclerview search filter not working Updating data but not changing. What would be the reason?  I tried a lot of methods, but none of them worked. No matter what I write, the result doesn't change. The list is still the same. Where am I doing wrong? I'm sure the adapter has been updated. Because I checked it. The problem must be something else.

MainActivity
 @Override
public boolean onCreateOptionsMenu(final Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.main_menu, menu);
    SearchManager searchManager =
            (SearchManager) getSystemService(Context.SEARCH_SERVICE);
    SearchView searchView =
            (SearchView) menu.findItem(R.id.app_bar_search).getActionView();
    searchView.setQueryHint("Search Customer");
    searchView.setSearchableInfo(
            searchManager.getSearchableInfo(getComponentName()));

    searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
        @Override
        public boolean onQueryTextSubmit(String query) {
            return true;
        }

        @Override
        public boolean onQueryTextChange(String newText) {
            mAdapter.getFilter().filter(newText);
            return true;
        }
    });

    return true;
}

Adapter
 PlaylistAdapter(Context c,List<M3UItem> list) {
        mContext = c;
        mInflater = LayoutInflater.from(mContext);
        this.mItem = list;
        this.list = list;
}

 @Override
    public Filter getFilter() {
        return new Filter() {
            @Override
            protected FilterResults performFiltering(CharSequence charSequence) {
                String charString = charSequence.toString();
                if (charString.isEmpty()) {
                    list = mItem;
                } else {
                    List<M3UItem> filteredList = new ArrayList<>();
                    for (M3UItem row : filteredList) {

                        // name match condition. this might differ depending on your requirement
                        // here we are looking for name or phone number match
                        if (row.getItemName().toLowerCase().contains(charString.toLowerCase()) ) {
                            filteredList.add(row);

                        }
                    }

                    list = filteredList;
                }

                FilterResults filterResults = new FilterResults();
                filterResults.values = list;
                return filterResults;
            }

            @Override
            protected void publishResults(CharSequence charSequence, FilterResults filterResults) {
                list = (ArrayList<M3UItem>) filterResults.values;

              notifyDataSetChanged();
                // refresh the list with filtered data

            }
        };
    }

EDİT:
onBindViewHolder
@Override
    public void onBindViewHolder(final ItemHolder holder, final int position) {
        final M3UItem item = mItem.get(position);
        if (item != null) {
            holder.update(item);
        }
    }

İtemHolder Update
void update(M3UItem item) {

        try {
            name.setText(item.getItemName());
            int color = generator.getRandomColor();
            if (item.getItemIcon().isEmpty()) {
                textDrawable = TextDrawable.builder()
                        .buildRoundRect(String.valueOf(item.getItemName().charAt(0)), color, 100);
                cImg.setImageDrawable(textDrawable);
            } else {
                if (Utils.getInstance().isNetworkAvailable(mContext)) {
                    Glide.with(mContext).load(item.getItemIcon()).into(cImg);
                } else {
                    textDrawable = TextDrawable.builder()
                            .buildRoundRect(String.valueOf(item.getItemName().charAt(0)), color, 100);
                    cImg.setImageDrawable(textDrawable);
                }
            }

        } catch (Exception ignored) {
        }

    }

MainActivity load item:
 @Override
    protected Boolean doInBackground(String... strings) {
        try { //new FileInputStream (new File(name)

            is = new FileInputStream(new File(strings[0])); // if u r trying to open file from asstes InputStream is = getassets.open(); InputStream
            final M3UPlaylist playlist = parser.parseFile(is);

            runOnUiThread(new Runnable() {

                @Override
                public void run() {

                    // Stuff that updates the UI
                    mAdapter.update(playlist.getPlaylistItems());
                    mAdapter.notifyDataSetChanged();
                }
            });

            return true;
        } catch (Exception e) {
            Log.d("Google2", "_loadFile: " + e.toString());
            return false;
        }
    }

A: The problem is with your onBindViewHolder and getItemCount try this changes in your Adapter class
@Override
    public void onBindViewHolder(final ItemHolder holder, final int position) {
        final M3UItem item = list.get(position);
        if (item != null) {
            holder.update(item);
        }
    }

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

you also need to change your filter code and revised it like this
List<M3UItem> filteredList = new ArrayList<>();
                    for (M3UItem row : mItem) {

                        // name match condition. this might differ depending on your requirement
                        // here we are looking for name or phone number match
                        if (row.getItemName().toLowerCase().contains(charString.toLowerCase()) ) {
                            filteredList.add(row);

                        }
                    }


text:
Q: Build errors. Duplicate class android.support.v4 I have created a simple image to text app using Visual Studio following uTube guide https://www.youtube.com/watch?v=CLjzLiU_GpE
I am new to app dev and wanted to learn this but cant get to compile.
I have tried to follow similar errors in here
Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes?
When I try to follow this and add to the AndroidStudioProjects\ImageToTextApp\gradle.properties
I get more errors
My errors are as show but i have included (only) first and last 2, there are 390 in total.
I think i can see it tells me (as per other issues in here) that the class is in 2 libraries.
(com.android.support:support-compat:28.0.0) and classes.jar (com.android.support:support-v4:24.0.0)
Were do i see my project importing these libraries and how do I fix these errors.
Duplicate class android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat found in modules classes.jar (com.android.support:support-compat:28.0.0) and classes.jar (com.android.support:support-v4:24.0.0)
Duplicate class android.support.v4.app.ActionBarDrawerToggle found in modules classes.jar (com.android.support:support-core-ui:28.0.0) and classes.jar (com.android.support:support-v4:24.0.0)
...
Duplicate class android.support.v4.widget.ViewDragHelper$2 found in modules classes.jar (com.android.support:customview:28.0.0) and classes.jar (com.android.support:support-v4:24.0.0)
Duplicate class android.support.v4.widget.ViewDragHelper$Callback found in modules classes.jar (com.android.support:customview:28.0.0) and classes.jar (com.android.support:support-v4:24.0.0)
Go to the documentation to learn how to Fix dependency resolution errors.
Hi @BachVu
I added your suggested line and the build.gradle file now looks like

dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:28.0.0'      implementation
  'com.android.support.constraint:constraint-layout:2.0.0-beta1'
    testImplementation 'junit:junit:4.13-beta-3'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation
  'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.android.gms:play-services-vision:10.2.4'
    exclude module: 'support-v4'  }

But this just creates more errors

ERROR: Gradle DSL method not found: 'exclude()'

Do i need to add another import or have i added in the wrong place?

A: Try adding this line to the library that causes this issue exclude module: 'support-v4' like this:
implementation("androidx.recyclerview:recyclerview:x.x") {
        exclude group: 'com.android.support'
        exclude module: 'appcompat-v7'
        exclude module: 'support-v4'
    }

A: Here is my build.Gradle file now and all works fine;
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta1'
    testImplementation 'junit:junit:4.13-beta-3'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.android.gms:play-services-vision:17.0.2' }

The main difference is
com.google.android.gms:play-services-vision:10.2.4

For some reason this was okay then out of nowhere it advised it was out of date. Once I updated from 10.2.4 > 17.0.2 all the errors went away.
Thanks for your time.

A: Go to gradle.properties and write these two lines of code:
android.useAndroidX=true # may be set already
android.enableJetifier=true

A: Try to migrate AndroidX
==> Step 1
Just go to
Refactor > Migrate to AndroidX > Migrate > Do Refactor

==> Step 2
Update your classPath and all dependencies with the latest version(Alt+Enter)


text:
Q: Clock Domain Crossing While reading the concept of CLOCK DOMAIN CROSSING I came across the 2 flip-flop synchronizer. If my first flop goes into metastable state, then how will it detect the correct value of data when it will come out of the metastable state? If my input is '1' and after coming out of metastable state my flip flop detects it as '0' then won't it create a problem in circuit as it is propagating false output through the whole circuit?

A: A chain of flip-flops does not 'cure' metastability. However, by delaying the final decision, it gives more time for the metastability to resolve itself, so reduces its likelihood. As the likelihood of it persisting falls exponentially as time passes, you do not have to add many stages for a circuit to improve enough to be usable.
To put some numbers on it. Let's say a flip flop has a metstability resolution time constant of 1nS, is operating at a 100MHz clock, and fails once per hour, needing a system reboot to recover from the resulting crash. If we add a second stage, then it improves things by 10 time constants, e^10, that is 22000, so now fails once in 2.5 years, a huge improvement, maybe good enough for some products. Add another stage and it fails once in 55000 years, probably good enough for one system to be called perfect. However, if you had deployed 10M systems to customers, then there would still still be 2 failures in the field per year. You do the sums for what improvement adding another stage would result in.
If a flip-flop goes metastable, it means it doesn't matter whether the output is 0 or 1, there is no 'correct' result, as long as two other circuits using the output data agree what it is. For instance, let's synchronise an external interrupt line to the program counter logic. Did an interrupt occur this clock cycle? If yes, provide the next program address from the interrupt vector. If no, provide it from the program counter. If the IV thinks there was no interrupt, and the PC thinks there was, then the system could crash.
See other answers 1 2 3 so I don't have to type too much more .

A: If there is meta-stability, that directly implies that there was no "valid" value of data at the specific sample time. Thus both 0 and 1 were acceptable valid data values at that time.
What is now, at this particular moment in time, considered "valid" has nothing to do with the validity of the data when it was sampled.
The actual problem with metastability is that the output has not settled to a specific value in the allotted time, which can cause metastable and unpredictable signals to propagate down the chain, creating all sorts of logic hazards, unpredictable glitches and oscillations, and excess localized power dissipation.
Making a definitive decision about the data, any decision at all, in the allotted time, avoids these problems.


text:
Q: How DMA buffer is so slow? I learn from some books or links,

*

*DMA buffer is locate in system memory and let devices access to it without CPU.

So I have a question,

*

*RAM speed normally is about 12 GB/s, but I tested DMA buffer in user space, and transfer speed using mmap/memcpy is only about 0.03 GB/s, why?
Here is my code below.

I got the result :

Ram Speed : 12.953367 GB/s
DMA Speed : 0.029834 GB/s

#include <string.h>
#include <iostream>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <cstring>
#include <fcntl.h>
#include <unistd.h>
struct drm_mode_create_dumb
{
    __u32 height;
    __u32 width;
    __u32 bpp;
    __u32 flags;
    /* handle, pitch, size will be returned */
    __u32 handle;
    __u32 pitch;
    __u64 size;
};
struct drm_prime_handle
{
    __u32 handle;

    /** Flags.. only applicable for handle->fd */
    __u32 flags;

    /** Returned dmabuf file descriptor */
    __s32 fd;
};

struct drm_mode_destroy_dumb
{
    __u32 handle;
};

double TimeStamp()
{
    struct timespec now;
    timespec_get(&now, TIME_UTC);
    return (((int64_t)now.tv_sec) * 1000 + ((int64_t)now.tv_nsec) / 1000000) / 1000.0;
}

void test_ram_speed()
{
    int i = 0;
    char *pbuf1 = new char[1024 * 1024];
    char *pbuf2 = new char[1024 * 1024];
    memset(pbuf1, 0, 1024 * 1024);
    memset(pbuf2, 1, 1024 * 1024);

    double ibegin = TimeStamp();
    double iend = 0;
    int MB = 1024 * 10;

    while (i < MB) /* Here you can adjust the byte size */
    {
        i++;
        memcpy(pbuf1, pbuf2, 1024 * 1024);
    }

    iend = TimeStamp();

    printf("Ram Speed : %f GB/s \n", MB * 1 / (iend - ibegin) / 1024.0);
}

void test_dma_speed()
{
    struct drm_mode_create_dumb mRequest;

    int DRM_FD = open("/dev/dri/card0", O_RDWR | O_CLOEXEC);
    if (DRM_FD < 0)
    {
        return;
    }

    mRequest.height = 1024;
    mRequest.width = 1024;
    mRequest.bpp = 1;

    int nRet = ioctl(DRM_FD, _IOWR('d', 0xB2, struct drm_mode_create_dumb), &mRequest);

    if (nRet)
    {
        return;
    }

    struct drm_prime_handle prime_request = {
        .handle = mRequest.handle,
        .flags = O_CLOEXEC | O_RDWR,
        .fd = -1};

    nRet = ioctl(DRM_FD, _IOWR('d', 0x2d, struct drm_prime_handle), &prime_request);

    int mDmaBufFd = prime_request.fd;

    if (nRet || mDmaBufFd < 0)
    {
        return;
    }

    uint8_t *PrimedFramebuffer = (uint8_t *)mmap(0, mRequest.size,
                                                 PROT_READ | PROT_WRITE, MAP_SHARED,
                                                 mDmaBufFd, 0);
    if (PrimedFramebuffer == MAP_FAILED)
    {
        return;
    }

    char *pbuf1 = new char[1024 * 1024];

    double ibegin = TimeStamp();
    double iend = 0;
    int MB = 1024 * 0.03;
    int i = 0;
    while (i < MB) /* Here you can adjust the byte size */
    {
        i++;
        memcpy(pbuf1, PrimedFramebuffer, 1024 * 1024);
    }

    iend = TimeStamp();

    printf("DMA Speed : %f GB/s \n", MB * 1 / (iend - ibegin) / 1024.0);

    munmap(PrimedFramebuffer, mRequest.size);

    struct drm_mode_destroy_dumb destroy_request = {
        .handle = mRequest.handle};

    ioctl(DRM_FD, _IOWR('d', 0xB4, struct drm_mode_destroy_dumb), &destroy_request);

    close(DRM_FD);
}

int main()
{
    test_ram_speed();

    test_dma_speed();
    return 0;
}


text:
Q: How to add a Null Value record in a temporary table? I have one table 'AgentEventStats' that has Agent IDs and their names. I use this table in a dataset that pulls up agent names to use a parameter for a Stats report. (This is to exclude those agents for my report).
However, I have to select an agent for that parameter or else my report won't work. That means that if I don't want to exclude any agents, (NULL value) I cannot run that report.
So, I thought, I would insert a Null value in a temp table that includes the AgentEventStats records.
What I tried:
    SELECT DISTINCT AgentReporting, AgentFirstName + ' ' + AgentLastName [AgentName]
    INTO #AgentStats    -- First, creating the temp table.
    FROM AgentEventStats
    WHERE MidnightStartDate >= dateadd(day, -60, getdate())--'2017-01-01'
    AND MidnightStartDate <  getdate() --dateadd(day,1,'2017-03-13')
    ORDER BY AgentName

    INSERT INTO #AgentStats (AgentReporting, AgentName)  --Then, inserting the Null value in that temp table.
    VALUES ('100', 'No Agents');

This doesn't work. I get an error message:

There is already an object named '#AgentStats' in the database.

Someone suggested I use a Union All instead. Can someone guide me please?

A: If you run the code like it is more than once in the same connection, you will get that error.
Quick fix: add DROP TABLE #AgentStats to the end of the script.
Then run just that line once (to drop the temp table).
Then you can run the whole script over and over again without error. Add in a SELECT * FROM #AgentStats before the drop to see what is in the table before you get rid of it.
Another way to do this is to first check to see if the temp table exists, then drop it before running the rest of the script. Like so:
IF OBJECT_ID('tempdb..#AgentStats') IS NOT NULL
    DROP TABLE #AgentStats

SELECT DISTINCT...

If you do it this way, you won't need the DROP TABLE at the end any more.
Hope this helps you out.
EDIT
The UNION solution.
SELECT DISTINCT AgentReporting, AgentFirstName + ' ' + AgentLastName [AgentName]
FROM AgentEventStats
WHERE MidnightStartDate >= dateadd(day, -60, getdate())--'2017-01-01'
AND MidnightStartDate <  getdate() --dateadd(day,1,'2017-03-13')
UNION ALL -- added ALL based on comment
SELECT '100', 'No Agents'
ORDER BY 2;


text:
Q: Greatest value of the binomial coefficient. How should I prove the greatest value of the binomial coefficient $C(n,r)$ occurs for $r=\left[\cfrac{(n+1)}{2}\right]$ ?

A: Note that $C(n,r+1)=C(n,r)\cdot\frac{n-r}{r+1}$.

A: HINT: Look at Pascals' Triangle. Notice where the maximum values of each row occur.

A: To find the maximum  binomial coefficient consider x=a=1.By the above theorem max term will give us the max binomial coefficient.
r=[n+1/1+1]=[n+1/2]


text:
Q: Visual Studio Code on Mac doesn't format correctly I love a lot about Visual Studio Code.
But on my Mac it does not format coding. The way it handles indenting is very frustrating.
Some code text editors allow you to select all your code and 'tidy' or 'reformat' it to fix any bad indenting, but Visual Studio Code doesn't appear to have any options for this.
Can anyone provide any tips or solutions?

A: Navigate the menu: Code > Preferences > Keyboard Shortcuts. Search for "format".
The default for editor.action.formatDocument is shift + option + F.
The default for editor.action.formatSelection is command + K + F.
Here's a similar question with answers.


text:
Q: Add JPanels dynamically to either a JTable or a JScrollPane Currently working on a project and I need to add a panel I've made to a scrollpane or a table dynamically. The scrollpane should start out empty and add the panels.
The GuiConstructor is where i make the window.
My problem is that if I don't comment out the setSize in the GuiConstructor, the window starts out very small.
Secondly, when i press the add button, it doesn't add the panels.
public GuiConstructor(){
    super(APPLICATION_NAME);
    setLayout(new BorderLayout());
    LoopControlWindow loopwin = new LoopControlWindow(connect);
    add(loopwin , BorderLayout.NORTH);
    pack();
    setLocationRelativeTo(null);
    setResizable(false);
    setVisible(true);
    //this.setSize(500, 500);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}

public class LoopControlWindow extends JPanel {

IConnector connect;

public LoopControlWindow(IConnector connect) {
    super(new BorderLayout());
    this.connect = connect;
    initPane();
}

private void initPane() {
    JPanel panel = new JPanel(new GridLayout(3,1));
    FolderSearchComp fsc = new FolderSearchComp(connect);
    JScrollPane scrollPane = new JScrollPane();
    JButton button = new JButton("Add");

    button.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            panel.add(new FolderSearchComp(connect));
            scrollPane.getViewport().setView(panel);
        }
    });

    scrollPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    scrollPane.setViewportBorder(new LineBorder(Color.BLACK));

    add(scrollPane, BorderLayout.CENTER);
    add(button, BorderLayout.SOUTH);

}

A: This is typical of this style of GUI app. You need to tell the layout manager how big to make the Window initialy without using setSize(). The way to do this is to override getPreferredSize() to return a default size. In your case:
public LoopControlWindow extends JPanel {
    private Dimension size;

    public LoopControlWindow() {
        Preferences prefs = Preferences.userNodeForPackge("your.java.package");
        size = new Dimension(prefs.getInt("width", 800), prefs.getInt("height", 600));
    }
    public Dimension getPreferredSize() {
        return size;
    }
}

By doing it this way you can store the user preferences for the window dimensions but also provide sensible defaults to start.
You should also make sure that this JPanel is your main panel and is added to the JFrame at BorderLayout.CENTER to ensure that your window gets drawn properly. All other panels should be somewhere inside this one.
Once you have this set up calling pack() will work correctly.

A: For your first problem, you need to specify a size for the initial JFrame().  One way is to call setSize as you are doing.  Another is to override getPreferredSize() to return the default size.  And one other option is to find the size of the user's monitor and set the JFrame to be a percentage of that size.  That way you can ensure your window always fits on your user's screen.
    int height = GraphicsEnvironment.getLocalGraphicsEnvironment()
            .getDefaultScreenDevice().getDefaultConfiguration().
            getBounds().height;
    height = (int) (height * .85);
    int width = GraphicsEnvironment.getLocalGraphicsEnvironment()
            .getDefaultScreenDevice().getDefaultConfiguration().
            getBounds().width;
    width = (int) (width * .85);
    frame.setSize(width, height);

Second, you need to call revalidate() and repaint() anytime you add or remove from a layout in order to see the changes.
button.addActionListener(new ActionListener() {

    @Override
    public void actionPerformed(ActionEvent e) {
        panel.add(new FolderSearchComp(connect));
        scrollPane.getViewport().setView(panel);
        revalidate();
        repaint();
    }
});

One note on border layout.  The components in it will not resize with your JFrame.  Whatever component that is placed in BorderLayout.CENTER will, however.  That component will grow to fill all extra space as the JFrame grows.  It will also be the component that shrinks when the JFrame windows gets smaller.


text:
Q: merge update oracle unable to get a stable set of rows I am trying to update a table in Oracle based on another table (inner join) but the matching fields match on more than 1 row so I get an error:

unable to get a stable set of rows

    MERGE INTO C
    USING D
    ON (C.SYSTEM = D.SYSTEM)
    WHEN MATCHED THEN
    UPDATE SET C.REF_CD = D.CODE,
               C.REF_DT = TO_DATE('12/05/2017', 'MM/DD/YYYY')
       WHERE C.CODE = '123'
       AND D.CODE IS NOT NULL
       AND C.CLOSED = 'N'
       AND C.RCVD_DT >= TO_DATE('12/01/2017', 'MM/DD/YYYY')
       AND C.RCVD_DT <= TO_DATE('12/04/2017', 'MM/DD/YYYY')
       AND SUBSTR(C.SSN,7,3) >= D.FROM
       AND SUBSTR(C.SSN,7,3) <= D.TO;

As a SELECT statement, I can pull this information using an inner join. But as a merge statement, I get the above error. SYSTEM is the only matching data in both tables.  How can I rewrite the above in a way that it will not error out?

A: I am going to show what the source of this error is.
Consider the below simple example:
CREATE TABLE A_100(
  x_system int,
  val int
);

INSERT INTO a_100 values( 1, 100 );
INSERT INTO a_100 values( 2, 200 );

CREATE TABLE B_100(
  x_system int,
  val int
);

INSERT INTO b_100 values( 1, 1100 );
INSERT INTO b_100 values( 2, 2000 );
INSERT INTO b_100 values( 2, 3000 );

commit;

Now please consider this join:
SELECT *
FROM A_100 a
JOIN B_100 b
ON a.x_system = b.x_system AND a.x_system = 1
;

| X_SYSTEM | VAL | X_SYSTEM |  VAL |
|----------|-----|----------|------|
|        1 | 100 |        1 | 1100 |

the above query gives one unique record from the table B_100. If you use this join condition in a merge statement, the merge will run without any error:
MERGE INTO A_100 a
USING B_100 b
ON ( a.x_system = b.x_system AND a.x_system = 1)
WHEN MATCHED THEN UPDATE SET a.val = b.val
;

1 row merged.

Now please consider the below join:
SELECT *
FROM A_100 a
JOIN B_100 b
ON a.x_system = b.x_system AND a.x_system = 2
;

| X_SYSTEM | VAL | X_SYSTEM |  VAL |
|----------|-----|----------|------|
|        2 | 200 |        2 | 2000 |
|        2 | 200 |        2 | 3000 |

The above join, for one record from A_100 gives two records from B_100.

If you try to use MERGE with the above join condition you will get the following:
MERGE INTO A_100 a
USING B_100 b
ON ( a.x_system = b.x_system AND a.x_system = 2)
WHEN MATCHED THEN UPDATE SET a.val = b.val
;

Error report -
ORA-30926: unable to get a stable set of rows in the source tables

Oracle simply says you :

The query for one record from the left table returned two values:
  2000 and 3000 from the right table.
  I can not assign two values from the right table to a single scalar field of the left table, this is impossible.
  Please change the join condition so that it gives only one unique
  record from the right table for each record in the left table


text:
Q: Printing variable characters to UART does not work, constants work fine I have a rather strange issue with XC8 on a PIC18F27K40 microcontroller. On a PIC16F1778 it works. I have defined:
void uart_putch(unsigned char byte) {
    while (!PIR3bits.TX1IF);
    TX1REG = byte;
}

When, in my main loop, I call uart_putch('a');, this works fine. However, when I define const char c = 'a'; and call uart_putch(c);, it does not work. It prints something, though not an a - I think they are 0x00 characters, which I get from hexdump -x /dev/ttyUSB0. This is not an issue with the serial port on my computer; I looked with a scope and the signal is different (left works, right does not):

The code is simple:
void main(void) {
    init(); // Sets up ports and UART control registers
    while (1) {
        uart_putch('a'); // or c
    }
}

What does not work either is using any of the string functions (puts, printf, etc.), which I think is related - so in this question I made a minimal working example with characters.
The generated assembly when I use a variable c has:
_c:
    db  low(061h)
    global __end_of_c

_main:
    ; ...
    movlw   low((_c))
    movwf   tblptrl
    if  1   ;There is more than 1 active tblptr byte
    movlw   high((_c))
    movwf   tblptrh
    endif
    if  1   ;There are 3 active tblptr bytes
    movlw   low highword((_c))
    movwf   tblptru
    endif
    tblrd   *
    movf    tablat,w
    call    _putch

And with a constant it has in the _main block:
    movlw   (061h)&0ffh
    call    _putch

I'm using MPLAB XC8 C Compiler V1.41 (Jan 24 2017), with part support version 1.41.
The relevant parts of my Makefile:
CC:=xc8
CFLAGS:=-I. --chip=18F27K40 -Q -Wall

SRC:=main.c uart.c
DEP:=uart.h
PRS:=$(subst .c,.p1,$(SRC))
OBJ:=main.hex

all: $(OBJ)

$(OBJ): $(PRS)
    $(CC) $(CFLAGS) $^

$(PRS): %.p1: %.c $(DEP)
    $(CC) $(CFLAGS) -o$@ --pass1 $<

Any help to get this working would be very much appreciated.

A: Your program is fine, It's a bug on the PIC18F27K40.
See http://ww1.microchip.com/downloads/en/DeviceDoc/80000713A.pdf
Use XC8 compilier V1.41 and mplabx IDE, select XC8 Global options / XC8 linker and select "Additional options", then add +nvmreg in the Errata box and all will be fine.
Excerpt from the linked doc, keywords marked bold:

TBLRD requires NVMREG value to point to
  appropriate memory
The affected silicon revisions of the PIC18FXXK40 devices improperly  require the NVMREG<1:0> bits in the NVMCON register to be set for TBLRD access of the various memory regions. The issue is most apparent in compiled C programs when the user defines a const type and the compiler uses TBLRD instructions to retrieve the data from program  Flash  memory  (PFM). The issue is  also apparent when the user defines an array in RAM for which the complier creates start-up code, executed before main(), that uses TBLRD instructions to initialize RAM from PFM.

A: const chars are stored in program memory (flash), and it looks like the compiler is seeing that you are not using it as a variable (since it never changes) and optimizing it into program memory regardless of if you use const or not.
Try declaring it as volatile char c= 'a';.  This will force it to be stored in SRAM rather than flash.
Why does this matter?
On PIC18s, using the db directive (databyte to store a byte in program memory) with an odd number of bytes (like in your case) will automatically pad it with zeros.  This behavior differs from that of the PIC16, which is probably why it works on one but not the other.  Because of this reason, strings or chars stored in flash memory also will not work with any of the standard string functions, such as strcpy or printf.  Storing something in program memory is not automatically type safe.
Based on the assembly, it is pretty clear that is loading the wrong 8 bytes.  Which is 0x00, so it correctly sending 0x00 (as you've thoroughly confirmed it is doing).
It can be difficult to predict what you'll get with the insane amount of compiler optimization these days, so I am not sure if this will work.  the volatile trick should work, but if you really want it stored in flash, try this:
TXREG = data & 0xff;
or possibly
TXREG = data & 0x0ff;
I know that in theory, this should do nothing.  But we are trying to change the assembly output of the compiler to do what we want, and not sort of but not really what we want.
From the MPASM Users Guide:

I also recommend checking it out yourself, as well as code_pack, in the PDF.  Page 65.


text:
Q: Adding a multidimensional numpy array into one array I have a multidimensional numpy array that has the shape (5, 6192, 1) so essentially 5 arrays of length 6192 into one array.
How could I add the elements of all the arrays into one array of length 6192 in the following way.
For example if the 5 arrays look like
ar1 = [1,2,3...]
ar2 = [1,2,3...]
ar3 = [1,2,3...]
ar4 = [1,2,3...]
ar5 = [1,2,3...]

I want my final array to look like:
ar = [5,10,15,...]

So for each inner array, add the values of each same position into a new value for the final array that is the sum of all the values in this position.
The shape should be, I guess shape(1,6192,1).

A: IIUC, simply use numpy.sum:
ar1 = [1,2,3]
ar2 = [1,2,3]
ar3 = [1,2,3]
ar4 = [1,2,3]
ar5 = [1,2,3]

arrays = [ar1, ar2, ar3, ar4, ar5]

ar = np.sum(arrays, axis=0)

output: array([ 5, 10, 15])
If really the shapes you describe are correct:
arr = np.array(arrays).reshape((5, 3, 1))
print(arr.shape)
# (5, 3, 1)

ar = np.sum(arr, axis=0)[None,:]

print(ar.shape)
# (1, 3, 1)


text:
Q: Sending variable data in iframe website and submit it Is it possible to send data to the iframe website form and submit the form? Like I want to track shipment number and this is the code
<?php
$tracking = 'LE783579177';
?>

<iframe src="http://leopardscourier.com/pk/tracking/" width="100%" height="100%" ></iframe>

I want to open the tracking form in an iframe and pass the tracking no and submit it. Is it possible?

A: You can use postMessage() to handle such a case - https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage


text:
Q: How to solve $20t + \frac{240}{\pi} \sin \frac{\pi t}{12} =2500$ by hand? I'm trying to solve a calc 1 problem about how long it takes to fill a reservoir.  This is the result of my integration.
$$20t + \frac{240}{\pi} \sin\frac{\pi t}{12}=2500$$
I know the answer is $t = 122.6$ (its an odd book problem), I only figured it out because I used my graphing calculator and found the intersection of the function and $y=2500$.
How can I solve for $t$ by hand?

A: Scale down the equation as
$$t + \frac{12}{\pi} \sin \left( \frac{\pi t}{12} \right)=125$$
Note that the RHS is much larger than the sine term. So, the solution is roughly $t=125$, which can be refined by adding the first-order approximation as follows.
Let $f(t) = t -125 + \frac{12}{\pi} \sin \frac{\pi t}{12} $ and the root $t=125 + \Delta t$. Then,
$$0 = f(125) + f'(125)  \Delta t$$
Solve for $ \Delta t$
$$ \Delta t = - \frac{f(125)}{f'(125)}
= -\frac{12}{\pi} \frac{\sin \frac{5\pi}{12}}{1+\cos \frac{5\pi}{12}  }
= -\frac{12}{\pi} \tan \frac{5\pi}{24}$$
Thus, the approximate analytic solution is
$$t= 125 -\frac{12}{\pi} \tan \frac{5\pi}{24}\approx 122.1$$

A: If by hand you mean without a calculator at all, you need to use some numeric approach.  Because the sine is limited to $\pm 1$ that term cannot be $80$ in absolute value, so we can get a first approximation by ignoring it, which gives $t=125$.  You will need some way to evaluate the sine, but presumably you have a set of tables.  Now I would use fixed point iteration, writing $$t=125-\frac {12}\pi \sin\left(\frac {\pi t}{12} \right)$$
Plug in $125$ on the right, calculate the new $t$ and iterate.  It takes a while to converge because the derivative of the right side is close to $-1$.  Newton's method will converge more quickly at the price of being a bit harder to derive.

A: Consider that you look for the zero of function $$f(t)=t + \frac{12}{\pi} \sin \left( \frac{\pi t}{12} \right)-125$$ and notice that $f(120)=-5$.
So use Taylor expansion
$$f(t)=-5+2 (t-120)+O\left((t-120)^3\right)$$ Ignoring the higher order terms, an approximation is then $t=122.5$. This is the same as the first iteration of Newton method.
Sooner or later, you will learn that, for approximating functions, Padé approximants are much better than Taylor series. Using the $[1,2]$ Padé approximant (this is the simplest), the solution will then be
$$t=120+\frac{17280}{6912-25 \pi ^2}$$ Now, remembering that $\pi^2 \sim 10$, this reduces to
$$t=120+\frac{8640}{3331}=120+\frac{8640\times 3}{3331\times 3}=120+\frac{25920}{9993}\sim 120+\frac{25920}{10000}=122.592$$ while the exact solution is $122.598$.


text:
Q: Azure DevOps Create Pull request with autocomplete from shell script I am now able to create a Pull Request by the DevOps Rest API with a shell script (bash). I set the following relevant options:
{
    // source and target....
    "autoCompleteSetBy":
    {
        "id":"mydevops_User_Guid"
    },
    "completitionOptions":
    {
        "deleteSourceBranch":"true",
        "transitionWorkItems":"true"
    }
}

The pull request will be created, but I have the complete it manually.
I want the following two extra things:

*

*Set autocomplete of the pull request to true

*Set "complete assossiated workitems" to true (there is a checkbox for this in DevOps)

How can I achive this?


text:
Q: Configure Search bar for modern page to menu bar I would like to know if this can possible to do without Spfx, enable the search function or engine to menu bar in the modern page without framework. I know it can be possible with the customize but i need to know or suggestion to enable without code.
In the image, that search engine is possible to search only site pages "Search Site Pages". Similarly for .aspx page i am looking for "Search this Page"
https://techcommunity.microsoft.com/t5/SharePoint/SharePoint-Online-Modern-search-on-pages-and-libraries/m-p/301370
Similar to the above post
Best Regards.

A: What do you mean the menu bar?
In the modern page, the search box is in the suite bar in the top of the page. It is by design.


text:
Q: Executing .bat from MySQL query For reasons which are convoluted and irrelevant for this question, I'm working on a Windows server behind a client firewall in which I have limited access to the Task Scheduler. I have root level access of a MySQL database I am moderating there, and was wondering if I could possibly call .bat executables from within the MySQL event scheduler. Eliminating the need for Windows Task Scheduler.
I can't fully reside within the MySQL event scheduler as the executables I wish to run will be making calls to other MySQL instances on 'neighboring' servers.
Is this something someone may have attempted or solved before?

A: To run a .BAT file from a MySQL procedure, you would need to develop a User Defined Function in C/C++, and install the compiled UDF on the MySQL host.
But if you don't have access to use the Task Scheduler, you might not have access to install a UDF either.
I don't recommend using the MySQL event scheduler for running .BAT files or any external programs. You risk crashing your MySQL Service, and it's a terrible security vulnerability too.
Use the MySQL event scheduler only for making scheduled changes to data in MySQL.


text:
Q: Remove all non-ASCII characters from a string except smart quotes I have this regex that removes all non-ascii characters from a string including all smart quotes:
str.replace(/[\u{0080}-\u{FFFF}]/gu,"");

But I need to keep the Smart quotes
The regex for removing Smart single quotes is: [\u2018\u2019\u201A\u201B\u2032\u2035] and for Smart double quotes is: [\u201C\u201D\u201E\u201F\u2033\u2036].
I need a combined regex that that removes all non-ASCII ([\u{0080}-\u{FFFF}]) except smart quotes ([\u2018\u2019\u201A\u201B\u2032\u2035] or [\u201C\u201D\u201E\u201F\u2033\u2036]).

A: Note that you need to use the \u{XXXX} notation in the regex with u modifier, and to build the regex you need you need to put the character class with exceptions into a negative lookahead placed right before your more generic pattern:
/(?![\u{2018}\u{2019}\u{201A}\u{201B}\u{2032}\u{2035}\u{201C}\u{201D}\u{201E}\u{201F}\u{2033}\u{2036}])[\u{0080}-\u{FFFF}]/gu

See the regex demo
Note that some chars in the Unicode table go one after another, so we may shorten the pattern using ranges:
/(?![\u{2018}-\u{201F}\u{2032}\u{2033}\u{2035}\u{2036}])[\u{0080}-\u{FFFF}]/gu

See this demo.

A: Instead of matching the non-ascii, match the ascii + the characters you need, and negate the expression. Example:
str.replace(/[^\x00-\x7F\u2018\u2019\u201A\u201B\u2032\u2035\u201C\u201D\u201E\u201F\u2033\u2036]/gu,"");


text:
Q: MacTeX 2018 Beamer 3.50 beamerarticle problem Moving from MacTeX 2015 and 2017 to MacTeX 2018 my LaTeX Beamer files have a problem. With Beamer 3.50 in MacTeX 2018, files producing article mode output with the beamerarticle package have error messages indicating something has happened to the loading of the xcolor package.
Section 21 of the Beamer manual version 3.41 in MacTeX 2017 (and earlier) describe a way of producing article and Beamer output from the same source text (and it is also in Section 21 of version 3.50 in MacTeX 2018). We have three files:

*

*MacTeX2018BeamerProblemC.main.tex which contains the source material and the part of the preamble common to both Beamer and article modes

*MacTeX2018BeamerProblemC.beamer.tex which contains the Beamer harness

*MacTeX2018BeamerProblemC.article.tex which contains the article harness

In the Beamer harness I have the option to the beamer class of xcolor={x11names,svgnames}- in the article harness I have the noxcolor option to the beamerarticle package and in the file I load the xcolor package with the command \usepackage[x11names,svgnames]{xcolor}- I have done it this way since beamerarticle appears to not have the same xcolor option that the beamer class has to pass options to xcolor - in the past up to Beamer 3.41 with MacTeX 2017 this worked. Now with Beamer 3.50 I get an error compiling the article version saying that \colorlet is not defined - the beamer version compiles as before.
Here is a minimal article harness. MacTeX2018BeamerProblemC.article.tex
% Structure of files based on section 21.2.2 of Beamer User Guide version 3.15

\documentclass[a4paper,12pt]{article}
\usepackage[noxcolor]{beamerarticle}
\setjobnamebeamerversion{MacTeX2018BeamerProblemC.beamer}

% ----------------------------------------------------------------------
%
% Commands particular to article mode % (fold)
%
% ----------------------------------------------------------------------

% ----------------------------------------------------------------------
%
% Color % (fold)
%
% ----------------------------------------------------------------------

% loaded here since Beamer loads it separately
% and beamerarticle loads xcolor with an option override unless you use noxcolor option
\usepackage[x11names,svgnames]{xcolor}

% End of Color % (end)
% ----------------------------------------------------------------------

% End of Commands particular to article mode % (end)
% ----------------------------------------------------------------------

% ----------------------------------------------------------------------
%
% Load main file
%
% ----------------------------------------------------------------------

% The *.main.tex file has commands that work in both article and beamer modes

\input{MacTeX2018BeamerProblemC.main}

Here is a minimal Beamer harness MacTeX2018BeamerProblemC.beamer.tex
% Structure of files based on section 21.2.2 of Beamer User Guide version 3.15

\documentclass[ignorenonframetext,xcolor={x11names,svgnames}]{beamer}

% ----------------------------------------------------------------------
%
% Beamer configuration  % (fold)
%
% ----------------------------------------------------------------------

% ----------------------------------------------------------------------
%
% Beamer theme macros  % (fold)
%
% ----------------------------------------------------------------------

\usetheme[right,hideothersubsections]{Goettingen}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}{\hspace*{\fill}\insertframenumber{}/\inserttotalframenumber}

% End of Beamer theme macros  % (end)
%
% ----------------------------------------------------------------------

% End of Beamer configuration  % (end)
% ----------------------------------------------------------------------

% ----------------------------------------------------------------------
%
% Load main file
%
% ----------------------------------------------------------------------

% The *.main.tex file has commands that work in both article and beamer modes

\input{MacTeX2018BeamerProblemC.main}

Here is a sample main file with the main source for both beamer and article versions, MacTeX2018BeamerProblemC.main.tex
% The *.main.tex file has commands that work in both article and beamer modes

\usepackage{ifthen}

% ----------------------------------------------------------------------
%
% Preamble Packages & Macros % (fold)
%
% ----------------------------------------------------------------------

% ----------------------------------------------------------------------
%
% Color, Graphics, Diagrams  % (fold)
%
% ----------------------------------------------------------------------
% xcolor is loaded by beamer

% End of Color, Graphics, Diagrams  % (end)
% ----------------------------------------------------------------------

% Preamble Packages & Macros % (end)
% ----------------------------------------------------------------------

% ----------------------------------------------------------------------
%
% Meta data % (fold)
%
% ----------------------------------------------------------------------

\title{MacTeX 2018}
\subtitle{Beamer 3.50 Problem}  % \subtitle only available with beamer
\author{Phil Molyneux}
\date{9 July 2018}

% End of Meta data % (end)
% ----------------------------------------------------------------------

% ----------------------------------------------------------------------
%
% Macros & Packages for this file  % (fold)
%
% ----------------------------------------------------------------------

% End of Macros & Packages for this file  % (end)
% ----------------------------------------------------------------------

% ----------------------------------------------------------------------
%
% BEGIN DOCUMENT  % (fold)
%
% ----------------------------------------------------------------------

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\maketitle
\tableofcontents

\section{MacTeX 2018 / Beamer 3.50 Problem} % (fold)
\label{sec:MacTeX2018Beamer350Problem}

\begin{frame}[t]\frametitle<presentation>{MacTeX 2018}
  \framesubtitle<presentation>{Beamer 3.50 Problem}

  \begin{itemize}
    \item Moving from MacTeX 2015 and 2017 to MacTeX 2018 my LaTeX Beamer files have a problem
    \item With Beamer 3.50 in MacTeX 2018, files producing article mode output have error messages indicating
    something has happened to the loading of the xcolor package
  \end{itemize}

\end{frame}

% section MacTeX2018Beamer350Problem (end)

\section{Creating Beamer and Article Versions} % (fold)
\label{sec:CreatingBeamerAndArticleVersions}

\begin{frame}[t]\frametitle<presentation>{Beamer}
  \framesubtitle<presentation>{Creating Beamer and Article Versions}

  \begin{itemize}
    \item Section 21 of the Beamer manual version 3.41 in MacTeX 2017 (and earlier)
    describe a way of producing article and Beamer output from the same source text
    \item We have three source files:
    \item \textbf{MacTeX2018BeamerProblemC.main.tex} which contains the source material and the part of the preamble common
    to both Beamer and article modes
    \item \textbf{MacTeX2018BeamerProblemC.beamer.tex} wich contains the Beamer harness
    \item \textbf{MacTeX2018BeamerProblemC.article.tex} which contains the article harness
    \item This is described in section 21.2.2 of the Beamer manual version 3.41
  \end{itemize}

\end{frame}

% section CreatingBeamerAndArticleVersions (end)

\section{Dummy Section 1} % (fold)
\label{sec:DummySection1}

\begin{frame}[t]\frametitle<presentation>{Beamer 3.50 Problem}
  \framesubtitle<presentation>{Dummy Section 1}

  \begin{itemize}
    \item Point 1
    \item Point 2
    \item Point 3
  \end{itemize}

\end{frame}

% section DummySection1 (end)

\section{Dummy Section 2} % (fold)
\label{sec:DummySection2}

\begin{frame}[t]\frametitle<presentation>{Beamer 3.50 Problem}
  \framesubtitle<presentation>{Dummy Section 2}

  \begin{itemize}
    \item Point 1
    \item Point 2
    \item Point 3
  \end{itemize}

\end{frame}

% section DummySection2 (end)

\section{Dummy Section 3} % (fold)
\label{sec:DummySection3}

\begin{frame}[t]\frametitle<presentation>{Beamer 3.50 Problem}
  \framesubtitle<presentation>{Dummy Section 3}

  \begin{itemize}
    \item Point 1
    \item Point 2
    \item Point 3
  \end{itemize}

\end{frame}

% section DummySection3 (end)

\section{Dummy Section 4} % (fold)
\label{sec:DummySection4}

\begin{frame}[t]\frametitle<presentation>{Beamer 3.50 Problem}
  \framesubtitle<presentation>{Dummy Section 4}

  \begin{itemize}
    \item Point 1
    \item Point 2
    \item Point 3
  \end{itemize}

\end{frame}

% section DummySection4 (end)

\section{Dummy Section 5} % (fold)
\label{sec:DummySection5}

\begin{frame}[t]\frametitle<presentation>{Beamer 3.50 Problem}
  \framesubtitle<presentation>{Dummy Section 5}

  \begin{itemize}
    \item Point 1
    \item Point 2
    \item Point 3
  \end{itemize}

\end{frame}

% section DummySection5 (end)

% Uncomment below for bibliography
% \renewcommand{\refname}{References}  % default is References
% \nocite{}
% \bibliographystyle{myplain} % myplain is produced by natbib and merlin
% \bibliography{web,computing}
% \addcontentsline{toc}{section}{References} % default is not in toc

\end{document}
% END DOCUMENT  % (end)
% ----------------------------------------------------------------------

Here is a copy of the log file for the article version, MacTeX2018BeamerProblemC.article.log - the undefined \colorlet error happens fairly early on at about line 87 of the log file
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex 2018.7.5)  11 JUL 2018 10:35
entering extended mode
 restricted \write18 enabled.
 file:line:error style messages enabled.
 %&-line parsing enabled.
**MacTeX2018BeamerProblemC.article.tex
(./MacTeX2018BeamerProblemC.article.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerarticle.sty
Package: beamerarticle 2018/02/20 v3.50 beamer input in article mode

(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasemodes.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2018/02/11 v2.5e e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count88
)
\beamer@tempbox=\box26
\beamer@tempcount=\count89
\c@beamerpauses=\count90

(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasedecode.sty
\beamer@slideinframe=\count91
\beamer@minimum=\count92
)
\beamer@commentbox=\box27
\beamer@modecount=\count93
))
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasearticle.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbaseoptions.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
))
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbaserequires.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasecompatibility.st
y) (/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasefont.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols

(/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/amsfonts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\@emptytoks=\toks15
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasetranslator.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/translator/translator.sty
Package: translator 2018/01/04 v1.12 Easy translation of strings in LaTeX
))
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasemisc.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasetwoscreens.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbaseoverlay.sty
\beamer@argscount=\count94
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasetitle.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasesection.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbaseframe.sty
\c@framenumber=\count95
LaTeX Info: Redefining \\ on input line 760.
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbaseverbatim.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbaseframesize.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbaseframecomponents.
sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasecolor.sty
/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasecolor.sty:117: Un
defined control sequence.
<argument>  \colorlet
                      {fg}{black} \colorlet {bg}{white}
l.117 }

?

/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasecolor.sty:117: La
TeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.117 }

?
/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasecolor.sty:117: Un
defined control sequence.
<argument>  \colorlet {fg}{black} \colorlet
                                            {bg}{white}
l.117 }

?
) (/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasenotes.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasetoc.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasetemplates.sty
\beamer@sbttoks=\toks16

(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbaseauxtemplates.sty
))
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbaselocalstructure.s
ty (/usr/local/texlive/2018/texmf-dist/tex/latex/tools/enumerate.sty
Package: enumerate 2015/07/23 v3.00 enumerate extensions (DPC)
\@enLab=\toks17
))
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasenavigation.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasetheorems.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2017/09/02 v2.17a AMS math features
\@mathmargin=\skip43

For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01 AMS text

(/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks18
\ex@=\dimen103
))
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen104
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count96
LaTeX Info: Redefining \frac on input line 213.
\uproot@=\count97
\leftroot@=\count98
LaTeX Info: Redefining \overline on input line 375.
\classnum@=\count99
\DOTSCASE@=\count100
LaTeX Info: Redefining \ldots on input line 472.
LaTeX Info: Redefining \dots on input line 475.
LaTeX Info: Redefining \cdots on input line 596.
\Mathstrutbox@=\box28
\strutbox@=\box29
\big@size=\dimen105
LaTeX Font Info:    Redeclaring font encoding OML on input line 712.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 713.
\macc@depth=\count101
\c@MaxMatrixCols=\count102
\dotsspace@=\muskip10
\c@parentequation=\count103
\dspbrk@lvl=\count104
\tag@help=\toks19
\row@=\count105
\column@=\count106
\maxfields@=\count107
\andhelp@=\toks20
\eqnshift@=\dimen106
\alignsep@=\dimen107
\tagshift@=\dimen108
\tagwidth@=\dimen109
\totwidth@=\dimen110
\lineht@=\dimen111
\@envbody=\toks21
\multlinegap=\skip44
\multlinetaggap=\skip45
\mathdisplay@stack=\toks22
LaTeX Info: Redefining \[ on input line 2817.
LaTeX Info: Redefining \] on input line 2818.
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/amscls/amsthm.sty
Package: amsthm 2017/10/31 v2.20.4
\thm@style=\toks23
\thm@bodyfont=\toks24
\thm@headfont=\toks25
\thm@notefont=\toks26
\thm@headpunct=\toks27
\thm@preskip=\skip46
\thm@postskip=\skip47
\thm@headsep=\skip48
\dth@everypar=\toks28
)
\c@theorem=\count108
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/beamer/beamerbasethemes.sty)))
(./MacTeX2018BeamerProblemC.beamer.snm)
(/usr/local/texlive/2018/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)

(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 225.

(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.

(/usr/local/texlive/2018/texmf-dist/tex/latex/xcolor/svgnam.def
File: svgnam.def 2016/05/11 v2.12 Predefined colors according to SVG 1.1 (UK)
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/xcolor/x11nam.def
File: x11nam.def 2016/05/11 v2.12 Predefined colors according to Unix/X11 (UK)
))
(./MacTeX2018BeamerProblemC.main.tex
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
(./MacTeX2018BeamerProblemC.article.aux)
\openout1 = `MacTeX2018BeamerProblemC.article.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 65.
LaTeX Font Info:    ... okay on input line 65.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 65.
LaTeX Font Info:    ... okay on input line 65.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 65.
LaTeX Font Info:    ... okay on input line 65.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 65.
LaTeX Font Info:    ... okay on input line 65.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 65.
LaTeX Font Info:    ... okay on input line 65.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 65.
LaTeX Font Info:    ... okay on input line 65.

(/usr/local/texlive/2018/texmf-dist/tex/latex/translator/translator-basic-dicti
onary-English.dict
Dictionary: translator-basic-dictionary, Language: English
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/translator/translator-bibliograph
y-dictionary-English.dict
Dictionary: translator-bibliography-dictionary, Language: English
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/translator/translator-environment
-dictionary-English.dict
Dictionary: translator-environment-dictionary, Language: English
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/translator/translator-months-dict
ionary-English.dict
Dictionary: translator-months-dictionary, Language: English
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/translator/translator-numbers-dic
tionary-English.dict
Dictionary: translator-numbers-dictionary, Language: English
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/translator/translator-theorem-dic
tionary-English.dict
Dictionary: translator-theorem-dictionary, Language: English
)
(/usr/local/texlive/2018/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count109
\scratchdimen=\dimen112
\scratchbox=\box30
\nofMPsegments=\count110
\nofMParguments=\count111
\everyMPshowfont=\toks29
\MPscratchCnt=\count112
\MPscratchDim=\dimen113
\MPnumerator=\count113
\makeMPintoPDFobject=\count114
\everyMPtoPDFconversion=\toks30
) [1

{/usr/local/texlive/2018/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
LaTeX Font Info:    Try loading font information for U+msa on input line 72.

(/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
)
LaTeX Font Info:    Try loading font information for U+msb on input line 72.

(/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsb.fd
File: umsb.fd 2013/01/14 v3.01 AMS symbols B
)
(./MacTeX2018BeamerProblemC.article.toc)
\tf@toc=\write3
\openout3 = `MacTeX2018BeamerProblemC.article.toc'.

LaTeX Font Info:    Try loading font information for OMS+cmr on input line 82.

(/usr/local/texlive/2018/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info:    Font shape `OMS/cmr/m/n' in size <12> not available
(Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 82.
 [2]
Overfull \hbox (7.28166pt too wide) in paragraph at lines 103--105
[]\OT1/cmr/bx/n/12 MacTeX2018BeamerProblemC.main.tex \OT1/cmr/m/n/12 which con-
tains the source
 []

Overfull \hbox (22.16222pt too wide) in paragraph at lines 105--106
[]\OT1/cmr/bx/n/12 MacTeX2018BeamerProblemC.beamer.tex \OT1/cmr/m/n/12 wich con
-tains the Beamer
 []

[3] [4] (./MacTeX2018BeamerProblemC.article.aux) ) )
Here is how much of TeX's memory you used:
 4380 strings out of 492649
 67434 string characters out of 6129623
 159001 words of memory out of 5000000
 8150 multiletter control sequences out of 15000+600000
 8006 words of font info for 31 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 56i,6n,35p,856b,258s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/local/texlive/2018/te
xmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/local/texlive/2018/tex
mf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/local/texlive/2018/texmf
-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb></usr/local/texlive/2018/texmf-d
ist/fonts/type1/public/amsfonts/cm/cmsy10.pfb>
Output written on MacTeX2018BeamerProblemC.article.pdf (4 pages, 49666 bytes).
PDF statistics:
 33 PDF objects out of 1000 (max. 8388607)
 22 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

My workaround is to revert to MacTeX 2017 where the error does not occur and the output is fine for both Beamer and article versions - however it does look like something has unexpectedly changed between version 3.41 and 3.50 of Beamer - has anyone else observed this behaviour ?

A: Workaround: load the xcolor package before beamer
\documentclass[a4paper,12pt]{article}

\usepackage[x11names,svgnames]{xcolor}
\usepackage[noxcolor]{beamerarticle}

\begin{document}
test
\end{document}

Or don't suppress loading of the xcolor package by beamer in the first place:
\documentclass[a4paper,12pt]{article}

\PassOptionsToPackage{x11names,svgnames}{xcolor}
\usepackage{beamerarticle}

\begin{document}

test

\end{document}

EDIT 4/8/2018
Meanwhile this problem was fixed in the beamer development version, see commit https://github.com/josephwright/beamer/pull/486/commits/28f1a1dfd5b9b105d3d427e5889fe732351a922d
I assume this will be included in beamer versions >=3.51


text:
Q: How to exclude Bootstrap's CSS from encapsulation in Angular? Component imports Bootstrap to reference variables or mixins:
@import "node_modules/bootstrap/scss/bootstrap";

HTML contains custom CSS elements but mostly standard Bootstrap elements:

The view encapsulation generates CSS from Bootstrap classes, and I would like to avoid it:
.h-100[_ngcontent-ukx-c19] {
    height: 100% !important;
}
.row[_ngcontent-ukx-c19] {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1 * var(--bs-gutter-y));
    margin-right: calc(-0.5 * var(--bs-gutter-x));
    margin-left: calc(-0.5 * var(--bs-gutter-x));
}

Is it possible to exclude Bootstrap from View Encapsulation and still be able to import Bootstrap into a component with enabled Encapsulation?
EDIT: Here is used angular.json: https://github.com/maciejmiklas/ng-doom/blob/20230124/angular.json

A: there is a section in angular.json called build->options->styles. styles listed there won't be encapsulated

A: It looks like it cannot be done. Here is a similar problem: Angular2: How to use bootstrap-sass with @extend and mixins in Angular-CLI?
As Eliseo pointed out - I have to remove bootstrap import from my component, which means I cannot use bootstrap imports inside components scss.


text:
Q: run macro from OnEdit google script but only for specific cell I would like a run a macro when a specific cell is changed in a google sheet. I have found very similar scripts but they tend to require a user to enter specific text in a specific cell. In my script, i only want to run a macro when the value changes in E2.
Essentially, its like the default OnEdit, but for 1 cell, not the whole sheet.
I have this so far
function onEdit(e) {
if(e.range.getA1Notation() !== 'E2' || e.value !== '') return;
movetog82()
}

my macro is called 'moveto82'
In e.value, i have left this blank but not sure what to substitue this with for it to capture any cell change.

A: You don't need any e.value comparison at all, just run the contents of the condition if the changed range is 'E2':
function onEdit(e) {
   if(e.range.getA1Notation() == 'E2'){
     movetog82()
  }
}

Any time 'E2' is edited it'll run movetog82(), else nothing will happen.


text:
Q: How to write proc tcl script to use as command line on shell terminal, with added option, and you can also tab this option? I want to write a tcl script, which will have a proc that when I execute the script, I can use the proc as a commandline when on tcsh Terminal, and I can also use option with it, and to also press Tab to display the options or to fill in if it's the only option.
For example, I want it to be able to function like this:
#!/usr/bin/tclsh
proc test {} {}
$ test file1 -option1 true -option2 file2 -Option3 0

*

*And like this: When I write:
$ test file1 -
And then press Tab, I can see:
-option1 -option2 -Option3
And if I continue to press O, the option automically fill in -Option3
Basically I'm trying to write a tcl script that let me use as a command line to use like other command, but with my option and function that I write in the script.

A: This really has nothing to do with tcl, and everything to do with tcsh's complete builtin, which is what's used to define custom completions for specific commands. Example:
% complete ./foo.tcl "C/-o*/( -option1 -option2 -option3)/" "n/-option2/f/"
% ./foo -op<tab>
-option1 -option2 -option3
% ./foo -option<cursor here>
% ./foo -option2 <tab>
<list of files>

See the man page for more details about the builtin.
If you bind the complete-word-fwd and complete-line-back editor commands to some key combinations you can use them to scroll through the possible choices.
So, basically, write a tcsh script that invokes complete to set up your desired completion choices, and source it. You can even create a tcl script that creates the script for your arguments; exact details would depend on what you're using to parse them - tcllib's cmdline package, your custom code, or something else?


text:
Q: Google AppEngine database I've been reading a little about Google's AppEngine that provides application hosting. I've been trying it out as I think it looks quite interesting but I'm a bit concerned about the database part.
Say I'm developing my Java app locally. I don't want to deploy to Google every time I make change to the code, so I setup a nice little Servlet container on my development machine to test things easily. With AppEngine you store things using their datastore API, which basically lets you model your data using Java objects - which is nice.
However, it seems like this data is embedded in the application code itself (inside the .war that is deployed to Google). Can I simply use their datastore api locally? How will it be stored on my local machine? Is this all handled by them so that I just have to worry about using the datastore API and when I deploy it to Google the data will just be stored in a different way than how it's stored on my local machine?
I'm just a little confused because I'm used to having the data part layered out of my application code.
I hope I'm clear enough. Thanks.

A: Development datastore and Production datastore are two different and separated things:
Development datastore is tipically a file based datastore named local_db.bin that it's just useful to store your data in your testing environment; the data is not replicated to the production environment when you deploy your application.
This kind of datastore is meant to be used with a fairly small number of entities and its performance has nothing to do with the powerful Production datastore beast based on Big Table.
All you need to do is to use the Datastore API that creates a level of abstraction between your code and the underlying datastore; in testing your data will be stored in the local datastore file, in production the created data will be saved to the Google App Engine datastore with all the features and limitations that this implies.