text:
Q: matlab2tikz and bar3 function If I use the function hist3() it perfectly works with matlab2tikz. But if I use
the function bar3 I find this in my matrix.tikz:
% This file was created by matlab2tikz v0.2.3.
% Copyright (c) 2008--2012, Nico Schlömer <nico.schloemer@gmail.com>
% All rights reserved.
%
% The latest updates can be retrieved from
%   http://www.mathworks.com/matlabcentral/fileexchange/22022-matlab2tikz
% where you can also make suggestions and rate matlab2tikz.
%
%
%
\begin{tikzpicture}
\pgfplotset{compat=1.6}
\begin{axis}[%
view={-37.5}{30},
width=4.52083333333333in,
height=3.565625in,
scale only axis,
xmin=0.6, xmax=9.4,
xtick={1,2,3,4,5,6,7,8,9},
xmajorgrids,
y dir=reverse,
ymin=0, ymax=10,
ytick={1,2,3,4,5,6,7,8,9},
ymajorgrids,
zmin=0, zmax=1,
zmajorgrids,
axis lines*=left,
unbounded coords=jump,
unbounded coords=jump,
unbounded coords=jump,
unbounded coords=jump,
unbounded coords=jump,
unbounded coords=jump,
unbounded coords=jump,
unbounded coords=jump,
unbounded coords=jump]

\addplot3[%
surf,
colormap/jet,
shader=faceted,
draw=black]
coordinates{
(NaN,(NaN,(NaN,(0.6,0.6,0)(0.6,1.4,0)(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(0.6,1.6,0)(0.6,2.4,0)(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(0.6,2.6,0)(0.6,3.4,0)(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(0.6,3.6,0)(0.6,4.4,0)(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(0.6,4.6,0)(0.6,5.4,0)(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(0.6,5.6,0)(0.6,6.4,0)(NaN,(NaN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0)(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(9.4,3.6,0)(9.4,4.4,0)(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(9.4,4.6,0)(9.4,5.4,0)(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(9.4,5.6,0)(9.4,6.4,0)(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(9.4,6.6,0)(9.4,7.4,0)(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(9.4,7.6,0)(9.4,8.4,0)(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(9.4,8.6,0)(9.4,9.4,0)(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,(NaN,

};
\end{axis}
\end{tikzpicture}%

And I can' t compile it with LaTeX. There is no error, all it says is Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features).
All I initially wanted to do, is to represent a 9x9 Matrix with the help of a histogramm, to see which entrys are high...
I also found this: 3-dimensional histogram in pgfplots where anton explained how to do a Diagramm by yourself, but I don't understand why he uses triple like (NaN, NaN, 0 ) and there is also no nice colering solution...
EDIT: This is how my matlab code looks now (I think C has changed slightly)
function work_for_me_mr_pc()

C=[ 0.8445  0.0398  0.0069  0.0341  0.0199  0.0143  0.0109  0.0196  0.0099
  0.0119  0.8153  0.0041  0.0057  0.0544  0.0086  0.0089  0.0847  0.0065
  0.0852  0.1921  0.1077  0.0875  0.1365  0.2143  0.0102  0.0993  0.0671
  0.0176  0.0135  0.004   0.7776  0.0693  0.0678  0.0203  0.0163  0.0136
  0.0047  0.0129  0.0012  0.0055  0.9565  0.0045  0.0012  0.0135  0.
  0.007   0.0118  0.008   0.0842  0.0572  0.8044  0.0038  0.0132  0.0102
  0.0876  0.0878  0.0151  0.2129  0.1377  0.0905  0.095   0.1883  0.085
  0.0109  0.0963  0.0046  0.0099  0.0867  0.0162  0.0092  0.7528  0.0134
  0.0098  0.0164  0.0059  0.017   0.028   0.0319  0.0078  0.0304  0.8528];

bar3(C)
matlab2tikz( 'matrix.tikz' );

A: See update -2 about plot2svg at the bottom. This is the most suitable method for diagrams as complex as this one.
This is not about a 9x9 matrix, but somewhat bigger than that. OK. After little try, I have this.

How did I generate it?
The actual figure is generated in matlab and the data points came as a result of some long computation. Then I generated the pgf code using matfig2pgf. It converts the figure into low level pgf commands. Unlike matlab2tikz it also inserts a menu item in to the matlab figure window, making the life easier. The generated code is somewhat long, somewhat 18400 lines, (hence, not posting here.) This method involved lot of manual tweekings and quite cumbersome. Also it won't work consistently.

Update:
Here is another alternative using inkscape and inkscape2tikz. First generate the figure in matlab, export it into pdf file. Now import this file into inkscape. In the pdf import settings window, uncheck Embed images:

Now export this into tikz using inkscape2tikz. It will generate the tex code (which again, is long, yuck!).

Here I have tweaked only the line width to be 1pt in the .tex code (which was something like 4pt and 2.667pt earlier).
Update-2
Now using plot2svg
I used bar3(C,0.25,'detached'); in your matlab code to make things less cluttered.
Put plot2svg.m somewhere (mine is - C:\Users\myname\Documents\MATLAB). When the figure window is active in matlab, type plot2svg in command window. A UI will open asking for the save details. Save the figure as .svg. Now open it in inkscape, save it as .tex (tikz) file.

You can also include the svg directly using svg package.
\documentclass{standalone}
\usepackage[clean,pdf]{svg}
\begin{document}
  \includesvg[width=13cm]{work2}
\end{document}

Refer this answer and this answer by speravir for details.


text:
Q: Use external JS to import data from XML I have very much javascript code in my HTML file (1500 lines), and I want to move parts of it to an other js file. I want to make a single file for importing data, and I can find the best way to do it.
This is my gameDataImport.js file:
function gameImport(gameID){
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","../riskmanagment/Data/gameData.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;

var numberOfWorkers;

var x=xmlDoc.getElementsByTagName("game");
for (i=0;i<x.length;i++)
{
    if(x[i].getAttribute('id') == gameID)
    {
        this.gameName = x[i].getElementsByTagName("name")[0].childNodes[0].nodeValue;
        this.numberOfWorkers = x[i].getElementsByTagName("numberOfWorkers")[0].childNodes[0].nodeValue;
        this.numberOfWorkersLeft = numberOfWorkers;
        this.overtimeWorkers = x[i].getElementsByTagName("overtimeWorkers")[0].childNodes[0].nodeValue;
        this.overtimeWorkersLeft = overtimeWorkers;
        this.difficulty = x[i].getElementsByTagName("difficulty")[0].childNodes[0].nodeValue;
        this.budget = x[i].getElementsByTagName("budget")[0].childNodes[0].nodeValue;
        this.gameTargetMinutes = x[i].getElementsByTagName("targetGameTime")[0].childNodes[0].nodeValue;
        this.gameTargetDays = x[i].getElementsByTagName("targetDays")[0].childNodes[0].nodeValue;
        this.gameLanguage = x[i].getElementsByTagName("language")[0].childNodes[0].nodeValue;
        this.projectDescriptionText = x[i].getElementsByTagName("description")[0].childNodes[0].nodeValue;
        this.wage = x[i].getElementsByTagName("wage")[0].childNodes[0].nodeValue;
        this.Owage = x[i].getElementsByTagName("Owage")[0].childNodes[0].nodeValue;
        this.numberOfRisks = x[i].getElementsByTagName("numberOfRisks")[0].childNodes[0].nodeValue;
    }
}

And this how I try to get the data:
in head:
<script type="text/javascript" src="js/gameDataImport.js"></script>

in body, inside script tag:
numberOfWorkers = gameImport(gameID).numberOfWorkers;

but I only get this error:
Uncaught TypeError: Cannot read property 'numberOfWorkers' of undefined
I have not tried more than one variable, but will try that one first.

A: You've forgot a closing curly bracket for the function GameImport

A: I don't know if this could help, but I solved this issue removing type attribute of the script, like this:
<script src="js/gameDataImport.js"></script>

redpajama_set_name: RedPajamaStackExchange


text:
Q: AngularJS $http put raw HTML element in the body test.html

Response from process.php is : {{message}}

process.php
<?php
    $data = "
Hey, how are you...???
";
    echo $data;
?>

Response from process.html is :
Hey, how are you...???

You can see that the output is not as expected. It puts the h1 element in the body. But the output should be an heading.
How can I do this..?? Any suggestions please.
SOLVED

A: Found solution
I have to use $sce with ng-bind-html .
HTML

Controller
$scope.message = response.data;
$scope.messageHtml = $sce.trustAsHtml($scope.message)

A: you can use ng-bind-html like this

A: Check This code :

Response from process.php is :

A: You have to use ng-bind-html directive.
Ref: https://docs.angularjs.org/api/ng/directive/ngBindHtml

Response from process.php is :

A: I have created a directive for just this scenario. You need to have angular-sanitize included in your project.
(function () {
    'use strict';

    angular
        .module('yourModule')
        .filter('to_trusted', ['$sce', function ($sce) {
            return function (text) {
                return $sce.trustAsHtml(text);
            };
        }]);
})();

Then in your HTML, you can write:

{{message | to_trusted}}


text:
Q: async await Task null reference exception I am getting NullReferenceExceptions on a webforms project I'm maintaining.  The catch is that there is no stacktrace for this exception because none of my code causes the exception.

Exception details copied to the clipboard offers zero assistance:
System.NullReferenceException was unhandled
Message: An unhandled exception of type 'System.NullReferenceException' occurred in mscorlib.dll
Additional information: Object reference not set to an instance of an object.
When I view the non-user code stacktrace, I see the following (all in mscorlib):

The error occurs randomly and inconsistently, either by loading pages or by postbacks.  The problem began after I added System.Net.Http.HttpClient for pulling data from REST services exposed on other sites.  Note that HttpClient contains only async methods for sending/receiving data.  Based on the internal stacktrace, I highly suspect the Task<> / async / await as the culprit.
To assist in troubleshooting, let me reaffirm that I'm running this in a WebForms site compiling in .NET 4.6 (and if you're about to tell me my problem is that I need to upgrade to MVC, save your keystrokes and don't say it).  While HttpClient exposes everything as Task<>, I am calling them synchronously by calling:
Task<MyObject> myResultTask = restClient.GetResultAsync();
MyObject myResult = myResultTask.Result; // no await
Thanks in advance!

A: I just had this issue and would like to suggest this as the answer.
In your web.config make sure you have the following:
  <system.Web>
      <httpRuntime targetFramework="4.5" />
  </system.Web>

and
<appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>

See more info here:
https://blogs.msdn.microsoft.com/webdev/2012/11/19/all-about-httpruntime-targetframework/
It seems to just crash randomly if you don't do this. I am a big fan of backwards compatibility but not when it just crashes if you don't opt in to the new way.
(Suggested in comment from Stephen Cleary)


text:
Q: How does 'Servers' view work underlying in Eclipse? 'Servers' is built-in view in Eclipse. We could integrate Java EE server into Eclipse easily. It could start/stop server both in normal and debug modes. Moreover, we could even set timeout and deployment path, things like that. Various types of server tomcat, jboss, websphere are supported, no intrusive to server.
I am just curious about how these cool things happen behind the scene. The complete mechanism is large and complex, so I just want to know general mechanism about it, an article also could be fine for me. Thank you!

A: It's the server-specific plugin which does all the work. When integrating a Server in Eclipse you basically need to instruct the plugin where to find the installation root of the server in question. The plugin in turn knows precisely where to locate the default libraries, how to deploy webapps to the server in question and how to start/stop the server with eventually extra commandline arguments.
Since every server make/version needs a different approach (as different as when you need to do it "manually"), I'll only give a Tomcat 6.0 based example how it roughly works. Doubleclick the server entry in Servers view and check the Server Location section. The field Server Path denotes the root location of configuration files. It's by default in Eclipse metadata (when Use workspace metadata is selected). If you browse further in this folder, you'll find something like tmp0\conf\server.xml. It contains information about where the to-be-deployed webapps are located, which context name it should have and so on. The plugin basically gives this information to Tomcat and it will handle it further.

A: Basically, server adapters are Eclipse plugins and allow to extend the IDE by implementing a set of generic actions (start, debug, stop, deploy, undeploy) that are translated into server specific orders. They also expose server specific configuration parameters. The deployment is more or less intrusive depending on the server (it may be done outside the server folder tree or in a special eclipse folder).


text:
Q: Fill polygon with SVG image pattern I want to fill my polygons in openlayers 3 to make them look like this:

In QGIS I can provide a svg image to create this kind of pattern. How can this be achieved in openlayers 3?
Background / Research so far
I intensively read through the API documentation and found out that the ol.style.Fill class accepts an ol.ColorLike object.
A ol.ColorLike Object again accepts a CanvasRenderingContext2D.fillStyle, which can be an image pattern or a gradient. So I guess it should be technically possible to tweak the openlayers API to achieve a patterned polygon fill.
See these links for further information:

*

*http://openlayers.org/en/latest/apidoc/ol.style.Fill.html

*http://openlayers.org/en/latest/apidoc/ol.colorlike.html

*https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle

*https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createPattern
Putting the Pieces together
This is my code so far and here begins the trouble. I can't find a way to get a working instance of CanvasRenderingContext2D. It always returns with undefined.
var canvas = document.getElementsByClassName('ol-unselectable') // filter <canvas>
var ctx = canvas.getContext("2d");
var img = new Image();
img.src = 'https://mdn.mozillademos.org/files/222/Canvas_createpattern.png';
var colorLike;

img.onload = function() {
      var pattern = CanvasRenderingContext2D.createPattern(img, 'repeat');
      CanvasRenderingContext2D.fillStyle = pattern;
      colorLike = CanvasRenderingContext2D.fillStyle
}

var style = new ol.style.Style({

      fill: new ol.style.Fill({
           color: colorLike // ol.ColorLike object
      })
  })

To see the full code visit: jsfiddle
Is there a way to access the polygon drawing canvas prior initializing it? Or how can I create a correct CanvasRenderingContext2D instance here?

A: ok, sometimes you don't realize that you're almost at the finish line...following SE Question pointed me into the right direction and after adding some lines of code it now works :)
Working Example:
var geojsonObject = 'someGeoJSON'
var source = new ol.source.Vector({
   features: (new ol.format.GeoJSON()).readFeatures(geojsonObject)
  });

var layer = new ol.layer.Vector({
source: source
});

var cnv = document.createElement('canvas');
var ctx = cnv.getContext('2d');
var img = new Image();
img.src = 'https://mdn.mozillademos.org/files/222/Canvas_createpattern.png';
img.onload = function() {
  var pattern = ctx.createPattern(img, 'repeat');
  layer.setStyle(new ol.style.Style({
    fill: new ol.style.Fill({
      color: pattern
    })
  }));
};

Full working example: jsfiddle


text:
Q: How to group_by and calculate percentage using Cypher queries in Neo4j I have 3 nodes created in graph database, origin airport and destination airport and carrier. They are related by a property named 'canceled_by'.
   MATCH (origin:origin_airport {name: row.ORIGIN}),
   (destination:dest_airport {name: row.DEST}),
   (carrier:Carrier {name: row.UNIQUE_CARRIER})
   CREATE (origin)-[:cancelled_by {cancellation: row.count}]->(carrier)
   CREATE (origin)-[:cancelled_by {cancellation: row.count}]->(destination)
   CREATE (origin)-[:operated_by {carrier: row.UNIQUE_CARRIER}]->(carrier)

cancelled_by holds the value number of times particular carrier is cancelled. My input file will be of below format:
ORIGIN  UNIQUE_CARRIER  DEST    Cancelled
 ABE    DL                ATL    1
 ABE    EV                ATL    1
 ABE    EV                DTW    3
 ABE    EV                ORD    3
 ABQ    DL                DFW    2
 ABQ    B6                JFK    2

Here I need to calculate the cancellation percentage of each carrier. I am expecting result as below:
UNIQUE_CARRIER  DEST    Percentage_Cancelled
    DL                   25%
    EV                   58.33%
    B6                   16.66%

Example: Total number of cancellation = 12
No of cancellation for DL = 3
Percentage of cancellation for DL = (3/12)*100 = 25%

Below query gives the sum of cancellation for each carrier:
 MATCH ()-[ca:cancelled_by]->(c:Carrier)
 RETURN c.name  AS Carrier,
 SUM(toFloat(ca.cancellation)) As sum
 ORDER BY sum DESC
 LIMIT 10

I tried the below query for calculating percentage:
  MATCH ()-[ca:cancelled_by]->(c:Carrier)
  WITH SUM(toFloat(ca.cancellation)) As total
  MATCH ()-[ca:cancelled_by]->(c:Carrier)
  RETURN c.name  AS Carrier,
  (toFloat(ca.cancellation)/total)*100 AS percent
  ORDER BY percent DESC
  LIMIT 10

But it is not calculating percentage by grouping and instead calculating the percentage individually.
     Carrier    sum
        DL    0.36862408915559364
        DL    0.34290612944706383
        DL    0.3171881697385341

How to calculate percentage based on group_by using cypher queries in Neo4j?

A: You forgot the summation by every carrier when grouping, and not necessarily always use a cast to float - just when the last calculation multiplied by the floating-point number.
MATCH ()-[ca:cancelled_by]->(:Carrier)
  WITH SUM(ca.cancellation) As total
  MATCH ()-[ca:cancelled_by]->(c:Carrier)
RETURN c.name AS Carrier,
       100.0 * SUM(ca.cancellation) / total AS percent
  ORDER BY percent DESC
  LIMIT 10

A: Hi You could try using the R dplyr package.
Use the chaining operation %>% along with the functions
group_by, summarize and transmute. The group_byand summarize
will give you the sum of cancelled within each group. Use the
transmute function to get relative frequencies.


text:
Q: TestNG Executing Test One Iteration at a time with DataProvider I am using data provider to pass data to each of the test methods. Let's assume there are 2 rows in the data provider.
@Test(dataProvider = "TestData")
public void firstTest(String data){
   //Code
}

@Test(dataProvider = "TestData")
public void secondTest(String data){
   //Code
}

@Test(dataProvider = "TestData")
public void thirdTest(String data){
   //Code
}

Currently all iterations of single test method runs and then the second test method runs... For example:
firstTest()
firstTest()

secondTest()
secondTest()

thirdTest()
thirdTest()

But I want to run in the following order.
firstTest()
secondTest()
thirdTest()

firstTest()
secondTest()
thirdTest()

Below is the xml for TestNG.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">

<suite name="Test-Automation" parallel="methods" thread-count="2" verbose="1">
    <test name="Suite Test" parallel="methods" thread-count="2" verbose="1">
        <listeners>
             <listener class-name="GroupByInstanceEnabler"></listener>
        </listeners>

        <classes>
            <class name="SampleTest">
                <methods>
                    <include name="firstTest"/>
                    <include name="secondTest"/>
                    <include name="thirdTest"/>
                </methods>
            </class>
        </classes>
    </test>
</suite>

The GroupByListener method is defined as below.
import org.testng.ISuite;
import org.testng.ISuiteListener;

public class GroupByInstanceEnabler implements ISuiteListener {

    @Override
    public void onStart(ISuite suite) {
        System.out.println("Hello");
        suite.getXmlSuite().setGroupByInstances(true);
    }

    @Override
    public void onFinish(ISuite suite) {

    }
}

I have checked the below 2 questions and it does not seem to work for me.
TestNG iterate over test data instead of test methods
TestNG - Dataprovider at Class level test annocation
http://fruzenshtein.com/testng-dataprovider-run-tests-sequentially/

A: You should be using a TestNG factory that is powered by a data provider.
Here's a sample that shows you how to use TestNG factories coupled with a data provider.
package com.rationaleemotions.stackoverflow.qn48399410;

import org.testng.annotations.DataProvider;
import org.testng.annotations.Factory;
import org.testng.annotations.Test;

public class SampleTestClass {
    private int iteration;

    @Factory(dataProvider = "dp")
    public SampleTestClass(int iteration) {
        this.iteration = iteration;
    }

    @Test
    public void firstTest() {
        System.err.println("firstTest() running for iteration #" + iteration);
    }

    @Test
    public void secondTest() {
        System.err.println("secondTest() running for iteration #" + iteration);
    }

    @Test
    public void thirdTest() {
        System.err.println("thirdTest() running for iteration #" + iteration);
    }

    @DataProvider(name = "dp")
    public static Object[][] getData() {
        return new Object[][]{
                {1},
                {2},
                {3}
        };
    }
}

And here's the suite xml file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="48399410_Suite" parallel="false" verbose="2">
    <test name="48399410_test" verbose="2" group-by-instances="true">
        <classes>
            <class name="com.rationaleemotions.stackoverflow.qn48399410.SampleTestClass"/>
        </classes>
    </test>
</suite>

The attribute group-by-instances=true would have an effect only when you are working with factories. It would cause TestNG to run all the methods within a test class instance together (which is apt in this case).
Refer to the official TestNG documentation on factories for more information.
Here's the output
...
... TestNG 6.13.1 by Cédric Beust (cedric@beust.com)
...
firstTest() running for iteration #2
secondTest() running for iteration #2

thirdTest() running for iteration #2
firstTest() running for iteration #3
secondTest() running for iteration #3
thirdTest() running for iteration #3
firstTest() running for iteration #1
secondTest() running for iteration #1
thirdTest() running for iteration #1
PASSED: firstTest
PASSED: secondTest
PASSED: thirdTest
PASSED: firstTest
PASSED: secondTest
PASSED: thirdTest
PASSED: firstTest
PASSED: secondTest
PASSED: thirdTest

===============================================
    48399410_test
    Tests run: 9, Failures: 0, Skips: 0
===============================================

===============================================
48399410_Suite
Total tests run: 9, Failures: 0, Skips: 0
===============================================

A: Krishnan Mahadevan , how can i run the iteration for a data provider using an array inside test class.

for Example
@Test (dataProvider="dp")
    public void firstTest() {
        System.err.println("firstTest() running for iteration #" + iteration);
        array of data provider elements ?
    }
is it feasible via dataprovider ?


text:
Q: calculate time difference from 24 hr select boxes I am having some trouble with this jscript function that is returning NaN. I have tried parseInt on inTime and outTime, but neither works for me. I was hoping to get some guidance.
function diffHours (h1,m1,h2,m2,t) {
    var inTime = ((h1 * 60) + m1);
    var outTime =((h2 * 60)+ m2);

    /* Converts total in minutes to "hh:mm" format */
    function toText (m) {
        var minutes = m % 60;
        var hours = Math.floor(m / 60);

        minutes = (minutes < 10 ? '0' : '') + minutes;
        hours = (hours < 10 ? '0' : '') + hours;

        return hours + ':' + minutes;
    }

    h1 = parseInt(inTime, 10);
    h2 = parseInt(outTime, 10);

    var diff = h2 - h1;

    document.getElementById(t).value = toText(diff)
}

I then have 4 select boxes in the document: hour in, minute in, hour out, minute out that execute this function onChange and should output it to a readonly input with the difference in time.
Edit: here's the input
<cfset timeHour = ['','00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23']>
<cfset timeMinute = ['','00','01','02','02','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59']>

<cfselect name="sun_in_hh" id="sun_in_hh" onChange="diffHours('sun_in_hh','sun_in_mm','sun_out_hh','sun_out_mm','sun_total')">
            <cfloop array="#timeHour#" index="h">
                <option value="#h#">#h#</option>
            </cfloop>
        </cfselect>
        <cfselect name="sun_in_mm" id="sun_in_mm">
            <cfloop array="#timeMinute#" index="m">
                <option value="#m#">#m</option>
            </cfloop>
        </cfselect>
<cfselect name="sun_out_hh" id="sun_out_hh" onChange="diffHours('sun_in_hh','sun_in_mm','sun_out_hh','sun_out_mm','sun_total')">
            <cfloop array="#timeHour#" index="h">
                <option value="#h#">#h#</option>
            </cfloop>
        </cfselect>
        <cfselect name="sun_out_mm" id="sun_out_mm">
            <cfloop array="#timeMinute#" index="m">
                <option value="#m#">#m#</option>
            </cfloop>
        </cfselect>
<cfinput type="text" name="sun_total" id="sun_total" size=5>

A: So most probably your case is, as you said they are coming from select boxes
diffHours("22","45","23","15") or

diffHours("2j2","45","23","15")

function diffHours (h1,m1,h2,m2,t) {
    var inTime = ((h1 * 60) + m1*1); // convert the strings to number
    var outTime =((h2 * 60)+ m2*1);  // convert the strings to number

    /* Converts total in minutes to "hh:mm" format */
    function toText (m) {
        var minutes = m % 60;
        var hours = Math.floor(m / 60);

        minutes = (minutes < 10 ? '0' : '') + minutes;
        hours = (hours < 10 ? '0' : '') + hours;

        return hours + ':' + minutes;
    }

    h1 = parseInt(inTime, 10);
    h2 = parseInt(outTime, 10);

    var diff = h2 - h1;

    alert(toText(diff))
}
diffHours(22,45,23,15)
diffHours("22","45","23","15")
diffHours("2j2","45","23","15")


text:
Q: Mac - TFS - Eclipse Error : unable to instantiate class "com.microsoft.tfs.client.common.ui.views.TeamExplorerView Requirement: Install TFS in eclipse
Methods Followed:
Installed software from the following URL http://dl.microsoft.com/eclipse/tfs.
Once the software is installed, Team Explorer opened with following steps.
Clicked on Window -> Show Item ->Team Foundation Server - > Team Explorer
Issue :
Following error message is shown when i tried to open Team Explorer
Plug-in "com.microsoft.tfs.client.common.ui" was unable to instantiate class "com.microsoft.tfs.client.common.ui.views.TeamExplorerView".
Softwares Used:
Eclipse IDE for Eclipse Committers
Version: 2019-12 (4.14.0),
Build id: 20191212-1212
Java version "13.0.1"
Java(TM) SE Runtime Environment (build 13.0.1+9)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing),
OS : MacOS Mojave
Am I missing something? Is it happening to everyone? Does java version matter?

A: This linked helped me to fix the same issue.
https://github.com/microsoft/team-explorer-everywhere/issues/285
Download 14.135.0 from - https://github.com/Microsoft/team-explorer-everywhere/releases

*

*Open Eclipse.

*On the Help menu, click Install New Software.

*The Install dialog box appears.

*Choose the Add button.

*The Add Site dialog box appears.

*For the name, enter "TFS plug-in for Eclipse".

*Under the Locations Click Archive and browse through the TFSEclipsePlugin-UpdateSiteArchive-14.135.0.zip file.

*Install TFS packages.

*Restart

A: According to the reviews on the Eclipse Marketplace Team Explorer Everywhere entry, the plug-in no longer works with current Eclipse versions.
Unfortunately, the current Team Explorer Everywhere version seems to be from 2018. It might be that the plug-in uses internal classes from the Eclipse platform, which would explain why it does not work even though it can be installed. See the error log for details.


text:
Q: ASSEMBLY EMU8086 - My program kind of mess up after getting some inputs? Here is my code to compare one-digit number inputs and print the greatest one
.MODEL SMALL
.DATA
PROMPT DB 10, 13, "Enter your number: $"
MAX_IS DB 10, 13, "Max number is: $"
NUM DB 0
MAX DB 0

.CODE
GET_INPUT PROC NEAR
          LEA DX, PROMPT
          MOV AH, 9
          INT 21H

          MOV AH, 1
          INT 21H

          ; terminates if input is 0
          CMP AL, 30H
          JE TERMINATE

          MOV NUM, AL
          CALL CMP_MAX
          RET
GET_INPUT ENDP

CMP_MAX PROC NEAR
        MOV AL, MAX
        CMP AL, NUM
        JL SET_MAX
        RET
CMP_MAX ENDP
.STARTUP
    MOV AX, @DATA
    MOV DS, AX
    MOV ES, AX

    CALL GET_INPUT

SET_MAX:
    MOV AL, NUM
    MOV MAX, AL
    JMP GET_INPUT

TERMINATE:
    LEA DX, MAX_IS
    MOV AH, 9
    INT 21H

    MOV DL, MAX
    MOV AH, 2
    INT 21H

.EXIT
END

After entering some inputs, the program just went crazy. I read that the disadvantage of using PROC is that it takes the computer a small amount of time to link to the procedure and return
from it. Should I only use one PROC instead?


text:
Q: "Select from where in" translate to mongoose I want to get all the _id's from
collection.posts
where _idUser is inside/equal to _idFollowing from
collection.use
my code is:
app.get("/api_posts_by_friend/:id", function(req,res){
    Post.find()
      .where('_idUser')
      .in(User.find({"_id" : mongoose.Types.ObjectId(req.params.id)}, "_idFollowing").exec())
      .exec(function (err, records) {
       if (err){
            console.log("err:"+err);
        } else {
            console.log("req: "+records);
            res.json(records);
        }
      });
});

A: I found out the solution! Thank you.
New code:
//get all posts by friends from db
app.get("/api_posts_by_friend/:id", function(req,res){
    db.open( function(err,mongoclient){
        mongoclient.collection('users', function(err,collection){
            collection.find(objectId(req.params.id)).toArray(function(err,results){
                if (err){
                    res.json(err);
                } else {
                    mongoclient.close();
                    var friends = results;
                    console.log("results="+results[0]._idFollowing);
                        db.open( function(err,mongoclient){
                        mongoclient.collection('postagem', function(err,collection){
                            collection.find({_idUser: {$in: friends[0]._idFollowing}}).toArray(function(err,results){
                                if (err){
                                    res.json(err);
                                } else {

                                    res.json(results);

                                }
                                mongoclient.close();
                            });
                        });
                    });
                }
            });
        });
    })

;
}


text:
Q: Classifier for biased dataset I have a dataset with two classes and the ratio of the number of instances in two classes is 1:10. I used SVM for classification and obtained a pathetic performance as it classified all the instances in the larger class. Is there a classifier which is shown to perform well in case of biased datasets?

A: One common approach is observation weighting and/or oversampling.
Simple as it seems, a quick and dirty approach is to create duplicate observations until they are balanced, and re-run your classifier of choice.  Alternatively, you can take a sub-sample of the majority class equal to the size of the minority class.  Either approach has issues, but can work well as a quick approach.
For a more general approach, look into the topic area of cost sensitive classification.  The core reason that generic classifiers have difficulty with imbalanced classes is that they have an implicit assumption that each type of classification error/success is weighed equally.
In other words, your SVM likes the useless solution it provided because it assumed that getting most of the 90% right is equally important to getting the 10% right.  There are methods available to augment many classifiers to accept a cost matrix, allowing you to specify some value (usually economic) to associate to each instance of type I, type II errors and successes with an explicit value.
For an overview, consider this
For a paper that constructs an SVM response to these issues see here


text:
Q: Python Qt - do signals need to be created in the worker thread? I am using Python Qt (PySide2) which has a GUI in the main thread and a library that does IO, data-crunching, etc in a second thread.
I use signals & slots to update the GUI. In the examples I have seen on SO, the signal is always created in the worker (non-GUI) thread. Is it necessary to do this?
Reason: my library can be used with a GUI or could be used in another Python script. So, it might output data to the GUI or maybe to console/log file. To make the code in the library generic, I thought that whatever calls the library can register a callback. That callback can be to emit to Qt or output to file, etc.
Here's an example where the Signal is created in the GUI thread. It works, but could it cause thread-related issues?
import threading
import time
import sys
from PySide2.QtWidgets import QWidget, QVBoxLayout, QTextEdit, QPushButton, QApplication
from PySide2 import QtCore

class aio_connection(QtCore.QObject):
    data_recvd = QtCore.Signal(object)

class TextEditDemo(QWidget):
    def __init__(self, parent=None):
        super().__init__(parent)

        self.setWindowTitle("TEST")
        self.resize(600,540)

        self.textEdit = QTextEdit()
        self.btnPress1 = QPushButton("Run")

        layout = QVBoxLayout()
        layout.addWidget(self.textEdit)
        layout.addWidget(self.btnPress1)
        self.setLayout(layout)

        self.btnPress1.clicked.connect(self.btnPress1_Clicked)

        self.aio_conn = aio_connection()    # Signal is created in main (GUI) thread

        # Connect signals (data_recvd) and slots (on_data_ready)
        self.aio_conn.data_recvd.connect(self.on_data_ready)

    def btnPress1_Clicked(self):
        threading.Thread(target=bg_task, args=(self.cb,)).start()

    @QtCore.Slot()
    def on_data_ready(self, msg):
        self.textEdit.append(msg)

    def cb(self, info):
        self.aio_conn.data_recvd.emit(info)

# Simulate the library that runs in a second thread
def bg_task(callback):
    for i in range(100):
        callback(str(i))
        time.sleep(0.1)

def main():
    app = QApplication(sys.argv)
    win = TextEditDemo()
    win.show()

    sys.exit(app.exec_())

if __name__ == "__main__":
    main()

A: By default, signal connections are made using the AutoConnection type. This means the eventual type of connection will be automatically made at runtime, when the signal is actually emitted. If the sender and receiver are in different threads, Qt will use a queued connection, which will post an event to the event-queue of the receiving thread. Thus, when control returns to the receiver, the event will be processed and any connected slots will be called at that time.
This is an important consideration when updating GUI elements from worker threads, because Qt does not support GUI-related operations of any kind outside the main thread. However, so long as you always use signals to communicate between threads using the default connection-type, you should not have any problems - Qt will automatically guarantee they are done in a thread-safe way.
Below is a version of your scripts that verifies everything is working as desired. When I run it, I get the following output, which shows the current thread-id within each function call:
main: 4973
bg_task: 4976
cb: 4976
on_data_ready: 4973
cb: 4976
on_data_ready: 4973
cb: 4976
...

import threading, time, sys
from PySide2.QtWidgets import QWidget, QVBoxLayout, QTextEdit, QPushButton, QApplication
from PySide2 import QtCore

class aio_connection(QtCore.QObject):
    data_recvd = QtCore.Signal(object)

class TextEditDemo(QWidget):
    def __init__(self, parent=None):
        super().__init__(parent)
        self.setWindowTitle("TEST")
        self.resize(600,540)
        self.textEdit = QTextEdit()
        self.btnPress1 = QPushButton("Run")
        layout = QVBoxLayout()
        layout.addWidget(self.textEdit)
        layout.addWidget(self.btnPress1)
        self.setLayout(layout)
        self.btnPress1.clicked.connect(self.btnPress1_Clicked)
        self.aio_conn = aio_connection()
        self.aio_conn.data_recvd.connect(self.on_data_ready)

    def btnPress1_Clicked(self):
        threading.Thread(target=bg_task, args=(self.cb,)).start()

    @QtCore.Slot()
    def on_data_ready(self, msg):
        print('on_data_ready:', threading.get_native_id())
        self.textEdit.append(msg)

    def cb(self, info):
        print('cb:', threading.get_native_id())
        self.aio_conn.data_recvd.emit(info)

def bg_task(callback):
    print('bg_task:', threading.get_native_id())
    for i in range(5):
        callback(str(i))
        time.sleep(0.1)

def main():
    print('main:', threading.get_native_id())
    app = QApplication(sys.argv)
    win = TextEditDemo()
    win.show()
    sys.exit(app.exec_())

if __name__ == "__main__":
    main()


text:
Q: Java JLabel, break text to next line? It's been awhile since I asked a question!
I'm developing an application in Java where JLabels are used. Anyway, as you may or may not be able to see from the picture below, the text that says Category Test gets cut off and ends up saying Categor... instead. Is there any way that I can "break" the text once it fills up the width of the label? Here is the image:

What I did
I used a JTextPane like so:
    JTextPane text = new JTextPane();
    SimpleAttributeSet attr = new SimpleAttributeSet();

    StyleConstants.setAlignment(attr, StyleConstants.ALIGN_CENTER);

    pane.add(text, c);

Then I added my text, but thanks anyway!

A: As I recall, you need to use a JTextArea if you want textwrap.  JLabel doesn't do it.

A: JLabels can't do that by default. But JLabels have some support for html, so a JLabel with the text First Line
Second Line would show up on two lines.
If you want a component that can split the lines by itself, take a look at JTextArea.

A: You can at StyledLabel component from JIDE Common Layer open source project at http://java.net/projects/jide-oss/.
The problem with html JLabel approach is it doesn't auto-wrap and about 20 to 40 times slower than a plain JLabel.
The problem with JTextArea or JTextPane approach is it has a weird size issue and is also 20 times slower.
StyledLabel extends JLabel. Automatically line wrapping is just one of the many features it adds. And the performance is as fast as a plain JLabel.
Hope it will help.


text:
Q: How to define foreign key relationship in EF Core 2.1 I am using EF Core 2.1 for my DAL. This is how my model looks like
One user can have only one role:
// Role entity - kind of master
public class Role
{
    public int RoleId { get; set; }

    public string RoleName { get; set; }
}

// User entity - every user will have one role
public class User
{
    public int UserId { get; set; }

    public string Email { get; set; }
    public string Password { get; set; }

    public int RoleId { get; set; }
    public bool IsActive { get; set; }
    public DateTime CreatedOn { get; set; }

    public virtual Role Role { get; set; }
}

This is how I was thinking/tried to define the relationship between these two entities:
public void Configure(EntityTypeBuilder<User> builder)
{
    builder.HasKey(x => x.UserId);
    builder.Property(x => x.RoleId).IsRequired(true);
    builder.Property(x => x.CreatedOn).IsRequired(true).HasDefaultValue(DateTime.Now);

    // FK - throwing compile time error
    builder.HasOne(x => x.Role).WithOne(y => y.RoleId);
}

How do I define this one user one role relation using EF Fluent API?
Thanks.
Attachment:-

A: Not only in the FK relationship configuration, you also have problem in the default value generation configuration for the CreatedOn column. So write your Entity Configuration as follows:
public void Configure(EntityTypeBuilder<User> builder)
{
    builder.HasKey(u => u.UserId);
    builder.Property(u => u.CreatedOn).IsRequired(true).HasDefaultValueSql("getdate()");

    // FK - configuraiton
    builder.HasOne(u => u.Role).WithMany().HasForeignKey(u => u.RoleId).IsRequired(true);
}

A: One of the tenets Entity framework is built on is "Convention over configuration" and by convention, I don't think builder.HasOne(x => x.Role).WithOne(y => y.RoleId); is necessary as by convention you already stated that your User entity should have just one role when you added public int RoleId { get; set; } and public virtual Role Role { get; set; } properties.
Remove that and I am certain your application will yield just that behaviour as stated in my comment above.

A: I think you can add Users to Role like this
public class Role
{
    public int RoleId { get; set; }

    public string RoleName { get; set; }
    public List<User> Users {get;set;}
}

Then you will register like this
public void Configure(EntityTypeBuilder<User> builder)
{
    builder.HasKey(x => x.UserId);
    builder.Property(x => x.RoleId).IsRequired(true);
    builder.Property(x => x.CreatedOn).IsRequired(true).HasDefaultValue(DateTime.Now);

    builder.HasOne(x => x.Role).WithMany(y => y.Users);
}


text:
Q: Jensen's Integral Inequality in Two Dimensions. There is a similar question on MSE but I don't think this is a duplicate, as my question is not addressed there.
Suppose $\varphi:\mathbb R^2\to \mathbb R$ is convex. Then, assuming the integrals exist, it seems reasonable that the following would be true:
$$\int^1_0 \varphi ((f(t),g(t))dt \ge \varphi\left ( \int^1_0 f(t)dt,\int^1_0g(t)dt \right )$$.
Let $\alpha= \int^1_0 f(t)dt$ and $\beta= \int^1_0 g(t)dt.$ Then $h(x,y)=x-\alpha+y-\beta+\varphi (\alpha,\beta)$ is a supporting plane so $\varphi ((f(t),g(t))\ge f(t)-\alpha+g(t)-\beta+\varphi (\alpha,\beta)$ and then integration across the inequality gives the result.
My question is how to show formally that $h$ is indeed a supporting plane. Is it enough to observe that the slope $m_u,$ of the line on the plane through the point $(\alpha, \beta)$ in the direction of a vector $u,$ lies between the left- and right directional derivative, $D\varphi_u((\alpha,\beta)^-)$ and $D\varphi_u((\alpha,\beta)^+); $  that is, $D\varphi_u((\alpha,\beta)^-)\le m_u\le D\varphi_u((\alpha,\beta)^+)?$

A: Let  the probability measure $\mu$  on $\mathbb R^2$ be the image of Lebesgue measure on $[0,1]$ induced by the map $t\mapsto (f(t),g(t))$, so $\mu(A)=\lambda(\{t: (f(t),g(t))\in A\}).$  Then the barycenter of $\mu$ is $\left( \int_0^1 f, \int_0^1 g\right)=\int z\, \mu(dz)$ and the ordinary Jensen's inequality gives $$
\int \varphi(z)\,\mu(dz) \ge \varphi\left ( \int z\, \mu(dz)\right).\tag{*}$$
But the left hand side is $\int_0^1\varphi(f(t),g(t))\,dt$, so the desired result holds.
Here by ordinary Jensen's inequality I mean the finite dimensional vector version of what the Wikipedia article call the "general inequality in a probabilistic setting". Here, one has a probability measure $\mu$ on a finite dimensional vector space $T$ supported in a closed convex set $C\subset T$ for which the vectorial expectation (aka center of gravity or barycenter) $\beta=\int z \mu(dz)$ exists.  One observes that $\beta\in C$, at least when $T$ is finite dimensional. (This is the delicate point in the theory, and requires a Pettis integral formulation in infinite dimensional cases. Clearly $\beta\in H$ for each closed half-space containing $C$, and hence in the intersection of all such $H$.)  If $\varphi$ is convex on $C$, the inequality (*) displayed above holds.  Here convex means that for all $x_1, x_2\in C$ and all $t\in[0,1]$, one has $$\varphi(tx_1+(1-t)x_2)\le t\varphi(x_1)+(1-t)\varphi(x_2).$$
One way to see this form of Jensen's inequality is to note that the epigraph  $$E_\varphi=\{(x,y):x\in C, y\ge\varphi(x)\}\subset T\times\mathbb R$$ is convex.  To see this, suppose $v_i=(x_i,y_i)\in E_\varphi$, for $i=0,1$, and $t\in[0,1]$.  We have $y_i\ge \phi(x_i)$, so $t y_1+(1-t)y_2\ge t \varphi(x_1) + (1-t)\varphi(x_2)\ge \varphi(tx_1+(1-t)x_2)$ where the first inequality is trivial and the second follows from convexity of $\varphi$. But this already implies  $tv_1+(1-t)v_2 \in E_\varphi,$   verifying the convexity of $E_\varphi.$ Finally, note that (*) follows from  $\gamma=\int_C (z,\varphi(z))\mu(dz)\in E_\varphi$. This last holds because $\gamma$ is the barycenter of the probability measure $\nu$ on $E_\varphi$ that is the image of $\mu$ under the map $z\mapsto (z,\varphi(z))$.


text:
Q: How to generate range with MIN MAX using Array.from Using  Array.from , I can create range from 0 to N-1 as following :

var N=6;
log( Array.from({length:N},(v,k)=>k) )
<script>var log=(m)=>console.log(m)</script>

This generate [0,1,2,...,N-1]
My question is how to generate a range with Min & Max bounds in general using Array.from not something elese (Not restrict to 0 as 1st element of range ) ?

A: It is possible By  identifying  the length of range :  MAX-MIN+1 AND identifying the first element of this range  : k+MIN .
Then :

var MIN=18,MAX=23 //--> [18,19,20,21,22,23] EXPECTED
console.log(
    Array.from({length:MAX-MIN+1},(v,k)=>k+MIN)
  )


text:
Q: directive with multiple behaviors depending on attribute or passed value from DOM I am writing a directive, and I would like this directive to behave differently based on a value I pass to it, this value would be static. Ideally I would like to pass the value via an attribute in the DOM, like <div my-directive directive-value="value"> or even better <div my-directive="directive-value"> I know I could just add an attribute and check if it exists in the attr object in the link function, but is there a better way, what is the best practice here?
Here is my code:
layout.directive('columnDirective', function() {
return {
    require: 'ngModel',
    // scope: {
    //  directive_type: '=test'
    // },
    link: function (scope, el, attrs, ngModel) {
        if (!ngModel) return;

        ngModel.$parsers.unshift(function (viewValue) {

            var columns = scope.row.columns;

            var column_total_before = 0;
            angular.forEach(columns, function(column) {
                var column_size = parseInt(column.size);
                column_total_before = column_total_before + column_size;
            });

            if(attrs.typeOf != "add") {
                //Remove current (prior to edit) value from total
                column_total_before = column_total_before - ngModel.$modelValue;
                var default_value = 1;
            } else {
                if (column_total_before == 12) {
                    var default_value = 0;
                }
                else {
                    var default_value = (12 - column_total_before);
                }
            }

            //Convert string to integer
            viewValue = parseInt(viewValue);

            //Add total existing columns with new value
            column_total = column_total_before + viewValue;
            scope.column_total = column_total;

            if(column_total >= 1 && column_total <= 12 && viewValue > 0) {
                return viewValue;
            } else if (isNaN(viewValue)) {
                ngModel.$setViewValue(default_value);
                return default_value;
            } else if (column_total_before == 12 && viewValue == 0) {
                return viewValue;
            } else {
                ngModel.$setViewValue(default_value);
                ngModel.$render();
                return default_value;
            }

        });
    }
}
});

Currently using attrs.typeOf , in my html  this works fine,but I don't know if it's best practice?


text:
Q: Textarea overlaid on div - Alignment issues on iOS 8 On iOS 8, I'm overlaying a div with a textarea, with the same text and resetting every margin/padding values, but there's still an offset of 3px that I can't get rid of. It works great on Chrome and Safari desktop.
Here's a fiddle: http://jsfiddle.net/jfvz0ved/
textarea, div {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 1.1em;
    line-height: 1.6em;
    font-family: Courrier;
    border: 0;
    outline: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    display: block;
    text-align: left;
    resize: none;
    width: 100%;
    color: black;
    opacity: 0.4;
}

Any idea what property could cause this issue? I don't want to resort to a browser detection + special class if possible.

A: What happens when you apply a universal CSS reset?
If that fixes the problem, then one of the containing elements might need to be reset.

A: After quite a bit of research, it turns out iOS is adding a 3px padding and it can't (apparently) be removed. So the best way to go about it is to compensate for it. I've added a left: 3px on the div when iOS is detected. It's not ideal (I'd have loved to avoid that and have a CSS only solution), but it works.


text:
Q: Initializers in React.js? I am using react 0.13.1 in a rails 4.2.1 application with react-rails and browserify-rails.  I am not doing a single page application, but instead adding react components on rendered pages and using the rails routing system.
When I load a page, I want to initialize a few things, but I'm not sure where this code should go.  Does react have a initializer function that it always calls before rendering components or does it always render the first component first such that I can just add initializer code to the first component?
How would I go about putting react initializer code in my multi page rails application? (should work for client or server rendered react code)
Note: Assume only react and plain javascript is being used.
Edit: not asking about initializing on each component, but rather initializing code after page load, but before react starts going through and rendering any components.

A: The entry point to initialize React is the call to React.render(), so you should perform any initialization before that call. If the initialization is async, just call React.render() in the callback.
And there's also the componentWillMount method on every component which can be used for component specific initialization.

A: Yeah it's all there in React's documentation.  Each component has a getInitialState which is called when the object is first requested, you then have oncompentdidmount and another for when the component is dismounted.   It's all JavaScript code so initialization code can be done inside each component or just declared globally before or after the React code is executed.
I have a similar setup with Django, where I use Django for it's strengths.  Routing, Sessions, Authentication, Rest API ect... and have Django render a bar bones template which loads the React UI.   This process seems to work really well, it's greatly sped up my site from where it was before, and the UI is awesome.
So in one particular case with my django app I need certain data to be initialized before the React components try to render themselves.  therefore I wrap the initialization code into a function which is called on page load, then as a callback after that function has completed I call another function that actually add's my react components to the page.  From there each component has it's own initialization which you've said you're not interested in at the moment, but that is how I handled the situation.


text:
Q: PHP get value from url and pass it to text field Hi I am a jsf programmer and want to integrate a documents repositary developed using php in my jsf application. So what i am doing is when the user clicks a link from my jsf screen it gets a value for the link pass it to the php url and opens a page where the user can add docs.
I am getting the value from url and displaying it in the page. But what i want is instead of user entering the *number field(please look at the screen shot)  the value from URL should pass automatically to the database as number and the number field should be removed . Please look at screen shots.

and the code snippets
*Number
$cellvalue = "";
if ((!isset($_GET["add_fd9"])) && (!isset($_POST["add_fd9"]))) {
$itemvalue = "";
} else {
$itemvalue = qsrequest($_GET["add_fd9");

then
fieldPrompts[_No] = "*Number";
pgitm_No= document.getElementsByName("add_fd9")[0];
I dont understand where to pass the url value

A: Try it :
$cellvalue = "";
if (!isset($_REQUEST["add_fd9"])) {
$itemvalue = "";
} else {
$itemvalue = qsrequest($_REQUEST["add_fd9"]);
}

A: Use
    $_REQUEST
as
<input type="text" name="text1" value="<?php echo isset($_REQUEST['add_fd9'])?$_REQUEST['add_fd9']:'';?>">


text:
Q: Fewest applications of associativity By repeatedly applying the basic associativity law $(x+y)+z = x+(y+z)$, one can get from any one expression with binary addition to any other with the variables in the same order.
Specifically, given two expressions only involving binary addition that are related by the general principle of associativity, one can brute force get both into fully-left-associated form: $$(\ldots((a+b)+c)+d)+\ldots)+z$$ by applying $$x+(y+z) \rightarrow (x+y)+z$$ everywhere possible in a brute force fashion.
Thus one can get from one expression to the other by first applying $$x+(y+z) \rightarrow (x+y)+z$$ to get to the fully-left-associated form and then applying
$$(x+y)+z \rightarrow x+(y+z)$$ to get back to the other expression.
But this is clearly not the most optimal route in some cases. Is anything known about the optimal route? That is, given two expressions in a binary operation related by general associativity, what is the fewest number of applications of the associativity law to get from one to the other?


text:
Q: Can I use ES Modules library from CDN? I want to use this library via CDN.
https://www.jsdelivr.com/package/npm/lit-element
My js code is here.
import { LitElement, html } from "https://cdn.jsdelivr.net/npm/lit-element@2.1.0/lit-element.js";

class MyElement extends LitElement {
    render(){
        return html`ABCD`
    }
}

customElements.define("my-element", MyElement)

I get following error.

Uncaught TypeError: Failed to resolve module specifier "lit-html". Relative references must start with either "/", "./", or "../".

Do I have to build using npm ?

Update
Following code works.
import { LitElement, html } from "https://unpkg.com/lit-element/lit-element.js?module"

class MyElement extends LitElement {
    render(){
        return html`ABCD`
    }
}

customElements.define("my-element", MyElement)

A: Inside LitHtml and LitElement modules use bare module specifiers internally to import dependencies, and these aren't supported by JS modules yet. LitElement has import { TemplateResult } from 'lit-html', but JS needs that 'lit-html' replaced with whatever path to the actual file (not the abstract name of the package).
If you use the npm packages (which cdn.jsdelivr.net is serving up here) you have to use a build step (WebPack, Rollup, etc) to resolve all those import statements to either the file paths JS supports or inline all the files together.
The former is what unpkg.com ... ?module does, it replaces the bare reference to lit-html with the absolute https://unpkg.com/lit-html@^1.1.1/lit-html.js?module.

A: The accepted answer is great; the core issue is your CDN file(s) use a "module specifier" that is the "bare" specifier (i.e. not using "/" or "./" or "../") . I fixed my issue with an importmap, mapping my "bare" module specifier, to a full URL/baseURL  specifier, i.e.
<script type="importmap">
   { "imports": { 'bare-specificer': 'https://full-url-specifier' } }
</script>

DETAIL ON CURRENT APPROACH: importmap
I was  using jsm three.js modules like ColladaLoader, but I got this error:
Uncaught TypeError: Failed to resolve module specifier "three". Relative references must start with either "/", "./", or "../"
This happens because I import this ColladaLoader.js file, which imports many things from 'three' (a "bare module specifier"):
import {
    AmbientLight,
    // ...etc....
    sRGBEncoding
} from 'three';
//--------^ this is the "bare" module specifier problem

I learned the fix from reading the collada loader example from three.js, which adds an importmap to its html. I think importmap is still a draft feature but it works well to map a "bare module specifier" to a full URL /baseURL-- just what we need! (more here and here):
<script type="importmap">
    {
        "imports": {
            "three": "../build/three.module.js"
        }
    }
</script>
<script type="module">
        //...
</script>

In my case I am using the three.js file located here:
https://cdnjs.cloudflare.com/ajax/libs/three.js/r123/three.module.js
Therefore my importmap looks like this:
<script type="importmap">
    {
        "imports": {
            "three": "https://cdnjs.cloudflare.com/ajax/libs/three.js/r123/three.module.js"
        }
    }
</script>
<script type="module">
        //...
</script>

I expect an importmap can work for you even if you have a "bare" module specifier from somewhere other than three.js; but the importmap approach  may only work in certain browsers (i.e. caniuse suggests Edge 89+, Chrome 89+, and Opera 76+ support type="importmap" as of 5/4/2022)
DETAIL ON ALTERNATIVE APPROACH: skypack
THE BELOW ANSWER DEPENDS ON skypack hosting up-to-date modules; i.e. the latest ColladaLoader should use BufferGeometry instead of Geometry which was deprecated with the change in r125, but the latest ColladaLoader was not available on skypack AFAIK
I'm providing this answer to suggest skypack as an alternative to your CDN, which works especially in the context of three.js, (apparently even unpkg might not work; read on)
The solution is discussed in this github issue, which references this migration guide

NPM: ES6 modules in examples/jsm now import using the bare specifier
three. This change breaks working with modules in cdns such as
https://www.jsdelivr.com/ and https://unpkg.com/. Please use
https://www.skypack.dev/ instead.

So in my case I replaced this line:
import { ColladaLoader } from 'https://cdn.jsdelivr.net/gh/mrdoob/three.js/examples/jsm/loaders/ColladaLoader.js';

with this line:
import ColladaLoader from 'https://cdn.skypack.dev/three-collada-loader';

This fixed the error re "Failed to resolve module specifier". But I did face a different issue, but that's three.js specific; i.e. using the deprecated Geometry constructor, because I guess the skypack.dev/three-collada-loader is not the latest code...


text:
Q: Minimum clustering of API Manager with Internal Store I am trying to set up a clustered environment for WSO2 API Manager. In the environment I need there is no need for an external store. I looking to start with the least amount of nodes and JVMs that yet is scalable with growing number of API requests.
Having looked at the WSO2 documentation
Clustering WSO2 API Manager and specifically the "Store and Publisher components in a single server node" model.
Some questions on this deployment model
Where is the Gateway Manager deployed?
I understand the publisher and store are on the same server node. Can they be run in the same JVM? If so would you use the default profile that also starts up KM and Gateway or soemthing else?
(Appologies but I can't post the image due to my low reputation value. I would have thought the image of the model would have helped)

A: Yes - API Store and Publisher will be running in the same JVM. As there is no profile for Store & Publisher (see [1] for available profiles), we need to start API Manager in the default profile. And yes it will start KM & Gateway components as well. But you can block (not expose) gateway ports. And regarding gateway manager, I guess one gateway node can act as both manager and worker in this deployment pattern.
[1] https://docs.wso2.com/display/AM180/Product+Profiles

A: As per the design publisher is a subset of store. So, If you start with profile api-store you will eventually get publisher as well. In this case you can start the server with following option.
-Dprofile=api-store


text:
Q: Segmentation Fault when accessing second element in obj vector using pointer please take a look at this code:
#include <vector>
#include <iostream>
#include <string>
using namespace std;

class A
{
    private:
        string contentA;

    public:
        A(){ contentA = ""; };
        A( string setContent ){ contentA = setContent; };
        virtual string printContent(){ return contentA; };
};

class B: public A
{
    private:
        string contentB;

    public:
        B( string setContent ){ contentB = setContent; };
        virtual string printContent(){ return contentB; };
};

int main()
{

    vector<A*> aPointer;
    vector<B> bVector;

    B b1("b1");
    //store b1 obj in bVector
    bVector.push_back( b1 );
    //store the current(last) obj address to aPointer for access later
    aPointer.push_back( &bVector.back() );

//    B b2("b2");
//    bVector.push_back( b2 );
//    aPointer.push_back( &bVector.back() );

    for( vector<A*>::iterator it = aPointer.begin(); it != aPointer.end(); it++ )
    {
        cout << (*it)->printContent() << endl;
    }
}

aPointer will store pointer to the element of B vector.
May i ask why does it has a segmentation fault when i access the 2nd element in my B vector in the for loop?
I've hex in and it will work fine again.

A: You have to remember that a std::vector is of variable size. When you add an element to a vector, it might have to reallocate the data, so any pointer to the vector will be invalid after such a reallocation.
What happens here is probably such a reallocation, so one pointer will be invalid and dereferencing it will be undefined behavior and in your case cause a crash.

A: The problem is not when you're accessing the second element of aPointer: it's when you access the first. As you'll see, this problem is caused when std::vector grows/resizes and reallocates memory. When it does this, references (pointers, iterators and & references) are invalidated, meaning it causes undefined behavior when you access those invalidated references (the effect, in your case, is a segmentation fault).
Let us see what's really causing the problem:
B b1("b1");
bVector.push_back( b1 );
aPointer.push_back( &bVector.back() );

B b2("b2");
bVector.push_back( b2 );
aPointer.push_back( &bVector.back() );

Oooh! You are pushing back two elements, whose addresses are stored at the time they are added. The problem is in there. When you do your second push_back, it causes reallocation and resizing, thus invalidating references to existing elements inside bVector. And you have an existing element inside that vector and an already invalidated reference to it! That reference is currently the first element of aPointer and it points to a memory location you're not suppose to point and access.
Thus, when you do your iteration, you access the first element of aPointer, and thus causing a segmentation fault.
To solve your problem, don't store a vector of pointers to corresponding elements of another vector! You could just pass the whole vector around (preferably by reference, so that we'll not incur the cost of copying) and do operations directly on the elements themselves. This will surely save you an hour of headache and will result in better, shorter code.

A: As both Joachim Pileborg and Mark Garcia have mentioned, it's a problem with the vector container reallocating memory.
To resolve this, you can use the vector.reserve method to pre-allocate memory for your vectors. While this will work for your situation here, it's just a band-aid and should not be taken as the way to fix this. EDIT: I want to emphasize that I've posted this only because it could be of interest. Joachim and Mark provide proper methods to address the root issue.
int main()
{

    vector<A*> aPointer;
    vector<B> bVector;

    //reserve some space. There's no special meaning to choosing 16.
    aPointer.reserve(16);
    bVector.reserve(16);

    B b1("b1");
    bVector.push_back( b1 );
    aPointer.push_back( &bVector.back() );

    B b2("b2");
    bVector.push_back( b2 );
    aPointer.push_back( &bVector.back() );

    for( vector<A*>::iterator it = aPointer.begin(); it != aPointer.end(); it++ )
    {
        cout << (*it)->printContent() << endl;
    }
}


text:
Q: Disable page transitions in Ionic 2 RC.0 How to disable transitions for all pages in ionic 2 ?

ionic 2 NavController allows you to do it on a specific view like so

nextPage() {
  this.navCtrl.push(HomePage, {}, {animate: false})
}

but how can I disable all transitions for all pages globally?

A: To disable animation for all your navigation go to your app.module.ts file and add to the config animate:false
Like so:
    IonicModule.forRoot(App, { animate: false })


text:
Q: Imaged disc copy won't log in to windows I am in the process of upgrading a laptop from a hard disc to SSD.  I have imaged the discs via a SATA dock on another PC so they should in theory be identical.
Unfortunately, when I've put in the SSD, it boots up as far as the windows login screen, and accepts the password.  But then it says 'Logging off' and throws me back to the login screen.
I'm a bit stuck now.  The old hard disc works fine (I'm using the laptop with HDD now) but with the SSD, it won't get past the login screen, even in safe mode.  I've tried recovering from the Windows XP CD, and manually expanded the CD copies of the userinit.exe and winlogon.exe but no change in behaviour.
Any other ideas on what to try?
Update - it seemed a borked image was the most likely cause, but I have just finished taking a new image from the HDD, and copying it back onto the SSD, but the new image behaves identically to the last.

A: Delete the \DosDevices\C: key prior to cloning.

*

*Navigate to HKEY_LOCAL_MACHINE\SYSTEM\Mounted Devices

*Search the list for \DosDevices\

*Delete the \DosDevices\C: key value

link ...

A: Is this a legal copy of Windows?
I have only seen this behaviour on cracked copies - a hardware change has probably caused reactivation to be needed and the activation components are corrupt which is causing Windows to log off straight away.
If this is not a dodgy copy of Windows, I apologise to you!

A: The problem lies in the way XP's registry keeps track of what volumes get what drive allocation, stored in the System registry at
HKEY_LOCAL_MACHINE\SYSTEM\Mounted Devices.
There are a bunch of keys that look like \DosDevices{Drive letter}:, and they store a binary value represented by 24 HEX characters, which stores mounting location and LBA location for each partition. The problem is that this information was relevant for when I booted from the master image partition, but no longer relevant for the clone on the target partition. In other words, the logging in couldn't proceed because the computer couldn't find C:\
I think it's a good idea to delete the \DosDevices\C: key prior to cloning. XP should figure it out retrospectively.
But presumably you're reading this now because you didn't do this. so what you have to do is edit the SYSTEM HIVE on the new target partition remotely from another installation of XP:
Firstly, you need an alternative installation of XP to boot from that can directly access the partition that you're trying to boot into (such as the master image partition). You could use UBCD4Win. Once this is done:
Then, you can discover the correct HEX code for this partition:

*

*Open diskmgmt.msc and make a note of the drive letter allocation of the target partition. (it won't be C:)

*Start REGEDT32

*Navigate to HKEY_LOCAL_MACHINE\SYSTEM\Mounted Devices

*Search the list for \DosDevices{The current drive letter allocation}: and make a note of the 24 HEX characters with pen and paper.
Now you can mount the SYSTEM HIVE from the target partition and correct the HEX code:

*

*Select the HKEY_LOCAL_MACHINE key in the left hand pane in Regedit.

*In the File menu select "Registry" -> "Load Hive"

*Select the wanted registry database file: {The current drive letter
allocation}:\%windir%\system32\config\system

*When prompted for a name, call it SYSTEM-TARGET. The name will be used to create a new node in the tree so one can browse the offline registry.

*Navigate to HKEY_LOCAL_MACHINE\SYSTEM-TARGET\Mounted Devices

*Compare the \DosDevices\C: key value to the HEX code you wrote down. If they are different, search through the list of drive letter allocations for the 24 digit HEX code that you wrote down - it will probably be recorded against an alternative drive letter mounting - the cause of the problem. If this is the case:

*Rename the \DosDevices\C: key to something else, an unallocated drive letter perhaps.

*Rename the key with the correct HEX code to \DosDevices\C: (You could swap the key names)
(The changes are written immediately to the offline registry database).

*When finished editing select SYSTEM-TARGET and in the File menu select "Registry" -> "Unload Hive"
Now you should be able to reboot from the partition and login.
Source: http://www.computing.net/answers/windows-xp/windows-xp-logs-off-immediately-after-clone/189450.html


text:
Q: Is "get something straight for" an idiom?
He really needed to get his accent straight for, although in Europe he was considered something of a prodigy in Persian, South Asians found Jones impossible to understand when he spoke to them in that language, taking it to be English. (source)

Is the phrase "get something straight for" idiomatic? I have heard, very often, "get something straight". What does "get something straight for" mean?

A: "For" is being used to mean "because".
Simplified:

He really needed to get his accent straight, for South Asians found Jones impossible to understand.


text:
Q: Let $X_i$ be i.i.d discrete random variables and $M = max_i(X_i)$. Find $\mathbb{P}(M = m)$ A known approach for a similar problem, $\mathbb{P}(M \le m)$, can be formulated as
\begin{eqnarray}
\mathbb{P}(M \le m) = \prod_{i}\mathbb{P}(X_i \le m)
\end{eqnarray}
However, by dealing with a specific value, there can be multiple ways of achieving the desired outcome. For instance, let $i = \{{ 1, 2\}}$:
\begin{eqnarray}
\mathbb{P}(M = m) = \mathbb{P}(X_1 = m;\; X_2 < m) \; \cup \;\mathbb{P}(X_1 < m;\; X_2 = m)\; \cup \;\mathbb{P}(X_1 = m;\; X_2 = m)
\end{eqnarray}
In order to overcome the necessity of counting for all the possible combinations, I thought about considering the 'range approach', as
\begin{eqnarray}
\mathbb{P}(M = m) &=& 1 - \mathbb{P}(M < m) - \mathbb{P}(M > m) \\
&=& 1 - \prod_{i}\mathbb{P}(X_i < m) - \prod_{i}\mathbb{P}(X_i > m)
\end{eqnarray}
I was wondering if there is any mistake in this approach to tackle the original problem. If not, what would be other options?
Thanks in advance!

A: Your first equality is correct. However:
\begin{eqnarray}
\mathbb{P}(M = m) &=& 1 - \mathbb{P}(M < m) - \mathbb{P}(M > m) \\
&=& 1 - \prod_{i}\mathbb{P}(X_i < m) - (1-\prod_{i}\mathbb{P}(X_i \leq m))\\
&=&\prod_{i}\mathbb{P}(X_i \leq m))-\prod_{i}\mathbb{P}(X_i < m).
\end{eqnarray}
Otherwise you can use this approach.


text:
Q: Input buttons style conflict with JavaScript code I have a problem with the code below. I want to change the style size of the input buttons (white, blue and yellow....located at the bottom) without effecting the result of the code.

*

*The code compares table one's cells colors to the other tables and is supposed to display an alert when there is a match.

*You can change the color of table one's cells by selecting one of the bottom buttons (white, blue or yellow). Please help...

// JavaScript Document
jQuery(function () {
 var brush = "white_block";
 jQuery('input.block').on('click', function () {
  brush = jQuery(this).data('brush');
 });

 function cellCheck() {
  $one = $("#one").html().replace(/\s/g, '');
  $two = $("#two").html().replace(/\s/g, '');
  $three = $("#three").html().replace(/\s/g, '');
  $four = $("#four").html().replace(/\s/g, '');
  $five = $("#five").html().replace(/\s/g, '');

  if ($one === $two) {
   alert("match with two");
  }
  if ($one === $three) {
   alert("match with three");
  }
  if ($one === $four) {
   alert("match with four");
  }
  if ($one === $five) {
   alert("match with five");
  }
 }
 jQuery('td').on('click', function () {
  jQuery(this).removeClass('white_block blue_block yellow_block').addClass(brush);
  cellCheck();
 });
});
.block {
 border: thin solid #000000;
 width: 59px;
 height: 57px;
 box-shadow: 1px 1px 0px #d9d9d9,  2px 2px 0px #d9d9d9,  3px 3px 0px #d9d9d9,  4px 4px 0px #d9d9d9,  5px 5px 0px #d9d9d9,  6px 6px 0px #d9d9d9;
}
.button {
 border: thin solid #000000;
 width: 49px;
 height: 47px;
}
.white_block {
 background-color: #FFFFFF;
}
.blue_block {
 background-color: #0066cc;
}
.green_block {
 background-color: #00b300;
}
.red_block {
 background-color: #FF0000;
}
.yellow_block {
 background-color: #FFFF00;
}
table {
 margin: 1em 0 0;
}

<input type="button" class="block white_block" data-brush="white_block">
<input type="button" class="block blue_block" data-brush="blue_block">
<input type="button" class="block yellow_block" data-brush="yellow_block">

  Table Two:

  Table Three:

  Table Four:

  Table Five:

A: You can just add an extra class name to the input buttons.
<input type="button" class="block white_block wide_input" data-brush="white_block">

and modify the css however you want in your stylesheet.
JSFiddle