text:
Q: Intercept significant in glmer and lmer I'm quite new on this with binomial data tests, confusing when doing the analysis in R using glmer and lmer
I am doing an experimental analysis which is a mixed design: 2*2*2.
Three independents variables in which one is a between-subject factor, and the others are within-subject.
The three independent variables are all binormal.
The experiment is setting two groups (unequal number), all of them need to read 8 vignettes of which have two types and some of the contents have been told the participants but some are not.
So the three independent variables are: groups, types, communicated.
Now, I need to test the responses after each reading. One of the dependent variable (break) is also binormal (yes or no). Other dependent variables are ordinal and continuous.
For example, I have a hypothesis that to verify the first group is more sensitive to 'break'. Here is my code and results.
Generalized linear mixed model fit by maximum likelihood (Laplace
  Approximation) [glmerMod]
 Family: binomial  ( logit )
Formula: break ~ group + (1 | id)
   Data: df

     AIC      BIC   logLik deviance df.resid
  3639.6   3657.8  -1816.8   3633.6     3213

Scaled residuals:
    Min      1Q  Median      3Q     Max
-1.8274 -1.4997  0.5653  0.5838  0.6668

Random effects:
 Groups Name        Variance Std.Dev.
 id     (Intercept) 0.07157  0.2675
Number of obs: 3216, groups:  id, 402

Fixed effects:
                       Estimate Std. Error z value Pr(>|z|)
(Intercept)             1.14543    0.06491  17.647   <2e-16 ***
groupI                  -0.08177    0.08625  -0.948    0.343
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
            (Intr)
groupI    -0.721

For another example, my hypothesis is about the first group would have more strong emotional reactions to type 1 break. Here is my code and results.
Models:
model.H3a: emo ~ group + type + (1 | id)
model.H3b: emo ~ group * type + (1 | id)
          npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
model.H3a    5 9589.1 9619.5 -4789.6   9579.1
model.H3b    6 9589.5 9626.0 -4788.8   9577.5 1.5838  1     0.2082
> summary(model.H3a)

Linear mixed model fit by REML ['lmerMod']
Formula: emo ~ group + type + (1 | id)

REML criterion at convergence: 9594.4

Scaled residuals:
    Min      1Q  Median      3Q     Max
-2.8125 -0.7602  0.1097  0.9639  1.2246

Random effects:
 Groups   Name        Variance Std.Dev.
 id       (Intercept) 0.02211  0.1487
 Residual             1.13143  1.0637
Number of obs: 3216, groups:  id, 402

Fixed effects:
                       Estimate Std. Error t value
(Intercept)             3.97730    0.03495 113.790
groupI                  -0.03096    0.04042  -0.766
typeI                   -0.16604    0.03751  -4.426

Correlation of Fixed Effects:
            (Intr) grou
groupI     -0.616
typI       -0.537  0.000
> summary(model.H3b)
Linear mixed model fit by REML ['lmerMod']
Formula: emo ~ group * type + (1 | id)
   Data: df

REML criterion at convergence: 9596.2

Scaled residuals:
    Min      1Q  Median      3Q     Max
-2.8084 -0.7681  0.1077  0.9684  1.2457

Random effects:
 Groups   Name        Variance Std.Dev.
 id       (Intercept) 0.02214  0.1488
 Residual             1.13119  1.0636
Number of obs: 3216, groups:  id, 402

Fixed effects:
                                            Estimate Std. Error t value
(Intercept)                                  3.95213    0.04027  98.130
groupI                                       0.01633    0.05520   0.296
typeI                                       -0.11569    0.05485  -2.109
groupI:typeI                                -0.09459    0.07518  -1.258

Correlation of Fixed Effects:
            (Intr) grou typ
groupI        -0.730
typI         -0.681  0.497
groupI:typ  0.497 -0.681 -0.730

table_model

                        emo                 emo
Predictors  Estimates   CI  p   Estimates   CI  p
(Intercept) 3.98    3.91 – 4.05 <0.001  3.95    3.87 – 4.03 <0.001
group [I]   -0.03   -0.11 – 0.05    0.444   0.02    -0.09 – 0.12    0.767
type [I]    -0.17   -0.24 – -0.09   <0.001  -0.12   -0.22 – -0.01   0.035
group [I]
* type [I]              -0.09   -0.24 – 0.05    0.208

Random Effects
σ2  1.13    1.13
τ00 0.02 id 0.02 id
ICC 0.02    0.02
N   402 id  402 id
Observations    3216    3216
Marginal R2 / Conditional R2    0.006 / 0.025   0.007 / 0.026

I run the code like this, all the variables are nonsignificant (except the intercept and only type variables in the second hypothesis). I'm not sure if I made some mistakes and how to interpret the outcome. I also changed the random intercept, but still nonsignificant.
Can someone help me to check it? And if there are some articles or books recommended that help me to figure it out or systematically learn it.
Or is there a more appropriate test for my cases?
I appreciate any feedback on this.

A: A "significant" intercept is one whose estimated value is "significantly" different from 0. In a logistic regression, that means different from equal outcome group probabilities when the predictors are at reference levels (categorical) or at 0 (continuous). So just centering a continuous predictor or changing the reference level of a categorical predictor can change the "significance" of an intercept. Don't put too much importance onto the "significance" of an intercept in this case.
With 3 pre-defined predictors you shouldn't be doing these analyses based on just one or 2 of them. In logistic regression omitting any predictor related to outcome whether correlated with the other predictors or not will tend to bias results, often in a way that makes it harder to find true associations with outcome. So you would be better off working with the full model (also including communicated as a predictor, potentially with interaction terms, if that makes sense based on the subject matter) and testing your specific hypotheses based on that full model.
When you have multiple outcomes things get even more complicated. I'd recommend finding some local statistical expertise to help with the issues that arise then, as (1) you might want to take associations among outcomes into account and (2) with separate models for each of the outcomes you need to correct for multiple comparisons.


text:
Q: SpatialLite for Android NDK Geos Configure Error I'm trying to build the following project for Android:
http://code.google.com/p/spatialite-android/
Does anyone know why there may be errors when running ndk-build for LineIntersector.cpp?
jni/geos-3.2.2/source/algorithm/LineIntersector.cpp:223: error: expected unqualified-id before '(' token

I'm running try to compile this on a mac and I'm an NDK newbie. Here is my configure that I run in the geos root
./configure --build=i686-android-linux-gnu --host=arm-linux-eabi

The error appears to be with the ISNAN function

A: At the moment you can only build on Ubuntu.  The step where you run ./configure is the issue on other platforms.  I have posted the latest binaries in the download section.  You could open the apk and copy the .so files.
I was able to get geos to build on my Mac by editing /source/headers/geos/platform.h
/* Set to 1 if you have `int64_t' type */
/* #undef HAVE_INT64_T_64 */

/* Set to 1 if `long int' is 64 bits */
/* #undef HAVE_LONG_INT_64 */

/* Set to 1 if `long long int' is 64 bits */
/* #undef HAVE_LONG_LONG_INT_64 */

/* Set to 1 if you have ieeefp.h */
/* #undef HAVE_IEEEFP_H */

/* Has finite */
#define HAVE_FINITE 1

/* Has isfinite */
/* #undef HAVE_ISFINITE */

/* Has isnan */
#define HAVE_ISNAN 1

A: I've build this project successfully on Win7,cygwin environment, have a look at:
http://code.google.com/p/spatialite-android/issues/detail?id=3

redpajama_set_name: RedPajamaStackExchange


text:
Q: How to change font colour inside a text field javafx I have a text field in javaFX and anything typed in that field must appear in blue color, can that be achieved via css?if yes, then how?

A: In CSS you can try :
input[type="text"] {
    color: #0000ff;
}

EDIT
Alright, your question seems to be duplicate with that one : How to change the color of text in javafx TextField?
Try this :
textField.setStyle("-fx-text-inner-color: blue;");


text:
Q: Is there a way to pipe stdout/stdin across a command? Or more specifically is there a way to take stdout from one command, run another command, and then use stdout as the stdin for the next command?
e.g.
cat file.txt| run_command | grep "foo"
This may seem confusing as to why someone would want to do this. Here is what I am trying to do:
I feed the webcam on my other computer (remote) to my local computer via
ssh user@remote ffmpeg -b 100k -an -f video4linux2 -s 320x280 -r 10 -i /dev/video0 -b 100k -f ogg - | vlc -
I am trying to do the reverse. So, send a feed from my webcam (local) to display on the remote machine.
It tryed:
ffmpeg -b 100k -an -f video4linux2 -s 320x280 -r 10 -i /dev/video0 -b 100k -f ogg - | ssh user@remote vlc -
which doesn't work because before I have to "export DISPLAY=:0.0" on the remote machine before I can launch vlc. So I'm trying to get the output from ffmpeg to vlc on the remote computer AFTER exporting the DISPLAY variable for that ssh 'session'.
Also if there is another way to do this (besides using ssh on the remote maching to use the first command) I would love to try it.(also if there is a way to do the same thing that doesn't lag so much I would appreciate the info, though that's not really relevant to the question) Thanks in advance. :)

A: To pass the output from source as an input to sink given that run_command must end before sink is run in your case:
source | { run_command &>/dev/null; sink; }


text:
Q: Texturing a sphere in OpenGL I'm new with textures in OpenGL and I'm having some issues applying a texture to a sphere.
I have calculated all the vertices and triangles for a Sphere with radius=1. To store my vertices and triangles I'm working with an array of floats that store vertices coordinates and another one of int that store the index of the vertices array for the triangles. My code to apply the texture is the following:
    glTexImage2D(GL_TEXTURE_2D,0,3,Image.width(),Image.height(),0,GL_RGB,GL_UNSIGNED_BYTE,Image.bits());
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

glEnable(GL_TEXTURE_2D);
glBegin(GL_TRIANGLES);
for (int i = 0; i < Triangles.size(); i++) {

  uvCylinder(Vertices[Triangles[i]._0]);
  glVertex3fv((GLfloat *) &Vertices[Triangles[i]._0]);
  uvCylinder(Vertices[Triangles[i]._1]);
  glVertex3fv((GLfloat *) &Vertices[Triangles[i]._1]);
  uvCylinder(Vertices[Triangles[i]._2]);
  glVertex3fv((GLfloat *) &Vertices[Triangles[i]._2]);

}
glEnd();
glDisable(GL_TEXTURE_2D);

inline void _object3D::uvCylinder(_vertex3f coord) {
  float angle = 0.5f * atan2(coord._2, coord._0) / 3.14159f + 0.5f;
  float height = 0.5f * coord._1 + 0.5f;
  glTexCoord2f(angle, height);
}

So the results that I'm getting are:

As you can see in the 3rd image, the result is the inverse of the image of the Earth. Also, I'm getting a strange thing in the 2nd one. I don't know where could the error be, I mean, the problem is with the calculation with my vertices and triangles or on how I'm applying texture?. Also I have thought that maybe there's a problem with the sizes that I'm using to create the Sphere.


text:
Q: javascript cannot surpass xmlhttprequest error using ajax/JS/mysql/php we have on the client side running this javascript code:
var src;
var y = document.getElementById('trigger-image-toll-id');
function addListener() {
    src = $('#nice_image').attr("src");
    alert(src);
}
y.click();
setTimeout(function(){
addListener()
}, 5000);

$.ajax({
    method: "POST",
    url: "http://www.orc23.com/insert.php",
    data: { theurl: src, asker: "test", solution53: "" }
})
    .done(function( msg ) {
    alert( "Data Saved: " + msg );
  });

Remote server side we have this php file I am trying to use to insert data into mysql DB:
<?php

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token');

$con =
mysqli_connect("orc23com.coooscowmysql.com","jim","jim123","coolbeans");
//$con = mysqli_connect("localhost","root","","cl30-ssndb");
if (!$con)
  {
  die('Could not connect: ' . mysqli_connect_error());
  }

mysqli_select_db($con, "coolbeans");

$sql="INSERT INTO requests (theurl, asker, solution53)
VALUES
('$_POST[theurl]','$_POST[asker]','$_POST[solution53]')";

if (! mysqli_query($con,$sql))
  {
  die('Error: ' . mysqli_error());
  }

mysqli_close($con)
?>

Back To Home Page Click Here

I've already tried to disable web security with Chrome option for my Chrome Browser but still getting this error here:

xmlhttprequest cannot load REMOTE WEBSITE HERE WITH A "insert.php"  . response to preflight request doesn't pass access control check: no 'access-control-allow-origin' header is present on the requested resource. origin 'adifferentwebsite' is therefore not allowed access.


text:
Q: git repo shared betwixt mac and windows causing line ending woes I have a strange issue. My colleague uses a mac, and after pulling his branch it immediately thought I had been making changes to the files.
I couldn't reset or stash these changes, so followed the advice here https://xkcd.com/1597/ and deleted the repo.
I cloned it, and immediately had the same problem.
I then commented out this from gitattributes
#* text=auto

And all the uncommitted changes were gone.
Can anyone explain whats going on and how we can configure git to avoid this in the future?
Thanks


text:
Q: jquery child element as trigger When "forum-title" is clicked, I want "subtopic-frame" within the parent "forum-topics-head" to expand. There are multiple "forum-topics-head" (with all associated children) on this page.
The way I have it now, the "forum-topics-head" is the trigger, but I want the "forum-title" to be the trigger.
html:

Forum Title

        subtopic 1
        subtopic 2

jquery:
$(document).ready(function(){
    $(".forum-topic-head").click(function(){
        $(this).children(".subtopic-frame").slideToggle("slow");
        $(this).children(".expand").delay("200").fadeToggle();
    });
});

A: you can use siblings() jQuery function:
$(document).ready(function(){
    $(".forum-title").click(function(){
        $(this).siblings(".subtopic-frame").slideToggle("slow");
        $(this).siblings(".expand").delay("200").fadeToggle();
    });
});

A: You can use this, .closest() and .find() to operate only within the currently clicked section.  For example:
$(".forum-title").click(function() {
    $(this).closest(".forum-topic-head").find(".subtopic-frame").slideToggle("slow');
});

A: fiddle here: http://jsfiddle.net/tkcRa/
$(document).ready(function(){
    $('.forum-title').on('click',function(){
        $(this).parent('.forum-topic-head').children('.subtopic-frame').slideToggle();
    });
});


text:
Q: android studio autofocus qr scanner I want to autofocus ore have a better quality cam can somebody help me with that? I want my qr scanner to autofocus and i want to switch the cam to front and the back.
this is my code...
public class MainActivity extends AppCompatActivity {

    SurfaceView cameraPreview;
    TextView txtResult;
    BarcodeDetector barcodeDetector;
    CameraSource cameraSource;
    ImageButton cameraSwitch;
    final int RequestCameraPermissionID = 1001;

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        switch (requestCode) {
            case RequestCameraPermissionID: {
                if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {

                    if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
                        return;
                    }
                    try
                    {
                        cameraSource.start(cameraPreview.getHolder());
                        cameraPreview.findFocus();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
           }
           break;
       }

    }

    //QR-code scanner
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        cameraPreview = (SurfaceView) findViewById(R.id.cameraPreview);
        cameraSwitch = (ImageButton) findViewById(R.id.cameraSwitch);

        txtResult = (TextView) findViewById(R.id.txtResult);
        barcodeDetector = new BarcodeDetector.Builder(this)
                .setBarcodeFormats(Barcode.QR_CODE)
                .build();
        cameraSource = new CameraSource
                .Builder(this, barcodeDetector)
                .setRequestedPreviewSize(500, 500)
                .build();

        cameraSwitch.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v)
            {

            }
        });

any help would be nice.

A: QrCodeReaderView library will help you to do that. This library uses ZXING Library
You can get the library here: https://github.com/dlazaro66/QRCodeReaderView
You can set auto focus and you can change camera also.
qrCodeReaderView = (QRCodeReaderView) findViewById(R.id.qrdecoderview);
        qrCodeReaderView.setOnQRCodeReadListener(this);

          // Use this function to enable/disable decoding
        qrCodeReaderView.setQRDecodingEnabled(true);

        // Use this function to change the autofocus interval (default is 5 secs)
        qrCodeReaderView.setAutofocusInterval(2000L);

        // Use this function to enable/disable Torch
        qrCodeReaderView.setTorchEnabled(true);

        // Use this function to set front camera preview
        qrCodeReaderView.setFrontCamera();

        // Use this function to set back camera preview
        qrCodeReaderView.setBackCamera();

Hope it helps:)


text:
Q: Azure pipeline has stopped requiring user approval I use Azure pipelines to deploy to different environments (dev, test, prod) that have been running for 2 1/2 years without issue.
Recently the pipeline has stopped asking for 'approval' after the test deployment stage.
It has been working with the following steps for 2.5 years

*

*Build

*Deploy to 'dev' without approval

*Wait for manual approval

*Deploy to 'test'

*Wait for manual approval

*Deploy to 'prod'

The Azure pipeline is a template within a separate repo - there have been no changes to the .yaml files but now the process is

*

*Build

*Deploy to 'dev' without approval

*Wait for manual approval

*Deploy to 'test'

*Deploy to 'prod'

This behaviour is mirrored on every service that deploys using this template.
I am at a loss as to what is causing this

A: The solution was this:
I 'environment' production had lost its approval - adding it back did not work.
So deleted and recreated and excepted the loss of deployment history. Working now.
Why this would happen I do not not know


text:
Q: Is there any way I can print the output of a code to a tkinter text box? I am making a python IDE and I wanted to print the output of a file's code to the output text box.
My current code doesnt work, it executes in the shell and the output is to the box is "None".
Code:
from tkinter import *
input_box = Text()
output_box = Text()
def execute():
    code = input_box.get(1.0, END)
    out = exec(code)
    output.insert(1.0, str(out))

A: You can do this by redirecting the standard output as described in this answer.
import sys
from io import StringIO
def execute():
    code = input_box.get(1.0, "end")
    old_stdout = sys.stdout
    redirected_output = sys.stdout = StringIO()
    exec(code)
    sys.stdout = old_stdout
    output_box.delete(1.0, "end")
    output_box.insert(1.0, redirected_output.getvalue())


text:
Q: Как создать связь между приложениями на golang в реальном времени? Добрый день,
Есть сервер и к нему должны подключаться клиенты. Нужно сделать канал и в реальном времени уведомлять сервер/клиентов.
Как сделать websocket соединение, но не между сервером/браузером, а двумя программами на golang?
Либо посоветуйте другую технологию, что б можно было по каналу отправлять json данные?
Спасибо

A: Ох, вот тут уж раздолье и беспредельщина.
Самый простой способ - использовать RPC (удаленный вызов процедуры), в Go это осуществляется как никогда просто: examples, также можно использовать брокеры, например, nats, у них другая логика - программы обмениваются событиями, следовательно программа может среагировать на него, а может проигнорировать, удобно в случаях, когда на одно событие должно произойти N действий (записать лог, метрики, отправить эл. сообщения, сохранить в бд).
Если собираетесь строить что-то масштабное и на кучу кластеров (микросервисы) советую обратить внимание на: Micro Toolkit, либо на RPCX. Возможности первого сильно выходят за границы обычного RPC запроса, там есть, и rpc, и брокеры, и стриминг, но это сложно. Второе намного проще, обычный rpc, но на кучу кластеров.
В случаях когда, вы точно знаете, где находится ваш клиент\сервер, стандартного RPC встроенного в Go будет выше крыши.


text:
Q: Haskell conditional error I have a problem with a Haskell code, I have the following:
takeMeHere cs m =
    |(find (==E) cs == Nothing && (checkNextStep pozxCrt+1 pozyCrt m) == True) = (Just E,[(pozxCrt+1,pozyCrt)] ++ m)
    |(find (==S) cs == Nothing && (checkNextStep pozxCrt pozyCrt-1 m) == True) = (Just S,[(pozxCrt,pozyCrt-1)] ++ m)
    |(find (==W) cs == Nothing && (checkNextStep pozxCrt-1 pozyCrt m) == True) = (Just W,[(pozxCrt-1,pozyCrt)] ++ m)
    |(find (==N) cs == Nothing && (checkNextStep pozxCrt pozyCrt+1 m) == True) = (Just N,[(pozxCrt,pozyCrt+1)] ++ m)
    |otherwise = (Nothing,m)
where
    pozxCrt=fst(head m)
    pozyCrt=snd(head m)

checkNextStep x y m = if(find (== (x,y)) m == Nothing) then True
   else False

I get a parse error on input "|" . If I write the code with something like if then else if then...it works. But I want to use the | for a more compact coding.What seems to be the problem here ?

A: To fix parsing error, remove = from first line. The = sign is put after the guards.
Next, you should indent "where"
takeMeHere cs m
    |(find (==E) cs == Nothing && (checkNextStep pozxCrt+1 pozyCrt m) == True) = (Just E,[(pozxCrt+1,pozyCrt)] ++ m)
    |(find (==S) cs == Nothing && (checkNextStep pozxCrt pozyCrt-1 m) == True) = (Just S,[(pozxCrt,pozyCrt-1)] ++ m)
    |(find (==W) cs == Nothing && (checkNextStep pozxCrt-1 pozyCrt m) == True) = (Just W,[(pozxCrt-1,pozyCrt)] ++ m)
    |(find (==N) cs == Nothing && (checkNextStep pozxCrt pozyCrt+1 m) == True) = (Just N,[(pozxCrt,pozyCrt+1)] ++ m)
    |otherwise = (Nothing,m)
  where
    pozxCrt=fst(head m)
    pozyCrt=snd(head m)

This will at least parse, yet it won't compile. The (checkNextStep pozxCrt pozyCrt+1 m) should be (checkNextStep pozxCrt (pozyCrt+1) m).
Let me add that you can fix a lot of verbose code:

*

*find (==E) cs == Nothing can be changed to E `notElem` x

*You do not need to compare with True: change x == True to x

*if x then True else False can be changed to x

*[x]++y can be changed to x:y

*You can use pattern matching like this: (pozxCrt, pozyCrt) = head m or (pozxCrt, pozyCrt):_ = m
The result is:
takeMeHere cs m
    | E `notElem` cs && checkNextStep (pozxCrt+1) pozyCrt m = (Just E,(pozxCrt+1,pozyCrt):m)
    | S `notElem` cs && checkNextStep pozxCrt (pozyCrt-1) m = (Just S,(pozxCrt,pozyCrt-1):m)
    | W `notElem` cs && checkNextStep (pozxCrt-1) pozyCrt m = (Just W,(pozxCrt-1,pozyCrt):m)
    | N `notElem` cs && checkNextStep pozxCrt (pozyCrt+1) m = (Just N,(pozxCrt,pozyCrt+1):m)
    | otherwise = (Nothing,m)
  where
    (pozxCrt, pozyCrt) = head m

checkNextStep x y m = (x,y) `notElem` m

You have a lot of repetition in the guards. A lot of repetition is a sign to create new functions.
move E (x, y) = (x+1, y)
move S (x, y) = (x, y-1)
move N (x, y) = (x, y+1)
move W (x, y) = (x-1, y)

takeMeHere cs m
    | canGo E = go E
    | canGo S = go S
    | canGo W = go W
    | canGo N = go N
    | otherwise = (Nothing,m)
  where
    pos = head m
    canGo dir = dir `notElem` cs && checkNextStep (move dir pos) m
    go dir = (Just dir, move dir pos:m)

checkNextStep (x, y) m = (x,y) `notElem` m

Next step: use find canGo [E,S,W,N] to get rid of the guards:
 takeMeHere cs m =
    case find canGo [E,S,W,N] of
      Just dir -> (Just dir, move dir pos:m)
      Nothing -> (Nothing, m)
    where ...

A: I can see at least three errors in your code.

*

*The = on the first line have to be removed. The syntax requires a = after the guard of each |. Basically, the error is saying you that the first pipe symbol | is unexpected after an = because the latter, in that position, is used without guards.

*You should put parenthesis around mathematical expressions when you give them in input to functions, because infix operators like + have a lower precedence with respect to function application. checkNextStep pozxCrt+1 pozyCrt m is evaluated as (checkNextStep pozxCrt) + (1 pozyCrt m) (which is obviously an error), and not as checkNextStep (pozxCrt+1) pozyCrt m.

*The where should be indented with respect to the first line.

Unless you have other errors in the code you omitted, this way it should work:
takeMeHere cs m    -- no more "=" here
    |(find (==E) cs == Nothing && (checkNextStep (pozxCrt+1) pozyCrt m) == True) = (Just E,[(pozxCrt+1,pozyCrt)] ++ m)
    |(find (==S) cs == Nothing && (checkNextStep pozxCrt (pozyCrt-1) m) == True) = (Just S,[(pozxCrt,pozyCrt-1)] ++ m)
    |(find (==W) cs == Nothing && (checkNextStep (pozxCrt-1) pozyCrt m) == True) = (Just W,[(pozxCrt-1,pozyCrt)] ++ m)
    |(find (==N) cs == Nothing && (checkNextStep pozxCrt (pozyCrt+1) m) == True) = (Just N,[(pozxCrt,pozyCrt+1)] ++ m)
    |otherwise = (Nothing,m)
  where -- indentation
    pozxCrt=fst(head m)
    pozyCrt=snd(head m)

By the way, your code is quite redundant, you should do something about all those comparisons with True (see @dbaupp's comment on your question).
I suggest you to study a little more Haskell's operator precedence and syntax, It will help you a lot in making your code easier to read :)


text:
Q: How to find whether the .NET installed or not in the System by using c++? Is there any API available to find the whether the .NET framework installed or not in the system. or atlest can any one give me idea how to do this our own  in c++ and also how to find the path where .NET installed if it is installed??
How can i do this ...
Any Help in this regard will Be Appreciated Greately.....

A: Aaron Stebner has posted several articles about how to do this over the years. His latest update following the release of .Net 3.5 can be found here, and includes C++ code to do the check. The detection is mainly based on registry checking.

A: Here's how:

*

*try to LoadLibrary() the mscoree.dll and then

*pass the handle to the just loaded library to GetProcAddress() and try to retrieve the entry point for GetCORSystemDirectory() and then

*try to call GetCORSystemDirectory() via the retrieved pointer.

If all steps succeed the .NET is installed. Don't forget error handling - each step can fail and you need to be sure your program is ready for that.


text:
Q: Statements about relations and functions but no restriction on sets In "Elements of Set Theory" 41p and 44p

Exercise 3-8. Show that for any set $\mathscr A$:
$dom\,\bigcup \mathscr A = \bigcup\{dom\,R\,|\,R\in\mathscr A\}$
$ran\,\bigcup \mathscr A = \bigcup\{ran\,R\,|\,R\in\mathscr A\}$

For this exercise I assumed $\mathscr A$ is a set of sets of ordered pairs. For example, $\{\{<1, 2>, <2, 5>\},\;\{<1, 3>\}\}$. But later I thought it should be included in a proof that if $(\exists X \in \mathscr A \land \exists x \in X \land x$ is not ordered pair$)$ then the equality in the given statement is vacuously true. If this is correct, why does the author let readers consider this possibility?

The following operations are mostly commonly applied to functions, sometimes are applied to relations, but can actually be defined for arbitrary sets $A$, $F$, and $G$.
Definition
(a) The inverse of $F$ is the set $F^{-1}=\{<u, v>\,|\,vFu\}$.
(b) The composition of $F$ and $G$ is the set $F\circ G = \{<u, v>\,|\,\exists t(uGt \;\&\; tFv)\}$
(c) ...
(d) ...

Here is a similar one, why does the author say "but can actually be defined for arbitrary sets $A$, $F$, and $G$"? When these definitions are applied to a set which is not a relation or a function, they would not have any meaning.


text:
Q: Matplotlib animation in Jupyter notebook creates additional empty plot I've started to create a series of interactive notebooks for a DSP lecture. So far, I've managed to copy & implement the MWE pasted below. However, in addition to the matplotlib figure containing the animation, I'm always getting an empty Matplotlib window. Any ideas how to suppress this behaviour?
python: 3.6.3
matplotlib: 2.0 and 2.1
IPython: 5.3.0
OS: Win 7 64 bit
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt

from matplotlib import animation
from IPython.display import HTML

plt.rcParams['figure.figsize'] = (5,3)
plt.rcParams['figure.dpi'] = 100
plt.rcParams['savefig.dpi'] = 100
plt.rcParams["animation.html"] = "jshtml"  # for matplotlib 2.1 and above, uses JavaScript
#plt.rcParams["animation.html"] = "html5" # for matplotlib 2.0 and below, converts to x264 using ffmpeg video codec
t = np.linspace(0,2*np.pi)
x = np.sin(t)

fig, ax = plt.subplots()
ax.axis([0,2*np.pi,-1,1])
l, = ax.plot([],[])

def animate(i):
    l.set_data(t[:i], x[:i])

ani = animation.FuncAnimation(fig, animate, frames=len(t))
ani

The notebook can also be viewed under:
https://github.com/chipmuenk/dsp_fpga/blob/master/notebooks/01_LTI/MWE_animation.ipynb
In the static rendering at github, only the empty plot window shows, not the JavaScript animation.

A: Here is an alternative example:
%matplotlib inline
from matplotlib import animation, pyplot as plt
import numpy as np
plt.rc('animation', html='html5')

data = np.random.random(20)
fig = plt.figure()

ax = fig.add_subplot(111)
ax.plot(data) # draw background

anim = animation.ArtistAnimation(fig, [[ax.scatter(x, y)] for x, y in enumerate(data)])
anim

The result (anim) is shown animated, but the potential side-effect is an additional display of the static frame. This side-effect vanishes if the plt.figure call occurs in a separate cell before the add_subplot method.
This works because (like ImportanceOfBeingErnest said) the creation of a new figure causes the side effect of displaying a static image (depicting how the figure was left at the conclusion of the current cell evaluation in the notebook). But if nothing has been populated onto the figure yet (not even the axes), you prevent any image from being displayed (without needing jupyter magic to suppress it).

A: This has nothing to do with an animation.
The lines
%matplotlib inline
import matplotlib.pyplot as plt
fig, ax = plt.subplots()

will create an output with an empty figure.
You may prevent the output of a cell in jupyter notebook using %%capture.
Cell1:
%%capture
%matplotlib inline
import matplotlib.pyplot as plt
import matplotlib.animation
plt.rcParams["animation.html"] = "jshtml"
import numpy as np

t = np.linspace(0,2*np.pi)
x = np.sin(t)

fig, ax = plt.subplots()
h = ax.axis([0,2*np.pi,-1,1])
l, = ax.plot([],[])

def animate(i):
    l.set_data(t[:i], x[:i])

ani = matplotlib.animation.FuncAnimation(fig, animate, frames=len(t))

Cell2:
ani

A: You can add plt.close() before the last line.
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt

from matplotlib import animation
from IPython.display import HTML

plt.rcParams['figure.figsize'] = (5,3)
plt.rcParams['figure.dpi'] = 100
plt.rcParams['savefig.dpi'] = 100
plt.rcParams["animation.html"] = "jshtml"  # for matplotlib 2.1 and above, uses JavaScript
#plt.rcParams["animation.html"] = "html5" # for matplotlib 2.0 and below, converts to x264 using ffmpeg video codec
t = np.linspace(0,2*np.pi)
x = np.sin(t)

fig, ax = plt.subplots()
ax.axis([0,2*np.pi,-1,1])
l, = ax.plot([],[])

def animate(i):
    l.set_data(t[:i], x[:i])

ani = animation.FuncAnimation(fig, animate, frames=len(t))
plt.close()
ani


text:
Q: How to passing external argument by call other powershell script? I want to call another powershell script with external argument. I try this but return error. anyone can help please
$direct = "D:\Learn"
Start-Process powershell.exe -WindowStyle Minimized ".\Testing.exe" -Path $direct

Testing.exe
Param(
  [parameter(mandatory=$true)][string]$Loc
)

Get-Content $Loc\API.txt
Pause

A: The Start-Process cmdlet has a -AgumentList parameter:
$direct = "D:\Learn"
Start-Process powershell.exe -WindowStyle Minimized ".\Testing.exe" -ArgumentList "-Path $direct"

A: If you want to just run a File with some arguments
$filepath = ".\Testing.exe"
$direct = "D:\Learn"
Start-Process -FilePath $filepath -ArgumentList $direct -Wait -NoNewWindow

A: I think they all were arguments of powershell.exe.
The whole argument can be wrapped in one double quote in argumentlist.
Start-Process "powershell.exe" -ArgumentList "-windowstyle minimized '.\testing.exe' -path $direct"

Or even it can be done without start-process:
& "powershell.exe -windowstyle minimized '.\testing.exe' -path $direct"


text:
Q: Searching for keyworkd in webpage I have wrriten some code for searching specific word in some webpage.
But, I have some problem, it finds all the keyword, excpet that in the javascript part of the webpage.
I dont know javasrcipt, Only java :|
Somebody can help me?
Thanks.
This is my code -
String searchWord = "WORD";
    String url = "SOME URL";

    Connection connection = Jsoup.connect(url).userAgent(USER_AGENT);
    System.out.println("Searching for the word " + searchWord);
    Document htmlDocument = connection.get();

    if(htmlDocument.body().text() != null){
                if((htmlDocument.body().text()).toLowerCase().contains(searchWord.toLowerCase()))
                    System.out.println("yes");
                else
                    System.out.println("No");

                                            }

Im using the Jsoup jar.

A: Read your js file and process it as below (Java SE 7):
    Path source = Paths.get("sourcecode.js");

    Charset charset = Charset.forName("US-ASCII");

    try(BufferedReader reader = Files.newBufferedReader(source, charset)) {
        String line;
        while ((line=reader.readLine())!=null) {
            if((line).toLowerCase().contains(searchWord.toLowerCase()))
                System.out.println("yes");
            else
                System.out.println("No");
        }
    } catch (IOException e) {
        System.out.println(e.getMessage());
    }

A: JSoup is not meant for parsing JavaScript, it is intended for HTML.
Rhino is a better option and provides a 'javax.script' variable for parsing Javascript.
If you must use JSoup, then you will need to manually parse the '' node, using a regular expression and parsing the HTML and not as text, see this link for more information on manually parsing the Javascript using JSoup:
Parse JavaScript with jsoup


text:
Q: How to keep javamail connection in android? I used javamail api in my android project and parse String in "mail subject" and "mail content". In my gmail there are many mail boxes such as travel, job, photo....  I need go through all mail boxes and search mails in my conditions. But I found when call getData() it will login gmail and make connection again.
My question are
1.How can it Keep connection in android?
2.How can I search all the mail boxes in the same time?
Thanks for help.
private String downloadUrl () throws IOException {

    receiveMail("username", "password");
    return null;
}

receiveMail part
    private static List<Message> receiveMail(String username, String Password) {

    try {

        Properties props = System.getProperties();
        props.setProperty("mail.store.protocol", IMAPS_PROTOCOL);

        Session session = Session.getDefaultInstance(props, null );
        session.setDebug(false);
        final Store store = session.getStore(IMAPS_PROTOCOL);
        store.connect(IMAPS_MAIL_HOTS , username, Password);

        getData(store, "travel");
        getData(store, "job");
        getData(store, "photo");

    } catch(Exception ex) {
        ex.printStackTrace();
    }

    return null;
}

A: If you want to reuse a single connection for each folder, you need to be sure to close the folder before opening the next folder.


text:
Q: Custom made frozen_inference_graph.pb not working? I am working on a license plate detection software. I trained TensorFlow object detection API on custom made license plate dataset in google collaboratory. After that, I downloaded frozen_inference_graph.pb from the training folder which is an end result after training. Initially, I used a saved_model.pb which was downloaded from TensorFlow hub and it works fine but now I renamed this frozen_graph_inference.pb to saved_model.pb and when I used it is giving me an error
CODE I USED FOR LOADING THE SAVED_MODEL

#picking an object detection module

module_handle="Models/"
  detector = hub.load(module_handle).signatures['default']

Here models is the directory for where i store all the models.
When i use my custom made model i am getting this error

File "objectDetection.py", line 2, in
      from helperFunctions import *
    File "C:\MachineLearning\helperFunctions.py", line 89, in
      detector = hub.load(module_handle).signatures['default']
    File "C:\MachineLearning\env\lib\site-packages\tensorflow_core\python\saved_model\signature_serialization.py", line 195, in getitem
      return self._signatures[key]
  KeyError: 'default'

Any help will be greatly appreciated.
Thank you

A: A SavedModel is a different file format than an old-school GraphDef. They cannot be exchanged like that.


text:
Q: Problem converting double integral to PDE and solving with NDSolve I'm trying to use the well-known "trick" of converting an integral to a differential equation, which can be much faster if the integral has to be evaluated repeatedly (in my case millions of times), but it seems there is a problem.
The integral is the following:
$$ \xi(r)=\frac{1}{2\pi^2}\int_{k_{min}}^{k_{max}} P(k) \frac{sin(kr)}{kr}k^2 dk,$$
where $k_{min}=10^{-4}$, $k_{max}=100$, the parameter $r$ runs in the range $r\in[10,150]$ and $P(k)$ is a complicated function that can only be determined numerically, but for the sake of this example we can assume it is reasonably close to a log-normal of the form: $$P(k)=\frac{108400 \sqrt{\frac{2}{\pi }} e^{-\frac{5000 \left(\log (k)+\frac{283}{100}\right)^2}{14641}}}{121 k}$$
Calculating the integral and converting it to an ODE is simple:
(* Some parameters *)
kmin = 10^-4;
kmax = 100;
rmin = 10;
rmax = 150;

(* The complicated function *)
P[k_] := A E^(-((-m + Log[k])^2/(2 s^2)))/(
    k Sqrt[2 \[Pi]] s) /. {m -> -283/100, s -> 121/100, A -> 2168};

(* Implementation of the integral with NIntegrate *)
xi0[r_] :=
 NIntegrate[1/(2 Pi^2) P[k] Sin[k r]/(k r) k^2, {k, kmin, kmax},
  Method -> Automatic, WorkingPrecision -> 20, PrecisionGoal -> 15,
  AccuracyGoal -> 15, MaxRecursion -> 15]

(* Converting the integral to an ODE and solving with NDSolve *)
xi1[r_] :=
 xi[kmax] /.
  NDSolve[{xi'[k] == 1/(2 Pi^2) P[k] Sin[k r]/(k r) k^2,
     xi[kmin] == 0}, xi, {k, kmin, kmax}, WorkingPrecision -> 20,
    PrecisionGoal -> 15, AccuracyGoal -> 15, MaxSteps -> 10^5][[1]]

Both NIntegrate and NDSolve give results in good agreement for $r=50$:
(* Result from NIntegrate *)
In[39]:= xi0[50]
Out[39]= 0.0079866930495540006015

and
(* Result from NDSolve *)
In[40]:= xi1[50]
Out[40]= 0.0079866930482492951647

However, I want to evaluate them for million values of the parameter $r$, so why not hit the ODE with a derivative with respect to $r$, convert it to a PDE and try NDSolve again. Then I have:
(* Convert to PDE by hitting the previous equation with derivative wrt r *)
In[48]:= sol=NDSolve[{D[xi[k, r], k, r] ==
1/(2 Pi^2) P[k] (Cos[k r]/r - Sin[k r]/(k r^2)) k^2,xi[kmin, r]
== 0, xi[k, rmax] == 0},xi,{k,kmin,kmax},{r,rmin,rmax}];

Which however for $r=50$ gives the wrong result:
(* Result from PDE *)
In[47]:= xi[kmax, 50] /. sol[[1]]
Out[47]= -0.0362161

Any ideas what went wrong in this case? Any help is much appreciated!

A: The boundary conditions are specified incorrectly and the size of the grid does not correspond to a rapidly oscillating function. However, even with correctly defined boundary conditions and a fine grid, the accuracy leaves much to be desired. Example
(*Some parameters*)kmin = 10^-4;
kmax = 100;
rmin = 10;
rmax = 150;

(*The complicated function*)
P[k_] := A E^(-((-m + Log[k])^2/(2 s^2)))/(k Sqrt[
        2 \[Pi]] s) /. {m -> -283/100, s -> 121/100, A -> 2168};

(*Implementation of the integral with NIntegrate*)
xi0[r_] :=
 NIntegrate[1/(2 Pi^2) P[k] Sin[k r]/(k r) k^2, {k, kmin, kmax},
  Method -> Automatic, WorkingPrecision -> 20, PrecisionGoal -> 15,
  AccuracyGoal -> 15, MaxRecursion -> 15]

(*Converting the integral to an ODE and solving with NDSolve*)
XI = ParametricNDSolveValue[{xi'[k] ==
     1/(2 Pi^2) P[k] Sin[k r]/(k r) k^2, xi[kmin] == 0},
   xi, {k, kmin, kmax}, {r}, WorkingPrecision -> 20,
   PrecisionGoal -> 15, AccuracyGoal -> 15, MaxSteps -> 10^6];
(*Convert to PDE by hitting the previous equation with derivative wrt \
r*)sol = NDSolveValue[{D[xi2[k, r], k, r] ==
     1/(2 Pi^2) P[k] (Cos[k r]/r - Sin[k r]/(k r^2)) k^2,
    xi2[kmin, r] == 0, xi2[k, rmax] == XI[rmax][k]},
   xi2, {k, kmin, kmax}, {r, rmin, rmax},
   Method -> {"MethodOfLines",
     "SpatialDiscretization" -> {"TensorProductGrid",
       "MinPoints" -> 10000, "MaxPoints" -> 100000,
       "DifferenceOrder" -> "Pseudospectral"}}, MaxSteps -> 10^6];
In[9]:= xi0[50]
XI[50][kmax]

Out[9]= 0.0079866930495540006015

Out[10]= 0.0079866930493438685592

In[11]:= sol[kmax, 50]

Out[11]= 0.00781333


text:
Q: TFS Project with Multiple Visual Studio Solutions Our team is looking at using Team Foundation Server v.11 (2012) to manage our projects. We currently do our project management in spread sheets. Our team develops software for internal clients only and there is a lot of dll sharing between projects. We are also using SVN for our source code version control.
We have Solutions for different parts of our applications: Common Library, Application Libraries (business rules, etc), Intranet Website, Internet Website, Windows Forms. Here is what our SVN structure looks like
SVN
    -CommonLibrary (VS Solution)
        -Source
            -CommonLibrary.Core (VS Project)
            -CommonLibrary.Security (VS Project)
            -CommonLibrary.Web (VS Project)
    -OurCompanyLibrary (VS Solution)
        -Libraries (Projects within this solution reference these)
            -CommonLibrary.Core.dll
            -CommonLibrary.Security.dll
        -Source
            -OurCompanyLibrary.Application1 (VS Project)
            -...
            -OurCompanyLibrary.ApplicationN (VS Project)
    -OurCompanyIntranet (VS Solution) (MVC framework)
        -Libraries (Projects within this solution reference these)
            -CommonLibrary.Core.dll
            -CommonLibrary.Security.dll
            -CommonLibrary.Web.dll
            -OurCompanyLibrary.Application1.dll
        -Source
            -OurCompanyIntranet.Application1 (VS Class Library Project)
            -...
            -OurCompanyIntranet.ApplicationN (VS Class Library Project)
            OurCompanyIntranet.UI (VS Web Project)
    -OurCompanyInternet (VS Solution) (MVC framework)
        -Libraries (Projects within this solution reference these)
            -CommonLibrary.Core.dll
            -CommonLibrary.Security.dll
            -CommonLibrary.Web.dll
            -OurCompanyLibrary.Application1.dll
        -Source
            -OurCompanyInternet.Application1 (VS Class Library Project)
            -...
            -OurCompanyInternet.ApplicationN (VS Class Library Project)
            -OurCompanyInternet.UI (VS Web Project)

The reason for splitting the code up into multiple solutions is because we can reuse the application libraries in different situations (Intranet apps, Internet apps, Winform apps). Also, the intranet and internet solutions contain multiple applications. This is our current structure. I'm not sure this is the best organizational structure, but it works for us.
The problem with switching to TFS is that one Team Project can't have parts in multiple VS solutions. For example, we would set up a TFS Team Project for Application1 so we could have a product backlog for that application. Application1 requires changes to OurCompanyLibrary, OurCompanyIntranet and OurCompanyInternet to complete the application but, using TFS, there would only be one VS Solution for Application1.
Here is an example of how we develop an application. All of the domain model and business rules our stored in the OurCompanyLibrary VS Solution. When we develop an application, call it Application1, we first start creating the domain model and business rules in the OurCompanyLibrary.Application1 VS project under OurCompanyLibrary VS Solution. Once the domain model is developed, we move over to program the UI side of things in the OurCompanyIntranet and OurCompanyInternet VS Solutions. These solutions are a MVC style website. OurCompanyIntranet contains a VS Web Project OurCompanyIntranet.UI that contains all of the views (.aspx files), css, javasciprt, etc. OurCompanyIntranet also contains all of the models and controllers separated by application (OurCompanyIntranet.Application1 in this case). Organizing this in TFS becomes a problem, because we want a Team Project for Application1, but that application can span multiple solutions and we don't want to have duplicate code everywhere by adding the same OurCompanyIntranet and OurCompanyInternet VS Solutions to source control.
How would you organize this in TFS? Is there another way we should organize our code structure that would make more sense? Any articles or websites out there that would lead us in the right direction would greatly help.

A: First, don't use multiple Team Project, this is a huge mistake that everybody make at the beginning. For the size of your team and what you develop: one Team Project is what you need.
You use two Team Projects when there are two teams of completely different people, working on a completely different project, with a completely different methodology/process.
With one Team Project you can still:

*

*Have many branches (related or not).

*Have the administration of Source Control at the tiniest level you need

*Split your project into sub categories (functional, technical, whatever you need) using the Area Path (which is a node tree) of Work Item. This way you can have one big product backlog or dedicated ones.

*Overall reports on your whole project or on specific area (still using Area Path, but in Reporting Services)

*Trust me on that, it's the best way to go and many many people (including me the first time) make the mistake to use multiple Team Project and have to paid the price thereafter. What you need is a good Source Control hierarchical structure and a good Area Path tree.

Concerning Solutions:
Having one solution per main component of your project is not a bad thing, developers can work on a dedicated subset of the project, to maximize the productivity and reduce the coupling between components.
But you still can have one global solution that reference all your projects and that will be use whenever you need to make changes that impact all your project. Having a global solution is also an easy way to build your whole project painlessly.
The issue here is about cross component references, if one component you develop (e.g. Application1) needs another component you develop (e.g. OurCompanyLibrary) then it creates a dependency between both and Application1 must reference "built assemblies" of OurCompanyLibrary.
Which implies either:

*

*You must create a location somewhere in your source control to store the built assemblies of all the components that will be referenced by others. Maintain a Build Cycle to release everything respecting the right order.

*Take advantage of the new standard which is Nuget and setup an in-house Nuget server (very easy to do) and build your own Nuget packages for the components that will be referenced by others.

*The easiest way to go is including all your dependencies developed in-house in the solution to make sure they are built when needed. It's easy to do but your Application1 project will include most of your VS Projects. I don't say it a good or bad way to go, it's your call. Sometime the easy way is the best one.
Each way has its own pros/cons, and only you can decide which one is the best to go.

A: As you have predicted it:-
OurCompanyLibrary would be a VS Solution.
OurCompanyLibrary.Application1 ... OurCompanyLibrary.ApplicationN would be VS Projects within that solution.
OurCompanyLibrary.ApplicationX.dlls would be references in the OurCompanyIntranet and OurCompanyInternet VS Solutions.
I'm not sure I understand your problem.
An Application VS Project in OurCompanyLibrary would be separately buildable producing its own dll that could then be referenced in the other two solutions.
If the problem is having all of the Applications under one VS Team Project (OurCompanyLibrary) then the answer would be to create a separate VS Team Project for each Application - OurCompanyLibrary1 for Application1, OurCompanyLibrary2 for Application2, etc.
The development of each Application is then totally self-contained and separate from the others.
If the problem is that you want different portions of the source in different solutions then that is achieved by adding the project to a solution.
This does mean that all of those solutions have all of the source code though.
We have something similar where I work:-
We have a solution that has 2 projects - our common business logic layer and our common data access layer.
Each of our other solutions has those projects included.
This means we can edit the source code from any solution.
I don't know if any of this will help you, but good luck with it!

A: If this is an application that in running in produciton I would make minimal changes to the folder/solution structure. In TFS in your build definition you can select multiple projects or you can also put multiple solution in the build script like in the below example
How to build 2 solutions from a single TFS team build definition

A: If you want to have a centralized reporting for the whole codebase, you should explore the possibility to use one TeamProject to host everything.In order to then distinguish between the different components/parts you can employ separate Areas within this TeamProject. Check out this very interesting article, especially the Pros/Cons section.


text:
Q: vi substitution matching I am able to pattern match a regex in vi, but when I add the replacement string, vi thinks that is part of the regex match. This occurs despite use of various different delimiters. Is there some way to avoid this? As an example, the following command matches and deletes the desired string (\a{b}[c]):
s:\\a{b}[c\]

However, If I add a replace string,
s:\\a{b}[c\]:abc

I receive the error
E486: Pattern not found: \\a{b}[c\]:abc

vi is therefore not recognizing the delimiter that separates the query regex from the replacement string. This happens with a variety of different separators/delimiters. How can I ensure that vi correctly distinguishes between regex pattern and replacement string?

A: The left bracket ([) starts a collection, or a set of characters that will match any one of its members. A collection is terminated by a right bracket (]), but you have backslash-escaped the right bracket in your pattern so vi sees everything to the right of the left bracket as being in the collection.
If you want to match a literal left bracket, you'll have to escape it with a backslash. If instead you meant to create a collection containing a c and a \, you'll need to backslash-escape the \. In other words, your substitute commands should probably look either like this
s:\\a{b}\[c\]:abc

or like this:
s:\\a{b}[c\\]:abc


text:
Q: Permutations of 1 to k among rows and columns of an n-order matrix Given a square matrix of order n (no elements are defined yet), some entries are marked, so that every row and column has k (k<n) marked entries. Is it possible to define an integer from 1 to k on every marked entry so that any row or column has every number exactly once?
I cannot post images yet (my first post), so here is an written-table example with n=5 and k=3 (marked entries as underlines):
x   _   _   x   _
x   x   _   _   _
_   _   _   x   x
_   x   x   _   _
_   _   x   _   x
The solution exists in this case (there are 36, but existence of one is enough):
x   3   2   x   1
x   x   3   1   2
3   2   1   x   x
1   x   x   2   3
2   1   x   3   x
Or, equivalently: given a table with pre-defined positions in the same quantity for any row or column, can I always find a way to put permutations in the rows and columns at the same time?
Seems to be a classic problem, but I could not find any demonstration.
This problem arises from trying to put teachers in classrooms. Many classrooms have the same teachers, so if I can only look at quantities first, then maybe the distribution becomes easier. It depends on the solution of the above table problem.

A: Yes, it is.
The marked entries correspond to edges of a bipartite graph with $n$ vertices in each part, all with degree $k$.  You want to colour the edges with $k$ colours, so no edges of the same colour share a vertex.
Using Hall's marriage theorem, the graph has a perfect matching.
Colour the corresponding edges with one colour and consider the graph with those edges removed.  This is now a bipartite graph of $n$ vertices, all of degree $k-1$.  Use induction.


text:
Q: unity udpclient cannot close on mac I'm writing a new game with unity3D. I use an unblock UdpClient with triggle to receive player's control command in my new game. I use udpclient.close() to close the socket. After I export it as a mac app and play it, I found that the socket I used cannot be close. When I start playing in unity, console show that address is already in use. Finally, I use
UdpClient.Client.Close ();
UdpClient.Close ();
((IDisposable)UdpClient).Dispose();

to close it. But I fail. I cannot close it at all! sudo lost -i :(port) show nothing. But netstat -anp udp | grep (port) show a udp4 is on the socket. So strange! Right? How can I close it?
BTW How can I make the socket be close when player click the close button of the window? Can I override the Application.Quit()?
Please help me! Sorry for my poor English.


text:
Q: HazelcastSerializationException: When Jet job is running over multiple cluster I am trying to run one of the Hazelcast-jet example over a Distributed System. My objective is to run code over Disributed System, Utilize Multiple machine's processing power. I have two Laptops connected via LAN. When I run this example in One Machine it works fine, to run it both system I Start Machine 1 and Machine 2 with only jet Instance. code on both Machines are,
Machine 1
public class PrimeFinder {

    public static void main(String[] args) {
        System.setProperty("hazelcast.logging.type", "log4j");
        try {
            JetConfig cfg = new JetConfig();
            cfg.setInstanceConfig(new InstanceConfig().setCooperativeThreadCount(
                    Math.max(1, getRuntime().availableProcessors() / 2)));
            cfg.setProperty("hazelcast.initial.min.cluster.size","3");
            Jet.newJetInstance(cfg);
            JetInstance jet = Jet.newJetInstance(cfg);

            DAG dag = new DAG();

            final int limit = 15_485_864;
            Vertex generator = dag.newVertex("number-generator", new GenerateNumbersMetaSupplier(limit));
            Vertex primeChecker = dag.newVertex("filter-primes", filterP(PrimeFinder::isPrime));
            Vertex writer = dag.newVertex("writer", writeListP("primes"));

            dag.edge(between(generator, primeChecker));
            dag.edge(between(primeChecker, writer));

            jet.newJob(dag).join();

            IListJet<Integer> primes = jet.getList("primes");
            List<Integer> sortedPrimes = primes.stream().sorted().limit(1000).collect(toList());
            System.out.println("Found " + primes.size() + " primes.");
            System.out.println("Some of the primes found are: " + sortedPrimes);

        } finally {
            Jet.shutdownAll();
        }
    }

    private static boolean isPrime(int n) {
        if (n <= 1) {
            return false;
        }

        int endValue = (int) Math.sqrt(n);
        for (int i = 2; i <= endValue; i++) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }

    static class GenerateNumbersMetaSupplier implements ProcessorMetaSupplier {

        private final int limit;

        private transient int totalParallelism;
        private transient int localParallelism;

        GenerateNumbersMetaSupplier(int limit) {
            this.limit = limit;
        }

        @Override
        public void init(@Nonnull Context context) {
            totalParallelism = context.totalParallelism();
            localParallelism = context.localParallelism();
        }

        @Override @Nonnull
        public Function<Address, ProcessorSupplier> get(@Nonnull List<Address> addresses) {
            Map<Address, ProcessorSupplier> map = new HashMap<>();
            for (int i = 0; i < addresses.size(); i++) {
                Address address = addresses.get(i);
                int start = i * localParallelism;
                int end = (i + 1) * localParallelism;
                int mod = totalParallelism;
                map.put(address, count -> range(start, end)
                        .mapToObj(index -> new GenerateNumbersP(range(0, limit).filter(f -> f % mod == index)))
                        .collect(toList())
                );
            }
            return map::get;
        }
    }

    static class GenerateNumbersP extends AbstractProcessor {

        private final Traverser<Integer> traverser;

        GenerateNumbersP(IntStream stream) {
            traverser = traverseStream(stream.boxed());
        }

        @Override
        public boolean complete() {
            return emitFromTraverser(traverser);
        }
    }

}

Machine 2
public class PrimeFinder {

    public static void main(String[] args) {
        System.setProperty("hazelcast.logging.type", "log4j");
        try {
            JetConfig cfg = new JetConfig();
            cfg.setInstanceConfig(new InstanceConfig().setCooperativeThreadCount(
                    Math.max(1, getRuntime().availableProcessors() / 2)));

            Jet.newJetInstance(cfg);
            JetInstance jet = Jet.newJetInstance(cfg);
        }
    }

Error
Members {size:4, ver:4} [
    Member [192.168.43.5]:5701 - e9ff45b4-50a2-4918-b51f-9fc3012cce7c
    Member [192.168.43.224]:5701 - 5931daa7-4452-4275-a3d5-a9daaf247f50
    Member [192.168.43.224]:5702 - 57bce3eb-71f7-40d3-86b3-64481feb84e9
    Member [192.168.43.5]:5702 - 9fff0e81-748d-4774-8556-2f45941bd59d this
]

06:10,158 [192.168.43.5]:5701 [jet] [3.2] Starting job 0368-8053-f940-0004 based on submit request
06:12,285 [192.168.43.5]:5701 [jet] [3.2] Didn't find any snapshot to restore for job '0368-8053-f940-0004', execution 0368-8056-5ec0-0001
06:12,286 [192.168.43.5]:5701 [jet] [3.2] Start executing job '0368-8053-f940-0004', execution 0368-8056-5ec0-0001, execution graph in DOT format:
digraph DAG {
    "number-generator" [tooltip="local-parallelism=2"];
    "filter-primes" [tooltip="local-parallelism=2"];
    "writer" [tooltip="local-parallelism=1"];
    "number-generator" -> "filter-primes";
    "filter-primes" -> "writer";
}
HINT: You can use graphviz or http://viz-js.com to visualize the printed graph.
06:12,733 [192.168.43.5]:5701 [jet] [3.2] Execution plan for jobId=0368-8053-f940-0004, jobName='0368-8053-f940-0004', executionId=0368-8056-5ec0-0001 initialized
06:12,784 [192.168.43.5]:5702 [jet] [3.2] Execution plan for jobId=0368-8053-f940-0004, jobName='0368-8053-f940-0004', executionId=0368-8056-5ec0-0001 initialized
06:12,824 [192.168.43.5]:5701 [jet] [3.2] Execution of job '0368-8053-f940-0004', execution 0368-8056-5ec0-0001 failed after 648 ms
com.hazelcast.nio.serialization.HazelcastSerializationException: java.io.IOException: unexpected exception type
    at com.hazelcast.internal.serialization.impl.SerializationUtil.handleException(SerializationUtil.java:70)
    at com.hazelcast.internal.serialization.impl.AbstractSerializationService.readObject(AbstractSerializationService.java:275)
    at com.hazelcast.internal.serialization.impl.ByteArrayObjectDataInput.readObject(ByteArrayObjectDataInput.java:574)
    at com.hazelcast.jet.impl.execution.init.CustomClassLoadedObject.read(CustomClassLoadedObject.java:56)
    at com.hazelcast.jet.impl.execution.init.VertexDef.readData(VertexDef.java:153)
    at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.readInternal(DataSerializableSerializer.java:160)
    at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.read(DataSerializableSerializer.java:106)
    at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.read(DataSerializableSerializer.java:51)
    at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:48)
    at com.hazelcast.internal.serialization.impl.AbstractSerializationService.readObject(AbstractSerializationService.java:269)
    at com.hazelcast.internal.serialization.impl.ByteArrayObjectDataInput.readObject(ByteArrayObjectDataInput.java:574)
    at com.hazelcast.jet.impl.util.ImdgUtil.readList(ImdgUtil.java:444)
    at com.hazelcast.jet.impl.execution.init.ExecutionPlan.readData(ExecutionPlan.java:307)
    at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.readInternal(DataSerializableSerializer.java:160)
    at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.read(DataSerializableSerializer.java:106)
    at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.read(DataSerializableSerializer.java:51)
    at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:48)
    at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toObject(AbstractSerializationService.java:187)
    at com.hazelcast.jet.impl.execution.init.CustomClassLoadedObject.deserializeWithCustomClassLoader(CustomClassLoadedObject.java:65)
    at com.hazelcast.jet.impl.operation.InitExecutionOperation.deserializePlan(InitExecutionOperation.java:116)
    at com.hazelcast.jet.impl.operation.InitExecutionOperation.run(InitExecutionOperation.java:71)
    at com.hazelcast.spi.Operation.call(Operation.java:170)
    at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.call(OperationRunnerImpl.java:210)
    at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:199)
    at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:416)
    at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:153)
    at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:123)
    at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:110)
    at ------ submitted from ------.(Unknown Source)
    at com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.resolve(InvocationFuture.java:126)
    at com.hazelcast.spi.impl.AbstractInvocationFuture$1.run(AbstractInvocationFuture.java:251)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64)
    at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80)
Caused by: java.io.IOException: unexpected exception type.....

When I run this code on a single Machine, Example is working fine and output is as expected.
Members {size:2, ver:2} [
    Member [172.29.97.33]:5701 - e2e6a9d5-9bdd-49d4-934c-e7becee8ad58
    Member [172.29.97.33]:5702 - 9e121fda-ca89-4d8c-a20e-3e345ce91fc2 this
]

36:20,086 [172.29.97.33]:5701 [jet] [3.2] Starting job 0368-94f5-7bc0-0002 based on submit request
36:20,316 [172.29.97.33]:5701 [jet] [3.2] Didn't find any snapshot to restore for job '0368-94f5-7bc0-0002', execution 0368-94f7-a640-0001
36:20,316 [172.29.97.33]:5701 [jet] [3.2] Start executing job '0368-94f5-7bc0-0002', execution 0368-94f7-a640-0001, execution graph in DOT format:
digraph DAG {
    "number-generator" [tooltip="local-parallelism=2"];
    "filter-primes" [tooltip="local-parallelism=2"];
    "writer" [tooltip="local-parallelism=1"];
    "number-generator" -> "filter-primes";
    "filter-primes" -> "writer";
}
HINT: You can use graphviz or http://viz-js.com to visualize the printed graph.
36:21,185 [172.29.97.33]:5701 [jet] [3.2] Execution plan for jobId=0368-94f5-7bc0-0002, jobName='0368-94f5-7bc0-0002', executionId=0368-94f7-a640-0001 initialized
36:21,237 [172.29.97.33]:5702 [jet] [3.2] Execution plan for jobId=0368-94f5-7bc0-0002, jobName='0368-94f5-7bc0-0002', executionId=0368-94f7-a640-0001 initialized
36:21,250 [172.29.97.33]:5701 [jet] [3.2] Start execution of job '0368-94f5-7bc0-0002', execution 0368-94f7-a640-0001 from coordinator [172.29.97.33]:5701
36:21,327 [172.29.97.33]:5702 [jet] [3.2] Start execution of job '0368-94f5-7bc0-0002', execution 0368-94f7-a640-0001 from coordinator [172.29.97.33]:5701
37:11,263 [172.29.97.33]:5701 [jet] [3.2] Execution of job '0368-94f5-7bc0-0002', execution 0368-94f7-a640-0001 completed in 51,171 ms
Found 1000000 primes.
Some of the primes found are: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919]
37:21,664 [172.29.97.33]:5702 [jet] [3.2] Removing connection to endpoint [172.29.97.33]:5701 Cause => java.net.SocketException {Connection refused: no further information to address /172.29.97.33:5701}, Error-Count: 5
37:21,697 [172.29.97.33]:5702 [jet] [3.2] Member [172.29.97.33]:5701 - e2e6a9d5-9bdd-49d4-934c-e7becee8ad58 is suspected to be dead for reason: No connection
37:21,697 [172.29.97.33]:5702 [jet] [3.2] Starting mastership claim process...
37:21,698 [172.29.97.33]:5702 [jet] [3.2] Local MembersView{version=2, members=[MemberInfo{address=[172.29.97.33]:5701, uuid=e2e6a9d5-9bdd-49d4-934c-e7becee8ad58, liteMember=false, memberListJoinVersion=1}, MemberInfo{address=[172.29.97.33]:5702, uuid=9e121fda-ca89-4d8c-a20e-3e345ce91fc2, liteMember=false, memberListJoinVersion=2}]} with suspected members: [[172.29.97.33]:5701] and initial addresses to ask: []
37:21,772 [172.29.97.33]:5702 [jet] [3.2]

Members {size:1, ver:3} [
    Member [172.29.97.33]:5702 - 9e121fda-ca89-4d8c-a20e-3e345ce91fc2 this
]

37:21,773 [172.29.97.33]:5702 [jet] [3.2] Mastership is claimed with: MembersView{version=3, members=[MemberInfo{address=[172.29.97.33]:5702, uuid=9e121fda-ca89-4d8c-a20e-3e345ce91fc2, liteMember=false, memberListJoinVersion=2}]}

Can anyone help me out what am I doing wrong?

A: You need to add the class to the JobConfig and pass it when submitting the pipeline:
JobConfig jobConfig = new JobConfig();
jobConfig.addClass(PrimeFinder.class);

jet.newJob(dag, jobConfig).join();


text:
Q: hack or something similar on my iPad Air I am new to using an iPad but I clicked accidentally on a bad link in Facebook and since then My Skype has been hacked and sending erroneous messages to my Skype contacts..how do I find out and remove malware on my iPad.  I have tried looking for an antivirus or a way to be able to look on my pad to see where I might be able to see where any malware may be hidden...I.e. On a PC it can be inregistry etc, whereas on an iPad I don't have a clue where to look but I have not been able to find any sufficient answer to help.   This question may be a bit basic for here but I didn't know where else to ask as I wasn't getting any answers elsewhere I.e Apple, Google, etc X

A: Go to Settings > General > Profiles and Device Management. Delete any profiles you don't remember installing, then restart your iPad.
Next, update it to the latest version of iOS (9.3.2), this should remove the Jailbreak, if there is one, as that version cannot be Jailbroken.
As for what caused it to send spam to your contacts:
If the iPad had malware, well, obviously that was it.
If not, did you sign into it on any other devices?
Also, does your daughter use an iPhone, iPad, or Mac? If so, you can use FaceTime instead of Skype.


text:
Q: Xbox 360 slim power supply unit issue My Xbox 360 Slim's power supply unit got burned. The reason is that the input AC voltage (100-127v) is not supported in my country (here it's 240v).
There were three electric shock sounds from inside the PSU (visible smokes also appeared) and immediately after that I disconnected the wire from my AC wall adapter.
What I want to know is, did my System also get fried along with the PSU? The PSU was plugged into my System when it got burnt. Please share your expertise ideas here.
UPDATE:
System didn't turn on (I didn't even touch it) just 3 poped electric noises from the PSU and my house's fuse is also went down. No lights or sounds came from the System.
UPDATE 02:
Bought a power supply from eBay that is compatible to my countries power difference

Input: AC 100 - 240V ~ 2A 47-63H

Output: DC 135W 12V---10.83A

Plugged it and voila..! Xbox did turned on and it's just working fine,except the power adapter sounds a little noisy (I guess this is because it's not the original and made in China).
Thanks.

A: Generally speaking those adapters are of low quality and will most likely not invoke a fail-safe to save your device. I noticed the slim adapters are of a much lower quality then older adapters that had built in fans and a ground. Without a ground it had no where to send the electricity and more than likely it simply passed it on to the device.  The fact that you had to unplug it and it didn't shut down automatically is a REALLY bad sign. Generally devices can handle variances in voltage but in your case it was a significant variance. Did the xbox light up or did the touch button make the ding? If so your chances it survived are even less since it was obviously drawling power from the device. You probably have a very small chance it survived but the only way to know for sure is to test it this time not a on 240v outlet! Best of luck.


text:
Q: How to keep Zend_Debug HTML tags out of Zend_Log I use Zend_Debug::dump to dump variables into a Zend_Log file.  How can I get it to stop wrapping the output in HTML tags?
The documentaion says "If the output stream is detected as a web presentation, the output of var_dump() is escaped using » htmlspecialchars() and wrapped with (X)HTML  tags."  Why does it think my log file is a web presentation?
The method for the dump function has a boolean $echo flag.  Even when this is FALSE, I get HTML markup in my log files.
Thanks for you help!

A: Zend Debug is always using htmlspecialchars() to quote. You cant disable this by an provided parameter.
The boolean for "echo" is only used to disable the var_dump() (wich is used in Zend_Debug) printing to the browser.
Code from Zend_Debug::dump():
$output = htmlspecialchars($output, ENT_QUOTES);
    if (self::getSapi() == 'cli') {
        $output = PHP_EOL . $label
                . PHP_EOL . $output
                . PHP_EOL;
    } else {
        if(!extension_loaded('xdebug')) {
            $output = htmlspecialchars($output, ENT_QUOTES);
        }

        $output = '<pre>'
                . $label
                . $output
                . '</pre>';
    }


text:
Q: Getting Syntax Error while creating AD User for Azure SQL DB When I am trying to create an Azure Active Directory User, getting syntax error.
create User s-dbreadwrtnonprod@work.com from external provider;
Error:
Msg 102, Level 15, State 1, Line 11 Incorrect syntax near '-'.

A: Based on this documentation you need to put the name of the user between brackets.
CREATE USER [s-dbreadwrtnonprod@work.com] FROM EXTERNAL PROVIDER;

Make sure you have configured Azure Active Directory authentication as outlined here.


text:
Q: Grouping multiple dates from json in klipfolio I have a JSON formatted input in the below form:
[
  {
    "hash":"abcdefg",
    "Stage 1 Status":"Complete",
    "Stage 1 Completion":"2021-01-16T19:56:10+02:00",
    "Stage 2 Status":"Complete",
    "Stage 2 Completion":"2021-02-17T16:30:30+03:00",
    "Stage 3 Status":"Complete",
    "Stage 3 Completion":"2021-03-17T16:30:34+03:00"
  },
  {
    "hash":"klmnop",
    "Stage 1 Status":"Complete",
    "Stage 1 Completion":"2021-01-16T19:56:10+02:00",
    "Stage 2 Status":"Open",
    "Stage 2 Completion":"2021-02-17T16:30:34+03:00"
  },
  {
    "hash":"jklmn",
    "Stage 1 Status":"Complete",
    "Stage 1 Completion":"2021-01-16T19:56:10+02:00",
    "Stage 2 Status":"Lost",
    "Stage 2 Completion":"2021-07-17T16:30:30+03:00"
  }
]

And I want to make a klip in klifolio, Showing me the Completed stages of each month like the below output derived from the above data.

January
February
March

Stage1
3
0
0

Stage2
0
1
0

Stage3
0
0
1

The data is of three years and I need to show the years counts in separate tables.
New to klipfolio so till now I have constructed arrays for table column titles and row tags, but I am having difficulty with the query.

A: To accomplish this in Klipfolio, you'll need to first organize your JSON data into columnar structures so you can perform queries on it. To do this you need one set of data for the status, completion and stage name.

*

*For the stage name, you can utilize kf:names and the LEFT() function. This will look like:
LEFT(@kf:names(/,FALSE),7)
By default, kf:names returns data in alphabetical order, and the FALSE parameter return the data in the order from top to bottom of the JSON structure.
LEFT() will return the 7 leftmost characters, which will only return "Stage 1" instead of "Stage 1 Status"

*To return the date, the wildcard selector is needed as well as the contains() function to return any values for the fields that have the name the contains "Completion".
@/*[contains(name(),'Completion')]

*Finally, to return the status you'll need to do the same as above, but search for field names that contain "status".
@/*[contains(name(),'Status')]

*From here you should have 3 arrays of data you can query upon. The first query which returns all field names in your JSON structure will first need to be filtered to return the same amount of items as the dates and status arrays. You can use SELECT() to only return fields with 'Completion' or 'Status' as we know there is a one-to-one relationship between these fields and the values.
SELECT(LEFT(@kf:names(/,FALSE),7),CONTAINS(@kf:names(/,FALSE),"Status"))
This will return 7 items to match the 7 items of dates and statuses.
Now that the data is in the proper shape, a LOOKUP() can be used in each column to align the count of completed records per stage, by using the SELECT(), AND(), GROUP() and COUNTDISTINCT() functions.
First, results reference the column with the stage names, in the first parameter of LOOKUP(). Then use a SELECT() to filter for only the completed stages which fall in a specific month. For the dates, you'll need to convert to unix time with DATE() and then DATEVALUE() to convert to something that is rolled up to a month like "yyyyMM" format which would return "202101" if the date is in January of this year.
The SELECT() looks like this:
SELECT(SELECT(LEFT(@kf:names(/,FALSE),7),CONTAINS(@kf:names(/,FALSE),"Status")),AND(DATEVALUE(DATE(@/*[contains(name(),'Completion')],"yyyy-MM-dd"),"yyyyMM")="202101",@/*[contains(name(),'Status')]="Complete"))
In the second parameter wrap a GROUP() around the SELECT() to group like values and in the third parameter of the LOOKUP() wrap the SELECT() with a COUNTDISTINCT() to count the items per group. The whole formula for the January 2021 column would look like so:
LOOKUP(&Stages,GROUP(SELECT( SELECT(LEFT(@kf:names(/,FALSE),7),CONTAINS(@kf:names(/,FALSE),"Status")), AND(DATEVALUE(DATE(@/*[contains(name(),'Completion')],"yyyy-MM-dd"),"yyyyMM")="202101", @/*[contains(name(),'Status')]="Complete"))), COUNTDISTINCT(SELECT( SELECT(LEFT(@kf:names(/,FALSE),7),CONTAINS(@kf:names(/,FALSE),"Status")), AND(DATEVALUE(DATE(@/*[contains(name(),'Completion')],"yyyy-MM-dd"),"yyyyMM")="202101", @/*[contains(name(),'Status')]="Complete"))))
From there, you can change the 202101 in the formula to any yyyyMM to return a particular month data, IE. for the next column, February it would be 202102.


text:
Q: Calling a Java Web service from silverlight throws an exception After my previous question HERE, I found the solution (well, part of it).
Here's the code for Java part:
@WebService

public class MyWebService
{
    @WebMethod
    public String myMethod()
    {
        return "Hello World";
    }
@WebMethod
public int Add(@WebParam(name="a") int a,
               @WebParam(name="b") int b)
{
    return a + b;
}

public static void main(String[] args)
{
    String address = "http://127.0.0.1:8023/_WebServiceDemo";
    Endpoint.publish(address, new MyWebService());
    System.out.println("Listening: " + address);
}

}
And Here is the Silverlight part:
private void SearchResultList_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        MyWebServiceClient proxy = new MyWebServiceClient();
        proxy.AddCompleted += proxy_AddCompleted;
        proxy.AddAsync(2, 3);
    }

    void proxy_AddCompleted(object sender, AddCompletedEventArgs e)
    {
        txtSearch.Text = e.Result.ToString();
    }

But when I run this, e.Result throws an exception.
What am I missing/ How should I solve it?
Note that this code runs perfectly in C# Console application (when it's not async). But when I run the async code, it doesn't work.
Thanks in advance.

A: I guess you are getting a System.ServiceModel.CommunicationException when trying to access the Java Webservice from Silverlight.
There is nothing basically wrong with your code, and it should also work with async calls in C# Console App.
The main problem is that Silverlight (as a browser plugin) enforces some security restrictions that prevent a Silverlight Application to talk to another server than the one loaded from (defined by server name and port) without further configuration. This behaviour can be configured as described here (also search for "silverlight cross-domain calls" or "silverlight cross domain policy").
This restrictions (normally) do not apply to desktop or console applications so they'll work fine with the same web service.
To make your code work you need to host the Silverlight Application inside the same "project" / website than your webservice (so I suppose, the self-hosting webservice won't work and you need to switch to Java web project where the webservice is to be hosted). As the Silverlight Application basically consists of an enclosing HTML file plus the referenced binaries, you can host it on any server, e.g. Apache Tomcat.
Hope this helps.


text:
Q: Search function not working in html table I have huge data records in my table which I will be fetching from my database table and for that I will need search option to filter data.
the search function is not working.
When I enter any words in search box it does not show anything,neither it says record does not exist nor throws any error.
***Expected:***When user enters anything in search box,the record related with those words should be displayed.Please check the code and let me know how can I resolve it.
       <?php
$db_host = 'localhost'; // Server Name
$db_user = 'root'; // Username
$db_pass = ''; // Password
$db_name = 'contacts'; // Database Name

$conn = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
if (!$conn) {
die ('Failed to connect to MySQL: ' . mysqli_connect_error());
 }

$sql = 'SELECT *
    FROM contact';

$query = mysqli_query($conn, $sql);

if (!$query) {
die ('SQL Error: ' . mysqli_error($conn));
}
?>

<title>Displaying MySQL Data in HTML Table</title>

<input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for names.." title="Type in a name">

US Data

            ContactID
            ContactOwner
            LeadSource
            First_name
            Last_name
            AccountName
            Title
            EmailID
            Department
            Industry
            Phone
            Mobile
            Fax
            DOB
            Assistant
            AsstPhone
            ReportsTo
            LinkedIn
            CallStatus
            Street
            OtherStreet
            City
            State
            Zip
            Country
            Description

    <?php
    $no     = 1;
    $total  = 0;
    while ($row = mysqli_fetch_array($query))
    {

        echo '

                '.$row['ContactID'].'
                '.$row['ContactOwner'].'
                '.$row['LeadSource'].'
                '.$row['First_name'].'
                '.$row['Last_name'].'
                '.$row['AccountName'].'
                '.$row['Title'].'
                '.$row['EmailID'].'
                '.$row['Department'].'
                '.$row['Industry'].'
                '.$row['Phone'].'
                '.$row['Mobile'].'
                '.$row['Fax'].'
                '.$row['DOB'].'
                '.$row['Assistant'].'
                '.$row['AsstPhone'].'
                '.$row['ReportsTo'].'
                '.$row['LinkedIn'].'
                '.$row['CallStatus'].'
                '.$row['Street'].'
                '.$row['OtherStreet'].'
                '.$row['City'].'
                '.$row['State'].'
                '.$row['Zip'].'
                '.$row['Country'].'
                '.$row['Description'].'

';

        $no++;
    }?>

A: Your statement that it's "not working" is not strictly true. It does work, but only in limited circumstances. If you'd tested it thoroughly you could have provided this data in the question - that's what I meant by explaining the problem in detail and providing full information.
Anyway, there are a number of issues with the code.
1) It only ever searches the first column of any row (getElementsByTagName("td")[0] returns only the first column)
2) If any of your  elements were to contain further HTML for any reason, it would search the HTML tags as well. innerHTML should be replaced with innerText to avoid that.
3) Once you search through all columns, the simple if/else logic to show/hide the whole
 will fail because each time you loop through a column, it could cause the column to be hidden again, when the previous iteration had caused it to be shown. Instead, assume it will be hidden, and then only show it if there's at least one match to the search text within the columns.
4) I think once you get lots of rows you will get performance and usability problems because the search begins as soon as the user types a single character. If you type "s" and there are thousands of rows with thousands of cells, chances are 70% of them will contain "s" (in English, at least). It will slow down the system and provide no value to the user. I have written my example so that it doesn't start until the user enters 3 characters. You might want to provide some instructions to that effect in your finished product (or associated training materials).
Here is a working version, using some basic not-quite-random sample data. Note that the "example" ID is moved onto the
 element, to avoid hiding the table header by accident.

function myFunction() {
  var input, filter, table, tr, td, i;
  var input = document.getElementById("myInput");
  var filter = input.value.toUpperCase();

  var table = document.getElementById("example");
  var trList = table.getElementsByTagName("tr");

  for (i = 0; i < trList.length; i++)
  {
    //don't initiate search unless user types at least 3 characters. This will greatly improve performance and usability especially with large tables.
    if (filter.length >= 3)
    {
   var match = false;
      var tdList = trList[i].getElementsByTagName("td");

   //loop through every td
   for (j = 0; j < tdList.length; j++)
   {
     var td = tdList[j];

        if (td)
     {
          if (td.innerText.toUpperCase().indexOf(filter) > -1) {
      match = true;
          }
     }
      }

   if (match == true)
   {
        trList[i].style.display = "";
   }
   else
   {
  trList[i].style.display = "none";
   }
 }
    else
    {
      trList[i].style.display = "";
    }
  }
}
<input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for names.." title="Type in a name">

            ContactID
            ContactOwner
            LeadSource

   Fish
   Fishing
   Test

   Hello
   World
   Estate

   Yellow
   Calling
   Bring


text:
Q: How can I create a Random Access File record without specifying the number of records? Here the registration number is given as 100, what I want is;
Instead of determining the number of records from the beginning, I want the number of records to increase as I add records.
I will exemplify what I want to tell through arrays;
Not so;
Array[100];
Array[0]=data;

Like this;
Array[];
Array.push(data);

import com.deitel.jhtp6.ch24.RandomAccessAccountRecord;
import java.io.IOException;
import java.io.RandomAccessFile;

public class CreateRandomFile {
    private static final int NUMBER_RECORDS = 100;

    public void createFile() {
        RandomAccessFile file = null;
        try {
            file = new RandomAccessFile("clients.dat", "rw");
            RandomAccessAccountRecord blankRecord = new RandomAccessAccountRecord();
            for (int count = 0; count < NUMBER_RECORDS; count++)
                blankRecord.write(file);
            System.out.println("Created file clients.dat.");
            System.exit(0);
        } catch (IOException ioException) {
            System.err.println("Error processing file.");
            System.exit(1);
        } finally {
            try {
                if (file != null)
                    file.close();
            } catch (IOException ioException) {
                System.err.println("Error closing file.");
                System.exit(1);
            }
        }
    }
}

It can be done by counting the number of recordings and adding +1 each time, but this is not practical or professional at all.

A: If you don't know the number of the records in advance, then you should not use a for loop, but rather a different construct. A while loop with a check if  there are still accounts records to write to file left would do for example.
I don't understand the code logic though, you initialise one instance of
RandomAccessAccountRecord blankRecord = new RandomAccessAccountRecord(); and then call the write method on the same instance hundred times?
I don't get this one either:

Not so; Array[100]; Array[0]=data;
Like this; Array[]; Array.push(data);

Does that mean that you need a data structure which will be initialised as empty and you would dynamically add elements? Then array is not the best choice for that.


text:
Q: google admob doesn't show ad on my android app I have integrated firebase admob in my android app, and have setup properly for the adview to work, but logcat constantly shows this message:
logcat message
and i've tried the test adunit id provided on the admob documentation site, it worked fine, but when i switched to my own admob app id and ad unit ad, it just didn't work, could anybody help me? appreciated a lot!
this is my code:
   @Override
  public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setHasOptionsMenu(true);

    MobileAds.initialize(getActivity(), "admob app id");
    fetchBooks();
  }

  @Override
  public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_book_gallery, container, false);

    //.........

    adView = v.findViewById(R.id.ad_view);
    AdRequest request = new AdRequest.Builder().addTestDevice("AE61276545183AF0466F05469FD032CC").build();
    adView.loadAd(request);

    //...........

    return v;
  }

this is my xml file
 <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context=".BookGalleryActivity">

  <android.support.v7.widget.RecyclerView
    android:id="@+id/recycler_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

  </android.support.v7.widget.RecyclerView>

  <com.google.android.gms.ads.AdView
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    android:id="@+id/ad_view"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|center"
    ads:adSize="BANNER"
    ads:adUnitId="ad unit id">

  </com.google.android.gms.ads.AdView>

  <android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|left"
    android:layout_marginLeft="16dp"
    android:layout_marginBottom="64dp"
    android:src="@drawable/dice"/>

</android.support.design.widget.CoordinatorLayout>


text:
Q: Java String replaceAll regex to remove everything except digits, dots and spaces I've browsed a lot of regex topics but none of these lead me to success in my particular situation.
(Using java) I have some charsequence which I then convert to array and extract numbers to array of doubles.

asdsad 59 asdf .2 asdf 56 89 .a 2.4 wef 95 asdf.

then I want to use regex to remove the extra part and compose the following string

59 2 56 89 2.4 95

so then I could just use .split(" ") and put them all to an array of doubles.
Until this moment I used the following expression
[^0-9.\s]

but it leaves the extra dots and therefore not reliable. Now I'm trying something like
[^0-9.\s]|([^0-9]\.[^0-9])

but it's not working at all, I'm not really good with regex, so could you explain me why the last expression is not working and how to fix it.

A: Have you tried string.replaceAll("[^\\d\\. ]","")?
You can see the results here: https://regex101.com/r/X6gLaY/2
String string = "asdsad 59 asdf 2 asdf 56 89 .a 2.4 wef 95 asdf.";
String regex = "[^\\d\\. ]| \\.|\\.$";
System.out.println(string.replaceAll(regex,""));

Java example: http://ideone.com/w4BWOZ
Outputs:
59  2  56 89 2.4  95

A: I've played with regex for half a day until I come up with this.
Apparently it really matters what the order of the expression is. I assume it's because it iterates over each condition and always uses the data that's left after execution of previous condition, so I changed the regular expression to:

*

*exclude all dots followed by non-digit

*exclude all non-digits followed by dot

*exclude all left-over non-digits
[^0-9]\.|\.[^0-9]|[^0-9.\s]

Now it works like a charm. Hope it helps someone. :)

A: Add an alternative to remove dots that are not preceded with a digit that is followed with a dot and a digit:
[^\d\s.]+|(?<!\d\.\d)\.

See this regex demo.
Details:

*

*[^\d\s.]+ - 1+ chars other than digits, whitespaces and dots

*| - or

*(?<!\d\.\d) - a location not preceded with a digit, dot, digit

*\. - a dot.

Sample code:
String re = "[^\\d\\s.]+|(?<!\\d\\.\\d)\\.";
System.out.println("asdsad 59 asdf 2 asdf 56 89 .a 2.4 wef 95 asdf.".replaceAll(re, ""));
System.out.println("asdsad 59 asdf .2 asdf 56 89 .a 2.4 wef 95 asdf.".replaceAll(re, ""));

Java demo

A: You can split directly on this regex:
([^\d.]|\B\.|\.\B)+

ie
String[] parts = str.split("([^\\d.]|\\B\\.|\\.\\B)+");

Although this (may) leave a leading blank in the array.
To go directly to a double[] in one line (handling the leading blank):
double[] numbers = Arrays.stream(str.split("([^\\d.]|\\B\\.|\\.\\B)+"))
    .filter(s -> !s.isEmpty())
    .mapToDouble(Double::parseDouble)
    .toArray();

See live demo.