text:
Q: Whats is the best way to interact with the server of a JWS java application Im having some trouble determining how to write files using a Java Web Start program, I want to write files to the server describing files that have been uploaded to a cloud server. I also want to be sent data such as file names and paths from the client so that I can create a connection between the user and the cloud storage facility and send their files to it.
Currently when i try to run my Web Start Application it works fine and gives no errors, but simply will not write Files and Folders to the Server it resides on. For example, the following code does not work:
new File ("ArFile Clients\\File Data\\"
        + user.getCompany().getName() + "\\" + user.getUsername()).mkdirs();

This directory is located on the server and it created to store data on users of the app. But during runtime it is simply ignored or not executed.
I am not using sockets or FTP or anything like that, the cloud server has its own custom library which I am using, I know for a fact that the issue must lie with how Java Web Start works, I just cant find any good examples involving creating files on the server machine and extracting data from a clients machine (just filesystem data like directories and files)

A: I think some explanations of what webstart really is will be relevant here :)
First of all, web start is something that runs on the client JVM.
Yes, it uses jnlp file where you should specify urls of the dependent jars/other resources.
All that web start does is reads this jnlp file (again on client side), parses, figures out the list of urls where the resources exist and donwloads them onto the client machine.
Physically this is achieved by using javaws utility that one can find in
%JDK_HOME%\bin
folder.
Just like ''java'' gets as an input a series of class-files/jars and spawns a jvm, javaws gets a jnlp, reads it, brings resources and spawns a jvm :)
There is some additional stuff, the web start can do (like auto updates) but this is a 'core functionality'.
Bottom line, if you do want to write some files on server, web start is a wrong way to go.
Conceptually once your application gets loaded and you want to store files on server - create some kind of connection to the server machine from client and upload your files there. One way or another it can't be done with Web Start :)
I hope it helps


text:
Q: How to Add a YouTube Video to a Playlist via YouTube official PHP SDK I am using the code in this page
https://developers.google.com/youtube/v3/code_samples/php#upload_a_video
to upload a video to youtube. but i can't find away to put the uploaded video to an already exists playlist.
I found this class Google_Service_YouTube_Resource_PlaylistItems which has insert method but I have no clue how to use it
this is what I came up with
                $resourceId = new \Google_Service_YouTube_ResourceId();
                $resourceId->setVideoId( $status["id"] );
                $resourceId->setKind('youtube#video');

                $playlistItemSnippet = new \Google_Service_YouTube_PlaylistItemSnippet();
                $playlistItemSnippet->setTitle('First video in the test playlist');
                $playlistItemSnippet->setPlaylistId($playlistId);
                $playlistItemSnippet->setResourceId($resourceId);

                $playlistItem = new \Google_Service_YouTube_PlaylistItem();
                $playlistItem->setSnippet($playlistItemSnippet);
                $playlistItemResponse = $youtube->playlistItems->insert(
                    'snippet,contentDetails', $playlistItem, array());

this was the response
object(GuzzleHttp\Psr7\Request)#698 (7) {
  ["method":"GuzzleHttp\Psr7\Request":private]=>
  string(4) "POST"
  ["requestTarget":"GuzzleHttp\Psr7\Request":private]=>
  NULL
  ["uri":"GuzzleHttp\Psr7\Request":private]=>
  object(GuzzleHttp\Psr7\Uri)#749 (7) {
    ["scheme":"GuzzleHttp\Psr7\Uri":private]=>
    string(5) "https"
    ["userInfo":"GuzzleHttp\Psr7\Uri":private]=>
    string(0) ""
    ["host":"GuzzleHttp\Psr7\Uri":private]=>
    string(18) "www.googleapis.com"
    ["port":"GuzzleHttp\Psr7\Uri":private]=>
    NULL
    ["path":"GuzzleHttp\Psr7\Uri":private]=>
    string(25) "/youtube/v3/playlistItems"
    ["query":"GuzzleHttp\Psr7\Uri":private]=>
    string(29) "part=snippet%2CcontentDetails"
    ["fragment":"GuzzleHttp\Psr7\Uri":private]=>
    string(0) ""
  }
  ["headers":"GuzzleHttp\Psr7\Request":private]=>
  array(3) {
    ["Host"]=>
    array(1) {
      [0]=>
      string(18) "www.googleapis.com"
    }
    ["content-type"]=>
    array(1) {
      [0]=>
      string(16) "application/json"
    }
    ["X-Php-Expected-Class"]=>
    array(1) {
      [0]=>
      string(35) "Google_Service_YouTube_PlaylistItem"
    }
  }
  ["headerNames":"GuzzleHttp\Psr7\Request":private]=>
 array(3) {
    ["content-type"]=>
    string(12) "content-type"
    ["host"]=>
    string(4) "Host"
    ["x-php-expected-class"]=>
    string(20) "X-Php-Expected-Class"
  }
  ["protocol":"GuzzleHttp\Psr7\Request":private]=>
  string(3) "1.1"
  ["stream":"GuzzleHttp\Psr7\Request":private]=>
  object(GuzzleHttp\Psr7\Stream)#730 (7) {
    ["stream":"GuzzleHttp\Psr7\Stream":private]=>
    resource(589) of type (stream)
    ["size":"GuzzleHttp\Psr7\Stream":private]=>
    NULL
    ["seekable":"GuzzleHttp\Psr7\Stream":private]=>
    bool(true)
    ["readable":"GuzzleHttp\Psr7\Stream":private]=>
    bool(true)
    ["writable":"GuzzleHttp\Psr7\Stream":private]=>
    bool(true)
    ["uri":"GuzzleHttp\Psr7\Stream":private]=>
    string(10) "php://temp"
    ["customMetadata":"GuzzleHttp\Psr7\Stream":private]=>
    array(0) {
    }
  }
}

Note:
I can upload a video via the API so the authentication and connection and all the basic requirements is OK

A: Here is a starting point from the SO post.
This is the code that solves the problem of the user.
$(function() {
    $('input.Chilltrap').on('click', function(e) {
        var chilltrap = this.id;
        if( $("input[name=" + chilltrap + "]").prop('checked') ) {
            checkboxstatusCt = "Yes";
        }
        else {
            checkboxstatusCt = "No";
        }
        var url = "url.php";
        var params = "c="+checkboxstatusCt+"&s="+chilltrap;
        if (window.XMLHttpRequest) {
            xmlhttp = new XMLHttpRequest();
        } else {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                $("#error").html(xmlhttp.responseText);
                $("#error"). fadeIn('fast');
                setTimeout(function(){
                    $("#error"). fadeOut('slow');
                },2000);
            }
        };
        xmlhttp.open("GET", url+"?"+params,true);
        xmlhttp.send();
    });
});

You can also check some related SO post listed below to get idea how they able to upload videos in playlist.

*

*Youtube API (PHP) - how to add (existing) video to existing playlist?

*Upload Video to Specific Playlist in youtube

*insert video into a playlist with youtube api v3

*Youtube PHP API - How do I add a specific video to a specific playlist using the PlaylistID

redpajama_set_name: RedPajamaStackExchange


text:
Q: Got File not found error after nginx server block configuration I'm trying to configure nginx server block with the same configuration i used on another server which worked well on the other server but for some reason i couldn't find out can not work on the new server am trying to configure it. below if the config file
 server {
    set $project_root /var/www/test.example.com/html;

    charset utf-8;
    client_max_body_size 128M;

    listen 80;
    server_name test.example.com;
    root $project_root;
    index index.html index.htm index.php;

    location / {
        rewrite ^/(.*)$ /index.php?$args&request_filename=$1 last;
        try_files $uri $uri/ @rewrite;
    }

    location @rewrite {
        rewrite ^/(.*)$ /index.php?$args&request_filename=$1 break;
    }

    location /nginx_status {
      stub_status on;
      access_log off;
      allow 127.0.0.1;
      deny all;
    }
    location ~ [^/]\.php(/|$) {
      fastcgi_pass unix:/run/php-fpm/www.sock;
      fastcgi_index index.php;
      include fastcgi.conf;
    }

    location ~ .*\.(uploads|img|images)?$ {
        expires 7d;
        access_log off;
    }

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico|svg|woff2|ttf)$ {
      expires 30d;
      access_log off;
    }
    location ~ .*\.(js|css|plugins|assets)?$ {
      expires 7d;
      access_log off;
    }
    location ~ ^/(\.user.ini|\.ht|\.git|\.svn|\.project|LICENSE|README.md) {
      deny all;
    }

    location ~ ^/(\.user.ini|\.ht|\.git|\.svn|\.project|LICENSE|README.md) {
      deny all;
    }
  }

and the error from test.example.com.error
errorlog
2020/10/02 14:07:20 [error] 6493#0: *1 FastCGI sent in stderr: "Primary script unknown" while readin
g response header from upstream, client: 214.64.240.229, server: test.example.com, request: "GET / H
TTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "test.dajubet.com"
2020/10/02 14:08:09 [error] 6493#0: *1 FastCGI sent in stderr: "Primary script unknown" while readin
g response header from upstream, client: 214.64.240.229, server: test.example.com, request: "GET / H
TTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "test.example.com"

any help on how to fix this would be appreciated


text:
Q: Javascript: efficiently compare two integer arrays I have two integer arrays which contain numeric values. I want to look through both lists and check for commonality (or lack of) between the lists. I.e. I want to iterate through the array(s) and find those items which appear in both lists, while in a separate function I want to go through the arrays and find items which are in the first and not in the second.
The obvious way of doing this is nested for loops:
var containedInFirst = false;
for (var primaryID = 0; primaryID < PrimaryArray.length; primaryID++) {
        containedInFirst = false;
        for (var secondaryID = 0; secondaryID < SecondaryArray.length; secondaryID++) {
            if (PrimaryArray [primaryID] === SecondaryArray[secondaryID]) {
                containedInFirst = true;
                break;
            }
        }

//Do some more stuff based on the value of containedInFirst here
}

But given the lists could contain hundreds or thousands of records this is quite a bit of itteration and processor intensive.
I was therefore wondering if there is a more efficient way of executing the above code? Not just the actual searching, but something more efficient than an Integer array as the container for the values, or just not using nested for loops to traverse and compare the content.
Any thoughts on more efficient or elegant solutions?

A: Everyone is overly complicating this. Here's a one liner:
var isEqual = (JSON.stringify(arr1.sort()) === JSON.stringify(arr2.sort()));

A: Sort them first and duck-waddle through them in parallel.
a.sort();
b.sort();

left = []; both = []; right = [];
i = 0; j = 0;
while (i < a.length && j < b.length) {
    if (a[i] < b[j]) {
        left.push(a[i]);
        ++i;
    } else if (b[j] < a[i]) {
        right.push(b[j]);
        ++j;
    } else {
        both.push(a[i]);
        ++i; ++j;
    }
}
while (i < a.length) {
    left.push(a[i]);
    ++i;
}
while (j < b.length) {
    right.push(b[j]);
    ++j;
}

A: When using two nested loops the complexity will be O(n*n).
Sorting both array can be done in complexity O(n log n).
AS Marcelo Cantos stated duck-waddle  :)
through both in paralell has complexity O(n) leading to an overall complexity of O(n log n) + O(n) which is O (n log n).

A: Sort both arrays, than loop just once and compare:
function diff(arrayToCompareTo, comparedArray)
{
  Sort(arrayToCompareTo);
  Sort(comparedArray);

  var difference = [], same = [];
  for(var i = 0; i < arrayToCompareTo.length; ++i)
  {
     if (arrayToCompareTo[i] != comparedArray[i])
        difference.push(comparedArray[i]);
     else
        same.push(comparedArray[i]);
  }

  if (comparedArray.length > arrayToCompareTo.length)
     for(var i = arrayToCompareTo.length; i < comparedArray.length; ++i)
       difference.push(comparedArray[i]);
}

This is not tested so if something is wrong please let me know.
Anyway this should set you to the right direction since it's O(N) at best and O(M) at worst if comparedArray.length > arrayToCompareTo.length, it's much more efficient than O(N^2). Note that the sorting takes O(N log N).

A: I think I have solution with efficiency of O(N) (no sort needed), here it is:
var firstNotSecond;
function CompareIntArrays(arr1, arr2)
{
    firstNotSecond = new Array();

    var arr3 = new Array(); //appear in both
    var arrTemp = new Array(); //used for firstNotSecond
    var usedNumbers = new Array();

    for (var i = 0; i < arr1.length; i++)
    {
        var key = arr1[i];
        usedNumbers[key] = true;
        arrTemp[key + ""] = true;
    }

    for (var i = 0; i < arr2.length; i++)
    {
        var key = arr2[i];
        if (usedNumbers[key])
        {
            arr3[arr3.length] = key;
            arrTemp[key] = false;
        }
    }

    for (var key in arrTemp)
        if (arrTemp[key])
            firstNotSecond[firstNotSecond.length] = parseInt(key);

    return arr3;
}

The function will return new array with the items that exist in both arrays, and will assign global array with all items existing in first array that do not exist in second array.
This code is relying on the fact both arrays hold only integer numbers.
Usage example:
alert(CompareIntArrays([15, 551, 25, 910, 11], [25, 11, 785, 880, 15]));
alert(firstNotSecond);

Tested with arrays having 100,000 items: less than one second.
Tested with arrays having 200,000 items each: less than 2 seconds.

A: Another possibility could be order those arrays while you create them. I am not sure if you can do that. But if you can, it will increase a bit the complextity of adding an element to the array (O(log n) instead of O(1)) but it will decrease the complexity of your comparison algorithm to O(n)


text:
Q: Error when compiling gwt project that uses Errai framework I have a project with multiple gwt modules. Some of these modules depends on other modules, so I have to inherit the dependencies in my gwt.xml. In one of these modules I had an issue that When I inherit other dependencies modules I created it would throw the exception similar to the following exception:
[ERROR]     at org.jboss.errai.config.rebind.AsyncGenerators$FutureWrapper.get(AsyncGenerators.java:112)
[ERROR]     at org.jboss.errai.config.rebind.AsyncGenerators$FutureWrapper.get(AsyncGenerators.java:86)
[ERROR]     at org.jboss.errai.config.rebind.AbstractAsyncGenerator.startAsyncGeneratorsAndWaitFor(AbstractAsyncGenerator.java:100)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:58)
[ERROR]     at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
[ERROR]     at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:657)
[ERROR]     at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
[ERROR]     at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
[ERROR]     at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
[ERROR]     at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:265)
[ERROR]     at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
[ERROR]     at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleGwtCreate(UnifyAst.java:355)
[ERROR]     at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:433)
[ERROR]     at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:237)
[ERROR]     at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:243)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[ERROR]     at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[ERROR]     at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:65)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[ERROR]     at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[ERROR]     at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:48)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
[ERROR]     at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR]     at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
[ERROR]     at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:133)
[ERROR]     at com.google.gwt.dev.jjs.ast.JTryStatement.traverse(JTryStatement.java:60)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
[ERROR]     at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR]     at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
[ERROR]     at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:133)
[ERROR]     at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:82)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[ERROR]     at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:434)
[ERROR]     at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:403)
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] Compiling module module.ui.widget.desktop.Desktop
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]    Computing all possible rebind results for 'org.jboss.errai.ioc.client.Bootstrapper'
[INFO]       Rebinding org.jboss.errai.ioc.client.Bootstrapper
[ERROR]     at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]          Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator
[ERROR]     at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:900)
[INFO]             [ERROR] Error generating BootstrapperImpl
[ERROR]     at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:625)
[ERROR]     at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:640)
[INFO] java.util.concurrent.ExecutionException: org.jboss.errai.ioc.rebind.ioc.exception.UnsatisfiedDependenciesException:  @> module.ui.widget.shell.client.presenter.ShellPresenter
[ERROR]     at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
[INFO]  - field org.jboss.errai.codegen.meta.MetaField:module.ui.widget.shell.client.presenter.ShellPresenter.shellView could not be satisfied for type: module.ui.widget.shell.client.view.ShellView
[ERROR]     at com.google.gwt.dev.Precompile.precompile(Precompile.java:278)
[INFO]   Message: can't resolve bean: module.ui.widget.shell.client.view.ShellView ( @Any  @Default )
[ERROR]     at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
[INFO]
[ERROR]     at com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
[INFO]  at java.util.concurrent.FutureTask.report(FutureTask.java:122)
[ERROR]     at com.google.gwt.dev.Compiler.run(Compiler.java:232)
[INFO]  at java.util.concurrent.FutureTask.get(FutureTask.java:188)
[ERROR]     at com.google.gwt.dev.Compiler.run(Compiler.java:198)
[INFO]  at org.jboss.errai.config.rebind.AsyncGenerators$FutureWrapper.get(AsyncGenerators.java:112)
[ERROR]     at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
[INFO]  at org.jboss.errai.config.rebind.AsyncGenerators$FutureWrapper.get(AsyncGenerators.java:86)
[ERROR]     at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
[INFO]  at org.jboss.errai.config.rebind.AbstractAsyncGenerator.startAsyncGeneratorsAndWaitFor(AbstractAsyncGenerator.java:100)
[ERROR]     at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
[INFO]  at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:58)
[ERROR]     at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[INFO]  at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
[INFO]  at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:657)
[ERROR] Caused by: org.jboss.errai.ioc.rebind.ioc.exception.UnsatisfiedDependenciesException:  @> module.ui.widget.shell.client.presenter.ShellPresenter
[INFO]  at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
[ERROR]  - field org.jboss.errai.codegen.meta.MetaField:module.ui.widget.shell.client.presenter.ShellPresenter.shellView could not be satisfied for type: module.ui.widget.shell.client.view.ShellView
[ERROR]   Message: can't resolve bean: module.ui.widget.shell.client.view.ShellView ( @Any  @Default )
[ERROR]
[INFO]  at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.exception.UnsatisfiedDependenciesException.createWithSingleFieldFailure(UnsatisfiedDependenciesException.java:39)
[INFO]  at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.injector.api.InjectionTask.doTask(InjectionTask.java:119)
[INFO]  at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:265)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.handleInjectionTasks(InjectUtil.java:163)
[INFO]  at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.access$000(InjectUtil.java:72)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleGwtCreate(UnifyAst.java:355)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil$2.generateConstructor(InjectUtil.java:150)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:433)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.injector.basic.TypeInjector.renderProvider(TypeInjector.java:140)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:237)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor$3.handle(IOCConfigProcessor.java:411)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:243)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor$7.process(IOCConfigProcessor.java:650)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor.process(IOCConfigProcessor.java:596)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generateBootstrappingClassSource(IOCBootstrapGenerator.java:283)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generate(IOCBootstrapGenerator.java:139)
[ERROR]     at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:68)
[ERROR]     at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:43)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[ERROR]     at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:40)
[INFO]  at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:65)
[ERROR]     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[ERROR]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[ERROR]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[ERROR]     at java.lang.Thread.run(Thread.java:744)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[INFO]  at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:48)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
[INFO]  at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:133)
[INFO]  at com.google.gwt.dev.jjs.ast.JTryStatement.traverse(JTryStatement.java:60)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
[INFO]  at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:133)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:82)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:434)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:403)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:900)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:625)
[INFO]  at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:640)
[INFO]  at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:278)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
[INFO]  at com.google.gwt.dev.Compiler.run(Compiler.java:232)
[INFO]  at com.google.gwt.dev.Compiler.run(Compiler.java:198)
[INFO]  at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
[INFO]  at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
[INFO]  at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
[INFO]  at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[INFO] Caused by: org.jboss.errai.ioc.rebind.ioc.exception.UnsatisfiedDependenciesException:  @> module.ui.widget.shell.client.presenter.ShellPresenter
[INFO]  - field org.jboss.errai.codegen.meta.MetaField:module.ui.widget.shell.client.presenter.ShellPresenter.shellView could not be satisfied for type: module.ui.widget.shell.client.view.ShellView
[INFO]   Message: can't resolve bean: module.ui.widget.shell.client.view.ShellView ( @Any  @Default )
[INFO]
[INFO]  at org.jboss.errai.ioc.rebind.ioc.exception.UnsatisfiedDependenciesException.createWithSingleFieldFailure(UnsatisfiedDependenciesException.java:39)
[INFO]  at org.jboss.errai.ioc.rebind.ioc.injector.api.InjectionTask.doTask(InjectionTask.java:119)
[INFO]  at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.handleInjectionTasks(InjectUtil.java:163)
[INFO]  at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil.access$000(InjectUtil.java:72)
[INFO]  at org.jboss.errai.ioc.rebind.ioc.injector.InjectUtil$2.generateConstructor(InjectUtil.java:150)
[INFO]  at org.jboss.errai.ioc.rebind.ioc.injector.basic.TypeInjector.renderProvider(TypeInjector.java:140)
[INFO]  at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor$3.handle(IOCConfigProcessor.java:411)
[INFO]  at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor$7.process(IOCConfigProcessor.java:650)
[INFO]  at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCConfigProcessor.process(IOCConfigProcessor.java:596)
[INFO]  at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generateBootstrappingClassSource(IOCBootstrapGenerator.java:283)
[INFO]  at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generate(IOCBootstrapGenerator.java:139)
[INFO]  at org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator.generate(IOCGenerator.java:68)
[INFO]  at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:43)
[INFO]  at org.jboss.errai.config.rebind.AbstractAsyncGenerator$1.call(AbstractAsyncGenerator.java:40)
[INFO]  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
[INFO]  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[INFO]  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[INFO]  at java.lang.Thread.run(Thread.java:744)
[INFO]    [ERROR] An internal compiler exception occurred
[INFO] com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:109)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[INFO]  at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:65)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[INFO]  at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:48)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
[INFO]  at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:133)
[INFO]  at com.google.gwt.dev.jjs.ast.JTryStatement.traverse(JTryStatement.java:60)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
[INFO]  at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
[INFO]  at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:133)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:82)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:434)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:403)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:900)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:625)
[INFO]  at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:640)
[INFO]  at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:278)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
[INFO]  at com.google.gwt.dev.Compiler.run(Compiler.java:232)
[INFO]  at com.google.gwt.dev.Compiler.run(Compiler.java:198)
[INFO]  at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
[INFO]  at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
[INFO]  at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
[INFO]  at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[INFO] Caused by: java.lang.NoClassDefFoundError: org.jboss.errai.ioc.client.BootstrapperImpl
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst.searchForTypeBySource(UnifyAst.java:981)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst.access$1500(UnifyAst.java:120)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleGwtCreate(UnifyAst.java:364)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:433)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:237)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:243)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  ... 45 more
[INFO]       [ERROR] at Container.java(62): GWT.create(Bootstrapper.class)
[INFO]       [ERROR] at Container.java(62): (Bootstrapper) GWT.create(Bootstrapper.class)
[INFO]       [ERROR] at Container.java(62): final Bootstrapper bootstrapper = (Bootstrapper) GWT.create(Bootstrapper.class)
[INFO]       [ERROR] at Container.java(46): {
[INFO]   Container.init = false;
[INFO]   QualifierUtil.initFromFactoryProvider(new Container$1(this));
[INFO]   LogUtil.log("IOC bootstrapper successfully initialized.");
[INFO]   if (((IOCEnvironment) new IOCEnvironmentImpl()).isAsync()) {
[INFO]     LogUtil.log("bean manager initialized in async mode.");
[INFO]   }
[INFO]   final Bootstrapper bootstrapper = (Bootstrapper) GWT.create(Bootstrapper.class);
[INFO]   Container.injectionContext = bootstrapper.bootstrapContainer();
[INFO]   final CreationalContext rootContext = Container.injectionContext.getRootContext();
[INFO]   if (rootContext instanceof AsyncCreationalContext) {
[INFO]     ((AsyncCreationalContext) rootContext).finish(new Container$2(this));
[INFO]   } else {
[INFO]     ((SimpleCreationalContext) rootContext).finish();
[INFO]     this.finishInit();
[INFO]   }
[INFO] }
[INFO]       [ERROR] at Container.java(46): try {
[INFO]   Container.init = false;
[INFO]   QualifierUtil.initFromFactoryProvider(new Container$1(this));
[INFO]   LogUtil.log("IOC bootstrapper successfully initialized.");
[INFO]   if (((IOCEnvironment) new IOCEnvironmentImpl()).isAsync()) {
[INFO]     LogUtil.log("bean manager initialized in async mode.");
[INFO]   }
[INFO]   final Bootstrapper bootstrapper = (Bootstrapper) GWT.create(Bootstrapper.class);
[INFO]   Container.injectionContext = bootstrapper.bootstrapContainer();
[INFO]   final CreationalContext rootContext = Container.injectionContext.getRootContext();
[INFO]   if (rootContext instanceof AsyncCreationalContext) {
[INFO]     ((AsyncCreationalContext) rootContext).finish(new Container$2(this));
[INFO]   } else {
[INFO]     ((SimpleCreationalContext) rootContext).finish();
[INFO]     this.finishInit();
[INFO]   }
[INFO] } catch (Throwable t) {
[INFO]   t.printStackTrace();
[INFO]   throw new RuntimeException("critical error in IOC container bootstrap: " + t.getClass().getName() + ": " + t.getMessage());
[INFO] }
[INFO]       [ERROR] at Container.java(45): {
[INFO]   try {
[INFO]     Container.init = false;
[INFO]     QualifierUtil.initFromFactoryProvider(new Container$1(this));
[INFO]     LogUtil.log("IOC bootstrapper successfully initialized.");
[INFO]     if (((IOCEnvironment) new IOCEnvironmentImpl()).isAsync()) {
[INFO]       LogUtil.log("bean manager initialized in async mode.");
[INFO]     }
[INFO]     final Bootstrapper bootstrapper = (Bootstrapper) GWT.create(Bootstrapper.class);
[INFO]     Container.injectionContext = bootstrapper.bootstrapContainer();
[INFO]     final CreationalContext rootContext = Container.injectionContext.getRootContext();
[INFO]     if (rootContext instanceof AsyncCreationalContext) {
[INFO]       ((AsyncCreationalContext) rootContext).finish(new Container$2(this));
[INFO]     } else {
[INFO]       ((SimpleCreationalContext) rootContext).finish();
[INFO]       this.finishInit();
[INFO]     }
[INFO]   } catch (Throwable t) {
[INFO]     t.printStackTrace();
[INFO]     throw new RuntimeException("critical error in IOC container bootstrap: " + t.getClass().getName() + ": " + t.getMessage());
[INFO]   }
[INFO] }
[INFO]       [ERROR] at Container.java(45): {
[INFO]   try {
[INFO]     Container.init = false;
[INFO]     QualifierUtil.initFromFactoryProvider(new Container$1(this));
[INFO]     LogUtil.log("IOC bootstrapper successfully initialized.");
[INFO]     if (((IOCEnvironment) new IOCEnvironmentImpl()).isAsync()) {
[INFO]       LogUtil.log("bean manager initialized in async mode.");
[INFO]     }
[INFO]     final Bootstrapper bootstrapper = (Bootstrapper) GWT.create(Bootstrapper.class);
[INFO]     Container.injectionContext = bootstrapper.bootstrapContainer();
[INFO]     final CreationalContext rootContext = Container.injectionContext.getRootContext();
[INFO]     if (rootContext instanceof AsyncCreationalContext) {
[INFO]       ((AsyncCreationalContext) rootContext).finish(new Container$2(this));
[INFO]     } else {
[INFO]       ((SimpleCreationalContext) rootContext).finish();
[INFO]       this.finishInit();
[INFO]     }
[INFO]   } catch (Throwable t) {
[INFO]     t.printStackTrace();
[INFO]     throw new RuntimeException("critical error in IOC container bootstrap: " + t.getClass().getName() + ": " + t.getMessage());
[INFO]   }
[INFO] }
[INFO]       [ERROR] at Container.java(45): public void bootstrapContainer();

Removing all inherited modules I created worked, the code compiled and worked fine. [I don't know why/how??]
On another different module, that also depends on other modules, if I inherit the dependency modules I created and get the exception above,  but If I remove these dependencies, I get the following error:
[INFO]    [ERROR] Errors in 'file:/D:/Projects/Fusion/UI/modules/preAuthorisation/target/classes/module/ui/widget/desktop/client/DesktopApp.java'
[INFO]    [ERROR] Line 28: No source code is available for type modules.ui.widget.shell.client.presenter.ShellPresenter; did you forget to inherit a required module?

I can see from the exception that this is because Errai is not creating the file org.jboss.errai.ioc.client.BootstrapperImpl hence the Caused by: java.lang.NoClassDefFoundError: org.jboss.errai.ioc.client.BootstrapperImpl. Can some one please help me explain why this is so? How can I solve this? All other modules compiles fine with no error.

A: This NoClassDefFoundError on BootstrapperImpl is the standard error of something that was not able to be compiled to Javascript.
The root cause is (well) hidden somewhere in your stacktrace:
field org.jboss.errai.codegen.meta.MetaField:module.ui.widget.shell.client.presenter.ShellPresenter.shellView could not be satisfied for type: module.ui.widget.shell.client.view.ShellView

Without the code of your classes, it's impossible to say exactly what is the problem.
But if I need to do a guess I would interpret this as: inside your class ShellPresenter, there is a field named ShellView that has an issue. It may be not able to create it, inject it or it's not GWT compatible, among possible reasons why.


text:
Q: Mac ssh: illegal option -- J I'm trying to connect with ssh and need to use -J.
It works fine on Ubuntu but on mac it returns - illegal option -- J

A: Connected with this command
ssh -o ProxyCommand="ssh -W %h:%p Jumphost" FooServer

Find out in this article https://www.cyberciti.biz/faq/linux-unix-ssh-proxycommand-passing-through-one-host-gateway-server/


text:
Q: Improving the speed on an iterated differential system I'm working on a simulation where I need to solve a differential system for a function, and then use the solution to this system to calculate another function that is used as an input to this differential system. This has to be iterated several times.
In code, the situation looks something like this:
solvefunction[fun_] :=
NDSolveValue[{g'[x] == fun[x]*g[x], g[0] == 1}, {g}, {x, 0, 1}]

This calculates the first function as a solution to a system (here simplified to only one equation). Then, the solution to this system is used to build a new function:
findfunction[fun_] := solvefunction[fun[1 - #^2] &][[1]]

Which then has to be used as the input to the previous system. I can iterate using:
Nest[findfunction, #&, 4]

The first iterations are fast but for n>4 it becomes very slow. I suspect this recurrence is not very efficient from a memory point of view. Is there a generic way to achieve this result in a faster way ?


text:
Q: Tridion 2011 workflow minor version increments using event handler custom code We have Tridion 2011 and page process workflow as well. We have event handler on page pre save. When the user saves a page an event handler is called to modify the page metadata and a workflow is initiated. So the minor versioning of the page goes to 0.3 on every editor save click. So basically:
0.1 - Tridion version for page Save
0.2 - Event handler code executed for saving page metadata and because of Save() call this code gets called again to lead to the next minor version
0.3 - Same event handler code gets executed.
What I'm trying to achieve is to keep the minor version to 0.1 on every user Save click.
I've tried Pre Save Post Save, Pre Check in and Post Check in and changed the order of execution i.e. last param of the event system subscribe call but nothing helped. So pl. help :)

A: Why are you calling Save() in your event? If you make your changes BEFORE the page is saved, then it should store everything in one go, without you ever calling Save.
public PageEvent()
{
    EventSystem.Subscribe<Page, SaveEventArgs>(ChangePageTitle, EventPhases.Initiated);
}
private void ChangePageTitle(Page page, SaveEventArgs args, EventPhases phases)
{
    page.Title = "Nuno was here " + page.Title;
}

This will change the page title, and as you see I don't call Save, since the editor did that already.


text:
Q: SharePoint 2010 - Search WebPart - Unable to display this webpart Search by People in SharePoint 2010 generates:

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

Switching to "All Sites" under search returns results.  I can open the site in SharePoint Designer but not sure where to go from there.
Site:  /sites/Search/Pages/peopleresults.aspx
I removed and added People Search Core Results it causes the same issue.
Any thoughts on how to resolve this issue?
UPDATE:  The issue appears to have started after installing the December SharePoint updates.

A: I implemented the solution in the link below and people appear in the results.
https://support.microsoft.com/en-us/help/4052414/loading-behavior-no-longer-available-in-search-results-web-part

A: I have this exact same problem, after the December 2018 updates.  I was able to remove a .Net update, which did not resolve the issue.  The SP 2010 updates cannot be uninstalled.  Other things I've tried, which have NOT worked:
- Restart servers
- Open the page peopleresults.aspx in SP Designer and save it.
- Edit the web part settings, like Display, Results Query, Appearance, Layout, etc.
- Created a new page with only the "People Search Core Results" web part.
- Changed XsltTransformTimeOut
 PS C:\Users\someone>  Add-PSSnapin
 Microsoft.Sharepoint.Powershell
 PS C:\Users\someone> $farm = Get-SPFarm
 PS C:\Users\someone> $farm.XsltTransformTimeOut
 1
 PS C:\Users\someone> $farm.XsltTransformTimeOut = 5
 PS C:\Users\someone> $farm.Update
<snip>
 PS C:\Users\someone> $farm.XsltTransformTimeOut
 5

- Checked web and SP log files, and event viewer, for additional information about the error.
Right now we are about to declare this part of the search unfixable.  The "All Sites" search still works, and it shows "People Matches" in the right side column of the search results.  We also have Lync to find people, but many prefer using this feature in SP.
I can't spend too much more time on this, but if I find anything I will make an update here.  We're getting closer to begin migration to SP 2019.
Found others having same issue in TechNet forum, People Search Not Working.


text:
Q: Postgres query with time zone I have table of companies where each company has individual timezone.
for example -
company 1 has time zone UTC+10 and
company 2 - UTC+2
table companies has field time_zone and stored abbreviation of zone like America/Los_Angeles(I can add additional field for store offset value from UTC if need).
and has table requests with start_date field where stored TIMESTAMP without time zone(UTC-0)
for example -
id | company_id | start_date (utc-0)
------------------------------------
1  | 1          | 21-03-16 02-00      // added for company  `21-03-16 12-00`
2  | 2          | 21-03-16 23-00      // added for company  `22-03-16 01-00`
3  | 1          | 20-03-16 13-00      // added for company  `20-03-16 23-00`
4  | 1          | 21-03-16 23-00      // added for company  `22-03-16 09-00

I want select records that started from 21-03-16 00-00 to 21-03-16 23-59 considering time zone each company.
but if I will use -
select * from request where start_date between '2016-03-21 00:00:00.000000' AND '2016-03-21 23:59:59.999999'
I get requests where id = 2 and 4.
but these requests were added 22-03-16 by fact for each company.
Any suggestions how I can decide this situation by one select? Many thanks.

A: I'm not sure if I understand your question right, you might need to clarify.
But I'd say that joining with companies where the time zone information is stored should solve the problem:
SELECT r.*
FROM request r
   JOIN companies c ON c.id = r.company_id
WHERE r.start_date BETWEEN '2016-03-21 00:00:00.000000'
                           AT TIME ZONE c.time_zone
                       AND '2016-03-21 23:59:59.999999'
                           AT TIME ZONE c.time_zone;


text:
Q: Article in biblatex with no year entry, how to remove parentheses? For my bibliography I am using
\usepackage[maxnames=99,style=alphabetic,backend=bibtex]{biblatex}

I am using @article for arxiv papers. My problem is that I don't want to enter a year for such references. On the other hand, if I do not type in anything for the year, the generated bibliography prints () in place of the year.
How do I get rid of these parentheses?

A: Since year/date is a mandatory field for @article, biblatex expects there to be at least a year and does not do any further sanity checking to avoid empty brackets. We can add that with
\renewbibmacro*{issue+date}{%
  \ifboolexpr{not test {\iffieldundef{year}} or not test {\iffieldundef{issue}}}
    {\printtext[parens]{%
       \iffieldundef{issue}
         {\usebibmacro{date}}
         {\printfield{issue}%
          \setunit*{\addspace}%
          \usebibmacro{date}}}}
    {}%
  \newunit}

Note though that even papers on the arXiv normally have a year (at least I have yet to happen upon a paper without a date). You should also note that an arXiv paper that has not been published in a journal (if it was published, surely it will have a date) should not be treated as an @article, it should rather be an @online entry.


text:
Q: How to pass a variable to event listener function? I'm having difficulties removing an event listener, since removeEventListener only works for non-anynomous functions I need to make a named function. The problem is I can't figure out how to pass the chart variable to the toggleLabels function without calling the function while I do it..
I tried looking at this question but no answer worked.
Is this possible?
var chart = {}; // Big object

labelToggle.addEventListener('click', toggleLabels);

function toggleLabels(chart) {

    scope.graph.isLabelsVisible = chart.isLabelsVisible = !chart.isLabelsVisible;

    for (i = 0; i < length; i++) {
      chart.series[i].isLabelsVisible = !chart.series[i].isLabelsVisible;
      chart.series[i].hide();
      chart.series[i].show();
    };
  };

A: When passing parameters, you can use an "anonymous function" that calls the specified function with the parameters:
labelToggle.addEventListener("click", function() {
    toggleLabels(chart);
});

var a = 5;
var b = 7;
document.getElementById('btn').addEventListener("click", function() {
    myFunction(a, b);
});

function myFunction(x, y) {
    var result = x + y;
    console.log(result);
}
<button id="btn">Click here!</button>

A: What you can do, is to make toggleLabels a function of chart. For example:
function chart(series) {
    this.series = series;
    this.toggleLabels = function (name) {
    for (i = 0; i < lthis.series.ength; i++) {
      chart.series[i].isLabelsVisible = !this.series[i].isLabelsVisible;
      this.series[i].hide();
      this.series[i].show();
    };
    };
}

And then just operate on the chart object like this:
chart.series
chart.toggleLabels()

And then, you should be able to do the following:
 labelToggle.addEventListener('click', chart.toggleLabels);

A: You can return a function like this:
var chart = {}; // Big object

labelToggle.addEventListener('click', toggleLabels(chart));

function toggleLabelsCls(chart) {

    return function(chart) {
       scope.graph.isLabelsVisible = chart.isLabelsVisible = !chart.isLabelsVisible;

       for (i = 0; i < length; i++) {
         chart.series[i].isLabelsVisible = !chart.series[i].isLabelsVisible;
         chart.series[i].hide();
         chart.series[i].show();
       };
     }
  };

A: It can be done by using partial application:
labelToggle.addEventListener('click', toggleLabels.bind(this,chart));

A: Here the shortest solution:
labelToggle.addEventListener('click', function(){toggleLabels(chart)});


text:
Q: flutter - how do calculate average the data in list? I have a List<Comment> about food from users.
It looks like this:
[
    {userId: 1,
     rating: 4.5
    },
    {userId: 2,
     rating: 4.0
    },
    {userId: 3,
     rating: 3.5
    },
    {userId: 4,
     rating: 3.0
    }

   ...
];

I want to get the average rating. AVERAGE = Number of ratings : total user, how do I apply this in dart?

A:   var values = [
    {'userId': 1, 'rating': 4.5},
    {'userId': 2, 'rating': 4.0},
    {'userId': 3, 'rating': 3.5},
    {'userId': 4, 'rating': 3.0}
  ];

  var result = values.map((m) => m['rating']).reduce((a, b) => a + b) / values.length;
  print(result);

A: In 2021 dart has the built-in average method from the collection package which can be used on an Iterable.
import 'package:collection/collection.dart';

void main() {
 var values = [
    {'userId': 1, 'rating': 4.5},
    {'userId': 2, 'rating': 4.0},
    {'userId': 3, 'rating': 3.5},
    {'userId': 4, 'rating': 3.0}
  ];

  var result = values.map((m) => m['rating']!).average;

  print(result); // prints 3.75
}

You might also be interested in the .sum method from the same package.

A: I did this by adding the values with the fold function and then dividing by the total. Here is an example:
var values = [
    {'userId': 1, 'rating': 4.5},
    {'userId': 2, 'rating': 4.0},
    {'userId': 3, 'rating': 3.5},
    {'userId': 4, 'rating': 3.0}
];

List<double> ratings = values.map((e) => e.price!).toList();
double sum = ratings.fold(0, (p, c) => p + c);
if (sum > 0) {
   double average = sum / ratings.length;
}


text:
Q: proc or function that will loop over each database in snowflake and list tables with empty rows Can someone help find these zero row tables?
CREATE OR REPLACE PROCEDURE checkrows()
RETURNS VARIANT
LANGUAGE JAVASCRIPT
AS
$
function ExecuteNonQuery(querystring) {

 var out = '';

 cmd1 = {sqlText: select * from information_schema.tables where rows_count = 0;};

 stmt = snowflake.createStatement(cmd1);

 var rs;

 try{

     rs = stmt.execute();

     rs.next();

     out = "SUCCESS: " + rs.getColumnValue(0);

      }

      catch(err) {

      throw "ERROR: " + err.message.replace(/\n/g, " ");

      }enter code here

     return out;

    }

    $$;

A: If you have a use case that it's okay to get row counts that are several minutes older than the last change (generally 15-90 minutes but up to 3 hours), you can simply run this:
select * from "SNOWFLAKE"."ACCOUNT_USAGE"."TABLES"
where TABLE_TYPE = 'BASE TABLE' and DELETED is null and ROW_COUNT = 0;

Edit: Since this needs to be automated, this SP will return a variant array with objects containing the db, schema, and table name of all tables with zero rows.
create or replace procedure FIND_EMPTY_TABLES(DATABASE_PATTERN string) -- Use .* for all databases in account. It will skip SNOWFLAKE and SNOWFLAKE_SAMPLE_DATA
returns variant
language javascript
execute as owner
as
$$
class Account {constructor(databases){this.databases = databases;}}
class Database {constructor(name) {this.name = name;}}
class Query{constructor(statement){this.statement = statement;}}

var account = getDatabasesInAccount(DATABASE_PATTERN);
var out = [];

for (var i = 0; i < account.databases.length; i++) {
    out = out.concat(rsToJSON(getQuery(
       `select TABLE_NAME, TABLE_CATALOG, TABLE_SCHEMA, TABLE_OWNER
        from ${account.databases[i].name}.INFORMATION_SCHEMA.TABLES
        where TABLE_TYPE = 'BASE TABLE' and ROW_COUNT = 0`)));
}

return out;

//------

function getQuery(sql){
    cmd1 = {sqlText: sql};
    var query = new Query(snowflake.createStatement(cmd1));
    query.resultSet = query.statement.execute();
    return query;
}

function executeSingleValueQuery(columnName, queryString) {
    cmd = {sqlText: queryString};
    stmt = snowflake.createStatement(cmd);
    var rs;
    rs = stmt.execute();
    rs.next();
    return rs.getColumnValue(columnName);
}

function getDatabasesInAccount(databasePattern){
    const SYSTEM_DB_NAMES = ["SNOWFLAKE", "SNOWFLAKE_SAMPLE_DATA"];
    var db = executeSingleValueQuery("name", "show databases");
    var i = 0;
    var dbRS = getResultSet(`select DATABASE_NAME from "${db}".INFORMATION_SCHEMA.DATABASES where rlike (DATABASE_NAME, '${databasePattern}');`);
    var databases = [];
    var db;
    while (dbRS.next()){
        db = new Database(dbRS.getColumnValue("DATABASE_NAME"));
        if (!SYSTEM_DB_NAMES.includes(db)) {
            databases.push(db);
        }
    }
    return new Account(databases);
}

function getResultSet(sql){
    let cmd  = {sqlText: sql};
    let stmt = snowflake.createStatement(cmd);
    let rs   = stmt.execute();
    return rs;
}

function rsToJSON(query) {
    var i;
    var row = {};
    var table = [];
    while (query.resultSet.next()) {
        for(col = 1; col <= query.statement.getColumnCount(); col++) {
            row[query.statement.getColumnName(col)] = query.resultSet.getColumnValue(col);
        }
        table.push(row);
    }
    return table;
}

$$;

call FIND_EMPTY_TABLES('.*');  -- .* is the RegExp pattern that tell it to check all databases except built-in ones.

A: Dirty and quick option adding to gregs excellent answer ... obviously if you like the results add 'create or replace zero_row_count_base_tables as ...' .... set it to re-create the view maybe weekly/daily then run the view when you want.
SELECT
'  SELECT  TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME  from UTIL_DB.INFORMATION_SCHEMA.TABLES  WHERE TABLE_TYPE = \'BASE TABLE\'  AND ROW_COUNT > 0 '
UNION
SELECT  concat( 'UNION SELECT  TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME
FROM ', DATABASES.DATABASE_NAME,'.INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = \'BASE TABLE\'  AND ROW_COUNT > 0   ')
FROM  UTIL_DB.INFORMATION_SCHEMA.DATABASES


text:
Q: developing Android on Eclipse which eclipse version I should Download to start developing on Android ?
 From This Site :http://www.eclipse.org/downloads/
Thanks

A: Eclipse Classic 3.7.1. Anyway, it's already said on Android Developer page anyway: http://developer.android.com/sdk/installing.html

The "Eclipse Classic" version is recommended

Next time please do some little searching before asking, thank you.


text:
Q: Open Source CMS based on kohanaphp Im searching open source CMS based on kohana.
I want to see ideas used in admin section and all idea for cms.
Please show me smth.

A: Bluehawk was working on Kohanut, but last I read, he's been busy and hasn't updated it in a couple of months.  I've also seen one called S7N CMS in the past but don't know as much about it.

A: Gleez CMS seems to be active these days. I haven't tried it much though, but in testing it looks good. Or there's BDQCustom (about which I know less).


text:
Q: How can I completely, forcibly disable any kind of auto-restart in Windows 10? I know there have been many topics about this, and believe me, I've already read dozens of them, as well as following numerous guides like this one, but no matter what I do, my Windows 10 still keeps restarting whenever it wants to install it's updates. I just step off the computer for a few minutes to get a coffee or a bathroom break, and then I come back, only to see another update going on, all my unsaved work gone. No prompts, no warnings. Sometimes it even begins restarting while I'm still working on my computer, and then I'm forced to wait, sometimes for half an hour, until it finishes the update.. I am an advanced user, and I already disabled everything in settings, services, registry, user policy, even disable update services via Task Manager, but they keep restarting themselves to do their bloody work. I even wrote a .bat script to keep disable all running update services, but the bloody 10 somehow still gets around it.
I am frustrated beyond belief. I must have already spent like 10 hours investigating this, going through guides, forums, etc., but they all suggest all too familiar steps, which I already did, and checked numerous of times.
What else can I do? Is there a way to hard-disable restart altogether, so that Windows itself is blocked from that function unless I run it manually? I am tired of fighting, and I want this auto-restart feature gone, forever.
P.S. Before you ask, my computer is clean of viruses, malware, 3rd party apps or anything else that could be related. No hardware problems, no BSOD's or anything.
P.P.S. Some people suggested that my question is a duplicate of How to disable automatic reboots in Windows 10? . However, it is not, because I have reviewed all the answers to that question, tried all the suggestions, but they were ineffective to solve the problem - Windows still restarts to install it's updates.

A: Update 2: After testing, my previous update failed to be effective. Microsoft seems to have implemented features that prevent even it from working.
My final solution was to use a utility called StopUpdates10. It combines all of the techniques I've read about over the last few months, notably multiple registry changes and the disabling of multiple services—rather than just the couple that keep being mentioned but which don't work on their own.

My computer is on 24/7, as I use it to host various services.
I have my Windows Update service stopped and set to Disabled. (Only Disabled will work.) When I want to apply updates, I re-enable the service (and then check for updates manually) at a time that I can afford to have it offline. When the updates are finished, I reboot it myself. After it reboots, I stop and disable the service again.
My computer has never restarted on its own (barring crashes and power failures).
Note: I just checked, and this answer is in the other question. (Although I find the other version of the answer needlessly complicated.) Perhaps you missed it . . .

Update 1: I just discovered that my computer had rebooted—and that my Windows Update service had been re-enabled. I have never had this happen before. Perhaps something has changed in what Microsoft is doing that is circumventing even this method?
I have disabled it again, removed inheritable permissions from the Windows Update registry key, and allowed only my username to have full control over it:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv
If I find next month that this has still failed to prevent updates from applying without my permission, I may try adding manual hosts entries (that point to localhost) for all DNS entries related to Windows Update. Or just rename sihclient.exe, as mentioned in the other answer here.

A: Technically you can go into Task schedule and delete the Windows update scheduled task so your computer won't shutdown for updates but if you do that then you will have to do updates your self by going to start "check for updates" ... another option would be to change your active time in the by going Start>check for updates>change active hours ... That will allow you to still get automatic updates but this way it happens at 4 am when your sleeping instead of 8pm when your doing homework ... hope thats the answer your looking for GL
edit: the program Sihclient.exe is the background installer for windows updates Delete that and no more updates. IE you will lose security but your computer won't shut down for updates anymore XD


text:
Q: Do I have to create files on github before pushing via Git? I am having an issue with pushing to my repository using Git on Github.  The error is attached here
What I want to know now is that do I have to create the files as a placeholder on Github before pushing my codes to it. I am really confused.
Thanks.

A: Your error message clearly states that you have pull the changes locally to your machine by using the command git pull then you can push
PS. if you pull the changes and the push right away you will be pushing the same thing that you pull so you will be prompt with a error.
You need to commit what you have done before merging.
So commit and then pull.
git add foo.js
git commit foo.js -m "commit"
git pull
git push

A: No, you don't need to create the files as a placeholder on Github before pushing your code to it.


text:
Q: How do I determine if my controller is in IDE or AHCI mode in Linux? I have an old MacBook Pro 4,1 (early 2008) - but I suspect an answer would apply to many MacBook Pros.
It has an Intel IDE/SATA controller (ICH8M/ICH8M-E).
I have installed a patched MBR that is supposed to put my controller into AHCI mode. It does this by setting some controller port value that I don't understand.
This seems to work as I get this from lspci:
00:1f.1 IDE interface: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 03)

Now most, perhaps all, sites that provide a solution (enabling AHCI) suggest that after a sleep/wake cycle that a controller will revert to IDE mode due to how Apple supports Windows.
They recommend disabling sleep.
From author of patchedcode.bin I think
Enabling AHCI for Windows on MacBooks
NB: I do not have Boot Camp installed and I do not have Windows installed.
Is there a way to prove that my controller is in IDE or AHCI mode?
Background Data
Using patchedcode.bin MBR I get this in syslog:
Jun 12 22:33:22 max kernel: [    1.860955] ahci 0000:00:1f.2: version 3.0
Jun 12 22:33:22 max kernel: [    1.861052] ahci 0000:00:1f.2: irq 45 for MSI/MSI-X
Jun 12 22:33:22 max kernel: [    1.861117] ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 3 ports 1.5 Gbps 0x1 impl SATA mode
Jun 12 22:33:22 max kernel: [    1.861120] ahci 0000:00:1f.2: flags: 64bit ncq sntf pm led clo pio slum part ccc ems
Jun 12 22:33:22 max kernel: [    1.861130] ahci 0000:00:1f.2: setting latency timer to 64
Jun 12 22:33:22 max kernel: [    1.880880] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
Jun 12 22:33:22 max kernel: [    1.880983] scsi2 : ahci
Jun 12 22:33:22 max kernel: [    1.884552] scsi3 : ahci
Jun 12 22:33:22 max kernel: [    1.886932] scsi4 : ahci
Jun 12 22:33:22 max kernel: [    1.886998] ata3: SATA max UDMA/133 abar m2048@0xdb504000 port 0xdb504100 irq 45
Jun 12 22:33:22 max kernel: [    1.887000] ata4: DUMMY
Jun 12 22:33:22 max kernel: [    1.887002] ata5: DUMMY
Jun 12 22:33:22 max kernel: [    2.204103] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Jun 12 22:33:22 max kernel: [    2.204656] ata3.00: ATA-8: FUJITSU MHY2200BH, 0081000D, max UDMA/100
Jun 12 22:33:22 max kernel: [    2.204662] ata3.00: 390721968 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
Jun 12 22:33:22 max kernel: [    2.205324] ata3.00: configured for UDMA/100
Jun 12 22:33:22 max kernel: [    2.205554] scsi 2:0:0:0: Direct-Access     ATA      FUJITSU MHY2200B 0081 PQ: 0 ANSI: 5

Using my original MBR I get this from syslog:
Jun 13 18:07:13 max kernel: [    0.622861] ata_piix 0000:00:1f.1: version 2.13
Jun 13 18:07:13 max kernel: [    0.622869] ata_piix 0000:00:1f.1: power state changed by ACPI to D0
Jun 13 18:07:13 max kernel: [    0.622924] ata_piix 0000:00:1f.1: setting latency timer to 64
Jun 13 18:07:13 max kernel: [    0.623339] scsi0 : ata_piix
Jun 13 18:07:13 max kernel: [    0.623730] scsi1 : ata_piix
Jun 13 18:07:13 max kernel: [    0.623765] ata1: PATA max UDMA/100 cmd 0x8108 ctl 0x811c bmdma 0x80e0 irq 21
Jun 13 18:07:13 max kernel: [    0.623767] ata2: PATA max UDMA/100 cmd 0x8100 ctl 0x8118 bmdma 0x80e8 irq 21
Jun 13 18:07:13 max kernel: [    0.623810] ata_piix 0000:00:1f.2: MAP [
Jun 13 18:07:13 max kernel: [    0.623811]  P0 -- -- -- ]
Jun 13 18:07:13 max kernel: [    0.623866] ata_piix 0000:00:1f.2: setting latency timer to 64
Jun 13 18:07:13 max kernel: [    0.624241] scsi2 : ata_piix
Jun 13 18:07:13 max kernel: [    0.624558] scsi3 : ata_piix
Jun 13 18:07:13 max kernel: [    0.624862] ata3: SATA max UDMA/133 cmd 0x80f8 ctl 0x8114 bmdma 0x8020 irq 18
Jun 13 18:07:13 max kernel: [    0.624865] ata4: SATA max UDMA/133 cmd 0x80f0 ctl 0x8110 bmdma 0x8028 irq 18
Jun 13 18:07:13 max kernel: [    1.208879] ata3.00: ATA-8: FUJITSU MHY2200BH, 0081000D, max UDMA/100
Jun 13 18:07:13 max kernel: [    1.208882] ata3.00: 390721968 sectors, multi 16: LBA48 NCQ (depth 0/32)
Jun 13 18:07:13 max kernel: [    1.208961] ata1.01: ATAPI: MATSHITA DVD+/-RW UJ-867S, 1.00, max UDMA/33
Jun 13 18:07:13 max kernel: [    1.216186] ata3.00: configured for UDMA/100
Jun 13 18:07:13 max kernel: [    1.224396] ata1.01: configured for UDMA/33

A: lspci is all I need it seems.
IDE mode means it is in IDE mode and AHCI mode means it is in AHCI/SATA mode.
I have documented this here
This modified MBR I referred to seems to just to something like this:
setpci -s 0:1f.2 90.b=40

which will work for a number of Apple MacBooks that use ICH7 and ICH8 controllers, but it is important to use a correct PCI 'slot' value that is easily obtained from lspci.
eg, while in IDE mode, note down slot which is 0:1f.2 in my case. In AHCI mode, this slot seems to change.
lspci
...
00:1f.2 IDE interface: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [IDE mode] (rev 03)
...


text:
Q: Is that possible to have multiple rules function in single Request class? I have request class like below.
class CategoryRequest extends Request
{
    public function response(array $errors){
        return \Redirect::back()->withErrors($errors)->withInput();
    }

    public function authorize()
    {
        return false;
    }

    public function rules()
    {
        return [
            'Category' => 'required|unique:tblcategory|max:25|min:5'
        ];
    }
}

There is rules function.
In the controller, there are multiple methods that have Request as a Parameter. Most of them vary in the validation point of view. I mean, if I am admin,. I can update 4 fields. If I am manager, I can update 3 and if I am normal user, I can update 2. So validation will change according to roles.
Is that possible to have multiple rules function in Request class ?

A: You can use here any conditions you want, so you you could do something like this:
public function rules()
{
    $rules = [];
    if (Auth::user()->isAdmin()) {
       $rules['Category'] = '...';
    }
    elseif (Auth::user()->isManager()) {
       $rules['Category'] = '...';
    }

    return $rules;
}

Of course you need to create isAdmin and isManager in your User model


text:
Q: \mediumvee and \mediumwedge? I would like to have access to a disjunction sign (and a conjunction sign), larger than $\vee$ and smaller than $\bigvee$ ($\wedge$ and $\bigwedge); its height should be the same as $\exists$ and $\forall$.
The British logician Geoffrey Hunter used such a $\mediumvee$ and $\mediumwedge$, in his book Metalogic: An Introduction to the Metatheory of Standard First Order Logic, for the existential and universal quantifiers. Sometimes one sees the use of much larger versions for the mentioned purpose, but I prefer the size I indicated.
How may the problem be resolved?

A: I'd find it utterly confusing if the "Hunter-style" universal quantifier is used along the standard "and" symbol.
Here is a possibility, scaling \land to match the uppercase letters (I used T as the matching character).
\documentclass{article}
\usepackage{graphicx}

\DeclareRobustCommand{\hunterforall}{%
  % no need to make it scalable in sub/superscripts
  \mathord{\resizebox{!}{\fontcharht\textfont1 `T}{\raisebox{\depth}{$\land$}}}%
}
\RenewCommandCopy{\forall}{\hunterforall}

\begin{document}

$\forall x(F^*(x)\land F^{*\prime}(x))$

\end{document}


text:
Q: Passing spinner value to another Activity on button click trigger I have a simple question here yet I still have no idea how to do. So, my class have a Spinner with EditText value which will be passed to another activity. I was able to pass EditText to another activity on button click trigger. But I do not know on how to pass Spinner value that I set in the String like the codes below. Perhaps, someone can show me how can I pass both value to the next activity when I click the button. I hope for the better solution. Thank You.
public class SearchActivity extends AppCompatActivity implements View.OnClickListener {
    private EditText editTextProduct;
    private Button btnSearch;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.search_product);

        editTextProduct = (EditText) findViewById(R.id.editTextProduct);
        btnSearch = (Button) findViewById(R.id.btnSearch);

        btnSearch.setOnClickListener(this);

        initializedSpinner();
    }

    private void initializedSpinner(){
        // Spinner element
        Spinner spinner = (Spinner) findViewById(R.id.spinner_search);

        // Spinner Drop down elements
        List<String> categories = new ArrayList<String>();
        categories.add("Search By Name");
        categories.add("Search By Type");

        // Creating adapter for spinner
        ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, categories);

        //spinner.setAdapter(dataAdapter);
        // Drop down layout style - list view with radio button
        dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

        // attaching data adapter to spinner
        spinner.setAdapter(dataAdapter);
        spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {

                String searchItem = parent.getItemAtPosition(position).toString();

                Toast.makeText(parent.getContext(),searchItem + " Selected" , Toast.LENGTH_LONG).show();
            }

            @Override
            public void onNothingSelected(AdapterView<?> parent) {

            }
        });
    }

    private void searchData() {
        String productName = editTextProduct.getText().toString().trim();
        if (productName.equals("")) {
            Toast.makeText(this, "Please Enter Product Name", Toast.LENGTH_LONG).show();
            return;
        }
        else{
            Intent i = new Intent(SearchActivity.this, ListProductActivity.class);
            EditText tv5 = (EditText) findViewById(R.id.editTextProduct);
            i.putExtra("productName",tv5.getText().toString());
            startActivity(i);
        }
    }

    @Override
    public void onClick(View v) {

        searchData();
    }
}

A: Try this on spinner click:
String Text = mySpinner.getSelectedItem().toString();

You will get the string which you select in spinner.
Whatever the text value you got you just need to pass via putExtras from intent.

A: You can pass the values like this:
@Override
    public void onClick(View v) {

      Intent i = new Intent(SearchActivity.this, ListProductActivity.class);
            i.putExtra("editTextValue",editTextProduct.getText().toString());
            i.putExtra("spinnerValue",spinner.getSelectedItem().toString());
            startActivity(i);
    }

A: String[] stdarray = { "KG", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "Other" };

       ArrayAdapter aa = new ArrayAdapter<String>(getActivity(), R.layout.layout_std, stdarray);

       final ListView lv = (ListView) rootView.findViewById(R.id.listView);

       lv.setAdapter(aa);

       lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
           @Override
           public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
               Tab1.sentfromStd(lv.getItemAtPosition(position).toString()); //I used static method here sentfromStd(), You can also use intents like others said for getting your job done.
           }
       });


text:
Q: Define a new font command I'd like to define a command aiming to apply italic and bold at the same time. I tried use \newcommand{\itbf}{\textit{\textbf{}}}. Is it correct?

A: LaTeX provides the \DeclareTextFontCommand declaration precisely for this purpose; in your case, you should say, for example,
\DeclareTextFontCommand{\textbfit}{\bfseries\itshape}

That is, in the first argument you specify a name of your choosing for the new command; and in the second argument, you put the declarations needed to obtain the family, series, and shape you want to change to.
With this method, you define commands that behave exactly as the predefined commands \textit, \textbf, etc., in that

*

*they are robust, so they can be used without problems in "moving arguments";

*they automatically take care of the italic correction at both ends,
in a way that is consistent with what the predefined commands do
(actually, by means of the same algorithm).
Indeed, the predefined commands \textit, \textbf, etc. are themeselves defined by means of \DeclareTextFontCommand, as you can readily check in the LaTeX sources (e.g., in latex.ltx).  Note that, given this fact, the name you choose for your new command should, by consistency, begin with \text....
MWE:
% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
                                 % declare the paper format.

\usepackage[T1]{fontenc}         % Not always necessary, but recommended.
% End of standard header.  What follows pertains to the problem at hand.

\DeclareTextFontCommand{\textbfit}{\bfseries\itshape}
\newcommand*{\nonRobustCommand}{I'm not robust!}
\DeclareRobustCommand*{\robustCommand}{I'm robust!}

\begin{document}

Normal text and \textbfit{text that is both boldfaced and italicized}.  By way
of comparison, \textbf{this is text that is oly boldfaced} (but not italicized),
and \textit{this is text that is only italicized} (but not boldfaced).

Test for italic correction:
\begin{itemize}
    \item
        bold-italic followed by normal: \textbfit{f}f
    \item
        bold-italic followed by bold: \textbfit{f}\textbf{f}
    \item
        bold-italic followed by italic: \textbfit{f}\textit{f}
\end{itemize}
In the last case, you might argue that the italic correction should
\textbfit{not} be used, as in {\bfseries\itshape f}{\itshape f}, but that's the
way \LaTeX\ is programmed!

\typeout{Test for robustness: \textbfit}
\typeout{(Compare with this: \nonRobustCommand}
\typeout{And with this: \robustCommand)}

\end{document}

Addition
I forgot to mention, among the benefits of this approach, that your new command will automatically work in math mode too, if you load the masmath package (actually, it suffices to load the amstext package), as the predefined commands like \textit and \textbf do.
New MWE:
% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
                                 % declare the paper format.

\usepackage[T1]{fontenc}         % Not always necessary, but recommended.
% End of standard header.  What follows pertains to the problem at hand.

\usepackage{amstext}

\DeclareTextFontCommand{\textbfit}{\bfseries\itshape}
\newcommand*{\nonRobustCommand}{I'm not robust!}
\DeclareRobustCommand*{\robustCommand}{I'm robust!}

\begin{document}

Normal text and \textbfit{text that is both boldfaced and italicized}.  By way
of comparison, \textbf{this is text that is oly boldfaced} (but not italicized),
and \textit{this is text that is only italicized} (but not boldfaced).

Test for italic correction:
\begin{itemize}
    \item
        bold-italic followed by normal: \textbfit{f}f
    \item
        bold-italic followed by bold: \textbfit{f}\textbf{f}
    \item
        bold-italic followed by italic: \textbfit{f}\textit{f}
\end{itemize}
In the last case, you might argue that the italic correction should
\textbfit{not} be used, as in {\bfseries\itshape f}{\itshape f}, but that's the
way \LaTeX\ is programmed!

Compatibility with the \textsf{amsmath} (or \textsf{amstext}) package:
\( T_{\textbfit{bold-italic}} \ne T_{\textit{italic}} \ne T_{\textbf{bold}} \).

\typeout{--------------------------------}
\typeout{Test for robustness: \textbfit}
\typeout{(Compare with this: \nonRobustCommand}
\typeout{And with this: \robustCommand)}
\typeout{--------------------------------}

\end{document}

This time I'm also showing the output:


text: Q: How to get byte data of PDF file from asp.net web method by java-script ajax post? Consider a file in size of 9.3 MB , it takes 33 MB in the form of byte.Is there any faster techniques to get these byte faster?


text:
Q: Why is my app 25% larger on the App Store? The zip file I uploaded is 19.5MB, but on the App Store, Apple reports it as 24.5MB -- too large for over-the-air downloading. Is Apple adding a 5MB wrapper? Decompressing and recompressing less efficiently? Using 815K "megabytes"?

A: Download the app from the App Store with iTunes. You should end up with a .ipa in ~/Music/iTunes/Mobile Applications which is (hopefully) approximately what you get from the App Store. Check its size. You can additionally use something like unzip -Z myapp.zip to check the compressed size of individual files (an .ipa is just a .zip).
If, as in FreeAsInBeer's answer, your executable's compressed size is increasing loads, then it might be worthwhile trying to fix this (5 MB is a lot of code). Compiling with -Os might be helpful.
Also note that the .ipa will have some additional info, namely iTunesArtwork (from the up-to-512x512 App Store app icon) and iTunesMetadata.plist (which has stuff like the App Store category) and some FairPlay information. I'm not sure which of these are sent to the device.
And finally, Apple might be using M = 106 instead of 220 — 19.5×220 ≈ 20.4×106 . IIRC this was one of the changes in Snow Leopard.

A: From Apple:

When your application is approved by
Apple to sell on the App Store, it is
encrypted for DRM purposes and
re-compressed. When the encryption is
added, the size of the compressed file
will increase. The exact size of the
increase will vary from app to app,
however, the size increase can be
large when the binary contains a lot
of contiguous zeros. We are unable to
guarantee the size of your file after
the encryption has been added.

Source (Expand section View the file sizes of a build (iOS, tvOS))


text:
Q: How to select 3 specific pattern in column using SQL? What is wrong with my code? SELECT * FROM Customers
WHERE CustomerName LIKE ('%aa%','%bb%','%cc%');

A: Try splitting your conditions like this
WHERE CustomerName LIKE '%aa%' OR CustomerName LIKE '%bb%' OR  CustomerName LIKE '%cc%'

A: Try
SELECT * FROM Customers
WHERE CustomerName LIKE '%aa%' OR CustomerName LIKE '%bb%' OR CustomerName LIKE '%cc%';

LIKE does not work the same as IN where you can list a set of possibilities to match against. You have to use an OR between LIKE statements to match multiple patterns.

A: SELECT * FROM Customers WHERE CustomerName LIKE '%aa%' OR CustomerName LIKE '%bb%' OR CustomerName LIKE '%cc%'

A: You can also use the following code
SELECT * FROM Customers
WHERE
instr(CustomerName,'aa')>0 or instr(CustomerName,'bb')>0 or instr(CustomerName,'cc')>0
However this is working in oracle 11G, Please check the compatibility as well


text:
Q: Get values from XPath I need to get some values from this xml document:
<node id="A." label="General Literature">
        <isComposedBy>
            <node id="A.0" label="GENERAL">
                <isComposedBy>
                    <node label="Biographies/autobiographies"/>
                    <node label="Conference proceedings"/>
                    <node label="General literary works (e.g., fiction, plays)"/>
                </isComposedBy>
            </node>
            <node id="A.1" label="INTRODUCTORY AND SURVEY"/>
            <node id="A.2" label="REFERENCE (e.g., dictionaries, encyclopedias, glossaries)"/>
            <node id="A.m" label="MISCELLANEOUS"/>
        </isComposedBy>
    </node>

In Java how can i select only the nodes with the attributes id and label and then get the values of those attributes?
I've tried with XPath using this expression:
XPathExpression expr = path.compile("//*/@id | /@label");

But this is not returning what i want.

A: Use XPathExpression expr = path.compile("//*[@id and @label]/(@id | /@label)"); with XPath 2.0 or XPathExpression expr = path.compile("//*[@id and @label]/@id | //*[@id and @label]/@label"); with XPath 1.0.

A: Using //node[@id and @label] will get all node elements having id and label attributes. Then you would need to loop over the nodes to get their attribute values. An example using DOM:
    for(int i = 0; i < nodes.getLength(); i++) {
        Node node = nodes.item(i);
        NamedNodeMap attributes = node.getAttributes();
        System.out.println(attributes.getNamedItem("id").getTextContent());
        System.out.println(attributes.getNamedItem("label").getTextContent());
    }

A: Try this way:
XPathExpression expr = path.compile("//*/*[@id and @label]");


text:
Q: Consume messages from JMS queue using multithreading I have a requirement in our project to process the JMS messages in parallel using threads. Currently our project works like this: When a file is placed in a directory the poller generates messages and the outbound adapter creates JMS messages and sends it to businessQueue. The JMS listener listens the messages from the queue and launches the batch job to process the file. So at a time only 1 file will be processed.
<jms:listener-container concurrency="1"
        acknowledge="client" container-type="default" destination-type="queue"
        connection-factory="cachingJmsConnectionFactory" cache="auto">
        <jms:listener id="businessFileJmsListener" ref="businessFileJmsReceiver"
            method="onMessage" destination="${BUSINESS_JMS_QUEUE_NAME}" />
    </jms:listener-container>

The requirement is to read the JMS messages from the queue using threads and process the files in parallel. For example we have to read 3 messages at a time and launch 3 batch jobs and process 3 files using threads. In the above configuration there is a property called concurrency. I don't know if we increase the number for that property will it works or not ? Please suggest if there is any way to implement our requirement. My final requirement is to read 3 JMS messages from queue at a time and process 3 files at a time. Please suggest. Thanks.

A: Yes, concurrency="3" will receive messages on 3 distinct threads.


text:
Q: Short list of .prj options in .pyt I'm tasked with creating a .pyt to distribute across our office and field computers (state geological survey) for converting .gpx to features but constraining the choice of projections/datums to seven (the point being that such functionality will be more efficient). The tool must be able to write locally to a specified gdb. I'm not sure what best practices would be:  create a file in the specified .gdb with the .prj files and point to that or make the .prj variables global. Have not had success with portability either way (new to .pyt, I can fashion a script tool that works fine but is more trouble for the user than its worth). I seek insight or sample code.
Or is there a better way?

A: You could just set up a filter list in your CR selection parameter.
    cr_parameter.parameterType = 'Required'
    cr_parameter.direction = 'Input'
    cr_parameter.datatype = 'GPString'
    cr_parameter.filter.list = ["WGS 1984",
                                "NAD 1983 NSRS2007 StatePlane California V FIPS 0405 (US Feet)",
                                ... # (etc)
                               ]

if the list of CRs isn't going to change much, you might as well just hard-code it. Remember also you can get arcpy.SpatialReference objects by name, so if you have "WGS 1984" in your list of CRs, you can get back to it in your script tool like this: arcpy.sa.SpatialReference("WGS 1984") or even arcpy.sa.SpatialReference(arcpy.GetParameterAsText(1)).
Edit: if you're married to the idea of using .prj files (and if you're not using custom projections, you shouldn't be), you could also set the Parameter.filter.list like this:
import glob

match_pattern = os.path.join(os.path.dirname(__file__), '*.prj')

cr_parameter.filter.list = [os.path.basename(filename) for filename in glob.glob(match_pattern)]

then the list would include every .prj file in the same folder as the .pyt.


text:
Q: What is the best implementation strategy for this html + javascript widget? The Problem
I came up with this select-box variant in answer to a question on UX.SE:
https://ux.stackexchange.com/a/48951/16187

However, working out how to implement it has been driving me mad ever since I wrote that post.
What I've tried
Initially I figured it would be easy enough to do.
The strategy I would have taken would be to  model all the options in a javascript object, with their own name and selected properties, and then write a view function to display them as an unordered list or something.
I could then create the button as another javascript object, modelling it's own state, and have a view function spiting it out a representation of it into the widget. Maybe throw in some event code for transitioning between button states and I'm done.
Where I'm Stuck
The more I thought about that approach, the more I realised that having all of the state sitting in javascript objects was a terrible idea. I figured that I should probably store the state in the dom, and mutate it with javascript.
However I have no clear idea what that sort of architecture would look like, or how I should go about coding it.
Can you help me work out what a better high level implementation strategy for this sort of widget looks like?

A: Why would you think that having the state in js would be bad? I think it's as good as in the DOM, if not better.
Anyway, you most likely already have the state in the DOM, since for display purposes you will add/remove classes from the list elements. In such cases I often just let jQuery find all elements with a certain class within the list. Get the amount of those elements and you already know how many were selected.
Put all of this functionality (count objects with class "selected_list_thing", update button state) in a function and add an mouse click handler to your list elements. There switch the class (eg add or remove "selected_list_thing" is blue) and then call the function you defined to update the button.


text:
Q: Having a generic GEOGRAPHY column with PostGIS In PostgreSQL 9 + PostGIS 1.5, is there a way to create a "generic" GEOGRAPHY column? By that I mean a column that would accept POINTs as well as POLYGONs, LINESTRINGs, etc. Until now, I've only seen columns like GEOGRAPHY(POINT,4326) on the Internet.
If that is not possible, then how would you design (from a DB point of view) an entity that is linked to a random geographical object (point, polygon, whatever)? Should I create 3, 4, 5 different tables for each type of geographical object I'd like to support? (1 table for POINT objets, 1 table for POLYGON objects and so on)?
Thanks in advance.
Romain

A: Yes, just don't specify a type constraint in the CREATE TABLE statement.
CREATE TABLE mytable ( geog GEOGRAPHY, id SERIAL PRIMARY KEY );


text:
Q: Why am I getting different Voltage Losses?
The step-down transformer has a ratio of 10:1

$$P_{globe}=V_{globe}\cdot I_{globe}$$
$$P_{globe}=V_{globe}\cdot I_{globe}=\left( 2 \right)\cdot I_{globe}=4\ \mbox{W}$$
$$I_{globe}=2\; \mbox{A}\; ∴\; I=2\cdot \frac{1}{10}=0.2\; \mbox{A}$$
$$V_{loss}=IR=\left( 0.2 \right)\left( 2+2 \right)=0.8\; \mbox{V}$$
$$However...$$
$$V_{loss}=V_{supply}-\frac{10}{1}V_{globe}=20.8\sqrt{2}-10\left( 2 \right)≈9.4\; \mbox{V}$$

What's wrong here?

A: The \$\sqrt 2\$ factor should be removed from Vsupply because you are comparing rms values and not peak values.


text:
Q: Node JS aws-sdk getting 403 forbidden error I am now developing Node JS module and one of its functionalities is to show the files that exist in Amazon s3 bucket.
Now I know Amazon AccessKeyID and SecretAccessKey, bucket name also.
So, I wrote my code as follows.
aws = require("aws-sdk");
fs = require("fs");

fs.readFile('config/amazon-s3.cfg', 'utf8', function(err, content) {
    if (err) {
        console.log("Cannot read Amazon Config file.");
    } else {
        config = JSON.parse(content);

        aws.config.update(
            {
                accessKeyId: config.accessKeyId,
                secretAccessKey: config.secretAccessKey,
                // region: config.region
            }
        );

        var s3 = new aws.S3();

        s3.listObjects({Bucket: config.bucket}, function(err, data) {
            if (err) console.log(err, err.stack);
            else {

                var contents = data.Contents;
                console.log(contents);
            }
        });
    }
});

But when I run this code, I get always forbidden 403 error.
I tried it with several amazon accounts including my friends' accounts, so the amazon accessKeyID and secretAccessKey and Bucket info is not doubtful, but keep fails.
Can you please tell me what's wrong in my code?
Please help me!!!


text:
Q: Calculating probability in iterative double pigeonhole type problem Assume I have $2n$ unique members of a set. Now assume that each element of that set is assigned an integer $\in (0,n]$, such that each integer is used twice. So for example if you have a set of 4 elements which we label $\{A,B,C,D\}$, then two elements will be labeled with 1 and two will be labeled 2, e.g. you might get the labeled set: $\{(A,1),(B,1),(C,2),(D,2)\}.$
Now assume the labels of the $2n$ elements are completely randomized. My question is, what is the probability $p_n$ that no pair of elements that shared a label, both got that same label again (for arbitrary values of $n$)? To continue the example before (for $n=2$), the 6 distinct ways the 4 labels can be arranged are:
$$\{(A,1),(B,1),(C,2),(D,2)\}\\
\{(A,1),(B,2),(C,1),(D,2)\}\\
\{(A,1),(B,2),(C,2),(D,1)\}\\
\{(A,2),(B,1),(C,1),(D,2)\}\\
\{(A,2),(B,1),(C,2),(D,1)\}\\
\{(A,2),(B,2),(C,1),(D,1)\}.$$
Because there is only one case where either $A$ and $B$ where both reassigned 1 and/or $C$ and $D$ where reassigned 2, the probability for $n=2$ is $p_2=5/6$.
Ideally I would like a closed form solution for $p_n$, but I'd also settle for a recursive formula (which could e.g. be used to numerically compute $p_n$ by say an iterated python script)

A: You want to avoid having any of the $n$ events which consist of each of the $n$ pairs repeating, we can get the probability of this with inclusion exclusion.
Let $f(n)$ be the number of labels on $2n$ elements, where $f(0) = 1, f(1) = 1, f(2) = 6$ etcetera.
The probability that a given subset of $k$ pairs repeats is $\frac{f(n-k)}{f(n)}$, because there are $f(n-k)$ ways to label the remaining $2(n-k)$ elements.
Hence via inclusion-exclusion the probability that no event happens is:
$1 + \sum\limits_{k=1}^n (-1)^k \binom{n}{k}\frac{f(n-k)}{f(n)}$.
Where $f(n)$ is $\frac{(2n)!}{2^n }$


text:
Q: Create a Bridge network interface to be used by QEMU vm Do you know how to crate a Bridge/Switch on MacOs hypervisor M1 chip to be able to connect a QEMU VM to LAN?
I have looked at:
networksetup
Nmtui: not for mac
ifconfig

Also tried looking at using Settings/Network but if I create a Bridge that takes over the connection. I am looking at adding a new virtual Bridge/Interface, that is using the real interface - connecting to LAN?


text:
Q: gwteventservice support multiple tabs I've tried the chatdemo of gwt-comet and gwteventservice so far.
I personally prefer the gwteventservice more, but they both have the same problem:
I have two tabs open in firefox: say with user ff1 and user ff2 and one tab in chrome say user chrome1. When I send an event from chrome1 for example a new message event, then only one of the users ff1 and ff2 will receive the message.
This was tested using gwteventservice 1.2.0 and the latest source code 1.3.0 (20-6-2012), and gwt-comet 1.2.3
Another problem with the demos is that closing a tab/closing the browser isn't perceived by the server and that user seems logged in to the other users. The user only seems logged out by others when the logout button is pressed.
I'd prefer a solution using gwteventservice. My question is thus:
how to manage multiple tabs using gwteventservice and logout users correctly in a chatapp?

A: # Generator for unique client ids
eventservice.connection.id.generator=de.novanic.eventservice.service.connection.id.SessionExtendedClientIdGenerator

more information can be found at:
https://stackoverflow.com/a/5882001/1467482