Is there a way for javascript to obtain paths of all files in a local folder?

Question: I tried searching for an answer to this question, but all I encountered were how to allow users to upload files.
So what I want to do is run a for loop over all the files within a local file to obtain the path of each file. Is there a way to do this?
Comment: possible duplicate of [Local file access with javascript](http://stackoverflow.com/questions/371875/local-file-access-with-javascript)
Comment: I don't think I'm looking for file manipulation...
Answer: You cannot directly. It will be a big security hole to allow JS to browse local directory...
Comment: Frontend is fully editable by users. And of course you dont want user browse your server directory so no you cannot.
But you can think about renaming your images from 001.jpg to 100.jpg for example and iterate on them whith JS until a 404 error appear.
Comment: Maybe I'm not being clear with my terms. When I was referring to 'local directory', I meant the files that I upload along with my html, css, and javascript files on the server.
Comment: What is your goal ? Will be easier like this :).
Comment: You want to see an a page the absolute path of some files ? Why you speak about javascript ? You use nodejs ?
Comment: Ah okay. So I have a directory of images that are located in another folder from my javascript file and I want to take all those images and insert them dynamically onto a webpage. The reason I wanted to search within the directory of images for files rather than hard coding each image is that I figured that writing a script to search for images would reduce clutter in my code.
Comment: Ok but Javascript is frontend stuff (if you dont use nodejs) and what you want to do is to list files hosted on server. Why dont use backend language like PHP ?
Comment: Because I'm not familiar with PHP or any other backend languages :P
Comment: Is there no other way to go about this other than through backend?
Comment: If I answer your request please tag my responce :)


Can you keep the ball if it is thrown at the audience?

Question: I have always wondered. Do people keep the balls? What happens?
Comment: Can you be a little more specific? This doesn't seem like the sort of thing that would be covered by the rules of the game, so we'll need to know which league or stadium you're interested in to have a chance at finding the correct answer.
Comment: Let's remember that balls in football are always good for use, they are only dropped when they are broken. In baseball, the ball get's change every once in a while.. there is no correct answer for this, it's depends on several things. Usually in football you can't keep the ball..
Comment: Lets say FIFA world cup 2014 in Brazil. Any stadium.
Answer: In football you cannot keep the ball, it has to be returned to the field. If it is not damaged, it will be used for the game.
In cricket also the ball has to be returned to the field. In case the ball is not found, it is considered a lost ball.
Comment: Welcome to Sports SE. Just wondering: "It has to be returned to the field" According to whom?
Answer: In football, if the ball crosses the field boundary then it is considered a throw or free-kick (unless it is a penalty as judged by the referee). It is derived from rules of all major leagues. The rules of football is applicable to the field i.e. it does not consider the crowd as part of the rule; throwing the ball at the crowd is considered the same as the ball crossing the field boundary. The ball is to be returned to the field for the play to continue. In case the ball is not found, it is considered lost and a replacement is brought in. In case the ball is damaged, a replacement is brought in.
Answer: The depends on the host club!
The host club will decide as owners, whether fans are allowed to take the balls.
At most clubs, the balls are thrown back to the security guards by the fans automatically. If one is not returned voluntarily, the guards get him. It is uncommon in football to take balls home with you. Finally they cost about 100 euros.
Source
Answer: If the ball ends up in the stands as a part of a play it must be returned. If a player scores and gives the ball to a fan it is theirs to keep.
Comment: Could you provide some reference to support this answer?


Dividir form com radios em 2 colunas

Question: Tenho o seguinte formulario:
 <?php
echo"<form class='form-horizontal' method='POST' action='reposicao.php'>";
  echo"<fieldset>";
    echo"<legend>OPÇÕES</legend>";
  echo"<input type='hidden' name='loja'     id='loja'     value='$v_loja'>";

  $query_menu = mysql_query("SELECT
  rm_id     AS FUNCAO,
  rm_desc   AS DESCRICAO,
  rm_obs    AS OBSERVACAO,
  rm_status AS STATUS
       FROM radios_menu
            WHERE rm_status='0'");
    while ($row = mysql_fetch_array($query_menu)) {
    $v_funcao    = $row["FUNCAO"];
    $v_desc      = $row["DESCRICAO"];
    $v_obs       = $row["OBSERVACAO"];
    $v_status    = $row["STATUS"];
    echo"
";
      echo"";
      echo"
";
        echo"
";
          echo"";
            echo"<input type='radio' name='v_desc' id='$v_funcao' value='$v_funcao' >$v_desc
";
        echo"
";
      echo"
";
    echo"
";
           }
     echo"<input type='hidden' name='v_descricao'     id='$v_desc'     value='$v_desc '>";
     echo"
";
     echo"
";
    echo"
";
      echo"
";
        echo"<button type='submit' class='btn btn-primary'>CONSULTAR</button>";
      echo"
";
    echo"
";

  echo"</fieldset>";
 echo"</form>";
?>

Ele lista vários rádios,só que ta listando tudo um embaixo do outro como poderia fazer para listar 2 colunas ?
Answer: Para listar lado a lado você teria que definir uma largura, pois a div vem por padrão com 100% de largura, ocupando assim todo o espaço e passando para a próxima linha.
Como a div que se encontra os radios está definida com col-lg-10, ou seja esta usando 10, para fazer duas colunas você deve setar para cada div dentro desta col-lg-5, como respondido pelo @Davi Sousa.
Repassei seu código com esta e mais algumas alterações afim de deixar o código mais limpo, segue:
<?php

echo "
<form class='form-horizontal' method='POST' action='reposicao.php'>
  <fieldset>
    <legend>OPÇÕES</legend>
      <input type='hidden' name='loja' id='loja' value='$v_loja'>";

        $query_menu = mysql_query("SELECT
          rm_id     AS FUNCAO,
          rm_desc   AS DESCRICAO,
          rm_obs    AS OBSERVACAO,
          rm_status AS STATUS
        FROM radios_menu
        WHERE rm_status='0'");

        while ($row = mysql_fetch_array($query_menu)):
          $v_funcao    = $row["FUNCAO"];
          $v_desc      = $row["DESCRICAO"];
          $v_obs       = $row["OBSERVACAO"];
          $v_status    = $row["STATUS"];

           echo "

               // Aqui vai a classe

                     <input type='radio' name='v_desc' id='$v_funcao' value='$v_funcao' >$v_desc

";

         endwhile;

         echo "
         <input type='hidden' name='v_descricao' id='$v_desc' value='$v_desc '>

             <button type='submit' class='btn btn-primary'>CONSULTAR</button>

       </fieldset>
     </form>";

?>

Lembrando que mudei o código para ficar mais legível, ja que não e necessário ter tantos echo, porem não é uma alteração necessária, vai de você.
Espero ter ajudado;
Att;
Comment: Blza, tudo certo,obrigado pela dica do echo também, abraço.
Comment: Que bom que pude ajudar, :D
Answer: Defina um width para sua a div radio e ponha um float: left.
Answer:  echo"
";
      echo"";
        echo"<input type='radio' name='v_desc' id='$v_funcao' value='$v_funcao' >$v_desc
";
    echo"
";

MUDE PARA
 echo"
";
      echo"";
        echo"<input type='radio' name='v_desc' id='$v_funcao' value='$v_funcao' >$v_desc
";
    echo"
";

Dividir form com radios em 2 colunas


Where can I view active directory failed logon attempts?

Question: I do not see any failed logon attempts in my windows sever 2003 security event log (I see only successful ones).  However, I have a user that is getting locked out very often and I need to try to determine why.   Is there a setting that might be hiding the failed login attempts, or a way to view these?
Answer: If your auditing policy is set to only log successful events, you will only get successful events.  Change your auditing policy to log logon failures as well, then look at these Microsoft tools to help you troubleshoot the lockout issue.
Comment: As in this?  http://support.microsoft.com/kb/814595
Comment: Yes, that is what you are looking to do.


Error in hook menu

Question: I have used drupal 7.38.I have created a custom hook_menu function().
My code is:
function jasmine_custom_menu(){
$items = array();
$items['review'] = array(
    'title' => 'Review Page',
    'page callback' => 'review_page',
    'access arguments' => TRUE,
    'type' => MENU_NORMAL_ITEM,
);
return $items;
}
function review_page(){
  return 'hello workld';
}

after module enable error display like this:
Warning: Invalid argument supplied for foreach() in menu_unserialize() (line 400 of D:\xampp\htdocs\jasmine\includes\menu.inc)
Answer: Your access arguments need to be an array.  But I believe you are wanting to grant access to this page to everyone, so access arguments isn't the right key anyway; you want access callback.  Try this:
$items['review'] = array(
    'title' => 'Review Page',
    'page callback' => 'review_page',
    'access callback' => TRUE,
    'type' => MENU_NORMAL_ITEM,
);

Error in hook menu


Como atribuir arredondamento no button e cores aleatórias ao mesmo tempo?

Question: Opa galera, estou com uma dúvida já dei uma vasculhada na internet e ainda não encontrei talvez não seja possível, mas vamos lá..
Por exemplo eu tenho um button nesse button eu jogo cores aleatórias nele, tenho uma List List Cores = new ArrayList(); e nessa list eu guardo as cores em Hexadecimal, até ai sem problemas eu uso o  Collections.shuffle() e pego uma cor aleatoriamente da lista e no button uso o bt1.setBackgroundColor(), minha dúvida maior é eu to querendo que meus buttons de minha aplicação fiquem com os cantos arredondados, sei que tenho que usar algo como isso
cantosredondodos.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#33DDFF" />
    <corners android:radius="4dp" />
</shape>

mas se eu colocar esse xml como background lá no xml do button
<Button
    android:text="Button"
    android:textAllCaps="false"
    android:layout_width="110dp"
    android:layout_height="wrap_content"
    android:id="@+id/button1"
    android:background="@drawable/cantosredondodos"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true" />

o backgroud que defini antes no código vai sobrescrever o a parte do xml que eu quero pra fazer o radius, teria alguma solução? pra fazer tudo no código da aplicação?, eu até pensei em fazer vários xmls mas acredito que não ficaria muito legal, como eu tenho mais de 10 buttons não ficaria uma coisa muito viável...
Answer: Você pode definir a borda programaticamente usando shape.setStroke(3, borderColor), onde o 3 representa a borda e borderColor representa a cor da borda usando o GradientDrawable. Veja esta função abaixo, que passo como parâmetro a view, que seria seu botão, o backgroundColor e a borderColor. Veja:
public static void customView(View v, int backgroundColor, int borderColor){
    GradientDrawable shape = new GradientDrawable();
    shape.setShape(GradientDrawable.RECTANGLE);
    shape.setCornerRadii(new float[] { 8, 8, 8, 8, 0, 0, 0, 0 });
    shape.setColor(backgroundColor);
    shape.setStroke(3, borderColor);
    v.setBackgroundDrawable(shape);
}

Você pode fazer a customização conforme suas ideias.
Para definir uma cor aleatoriamente você pode usar a classe Random. Veja:
Random rnd = new Random();
int color = Color.argb(255, rnd.nextInt(256), rnd.nextInt(256), rnd.nextInt(256));

Comment: @RogersMarques legal... eu coloquei assim pra você adaptar mesmo, porque está de um jeito bem genérico.  abs. boa sorte
Comment: opa obrigado, aqui no meu caso eu dei uma pequena adaptada :  ic void customView(int backgroundColor, Button valor){
        shape = new GradientDrawable();
        shape.setShape(GradientDrawable.RECTANGLE);
        shape.setCornerRadii(new float[] { 8, 8, 8, 8, 0, 0, 0, 0 });
        shape.setColor(backgroundColor);
        //shape.setStroke(3, borderColor);
        valor.setBackgroundDrawable(shape);
    }   as cores eu já tenho adicionadas na lista ao todo 18 cores, e no meu caso eu já uso o collections.shuffle para não repetir as cores, mas obrigado resolveu meu problema


How and where can I import a common SCSS files, so that it gets available in every scss files?

Question: I have scss files that use variables for colors. like -
.label-primary, .badge-primary {
  background-color: $navy;
  color: #FFFFFF;
}

.label-success, .badge-success {
  background-color: $blue;
  color: #FFFFFF;
}

.label-warning, .badge-warning {
  background-color: $yellow;
  color: #FFFFFF;
}

These variables are defined in variables.scss file
I have already @imported @import "base/variables"; in application.css.scss file.
// Variables, Mixins
@import "base/variables";
@import "base/mixins";

but still it doesnt loads in other scss files and throws error Sass::SyntaxError: Undefined variable: "$navy". where trying to precompile in production.
I have to explicitely @import "base/variables"; in every scss file on the top. there are 35 files.
How can i define this variable.scss file in just one place so that its loaded in every scss file?
NOTE: I am using rails-api gem and the application is API only. I have tweaked a bit to make some views on this application.

Answer: Have you tried sprockets-sass gem ? It works great with Sprockets 2.x and 3.x with both SCSS and SASS files.
And it does exactly what you need :D


How to interpret statistical insignificance of explanatory variables that may be indirectly affecting Y?

Question: I have modeled Y (binary variable) on a set of explanatory variables, X, using logistic regression. A number of x's, say 10 of them, are found to be significantly affecting Y (based on LR test). Then I model another binary variable Z, on X and Y. Y is found to be significantly affecting Z, but almost none of the x's are. I thought it should be because of multicollinearity (as Y is already in the model, x's are not needed), so I removed Y and still x's coefficients are not statistically significant. How can I interpret this?
Answer: It's hard to answer the question as significance of variables vary a lot depending on what other variables you include and if you have misspecified your model.
I don't know how much variance of Y is explained by x. x just being significant doesn't mean that you don't have an omitted variable bias.
Meaning, that if x only explains a very small part of the variance in Y and you are omitting variables and your model is misspecified, then your significance doesn't mean much (as the model is misspecified).
So if x doesn't explain much variance in y,  when you then later try to explain Z by x instead of Y, then you won't get the results you expect.
Remember that omitting variables or including variables in the model that have multicollinearity will lead to model misspecification and you significance or coefficients won't match the 'true model'.
Additionally: you could test for multicollinearity with a VIF test.


Hibernate performs an uncontrolled update on entity

Question: Debugging a problem setting Hibernate logs on (org.hibernate.SQL and org.hibernate.type.descriptor.sql).
I've found that after my business logic has ended, an update is performed setting a wrong value in an entity.
I use @Service and @Repository (extending JpaRepository) as layers for persistence. (I'll update that code soon).

A SELECT PRIOR TO DE WRONG UPDATE

[DEBUG] 2022-11-24 11:11:03.906 [pool-3-thread-1] SQL - select entidad0_.id as id1_41_1_, entidad0_.anonimo as anonimo2_41_1_, entidad0_.apellidos as apellido3_41_1_, entidad0_.centroSalud as centrosa4_41_1_, entidad0_.idComu as idcomu39_41_1_, entidad0_.conFoto as confoto5_41_1_, entidad0_.dirCp as dircp6_41_1_, entidad0_.dirLocalidad as dirlocal7_41_1_, entidad0_.dirNombre as dirnombr8_41_1_, entidad0_.dirNumero as dirnumer9_41_1_, entidad0_.dirPiso as dirpiso10_41_1_, entidad0_.direccion as direcci11_41_1_, entidad0_.documento as documen12_41_1_, entidad0_.empresa as empresa13_41_1_, entidad0_.idEstadoCiudadano as idestad40_41_1_, entidad0_.estudios as estudio14_41_1_, entidad0_.fechaCreacion as fechacr15_41_1_, entidad0_.fechaNacimiento as fechana16_41_1_, entidad0_.foto as foto17_41_1_, entidad0_.idBiblioteca as idbibli18_41_1_, entidad0_.idEntidad as identid19_41_1_, entidad0_.idFCM as idfcm20_41_1_, entidad0_.mail as mail21_41_1_, entidad0_.movil as movil22_41_1_, entidad0_.nia as nia23_41_1_, entidad0_.nombre as nombre24_41_1_, entidad0_.pais as pais25_41_1_, entidad0_.profesion as profesi26_41_1_, entidad0_.prueba as prueba27_41_1_, entidad0_.idPuestoImpresion as idpuest41_41_1_, entidad0_.saldoVirtual as saldovi28_41_1_, entidad0_.sexo as sexo29_41_1_, entidad0_.telefono as telefon30_41_1_, entidad0_.idTipoCiudadano as idtipoc42_41_1_, entidad0_.idTipoDocumento as idtipod43_41_1_, entidad0_.idTipoDocumentoTutor as idtipod44_41_1_, entidad0_.tipoEntidad as tipoent31_41_1_, entidad0_.idTipoTutor as idtipot45_41_1_, entidad0_.tokenTemporal as tokente32_41_1_, entidad0_.tutorApellido as tutorap33_41_1_, entidad0_.tutorDocumento as tutordo34_41_1_, entidad0_.tutorEmail as tutorem35_41_1_, entidad0_.tutorFechaNacimiento as tutorfe36_41_1_, entidad0_.tutorMovil as tutormo37_41_1_, entidad0_.tutorNombre as tutorno38_41_1_, entidad0_.user_id as user_id46_41_1_, entidad0_.idUsuarioCreador as idusuar47_41_1_, incidencia1_.idEntidad as identida2_77_3_, incidencia2_.id as idincide1_77_3_, incidencia2_.id as id1_75_0_, incidencia2_.conAdjuntos as conadjun2_75_0_, incidencia2_.descripcion as descripc3_75_0_, incidencia2_.direccion as direccio4_75_0_, incidencia2_.idEstado as idestad11_75_0_, incidencia2_.fecha as fecha5_75_0_, incidencia2_.idIncidencia as idincide6_75_0_, incidencia2_.imagen as imagen7_75_0_, incidencia2_.lat as lat8_75_0_, incidencia2_.lon as lon9_75_0_, incidencia2_.prioridad as priorid10_75_0_, incidencia2_.idTipoIncidencia as idtipoi12_75_0_, incidencia2_.idUsuarioAsignado as idusuar13_75_0_, incidencia2_.idUsuarioCreador as idusuar14_75_0_ from Entidades entidad0_ left outer join incidenciasCiudadanos incidencia1_ on entidad0_.id=incidencia1_.idEntidad left outer join Incidencia incidencia2_ on incidencia1_.idIncidencia=incidencia2_.id where entidad0_.id=?
[TRACE] 2022-11-24 11:11:03.906 [pool-3-thread-1] BasicBinder - binding parameter [1] as [INTEGER] - [229]
[DEBUG] 2022-11-24 11:11:03.936 [http-nio-8090-exec-6] SQL - select listaambit0_.idTipoCiudadano as idtipoci4_135_0_, listaambit0_.id as id1_135_0_, listaambit0_.id as id1_135_1_, listaambit0_.porcentajePago as porcenta2_135_1_, listaambit0_.idTipoAmbito as idtipoam3_135_1_, listaambit0_.idTipoCiudadano as idtipoci4_135_1_, ambito1_.id as id1_4_2_, ambito1_.color as color2_4_2_, ambito1_.comisionCompra as comision3_4_2_, ambito1_.comisionRecarga as comision4_4_2_, ambito1_.descripcion as descripc5_4_2_, ambito1_.icono as icono6_4_2_, ambito1_.idAmbito as idambito7_4_2_, ambito1_.mail as mail8_4_2_, ambito1_.nombre as nombre9_4_2_, ambito1_.orden as orden10_4_2_, ambito1_.permiteAcceso as permite11_4_2_, ambito1_.permiteCompra as permite12_4_2_, ambito1_.permiteRecarga as permite13_4_2_, ambito1_.tipocentro as tipocen14_4_2_, ambito1_.visible as visible15_4_2_, ambito1_.visibleGraficos as visible16_4_2_ from TiposCiudadanoAmbito listaambit0_ inner join Ambitos ambito1_ on listaambit0_.idTipoAmbito=ambito1_.id where listaambit0_.idTipoCiudadano=?
[TRACE] 2022-11-24 11:11:03.936 [http-nio-8090-exec-6] BasicBinder - binding parameter [1] as [INTEGER] - [1]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([id1_75_0_] : [INTEGER]) - [null]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([anonimo2_41_1_] : [BOOLEAN]) - [false]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([apellido3_41_1_] : [VARCHAR]) - [Propiedades email revertidas a ]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([centrosa4_41_1_] : [BOOLEAN]) - [false]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([idcomu39_41_1_] : [INTEGER]) - [1]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([confoto5_41_1_] : [BOOLEAN]) - [true]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([dircp6_41_1_] : [VARCHAR]) - [41100]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([dirlocal7_41_1_] : [VARCHAR]) - [XXX]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([dirnombr8_41_1_] : [VARCHAR]) - [null]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([dirnumer9_41_1_] : [VARCHAR]) - [null]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([dirpiso10_41_1_] : [VARCHAR]) - [null]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([direcci11_41_1_] : [VARCHAR]) - [Propiedades email revertidas a]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([documen12_41_1_] : [VARCHAR]) - [XXX]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([empresa13_41_1_] : [VARCHAR]) - [null]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([idestad40_41_1_] : [INTEGER]) - [1]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([estudio14_41_1_] : [VARCHAR]) - [null]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([fechacr15_41_1_] : [TIMESTAMP]) - [2021-01-14 11:17:51.0]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([fechana16_41_1_] : [TIMESTAMP]) - [2000-06-21 00:00:00.0]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([foto17_41_1_] : [VARCHAR]) - [user/C0024460D/foto.htm]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([idbibli18_41_1_] : [VARCHAR]) - [null]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([identid19_41_1_] : [VARCHAR]) - [C0024460D]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([idfcm20_41_1_] : [VARCHAR]) - []
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([mail21_41_1_] : [VARCHAR]) - []
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([movil22_41_1_] : [VARCHAR]) - [444111222]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([nia23_41_1_] : [VARCHAR]) - [null]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([nombre24_41_1_] : [VARCHAR]) - [Propiedades email revertidas a ]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([pais25_41_1_] : [VARCHAR]) - [ES]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([profesi26_41_1_] : [VARCHAR]) - [null]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([prueba27_41_1_] : [BOOLEAN]) - [false]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([idpuest41_41_1_] : [INTEGER]) - [1]

**GOOD VALUE [TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([saldovi28_41_1_] : [NUMERIC]) - [50.00]**

[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([sexo29_41_1_] : [VARCHAR]) - [MASCULINO]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([telefon30_41_1_] : [VARCHAR]) - [444777888]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([idtipoc42_41_1_] : [INTEGER]) - [1]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([idtipod43_41_1_] : [INTEGER]) - [2]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([idtipod44_41_1_] : [INTEGER]) - [2]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([tipoent31_41_1_] : [INTEGER]) - [1]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([idtipot45_41_1_] : [INTEGER]) - [1]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([tokente32_41_1_] : [VARCHAR]) - [uuid-something]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([tutorap33_41_1_] : [VARCHAR]) - []
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([tutordo34_41_1_] : [VARCHAR]) - []
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([tutorem35_41_1_] : [VARCHAR]) - []
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([tutorfe36_41_1_] : [TIMESTAMP]) - [null]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([tutormo37_41_1_] : [VARCHAR]) - []
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([tutorno38_41_1_] : [VARCHAR]) - []
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([user_id46_41_1_] : [INTEGER]) - [229]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([idusuar47_41_1_] : [INTEGER]) - [null]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([identid19_41_1_] : [VARCHAR]) - [C0024460D]
[TRACE] 2022-11-24 11:11:03.966 [pool-3-thread-1] BasicExtractor - extracted value ([identida2_77_3_] : [INTEGER]) - [null]

... more queries nomehow expected ones ...

[DEBUG] 2022-11-24 11:11:05.894 [pool-3-thread-1] SQL - update Entidades set anonimo=?, apellidos=?, centroSalud=?, idComu=?, conFoto=?, dirCp=?, dirLocalidad=?, dirNombre=?, dirNumero=?, dirPiso=?, direccion=?, documento=?, empresa=?, idEstadoCiudadano=?, estudios=?, fechaCreacion=?, fechaNacimiento=?, foto=?, idBiblioteca=?, idEntidad=?, idFCM=?, mail=?, movil=?, nia=?, nombre=?, pais=?, profesion=?, prueba=?, idPuestoImpresion=?, saldoVirtual=?, sexo=?, telefono=?, idTipoCiudadano=?, idTipoDocumento=?, idTipoDocumentoTutor=?, tipoEntidad=?, idTipoTutor=?, tokenTemporal=?, tutorApellido=?, tutorDocumento=?, tutorEmail=?, tutorFechaNacimiento=?, tutorMovil=?, tutorNombre=?, idUsuarioCreador=? where id=?
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [1] as [BOOLEAN] - [false]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [2] as [VARCHAR] - [Propiedades email revertidas a ]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [3] as [BOOLEAN] - [false]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [4] as [INTEGER] - [1]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [5] as [BOOLEAN] - [true]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [6] as [VARCHAR] - [41100]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [7] as [VARCHAR] - [XXX]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [8] as [VARCHAR] - [null]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [9] as [VARCHAR] - [null]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [10] as [VARCHAR] - [null]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [11] as [VARCHAR] - [Propiedades email revertidas a ]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [12] as [VARCHAR] - [22987668L]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [13] as [VARCHAR] - [null]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [14] as [INTEGER] - [1]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [15] as [VARCHAR] - [null]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [16] as [TIMESTAMP] - [2021-01-14 11:17:51.0]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [17] as [TIMESTAMP] - [2000-06-21 00:00:00.0]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [18] as [VARCHAR] - [user/C0024460D/foto.htm]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [19] as [VARCHAR] - [null]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [20] as [VARCHAR] - [C0024460D]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [21] as [VARCHAR] - [dkAVD8sOQ96w8OKI2jHMGE:APA91bG95UutWvUnAomLD57ZCBArogJmGyZajG1BJA939Dl1Gelcgiy4YHHJnaho7JZWVhGBthTRbNX9Hq5LOpZ8B1ydC1pE4FSPuF8PEqI2BOS_sUFIl6FjxciNN4QJNFs9IHQkRSZF]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [22] as [VARCHAR] - []
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [23] as [VARCHAR] - [444111222]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [24] as [VARCHAR] - [null]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [25] as [VARCHAR] - [Propiedades email revertidas a ]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [26] as [VARCHAR] - [ES]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [27] as [VARCHAR] - [null]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [28] as [BOOLEAN] - [false]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [29] as [INTEGER] - [1]

**WRONG VALUE DETECTED [TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [30] as [NUMERIC] - [0.44]**

[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [31] as [VARCHAR] - [MASCULINO]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [32] as [VARCHAR] - [444777888]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [33] as [INTEGER] - [1]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [34] as [INTEGER] - [2]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [35] as [INTEGER] - [2]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [36] as [INTEGER] - [1]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [37] as [INTEGER] - [1]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [38] as [VARCHAR] - [null]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [39] as [VARCHAR] - []
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [40] as [VARCHAR] - []
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [41] as [VARCHAR] - []
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [42] as [TIMESTAMP] - [null]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [43] as [VARCHAR] - []
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [44] as [VARCHAR] - []
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [45] as [INTEGER] - [null]
[TRACE] 2022-11-24 11:11:05.894 [pool-3-thread-1] BasicBinder - binding parameter [46] as [INTEGER] - [229]

UPDATED
Service layer where I do all the saves. The involved methods are:

anotacionesBonificarCompra where the saves happen.
saldoCiudadano as an info query.
recalcularBonificacion not transactional or persistence related.

@Service
@Log4j2
public class ISaldoVirtualServiceImpl implements ISaldoVirtualService {

    @Autowired
    private IComprasService comprasService;
    @Autowired
    private IRecargasService recargasService;
    @Autowired
    private IEntidadService entidadService;
    @Autowired
    IHistorialCiudadanoService historialCiudadanoService;
    @Autowired
    IHistorialSaldoVirtualService historialSaldoVirtualService;
    @Autowired
    private ISolicitudSaldoVirtualCiudadanoService solicitudSaldoVirtualService;
    @Autowired
    private IAccionService accionService;
    @Autowired
    private IHistorialVentaService historialVentaService;

    @Override
    @Transactional(readOnly = true)
    public BigDecimal saldoCiudadano(String idEntidad, Integer ciudadanoId) {
        BigDecimal sumaCompras = comprasService.findByIdCiudadano(idEntidad).stream().map(x -> x.getImporte()).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
        BigDecimal sumaRecargas = recargasService.findByIdCiudadano(idEntidad).stream().map(x -> x.getImporte()).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
        BigDecimal sumaRecargasMasivas = solicitudSaldoVirtualService.findByIdCiudadanoValidada(ciudadanoId).stream().map(x -> x.getSolicitud().getSaldorecargar()).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);

        return sumaRecargas.add(sumaRecargasMasivas).subtract(sumaCompras);
    }

    @Override
    public CalculoBonificacion recalcularBonificacion(CalculoBonificacion calculo) {

        BigDecimal importeBonificacion = ApiUtils.porcentajeame(calculo.getEntradaBonificar().getImporteTotal(), calculo.getCampana().getPorcentaje());
        BigDecimal valorMaximoCliente  = calculo.getCampana().getLimiteCampanaCiudadano();

        BigDecimal valorBase = calculo.getSaldoCiudadano();

        valorBase = (valorBase.compareTo(calculo.getRecargasHechas()) > 0 ? valorBase : calculo.getRecargasHechas());

        if (valorBase.add(importeBonificacion).compareTo(valorMaximoCliente) > 0) {
            importeBonificacion = valorMaximoCliente.subtract(valorBase);
            if (importeBonificacion.compareTo(BigDecimal.ZERO) < 0) importeBonificacion = BigDecimal.ZERO;
        }

        calculo.setCantidadBonificar(importeBonificacion);
        return calculo;
    }

    @Override
    @Transactional
    public void anotacionesBonificarCompra(Recarga recarga, HistorialCiudadano historialCiudadano, HistorialSaldoVirtual hv, Accion accion, Entidad ciudadano) {

        entidadService.saveAndFlush(ciudadano);

        recargasService.save(recarga);
        recarga.setNumeroOperacion(ApiUtils.exaId("","d",9, recarga.getId())+ UniqueUtils.randomChar(3,UniqueUtils.MAYUS_CONSONANTS));
        recarga.setIdUso(ApiUtils.exaId("R","X",10, recarga.getId()));
        recargasService.save(recarga);

        historialCiudadanoService.save(historialCiudadano);
        historialSaldoVirtualService.save(hv);

        accionService.save(accion);
        accion.asignarIdAccion();
        accionService.save(accion);
    }

    @Override
    @Transactional
    public void anotacionesCobrarTokenSaldoVirtual(Compra compra, HistorialVentas historialVentas, HistorialCiudadano historialCiudadano, HistorialSaldoVirtual hv, Accion accion, Entidad ciudadano) {
        entidadService.save(ciudadano);

        comprasService.onlySave(compra);
        compra.asignarIdUso();
        comprasService.onlySave(compra);

        historialVentaService.save(historialVentas);
        historialCiudadanoService.save(historialCiudadano);
        historialSaldoVirtualService.save(hv);
        accionService.save(accion);
        accion.asignarIdAccion();
        accionService.save(accion);

    }

}

UPDATE 2:
I've put the service.save(...) methods on the controller code (without a @Transactional grouping them). The same behaviour occurs.
Any advice to do further investigation on solving this problem?
UPDATE 3:
More troubleshooting located a concurrency bug in the code. The update was from a buggy code asking for it.
Comment: show service code
Comment: Code updated @Nick
Answer: I couldnt understand your question exactly but adding below statement to your application.properties might help you by identfiying update query. so you can see queryies that run by hibernate
spring.jpa.show-sql=true

Comment: the query logging is currently being done, thanks for your answer.


Can't launch glassfish on ec2 - can't open port

Question: I'm trying to start glassfish on an EBS-based AMI of Ubuntu 10.04 64-bit. I have used glassfish on non-ec2 servers with no problems, but on ec2 I get this message:

$ sudo -u glassfish bin/asadmin start-domain domain1
There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.
Command start-domain failed.

I know that ec2 has requires that firewall rules be modified using ec2-authorize to let outside traffic thru the firewall, as I had to do to make ssh work.  This still doesn't explain the port error when all I'm trying to do is start glassfish so I can try
$ wget localhost:8080and make sure it's working.
This is very frustrating and I'd really appreciate any help.
Thanks.
FINAL UPDATE:
Sorry if you came here looking for answers.  I never figured out what was causing the problem.  I created another fresh instance, installed the same stuff, and Glassfish worked perfectly.  Something obviously got boned during installation, but I have no idea what.  I guess it will remain a mystery.

UPDATE:
Here's what I get from netstat:

# netstat -nuptl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      462/sshd
tcp6       0      0 :::22                   :::*                    LISTEN      462/sshd
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           483/avahi-daemon: r
udp        0      0 0.0.0.0:1194            0.0.0.0:*                           589/openvpn
udp        0      0 0.0.0.0:37940           0.0.0.0:*                           483/avahi-daemon: r
udp        0      0 0.0.0.0:68              0.0.0.0:*                           377/dhclient3

UPDATE: One more thing...
I know that the "net.ipv6.bindv6only" kernel option can cause problems with java networking, so I did set this:

# sysctl -w net.ipv6.bindv6only=0

UPDATE: I also verified that it has nothing at all to do with the port number (4848).  As you can see here, when I changed the admin-listener port in domain.xml to 4949, I get a similar message:

# sudo -u glassfish bin/asadmin start-domain domain1
There is a process already using the admin port 4949 -- it probably is another instance of a GlassFish server.
Command start-domain failed.

UPDATE:
Here are the contents of /etc/hosts:

127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

I should mention that I have another Ubuntu Lucid 10.04 64-bit slice that is NOT hosted on ec2, and set it up the exact same way with no problems whatsoever.
Also server.log doesn't offer much insight either:

# cat ./server.log
Nov 20, 2010 8:46:49 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
/usr/lib/jvm/java-6-sun-18.104.22.168/bin/java
-cp
/opt/glassfishv3/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-XX:NewRatio=2
-XX:+LogVMOutput
-XX:LogFile=/opt/glassfishv3/glassfish/domains/domain1/logs/jvm.log
-Xmx512m
-client
-javaagent:/opt/glassfishv3/glassfish/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true
-Dosgi.shell.telnet.maxconn=1
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Dfelix.fileinstall.dir=/opt/glassfishv3/glassfish/modules/autostart/
-Djavax.net.ssl.keyStore=/opt/glassfishv3/glassfish/domains/domain1/config/keystore.jks
-Dosgi.shell.telnet.port=6666
-Djava.security.policy=/opt/glassfishv3/glassfish/domains/domain1/config/server.policy
-Dfelix.fileinstall.poll=5000
-Dcom.sun.aas.instanceRoot=/opt/glassfishv3/glassfish/domains/domain1
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dosgi.shell.telnet.ip=127.0.0.1
-Djava.endorsed.dirs=/opt/glassfishv3/glassfish/modules/endorsed:/opt/glassfishv3/glassfish/lib/endorsed
-Dcom.sun.aas.installRoot=/opt/glassfishv3/glassfish
-Djava.ext.dirs=/usr/lib/jvm/java-6-sun-22.214.171.124/lib/ext:/usr/lib/jvm/java-6-sun-126.96.36.199/jre/lib/ext:/opt/glassfishv3/glassfish/domains/domain1/lib/ext
-Dfelix.fileinstall.bundles.new.start=true
-Djavax.net.ssl.trustStore=/opt/glassfishv3/glassfish/domains/domain1/config/cacerts.jks
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.security.auth.login.config=/opt/glassfishv3/glassfish/domains/domain1/config/login.conf
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dfelix.fileinstall.debug=1
-Dorg.glassfish.web.rfc2109_cookie_names_enforced=false
-Djava.library.path=/opt/glassfishv3/glassfish/lib:/usr/lib/jvm/java-6-sun-18.104.22.168/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-126.96.36.199/jre/lib/amd64:/usr/lib/jvm/java-6-sun-220.127.116.11/lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
com.sun.enterprise.glassfish.bootstrap.ASMain
-domainname
domain1
-asadmin-args
start-domain,,,domain1
-instancename
server
-verbose
false
-debug
false
-asadmin-classpath
/opt/glassfishv3/glassfish/modules/admin-cli.jar
-asadmin-classname
com.sun.enterprise.admin.cli.AsadminMain
-upgrade
false
-domaindir
/opt/glassfishv3/glassfish/domains/domain1
-read-stdin
true
Answer: You're right - firewalling has nothing to do with the open (presumed TCP?) port.
netstat is your friend.  Something similar to netstat -nupt -l will give you an indication of what processes are listening on what ports.
Let us know the output of that command, and whether it helps point you in the right direction.
Comment: Thanks.  As you can see from netstat the port doesn't seem to be in use.  :(
Comment: Your issue seems related to this: http://serverfault.com/questions/90493/used-blocked-ports-in-ubuntu - where one of the answers mentions looking at the /etc/hosts file for the culprit, based on the logs.  So first check/share your app logs, second check /etc/hosts for anything missing/additional.
Comment: I updated above.  I don't see anything to indicate that /etc/hosts is the problem at all.  I was able to fire up # python -m SimpleHTTPServer and read from localhost using # wget localhost:8000 with no problems as well.
Comment: Based on some googling, I'd recommend you try adding whatever host name is returned from `hostname`, and the IP returned when doing a `dig` or `host` against that name, into your */etc/hosts* file - just as a quick test.  What I don't like about the info provided thus far, is the application is clearly complaining, yet there is nothing in the logs echoing even that same issue.  Are you looking at the correct logs (I know how... complex Java apps can be :) )?
Comment: I'm not sure where else to look honestly.   I think it's weird too, but that is the full log from one invocation of asadmin start-domain.  It's the _only_ log in glassfish/domains/domain1.  As a test I did put the hostname and value returned by host $hostname, but still this had no effect, even after a restart.
Comment: Two final recommendations: 1) try get **netcat** listening on the port glassfish is claiming is being used; 2) approach the glassfish developers through their forum or whatever medium they have available.  At this point I'm hard pressed to believe it is the OS, but better understanding of what the app is trying to do could provide the correct evidence.
Comment: Well netcat doesn't really work because it occupies the port that it is listening on.  I find it hard to see how a basic Ubuntu 64-bit 10.04 instance can be having such a huge problem starting glassfish using the standard sun java 6 installation.
Comment: What I meant was *after* glassfish complains, then try netcat to prove immediately that *nothing* was actually listening on that port.  It then points to a vagary of operation or configuration of the glassfish app, as opposed to then OS and network stack.  And given the checking already done, speaking to the application developers is the logical next step, unless you're thinking of a doing a fresh install and trying again? ;)
Comment: Hey man, thanks for all your help.  Because it's ec2, I can fairly easily fire up another instance from scratch and see if I run into the same problems.  I'll report back once I've had time to check it out.
Comment: I fired up another instance and had no problems setting up glassfish.  I have no idea why that one instance didn't work.  Maybe I changed something somewhere without realizing or something else went wrong.  Anyways, problem solved.  Thanks for helping :)
Answer: I don't know why your hosts file was brought up, as these have nothing to do with each other.
This sounds to me (based on your revisions) that its not that something is currently listening on the port--but that you may have configured TWO things to listen on the same port in the same Glassfish instance.  So if you start Glassfish and it tries to launch listeners on each of the ports, it will fail, and consequently shutdown the previously started services.  So when you use netstat before and after, it reports correctly that nothing is currently listening on the ports.
Check that each of your listeners is on a different port using asadmin, and I'll bet you find that the port number is used twice.  Or it could simply be that the initialization is causing two instances to start up simultaneously, which would give you the same behavior.  Can you try configuring a brand new domain on different ports to see if you experience a similar issue?
Best of luck!
UPDATE: Try using the following to get all the listeners:
asadmin get server | grep -i listener

Comment: Unfortunately the server refuses to start, I get this: # bin/asadmin get server | grep -i listener
Remote server does not listen for requests on [localhost:4848]. Is the server up?
Comment: Try `asadmin get server.*`.  What you're seeing is probably `stderr`, not `stdout`--pipes will not pipe stderr unless instructed to do so. If you are still not getting anything, then it sounds like there are no configured listeners... which indicates even more issues with your install.
Answer: same problem here. It is related to /etc/hosts
i did a cat /etc/hostname and added this for 127.0.0.1
Answer: This error is thrown not only when the port is taken, but also erroneously when there is an error with the /etc/hosts file.
Make sure you have proper definitions for your hostname (have you changed it recently?) in the file, and that it is not missing. For example, if you just changed your hostname (either via hostname or in /etc/hostname) to server.example.com, then make sure that your /etc/hosts file has:
127.0.0.1 server.example.com localhost

Answer: Recently, I found that launching a server into VPC requires quite a bit of extra configuration (once off) to get started.  A key clue:
 nslookup `hostname`

should work.  If it doesn't work, that's likely to be the reason.
You can either:
 1) launch a server into EC2-classic
 2) configure your VPC / host to be able to run the command above successfully.
Hope that helps.


Associates in the ring of continuous real-valued functions on $[0,1]$

Question: I have tried to give a proof of the following theorem but I feel very unsure and would be very grateful if someone would check it for me
Many thanks!

Theorem. Let $R$ be the ring $C[0,1]$ of continuous real-valued functions on the interval $[0, 1]$ (with pointwise operations). If $f, g \in R\setminus\{0\}$ satisfy $f \,|\, g$ and $g \,|\, f$, then there is some unit $u \in R$ such that $f = ug$.

Proof. First observe that the units in $C[0,1]$ are precisely the functions which are nowhere zero.
Since $g\,|\,f$ (say $f=sg$) and $f\,|\,g$ (say $g=tf$) we have
1) $f(x)=0 \Leftrightarrow g(x)=0$;
2) $s(x)=0 \Rightarrow f(x)=0$;
3) $t(x)=0 \Rightarrow g(x)=0$;
Thus we reduce to the case where $f$ and $g$ are both non-units.
There is some $(a,b)\subseteq[0,1]$ such that
1) $f$ and $g$ are both non-zero on $(a,b)$;
2) either $f(a)=g(a)=0$ or $f(b)=g(b)=0$ (wlog we assume the former).
We see that $s(x)=\dfrac{1}{t(x)}$ for all $x \in (a,b)$ and so, since $t$ is bounded, we cannot have $s(a)=0$.
It follows that $s$ is a unit. Q.E.D.
Answer: Consider this piecewise linear function as $f(x)$:

Now let $u(x)$ be the following piecewise linear function:

Let's look at your proof with $f(x)=g(x)$.  We can use  the functions $s(x)=u(x)$ and $t(x)=1$ because $f(x)=u(x)f(x)$ and $f(x)=1*f(x)$.
The problem is that you can't just use any $s(x)$ and $t(x)$, you need to construct them.
[Since you are only asking for a check of the proof, I won't propose a solution.]
Comment: Why does my interval not exist? Surely it's just (something like - I can't read the axes precisely) $(0.675,1)$? Thank you for your help so far :)
Comment: Sorry, you're right. I misread your interval.  But I still think theres a problem with the proof. Because we can make $u$ and $v$ so that $f=uf$ And $f=vf$ but neither of $u$ nor $v$ are units.
Comment: Yes, I see the problem :)
Answer: This is not true as it is shown by a simple example of Kaplansky which can be found in this answer.


Why can the Orthogonal group be split up in this way?

Question: In my groups course at university, we've spent a while on the orthogonal group, leading up the the conclusion that
$$
  \mathrm{O}_n
  =
  \mathrm{SO}_n
  \mathbin{\dot{\cup}}
  \begin{pmatrix}
    -1 &   &        &   \\
       & 1 &        &   \\
       &   & \ddots &   \\
       &   &        & 1
  \end{pmatrix}
  \mathrm{SO}_n \,.
$$
The proof given was just "because cosets partition".
I just want to know: Is this true because of a specific choice of matrix or will any matrix in $\mathrm{O}_n \setminus \mathrm{SO}_n$ do? How do we know there arent any other cosets? (I.e., that this expression covers everything in $\mathrm{O}_n$).
Comment: The determinant map is a homomorphism onto the multiplicative group $\{-1, 1\}$. The kernel is $\mathrm{SO}_n$, and will hence be an index $2$ (normal) subgroup of $\mathrm{O}_n$. So, yes, any matrix in $\mathrm{O}_n \setminus \mathrm{SO}_n$ will produce the same coset.
Comment: @TheoBendit Thanks for the quick reply! Just to check, index 2 matters because all cosets are the same size so you only get two distinct cosets of $\text{O}_n$?
Comment: @ReubenPrice index two means there are two cosets. The are the preimage of the determinant so $f(1)$ which is the special orthogonal group and $f(-1)$ which is the other.  You could use any matrix with determinant $-1$ to represent them but the one given is simple.
Comment: Any coset of any subgroup of any group is represented as any element of said coset times said subgroup.
Answer: The subgroup $\mathrm{SO}(n)$ of $\mathrm{O}(n)$ has index $2$.
Indeed, $\mathrm{SO}(n)$ is the kernel of the surjective group homomorphism
$$
  \det \colon \mathrm{O}(n) \longrightarrow \{ 1, -1 \} \,,
$$
so
$$
  [\mathrm{O}(n) : \mathrm{SO}(n)]
  = | \mathrm{O}(n) / \mathrm{SO}(n) |
  = | \{1, -1\} |
  = 2 \,.
$$
Let more generally $G$ be a group and $H$ a subgroup of $G$ of index $2$.
The group $G$ is the disjoint union of the left cosets with respect to $H$, and there are precisely $2$ such cosests.
(Because the number of cosets is given by $[G : H] = 2$.)
One of these cosets is $H$ itself, whence
$$
  G = H \mathbin{\dot{\cup}} gH
$$
for every element $g$ of $G$ with $gH ≠ H$.
We have $gH = H$ if and only if $g ∈ H$, so any element $g$ of $G$ with $g ∉ H$ does the trick.
To explicitly answer your questions:

Is this true because of a specific choice of matrix or will any matrix in $\mathrm{O}_n \setminus \mathrm{SO}_n$ do?

Yes, any matrix of $\mathrm{O}(n)$ that is not contained in $\mathrm{SO}(n)$ will do the trick.

How do we know there arent any other cosets? (I.e., that this expression covers everything in $\mathrm{O}_n$).

There are only two cosets because $\mathrm{SO}(n)$ has index $2$ in $\mathrm{O}(n)$.
This in turn is true because $\mathrm{SO}(n)$ is the kernel of a surjective homomorphism from $\mathrm{O}(n)$ into a group of order $2$.


MEVN Stack. Linking to Uploaded Images

Question: Hi I implemented an image upload system on my website but now I don't know how to link to that image.
My root directory has a client folder, for my vuejs app, and a server folder, for the back end logic.
When users upload a file, the file goes to a public folder under the server folder.  This is where I got stuck.
How do I then link to that uploaded image from my vuejs app that is in the client folder.
Keep in mind that my express app is running on port 5000 while my vuejs app is running on port 8080.
In my img tags I tried linking to the image by using "http://localhost:5000/public/image/imagename" and "http://localhost:5000/image/imagename" but no luck
Answer: In your express.js logic you should expose your public folder
app.use('/public', express.static(`${__dirname}/public/`));

I'm supposing your express entry point is in the same backend folder as '/public/ folder.
And then you can just access it like you've tried before on: http://localhost:5000/public/image/imagename

MEVN Stack. Linking to Uploaded Images


node-RED json object - how to extract a value example code

Question: I am trying to extract values from a json file.  I can do this with function node when it is posted from a webhook on my github page.  But from another site I cant seem to get this working. This is what I use to get the value on github to test.
var msg2 = {payload: msg.payload.comment.user.login };

return msg2;

This is the code I get from the other server.  I just want two value from this below.  When I save the incomming message directly with a save node this is whats in the json file.
{"payload":"{\"id\":33,\"status\":\"completed\",\"totalAmount\":103,\"tipAmount\":0,\"feeAmount\":4,\"settleAmount\":99,\"requiredAmount\":null,\"date\":\"2017-09-22T06:51:33Z\",\"snapCode\":\"To9tQhiV\",\"snapCodeReference\":\"06ce2405-1688-4cb7-aa26-6df25c053f8c\",\"userReference\":\"\",\"merchantReference\":null,\"statementReference\":null,\"authCode\":null,\"deliveryAddress\":null,\"extra\":{\"merchantReference\":\"AB11FFBC56\"}}"}

I just need totalAmount and merchantReference in the extra field.
Please assist and thank you in advance.
Answer: Your payload is a JSON String. To access its contents you must first parse it to a JavaScript Object.
Add a JSON node in front of your Function node - that will convert msg.payload for you.
Comment: Thank you for the reply I have just tried this.  See screenshot.  This is the code I use in the function.  Should I tick the box FORMAT JSON STRING? inline `var msg2 = {payload: msg.payload.snapcode};`
Comment: Sorry I see I cant add pictures in the comments but the flow is as follow: HTTP IN NODE(POST) - JSON - FUNCTION - DEBUG  It returns this after the JSON node: inline `{    "payload": "{\"id\":36,\"status\":\"completed\",\"totalAmount\":106,\"tipAmount\":0,\"feeAmount\":4,\"settleAmount\":102,\"requiredAmount\":null,\"date\":\"2017-09-.............\":\"06ce2405-1688-4cb7-aa26-6df25c053f8c\",\"userReference\":\"\",\"merchantReference\":null,\"statementReference\":null,\"authCode\":null,\"deliveryAddress\":null,\"extra\":{\"merchantReference\":\"AB11FFBC56\"}}"}'`
Comment: Edit the original question to add details


How to create DefaultMessageListenerContainer in Spring-Boot?

Question: I am new to Spring-Boot and trying to create DefaultMessageListenerContainer so I can use the weblogic workmanager and run several message listeners in multithreaded fashion.
Can someone please provide some example.
So far, I found the below solution but how do I implement this in Spring-Boot?
<bean class="org.springframework.jms.listener.SimpleMessageListenerContainer">
    <property name="connectionFactory" ref="connectionFactory"/>
    <property name="destination" ref="destination"/>
    <property name="messageListener" ref="receiver"/>
    <property name="taskExecutor" ref="taskExecutor"/>
</bean>

Answer: Create a ConnectionFactory:
  @Bean
  public ActiveMQConnectionFactory receiverActiveMQConnectionFactory() {
    ActiveMQConnectionFactory activeMQConnectionFactory =
        new ActiveMQConnectionFactory();
    activeMQConnectionFactory.setBrokerURL("yourBrokerUrl");

    return activeMQConnectionFactory;
  }

Create a DefaultJmsListenerContainerFactory:
  @Bean
  public DefaultJmsListenerContainerFactory orderDefaultJmsListenerContainerFactory() {
    DefaultJmsListenerContainerFactory factory =
        new DefaultJmsListenerContainerFactory();
    factory
        .setConnectionFactory(receiverActiveMQConnectionFactory());
    factory.setConcurrency("3-10");

    return factory;
  }

Create your DefaultMessageListenerContainer:
  @Bean
  public DefaultMessageListenerContainer orderMessageListenerContainer() {
    SimpleJmsListenerEndpoint endpoint =
        new SimpleJmsListenerEndpoint();
    endpoint.setMessageListener(new YourMessageListener());
    endpoint.setDestination("yourDestination");

    return orderDefaultJmsListenerContainerFactory()
        .createListenerContainer(endpoint);
  }

For a more detailed example checkout this post I created on Spring JMS listeners.


Discrete mathematics Logic Proof

Question: I'm stuck with these problems...
 1.Show that B∧C,(B↔C)→H∨G tautologically implies(⇒) G∨H ?
 2.Use Rule Conditional Proof (C.P) show that P→(Q→R) , Q→(R→S) tautologically implies(⇒) P→(Q→S)
 3.Using Proof by Contradiction, show that P→¬S is valid. (P→ (Q∧R))∧ (Q→¬P) ∧ (S→¬R) ∧P

My attempt to answer the first question .
 i) B∧C Rule P
 ii)B Rule T (i) Simplification
 iii)C Rule T (i)

after this i should arrive at (B↔C) . How should i do this ?

My attempt to answer the second question .
i)P Rule P(Assumed)
ii) P→(Q→R) Rule P
iii) Q→R Rule T (i)(ii) Modus Ponens
i should get Q from this . How should i do this ?
note: Can we assume One more premise Q, to get the answer is it possible .

My attempt to answer the third question .
Given Premises : (P→(Q∧R)),(Q→¬P),(S→¬R)∧P
Required Conclusion : P→¬S

i)¬(P→¬S) Rule P ( Assumed)
ii)
What should i do next ?

Can anyone explain me how to do these problems . I don't know the exact symbol used for tautological implication .
Comment: @MauroALLEGRANZA could do please provide me the answer for the above mentioned questions . I don't know much about it .
Comment: @MauroALLEGRANZA Thanks for this answer now could you please try the other two problems ..
Comment: @MauroALLEGRANZA Thanks again how to prove that using contradiction
Comment: @MauroALLEGRANZA perfect answer .. everything fine ..
Comment: @MauroALLEGRANZA  I have edited the question please move my question from on HOLD
Answer: I assume that you are using natural deduction:
(1) Prove that $B\land C,(B \leftrightarrow C) \to (H \lor G) \vdash G \lor H$

Proof sketch: It is not hard to show that $B∧C \to (B↔C)$ (e.g. here). Now you can derive $H \vee G$ by modus ponens and $G \vee H$ from the commutativity of disjuction.

(2) Prove that $P\to (Q \to R) , Q \to (R \to S) \vdash P \to (Q \to S)$

Hint: What happens if you assume $P$ as hypothesis, and then assume $Q$ afterwards?

(3) Prove that $P \to (Q\land R),Q\to \neg P,(S\to \neg R) \land P \vdash P→¬S$

Hint: Since you seem to require a proof by contradiction, assume $\neg (P→¬S)$. By the De Morgan laws, this is the same as $P \wedge S$. By conjunction elimination, we have derivations of $P$ and $S$.

Let's look at our premises once again, is there any way we can get a contradiction, say, $R \wedge \neg R$?
Comment: i got all three

Discrete mathematics Logic Proof


XFS on LVM or directly on MD array?

Question: I have a RAID6 array consisting of 10x2TB drives that I will be using as a NAS device.  The server enclosure has 6 additional bays that I may use for future expansion.  The storage will all be 500G-1T sparse files served up as iSCSI disks to various servers, with the disk images residing on an XFS partition.
My question is: given this setup, is it more efficient to install the XFS partition directly on the /dev/md device?  I would prefer to create a volume group, and use LVM to manage the space, but not if is going to incur much of a performance penalty.
Thinking forward to eventually creating a second RAID array with the additional 6 slots, adding that to the volume group would be fairly trivial if I started out with LVM, but can you have an XFS filesystem run on two different devices without putting it on LVM to begin with?  Two separate XFS mounts, while not ideal would probably work, but again only if there is some performance boost to compensate.
Comment: Why have a filesystem at all?  If you are serving out via iscsi, why not just setup LVM and then export the logical volumes?
Answer: I think the performance impact is really minimal for LVM, except if you use snapshots which can have a big impact - best if snapshots are used during backups only. This answer agrees.
For a detailed discussion of issues with LVM, with some mention of XFS, Advanced Format, RAID, etc, see LVM dangers and caveats
Answer: Every layer of abstraction adds an additional amount of performance impact. So LVM will decrease the performance by adding flexibility.
It's you who has to evaluate the gain and the risks. The best way is to do performance tests and see if the performance impact of LVM is acceptable (or even measurable).
Comment: have you measured that 'performance impact'?  in fact, LVM doesn't add any extra disk activity and the only unavoidable 'abstraction overhead' is a single function call and a couple integer additions per block of IO.  not only vanishingly small, but absolutely indetectable below many sources of statisitical noise.
Comment: @Javier this is exactly what I said. Without measurements you can only give the general answer that there is overhead. But the overhead could be so minimal that one shouldn't care.
Comment: my point is that it's beyond minimal, not even undetectable; it's totally inexistant since it doesn't generate extra I/O

XFS on LVM or directly on MD array?


Why is Lebesgue integration better suited for convergence axioms?

Question: I am trying to understand Lebesgue integration here. Here you basically make equal splits on the y-axis instead of the splits on the x-axis that Riemann does. I understand the proofs of the limit theorems like MCT and DCT, but I do not see how a simple idea as splitting the y-axis leads to such wonderful theorems, which Riemann is not amenable to.
Is there an easy way to understand why Lebesgue integration is conducive to limit theorems while Riemann is not? This is keeping in mind their intuitive explanation of creating equal strips along an axis and adding the areas up.
Comment: @Bravo: In many presentations of Lebesgue integration, nothing is "partitioned" at all. On the other hand, in many presentations of Riemann integration the partitions on the $x$-axis do not need to be uniform, they can be arbitrary finite partitions.  So uniformity of partitions is not the issue.
Comment: See Henstock-Kurzweil integral ( http://en.wikipedia.org/wiki/Henstock%E2%80%93Kurzweil_integral ) for an easy modification of Riemann's integral, which satisfies all the convergence properties. It is not a fault of division of the $x$-axis, rather of uniform division. Lebesgue integral has other advantages though.
Comment: @Carl Mummert: In Riemannian integration there is a uniform estimate on the lengths of the subintervals. That's exactly what is removed in the HK integral. This uniformity is the issue (if you divide the $x$-axis). Sorry for not stating it clearly in my previous comment.
Comment: @Carl: can they really be "arbitrary partitions"? Riemann integrability takes the form of "for each $\epsilon$, for all partitions $P$ with property $Q(\epsilon)$, $|\sum_P f - s| < \epsilon$". There's gotta be some condition $Q(\epsilon)$. Else with arbitrary finite partitions there's no hope that we can say anything like $|\sum_P f - s| < \epsilon$.
Comment: "rather of uniform division": but you do divide the y-axis uniformly even in Lebesgue integration?
Comment: Yes, and this makes all the difference.
Comment: @Willie Wong: I think it will depend on exactly how you or I state the definition of the Riemann integral. I suppose I would state it in terms of the net of all partitions, ordered by refinement, rather than stating it in terms of $Q(\epsilon)$ as you have, while I would state the HK integral in terms of a net of $\delta$-fine partitions for a gauge $\delta$. So I would say the Riemann definition allows all partitions while the HK one only allows some partitions.
Comment: @Carl: this is getting to be mostly a semantics/epistemological issue, I think. :) You see HK as "restrictive" because "fewer" partitions are allowed, whereas I see HK as (naively) more "general" because "more" gauges are allowed. Roughly speaking, user8268's "uniformity" implies that you have "more" allowed partitions in Riemann integral (what you said in your previous comment) which gives more opportunities for the integral to not converge. (I think the issue [that user8268 tried to describe] is whether one allows partitions uniformly bounded _below_ in size.)
Comment: @Willie Wong: at least I think we have figured out where the difference is coming from.
Answer: This is essentially an elaboration on a point made in the comments. In both Lebesgue and Riemann integration, the integral is defined on simple functions made up of "blocks" and is then extended to more general functions by a limiting operation. The difference is really at the level of blocks. The blocks in Riemann integration are proper rectangles, the base is an interval. In function form, a rectangle of height $1$ can be written as $1_{[a,b]}$. The simple functions are linear combinations of blocks. In Lebesgue integration, the base may not be an interval, but an arbitrary measurable set, a block has the form $1_A$ with $A$ being some measurable set. The simple functions are again linear combinations of blocks. The difference between these integrals can already be seen when lloking at which functions are simple.
$1_\mathbb{Q}$ is a simple function in the setting of Lebesgue integration, since $\mathbb{Q}$ is a measurable subset of $\mathbb{R}$. But $\mathbb{Q}$ contains no proper interval. But $\mathbb{Q}$ is countable, so we can write it as $\mathbb{Q}=\{q_1,q_2,\ldots\}$. Let $f_n=1_{\{q_1,\ldots,q_n\}}$ for all $n$. Each $f_n$ is a simple function for both Lebesgue and Riemann integration. But the pointwise limit of the $f_n$ is $1_\mathbb{Q}$, a simple function for Lebesgue integration, but a function that cannot be well approximated by simple functions for Riemann integration.
Answer: This is a follow up on Michael Greinecker's answer.  I don't see the issue as having to do with uniform partitions at all; there is no requirement in the definition of either integral that anything has to be partitioned uniformly.
The Lebesgue integral of a non-negative measurable function $f$ is defined as the supremum $S_f$ of the "areas" of non-negative "Lebesgue simple" functions that are bounded by $f$ (the supremum may be $\infty$). These functions were defined in Michael Greinecker's post: they are finite linear combinations of characteristic functions of measurable sets. The supremum $S_f$ is well-defined for every non-negative measurable function. The proofs of many convergence theorems come down to showing that other limit operations can be exchanged (commuted) with this supremum operation. Note that the definition of the Lebesgue integral phrased this way is not about partitions at all: it is just about how much area can fit below the graph of a non-negative measurable function.
The extension of the Lebesgue integral to general (not necessarily non-negative) measurable functions is routine, by dividing the function into positive and negative parts that are handled independently.
On the other hand, the Riemann integral is defined in a much more restrictive way. In order determine whether a Riemann integral of a non-negative measurable function $f$ exists, it is not enough to look at the integrals of nonnegative "Riemann simple" functions that are bounded by $f$. These functions are finite linear combinations of characteristic functions of intervals, as Michael Greinecker says. For example, this supremum is perfectly well defined for $f = 1_\mathbb{Q}$, and equal to 0, because every non-negative constant function on an interval that is bounded below $1_\mathbb{Q}$ must be identically zero on that interval. But $1_\mathbb{Q}$ is a famous example of a function that is not Riemann integrable. The problem, of course, is that the definition of the Riemann integral requires more than just the convergence of that supremum.
Thus proving that a non-negative function is Riemann integrable requires more than showing that a particular supremum exists, and this causes corresponding problems in proving limit theorems for Riemann integration. On the other hand, the Lebesgue integral exists for every measurable non-negative function (it may be $\infty$), so this problem simply doesn't exist in the setting of Lebesgue integration. There is an extra step in proving a limit theorem for Riemann integration, and sometimes this step is insurmountable.
There is a theorem that a bounded function on a closed bounded interval is Riemann integrable if and only if it is Lebesgue integrable and is continuous almost everywhere on the interval. This shows, in hindsight, an intuition for why limit theorems must fail in the Riemann case: because "continuity almost everywhere" is not preserved by the sorts of limit operations that are considered in these theorems. For example, $1_\mathbb{Q}$ is a pointwise limit of an increasing sequence of functions $(f_i)$ each of which is continuous almost everywhere, as described by Michael Greinecker.  Since pointwise limits don't respect "almost everywhere continuity", it will not be possible to show that Riemann integration acts well with respect to these limits. In the non-negative case, Lebesgue integration only requires that the limit function has to be measurable, and measurability is preserved under the sorts of limits that are considered.
P.S. The use of the extended real line $[-\infty,\infty]$ in the Lebesgue setting, but not typically in the Riemann setting, is another minor cause of difficulty in the Riemann setting. And, as usual, there can be confusion because in the Lebesgue sense "integrable" means "has a finite integral" rather than "the Lebesgue integral exists". Neither of these gets to the heart of the matter, which is that every non-negative measurable function has an integral in the Lebesgue sense, but this fails in the Riemann sense.
Comment: The penultimate paragraph should probably read: "There is a theorem that a bounded function on a closed bounded interval is Riemann integrable if and only if it is continuous almost everywhere" (measurability follows from continuity a.e. and then integrability is clear by boundedness).
Comment: @t.b.: yes, that's true, I'll fix it the next time I edit the response. Thanks.
Comment: sorry for spamming with my comments. The uniformity in Riemann's integral is: $\forall\epsilon>0\,\exists\delta>0$ such that Riemann's sums with subintervals smaller than delta are $\epsilon$-close to the integral. The $\delta$ (as an estimate) is the same for all the subintervals. In the HK integral you simply allow $\delta$ to be a function of $x$; that makes all Lebesgue-integrable functions also HK-integrable, and proving (the right forms, as there are HK-integrable functions that are not absolutely integrable) convergence theorems is relatively easy.
Comment: @user8268: I would usually think of the Riemann integral in terms of an net rather than in terms of $\epsilon/\delta$ as you have. In that setting, it says that there is some (tagged) partition $P$ such that any partition $Q$ refining $P$ is within $\epsilon$ of the value of the integral; there is no uniformity on the widths of the intervals in $P$. I do see the uniformity when you write the $\epsilon/\delta$ definition, though.
Comment: @Carl: that last comment is very helpful (to me). It points clearly to the fact that in the HK integral a refinement of a $\delta$-fine partition need not be $\delta$-fine!
Answer: Well Riemann integral  divides the domain in a partition with a point $\xi_i \in [t_i,t_{i+1}]$ and chooses $f(\xi_i)\in f([t_i,t_{i+1}])$ as a "good" representative of the values in $f([t_i,t_{i+1}])$. Not bad if your function is continuous or "nearly" continuous.
$RS(f)=\sum_{i}f(\xi_i)m([t_i,t_{i+1}])=\sum_{i}f(\xi_i)(t_{i+1}-t_{i})$
However Lebesgue integral divides the image $(f([a,b]))\subset\cup (x_i,x_{i+1}]$  in a partition of small interval and chooses a middle point $\tau_i$ and evaluates
$LS (f)=\sum_{i}\tau_i m(f^{-1}(x_i,x_{i+1}])$.
Here you need you need only that $f$ is measure that is the set is $f^{-1}(x_i,x_{i+1}]$ is Lebesgue measurable and a hypothesis of finite integral for $f^+$ and $f^-$.
The advantages are many as $L^1$ that is a Banach space, i.e., the limit of integrable funtions in the integral norm is still integrable, the pointwise limite is still integrable, regarded the limitation hypothesis!
Answer: The abstract integral may be defined in a very simple way.
Divide the domain into finite nonoverlapping subdivisions, take Inf{f(x)} on each subdivision, multiply it with "measure" of this subdivision, and sum all these multiplicands. Then take Sup{sums on all possible such finite subdivisions), and you get an integral. The key moment is to understand what "measure" means, and this is what the Lebesgue theory deals with: it simply says that the subdivisions must be measurable, and the function must be measurable too, and thus you get Lebesgue integral. In case of Riemann integrability this abstract approach leads simply to Lower Darboux integral, and an Upper Darboux integral must additionally be calculated, and the two Darboux integrals must be equal. Thus we see that every Riemann integrable function is Lebesgue integrable too.
The answer is: because the Lebesgue integrability is much less restrictive than Riemann integrability, and the details are outlined on previous answers.


INSTALLED_KERNEL_HEADERS missing while trying to compile ROM for android

Question: Sorry but I m kind of new to this development world.
So basically when I tried to compile lineageos15.1 from source I recieved this error
ninja: error: 'INSTALLED_KERNEL_HEADERS', needed by '/home/oveno/los15.1/out/target/product/mido/obj/SHARED_LIBRARIES/libcryptfs_hw_intermediates/cryptfs_hw.o', missing and no known rule to make it

Currently I have no idea how to fix it.
I have tried to reinstall the Ubuntu kernel headers but it didn't work.
It would be great if anyone could help me with a workaround.
Thank you in advance.
Comment: Did you figure this one out?
Answer: I had a similar issue. To fix it, I had to download the kernel of the device for which you want to build.
For example, in my case, for lineageos and a xperia M2 device (eagle), I had to get the kernel from https://github.com/f2065/android_kernel_sony_msm8226
and install it into kernel/sony/msm8226 in the android build tree.


Select a column from multiple dataframes in a list

Question: My list has multiple data frames with only two columns
DateTime       Value
30-06-2016      100
31-07-2016      200
.
.
.

I just want to extract the column Value from the list. The fillowing code proved unsuccesful for me. What am I doing wrong here ?
actual_data <- lapply(test_data, function(df) df[,is.numeric(df)])
> actual_data[[1]]

data frame with 0 columns and 12 rows

Thank you
Comment: `lapply(test_data, '[', 2)`
Comment: Thanks a lot @Sotos. Will you explain the solution as well ?
Comment: Try `test_data[[1]][1]` or `test_data[[2]][1]` etc..and you will get it. HINT: See how `[` is used for indexing?!
Comment: `test_data[[1]][1]` would give me the first column of the first df in the list. To be specific in my question, what does `'['` do ?
Answer: purrr::map (an enhanced version of lapply) provides a shortcut for this type of operation:
# Generate test data
set.seed(35156)

test_df   <- data.frame('DateTime' = rnorm(100), 'Value' = rnorm(100))
test_data <- rep(list(test_df), 100)

# Use `map` from the purrr package to subset the data.frames
purrr::map(test_data, 'Value')
purrr::map(test_data, 2)

As you can see in the example above, you can select columns in a data.frame either by name, by passing a character string as the second argument to purrr::map, or by position, by passing a number.


Problemas ao inserir valores em ponteiro de vetor

Question: Estou com problemas ao tentar realizar um exercício de programação que me foi passado, onde se pede para "criar uma variável ponteiro do tipo vetor com 20 ocorrências do tipo caracteres".
#include <stdio.h>
#include <conio.h>

int main()
{
char *v[20];

for(int i = 0; i < 20; i++) {
char c;
v[i] = &c;
scanf("%c", &c);
*v[i] = c;
}

for(int i = 0; i < 20; i++) {
        printf("%c ", *v[i]);
}

getch();
}

Não dá nenhum erro ao compilar, mas há alguns problemas:
Ele sai do primeiro for não após digitar os 20 caracteres, mas apenas 10 deles;
O resultado do printf é um monte de espaços vazios
Minha experiência com ponteiros é quase nula, perguntei a alguns amigos que entendem mais, mas não consegui uma solução.
Answer: Fiz algumas mudanças no seu código, não sei se atinge exatamente o objetivo, mas acredito que pode ajudar.
#include <stdio.h>

int main()
{
    char *v;
    char c[20];
    int i;
    for(i = 0; i < 20; i++) {
        scanf("%c", &c[i]);
        getchar();

    }
    v = c;

    for(i = 0; i < 20; i++) {
            printf("letra  i = %c \n", *(v+i));
    }

return 0;
}

Utilizei um ponteiro v apontando pra um vetor de char.
O getchar() dentro do for está pegando o enter que é dado. Esse é o motivo que o seu programa estava pegando apenas metade dos elementos, a outra metade era pego como enter.
No último for, trata-se de aritmética de ponteiro, v aponta pra o primeiro elemento de c, ou seja c[0], então quando você faz *(v+i) está dizendo que vai acessar o endereço de v + o endereço de i. i não é um valor específico, é uma unidade do tipo de dado que v aponta, ou seja, char, então se i = 1,  v+i == c[1] pois está adicionando uma unidade de char no endereço de v.
Espero ter ajudado!
Answer: Acho que o seu código deveria ser isso:
#include <stdio.h>
#include <conio.h>

int main() {
    char v[20];

    for(int i = 0; i < 20; i++) {
        char c;
        scanf("%c", &c);
        v[i] = c;
    }

    for(int i = 0; i < 20; i++) {
        printf("%c ", v[i]);
    }

    getch();
}

Testei aqui e funcionou. Apenas tive que retirar o #include <conio.h> e coloquei um return 0; no lugar do getch();.
Lembre-se que em C todo vetor é um ponteiro, então char v[20]; é um ponteiro para um caractere. Ocorre apenas que este ponteiro aponta para uma área de memória já alocada na pilha de execução (stack) para 20 caracteres.
Já char *v[20]; é um ponteiro para um outro ponteiro de caractere, que aponta para uma área de memória no stack aonde cabem 20 outros ponteiros. Não é isso que você quer!
O código v[i] = &c; é particularmente perigoso. Você pega o endereço de memória da variável c e coloca ela no vetor de caractere. Essa operação não tem sentido nenhum, além disso o tamanho do endereço de memória não cabe na posição do vetor, então o valor resultante vai ser truncado. O resultado será que você está poluindo o seu vetor com lixo.
Já *v[i] = c; significa que você pega o i-ésimo caractere de v, o interpreta como um ponteiro e o desreferencia, e coloca o valor do c na posição de memória resultante. Não é isso que você quer, você não quer interpretar o i-ésimo caractere como se fosse um ponteiro. O mais provável é que isso cause uma falha de segmentação no programa ou alguma outra coisa desastrosa.
Agora, olhando no código que eu corrigi, observe que você quase não precisa desreferenciar ponteiros explícitos, basta trabalhar com arrays. O único detalhe é o scanf, aonde você pega o endereço do c apenas.
Um outro detalhe do seu código: Ele sempre tentará ler os 20 caracteres, mesmo se o que você quiser digitar for menor que isso. Para resolver esse detalhe, caso você queira, você vai ter que verificar se o usuário digitou \n e parar.
Comment: Então, é que o enunciado do exercicio é o seguinte: "Crie uma variável ponteiro do tipo vetor com 20 ocorrências do tipo caracteres. Carregue este vetor realizando a leitura destas ocorrências e armazene-o na memória." Então eu pensei que precisaria fazer o vetor como um ponteiro em si... Mas uma coisa ainda está acontecendo mesmo com o seu código, ele só le metade dos caracteres que deveria, se eu coloco 20 no for, ele lê 10, se eu coloco 10, ele lê 5, tem alguma idéia do porque?
Comment: @Tryedz "Crie uma variável ponteiro do tipo vetor", isto é exatamente o que o `char v[20];` é. Ele é uma variável ponteiro e o tipo dele é um vetor. Se a ideia é utilizar um `char*` então o enunciado está mal-escrito, mas isso é fácil de arrumar. Quanto a este negócio de só ler a metade, você está digitando ENTER após cada caractere? Ele considera o ENTER um caractere como outro qualquer.


Interoperability of Mercurial 6 with other VCSes

Question: Some years ago, Mercurial | TortoiseHG could exchange data bidirectionally easy with at least 2 Big Brothers:

Subversion, using HGSubversion
Git, using HG-Git

Current (6.0 versions of family) state - the ordinary users have none:

hg-subversion is broken (extension can't be loaded), bundled with THG (Mercurial ???) extension not updated since 2019 hgsubversion:    6a6ce9d9da35    2019-04-19 (extraction from my TortoiseHg\extension-versions.txt), external SVN-bindings exist only for Python 2.7 (while py3-movement inside Mercurial is live and active)
hg-git got some big troubles, starting from THG 4.9 (manual patching of library.zip was required), on 6 version the situation has gotten better (no patching), but still unsatisfactory for the common user - installing Python 2.7 (for single-user) and using pip isn't The Right Way (tm)

Are there any comments, additions, clarifications, recommendations on how to do it (if what I am doing is wrong)?
Addition after some testing: special verson tortoisehg-6.0hggit-x64.msi from Matt Harbison at least allow using hg-git with ssh-transport (not http yet) and can be recommended for every-day usage by ordinary user.
Comment: @ecm - from **user's POV** there is another *additional* problem here: any binding provided for Mercurial by additional extension, which have to be a) functional b) maintained and both conditions are **not met** now
Comment: As a workaround, in many cases one can still use much older versions of HG on a current repository. So if the need is just for a one-time conversion, that could suffice.
Comment: Your addition seems more like another answer than part of the Question... good find.
Comment: I found that `hg convert` requires Subversion bindings in Python that are found in the `python-subversion` Debian package for Python 2.x -- However, Debian 10 didn't have the corresponding `python3-subversion` package. Debian 11 and up do provide that so we upgraded. Not sure whether `hg-subversion` uses the same bindings or different ones.
Comment: Apparently `hg-subversion` can use either the `Subvertpy` bindings or the `SWIG` bindings. I believe the latter are what is provided in these Debian packages.
Answer: So, as a current maintainer of hg-git and former contributor to hgsubversion, I think I can provide some context here.
Regarding hgsubversion, the short answer that it is either dead or — at best — extremely dormant. Personally, I have not interacted with a Subversion repository in years, and that's a common experience. No-one has been sufficiently motivated to fix bugs, keep it working, and — last, but not least — make it work with Python 3.
For hg-git, a period of semi-dormant state meant that the TortoiseHg maintainers stopped bundling it. We now keep up with Mercurial releases, and I've requested that they reverse that decision. I believe they bundle Dulwich, but as I don't use Windows, I can't say for sure. That said, it's quite reasonable to want to use hg-git with TortoiseHg, and if you run into any specific issues, I'd suggest you file a bug with them — or perhaps add a comment to the bug I linked earlier.
Generally speaking, you should be able to use 0.10.x version of hg-git with most versions of TortoiseHg, as I believe they bundle Dulwich. In that case, enabling the extension should be as simple as:
hg clone -u 0.10.x http://foss.heptapod.net/mercurial/hg-git /path/to/repo

And then adding the following to your .hgrc:
[extensions]
hggit = /path/to/repo/hggit

Once TortoiseHg moves to Python 3.x, the default branch of hg-git will work with it again.
EDIT: I was wrong; they don't bundle Dulwich, it seems. On the bug for this, one of the maintainers posted a link to a packaged installer that includes hg-git & Dulwich. The next release, 6.1, should fix this. Please consider testing the installer, and report to the TortoiseHg maintainers whether it works as expected.
EDIT²: Please note that only SSH works with that installer, as they ran into some issues bundling urllib3, which is necessary for HTTP support.
Comment: @KakCAT Sadly, they ran into some issues bundling `urllib3` with Python 2.7, but SSH works. You can set up an SSH key and use SSH URIs; although this is suboptimal, only supporting SSH with Git is preferable to no support for Git at all.
Comment: @Lucero - at least now I can confirm: we got "work from a box" for ssh and https connections with bundled (into THG) hggit
Comment: thank you for confirmation of perspectives for hg-subversion, but I'm sorry - I haven't good news about hg-git. I **have** external hg-git from the times of THG 5.02, I **tried** both `0.10.3` and `tip`, now testing HEAD of `0.10.x` and get the same (for `tip`) `*** failed to import extension hggit from ...\hg-git\hggit: No module named dulwich`. I read **all** hg-git related issues on heptapod, didn't try yet only installing Python 2.7 for pip-based hg-git
Comment: @LazyBadger you probably saw this, which has some notes on hggit, but just in case you did not: https://stackoverflow.com/q/67859068/3195477
Comment: @LazyBadger Ah, my assumption was incorrect! Fortunately, one of the maintainers created an installer that should work this in the meantime; I've edited the answer to reflect this.
Comment: I'm testing the release, but I'm new to hggit. I'm trying the first example that appears with "hg help hggit" (cloning dulwich) but I'm getting a "No module named urllib3" error unless I use git:// instead of git+https:// . However I can't push to github if using git:// . Is this a bug or I'm doing something wrong?
Comment: Thank you @DanVilliomP.Christiansen for your work. As a user not familiar with the Python ecosystem, the whole experience with hggit in the last few years has been pretty frustrating (after it suddenly stopped working out of the box after a THG update). I'll try that packaged installer for now, but I hope that you, the Dulwich and THG maintainers can get this back into a bundled working state where it "just works" - the documentation on https://hg-git.github.io/ is pretty misleading right now.
Comment: Thank you @LazyBadger for the followup! I'll try the latest THG version then. :)
Answer: TortoiseHG 6.2
Bundled hg-git works (at least with GitHub), but for now only for https:// repos:
old worked ssh-access failed with complaining about my keys
With the new keypair (still RSA) and PageAnt-x64 (for THG-x64) I got both access-methods in game


Jenkins - Run some commands after jenkins job is deleted

Question: I have Jenkins setup when a branch is deleted the associate jenkins job for that branch is also deleted. However, I want to add some commands (kubernetes clean up) after the branch is deleted.
I am trying to use this plugin here:  https://github.com/jenkinsci/multibranch-action-triggers-plugin
I want to check two things:
How can I use the multibranch via jenkinsfile?
Have you guys already done this before? How?
Thank you
Answer: Your question could be much improved if you would pinpoint the source control system you use.
Anyhow, in a situation where you have multiple branches, it's better to use appropriate plugins for multibranch setups. There are a couple available for Git and Github, if that's your case. In this setup, there is a copy of Jenkinsfile in each branch (as with other files, the Jenkinsfile may be — but doesn't have to be — the same in all branches). These plugins usually create new "sub-jobs" for new branches (or pull requests) and remove the deleted ones as necessary.
Additionally, there is a somewhat unexplained use case where you have to do some actions on branch removal, for reasons that are unclear. Most cleanups are done after a job is finished, not after a branch is deleted. However, you may still implement that if your setup allows for the notifications on these events. Github, for example, can be configured to send a notification (webhook) to your Jenkins that can parse that notification and do something in the case. The way to do that is outlined in this answer.


How to know how many times the number of divisors for the numbers from 1-5000 are odd?

Question: I have a question I can not answer myself. For every number from 1-5000 I write down the number of divisors.
Example: 1 has 1 divisor, 2 has 2 and 10 has 4 (1, 2, 5, 10). I do this up to the number 5000. Know I want to know how many times the number of divisors is odd and how many times it is even.
I am looking forward to your thougts!
Finn
Comment: Hint:  for each $n$ up to $20$ or so, write out the parity of the number of divisors.  I expect a pattern will emerge.
Comment: I already did that and could not find a pattern :/
Answer: Hint:  $4$ has an odd number of divisors.  (Why?)
Hint:  $576$ has an odd number of divisors.  (Why?)
But numbers like $12$ have an even number of divisors.
Each integer can be expressed as $n=ab$ (even if $a=1$ and $b=n$).  So for every divisor $a$, there's a matching divisor $b$ such that $ab=n$.
What happens with numbers like $4$ and $576$ is that $a=b$ for one of the pairs, and you get an odd number of divisors overall.
Comment: Added some more hints.  (I think you'll be much more satisfied if you see the pattern for yourself!)
Comment: I don't know why. Maybe you could help me with that :). I already thougt so many hours about it.
Answer: It is well known that if $$n=\prod p_i^{\alpha_i}$$ then the number of divisors of $n$ is equal to $$\prod (\alpha_i+1)$$
Hence in order to have an odd number of divisors you need all the exponents $\alpha_i$ be even because if not then the numbers of factors will be even.
Since $$70^2\lt 5000\lt 71^2$$ you have $70$ times for which the number of divisors is odd an $5000-70=4930$ times for wich the number of divisors is even.


Aplicações Android, quais vantagens e desvantagens das ferramentas?

Question: Entre criar apps nativos, usar HTML, CSS e JavaScript juntamente com Phonegap, ou ainda C# com a ajuda do Mono, quais são as vantagens e desvantagens e qual contexto melhor se aplica?
Considerando os seguintes itens:

Performace
Design da aplicação
Manutenção da aplicação
Acesso aos recursos do dispositivo
Comment: @bigown se fosse uma questão entre "apps nativos x apps webs" reduziria o escopo certo?
Comment: Não sou bom pra escrever respostas complexas e explicativas kkk mas olha que bacana aqui nesse site: http://www.luisaambros.com/blog/diferenca-entre-aplicativos-nativos-hibridos-e-mobile-web-apps/
Comment: concordo com você @bigown reli minha pergunta e pedi opiniões no chat, ela estava bem complexa mesmo. Com a edição gostaria de comprar o app nativo, PhoneGap e Xamarin.
Comment: obrigado @DiegoFelipe esse link é muito útil!
Answer: Jedaias, vou responder com base no meu conhecimento e no que eu já desenvolvi com cada tecnologia.
Acredito que mais gente na comunidade possa contribuir com essa pergunta. Vejo que essa pergunta é muito realizada por quem esta começando e em alguns casos pode te levar a fazer uma escolha errada.
Primeiramente é muito relativo o que você quer saber.
Cada tecnologia ou método de desenvolvimento citado por você tem as suas vantagens, desvantagens e aplicações específicas, ou seja, depende muito do que você quer fazer para que eu possa te dizer se esse ou aquele é melhor.
O que vai te direcionar melhor é saber exatamente o que você quer fazer na sua aplicação, antes de tudo pergunte a si mesmo:

A sua aplicação vai rodar localmente ou na núvem?
A sua aplicação necessita de muitos recursos do dispositivo?
Sua aplicação é multiplataforma (Android, WP e IOs)?

Eu particularmente não gosto de nenhuma nem do Phonegap e nem do Xamarin (ou Mono, ou qualquer coisa parecida), isso é uma opinião e não quer dizer que estou certo, mais eu sempre acreditei que nada supera o desenvolvimento nativo, mesmo que seja mais trabalhoso e que a manutenção seja mais cara, o desenvolvimento nativo é bem mais seguro do que a utilização de ferramentas de interpretação e intermediação de código fonte.
Agora uma ideia sobre cada opção:
Desenvolvimento Nativo:

É mais trabalhoso e caro, pois se a sua aplicação vai ser
multiplataforma, você terá que aprender cada linguagem e adquirir as ferramentas necessárias para cada plataforma;
Se o desenvolvimento for realizado utilizando boas práticas e aproveitando o melhor de cada linguagem, com certeza terá uma performance acima da média;
Você terá acesso à todos os recursos do dispositivo.

Phonegap, HTML, CSS, Cordova, etc...

Empacota aplicações Web em um pacote que pode ser instalado nos equipamentos;
É uma boa para aplicações Web que não necessitam de muitos recursos do equipamento;
Fornece suporte há algumas funcionalidades nativas do equipamento;
Possibilita o desenvolvimento multiplataforma, pois você escreve um código apenas e gera arquivos binários para diversas plataformas;
O desempenho não é o forte desta abordagem, mais é possível desenvolver muita coisa legal;

Xamarin, Mono

São interpretadores de código que convertem o que você codifica em C#, Delphi, etc... para que possa ser interpretado como linguagem nativa da plataforma desejada;
Num projeto utilizando essa abordagem, você tem uma área que é compartilhada (Shared) entre todas as plataformas e uma parte específica para cada plataforma, ou seja, o desenvolvimento é multiplataforma, mais possui algumas partes que são específicas para cada plataforma;
Devido ao item acima citado, além de ser uma abordagem que possibilita o desenvolvimento multiplataforma, possui um acesso maior aos recursos nativos de cada sistema operacional;
Quando compilado possui um desempenho mais próximo do desempenho de uma aplicação nativa.

Basicamente é isso, e acredito que isso possa ser um embasamento inicial para que você possa escolher o que é melhor para você. Então com base no que eu repassei e nas perguntas que fiz no começo, abaixo lhe repasso a minha idéia:

Minha aplicação não é multiplataforma e preciso de desempenho máximo e acesso à todos os recursos do dispositivo: Desenvolvimento nativo;
Preciso de uma aplicação multiplataforma para rodar localmente, com base de dados, etc...: Xamarin, Mono, ou nativamente se preciso de um desempenho excelente.
Minha aplicação não utiliza muitos recursos do dispositivo ou vai rodar em núvem: Phonegap, Cordova, HTML, CSS, etc...

Espero ter ajudado. Juntando isso com o link que o DiegoFelipe repassou, acredito que vai ser muito útil.
Comment: "São interpretadores de código que convertem o que você codifica em C#, Delphi, etc... para que possa ser interpretado como linguagem nativa da plataforma desejada;" Huuuum?!?!?!
Comment: Na realidade, eu nem sei se essa palavra se aplica ao conceito, mais foi o que me veio à cabeça, pois na realidade o Xamarin, o Mono, pegam o que vc escreve em C# ou Delphi e converte para a linguagem nativa do sistema operacional. É o que eu entendi, mais se alguem tiver uma definição melhor, me passa  ai que eu coloco na resposta.
Answer: Bem vamos lá. Em primeiro lugar, esqueça mono, é algo pago e muito caro, da muita dor de cabeça para o desenvolvimento em várias plataformas e a documentação é muito pouca.
Entre nativo e hibrido considerando os itens que você quer:

Performace: Melhor no nativo
Design da aplicação: Melhor no hibrido
Manutenção da aplicação: Melhor no hibrido
Acesso aos recursos do dispositivo: Melhor no nativo

Na base hibrido é muito mais produtivo e rápido para fazer qualquer coisa porem perde bastante em performace, caso você precise de algo rápido e de custo baixo e a performace não seja um fator crucial ele é a melhor escolha sem duvida, agora se você tem tempo de sobra e grana de sobra e a performace é algo fundamental o melhor é nativo. Muita gente para lançar rápido a app escolhe hibrido e depois quando ela cresce o suficiente em numero de usuários migra para o nativo.
Comment: Corrigido, valeu


asymptotic proportionality

Question: Is there a well established notation for asymptotic proportionality by a non-zero and non-unitary constant (for null contant we have little-oh, for unitary constant of asymptotic proportionality we have $\sim$)? Is for example the usual proportionality symbol $\propto$ extended to such use?
Answer: I think, if I understood correctly, that $\Theta$ is what you're looking for?
$$f = \Theta(g) \leftrightarrow \exists M>0, (C_1, C_2) \in \mathbb{R}; \forall x>M, C_1<\frac{f(x)}{g(x)}<C_2$$
Comment: Unfortunately this is a bit more general than what I intended, this notation expresses only a bound for the asymptotic proportionality constant.
Comment: Then yes, $\propto$ is what you need: $f\propto g \leftrightarrow  \exists a, f=ag$
Comment: But the problem is exactly the definition of $\propto$ as a relationship: standard definition and use requires the constant a you use in your definition to work for every x (implicitly assumed in your definition by minimal notation). What I am asking is if it is standard use in research to use $\propto$ when the proportionality may hold only in the limit (therefore including cases in which it does no hold for any finite x).
Comment: Oh, then I'm afraid I'm not aware of any specific notation... You'd have to spell it out as $\frac{f}{g} \rightarrow a$ I guess

asymptotic proportionality