text:
Q: ElasticSearch with hunspell analyzer I'd like to create an index in ElasticSearch which stores a specific type of data which has some string fields. The language is hungarian.
I ran a HTTP PUT command with the following body:
{
    "settings" : {
        "analysis" : {
            "analyzer" : {
                "hu" : {
                    "tokenizer" : "standard",
                    "filter" : [ "lowercase", "hu_HU" ]
                }
            },
            "filter" : {
                "hu_HU" : {
                    "type" : "hunspell",
                    "locale" : "hu_HU",
                    "language" : "hu_HU"
                }
            }
        }
    },
    "mappings": {
        "printedArticle": {
            "_source": {"enabled": false},
            "properties": {
                "_id": {"type": "string", "store": true},
                "mysqlid": {"type": "long", "store": false},
                "publishDate": {"type": "date", "format": "dateOptionalTime", "store": false},
                "title": {"type": "string", "analyzer": "hu", "analyze": true, "store": false},
                "lead": {"type": "string", "analyzer": "hu", "analyze": true, "store": false},
                "content": {"type": "string", "analyzer": "hu", "analyze": true, "store": false},
                "participants": {"type": "string", "analyzer": "hu", "analyze": true, "store": false},
                "authors": {"type": "string", "analyzer": "hu", "analyze": true, "store": false},
                "subtitle": {"type": "string", "analyzer": "hu", "analyze": true, "store": false}
            }
        }
    }
}

Then I inserted one record with some test text, and if I run a search through Elastic API with a GET request like this:
http://localhost:9200/mf_pa/_search?q=MYTESTTEXT

it founds my record only if my test text is equal with one of the words of my record.
I tried to analyze some similar text through the analysis API:
http://localhost:9200/mf_pa/_analyze?analyzer=hu&text=My text to tokenize

and it tokenized my test text properly. Based on this fact I'd expect that if I put a previously found token into my search query, it would find the record but it's not.
For an english example I'd say that my text is 'unforgettable' and my query is 'forget'.
What should I do to find the record?

A: If the analyzer tests out using the Analyze API, it should also work in the mapping.  Here are some things to check:

*

*Make sure the mapping was input successfully. GET /mf_pa/_mapping
For example, "analyze": true should be "index": "analyzed"

*Make sure that the test document was actually correctly indexed as type printedArticle.
GET /mf_pa/_search should return your test doc showing "_type": "printedArticle".

*You can also use the Analyze API to validate how text will analyze against a specific field (to ensure the analyzer is correctly applied to that field)
e.g. GET /mf_pa/_analyze/?field=title&text=A kőszivű ember fiai


text:
Q: Triggering custom flows in keycloak I can define custom flows in Keycloak and replace standard flows with them.
Is it possible to define a custom flow and trigger it manually, via link? It would be useful for example for extending user self management.

A: You can create a client and then override some of the authentication flows for this particular client. The feature is not documented yet and somewhat hidden at the bottom of the first client administration tab:

If you are triggering the authentication flow from a specific application, this solution should work for you.
Possibly there is also a link to trigger it. I just don't know but would also be interested in learning about it – in particular a link to trigger a specific registration flow.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Binding values from dataTable into Specific cell in Gridview ASP c# .net I Have an existing table name [thisMonth]. I would like to bind certain values depending on the query into a specific Cell in the Gridview.
The pseudo goes like this * please excuse my incorrect syntax
sqlquery string = "Select * from [thisMonth] where [Day] = 'm1';
sqlcommand cmd = (string, con);
sqlreader read = sqlreader(cmd);
executequery;

GridView1.Rows[0].Cells[1].Text += read["value1"];
GridView1.Rows[0].Cells[1].Text += read["value2"];
GridView1.Rows[0].Cells[1].Text += read["value3"];

am I in the right path? I don't get any errors but nothing is displaying in my table.

A: You will have a much easier time of it if you add an sqlDataSource to the page, set the data source of the gridView to the sqlDataSource and use your query to select data in table form for the data source.
I would go into specifics but there are plenty of other sources on Stackoverflow with examples of doing this ;)

A: The default position of the SqlDataReader is before the first record. Therefore, you must call Read to begin accessing any data
https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.read(v=vs.110).aspx
while (read.Read())
{
    GridView1.Rows[rowindex].Cells[1].Text = read["value1"];
    GridView1.Rows[rowindex].Cells[1].Text = read["value2"];
    GridView1.Rows[rowindex].Cells[1].Text = read["value3"];
    rowindex++;
}

// Call Close when done reading.
read.Close();

A: Looks like I got to assign now values to specific cell but the only thing that I can't figure out is how to do endl in c# :P
here is my code now :
        bind.gridv = new GridView();
        bind.gridv.ID = "complete";
        bind.gridv.AutoGenerateColumns = false;

        DataTable dt = new DataTable();
        DataRow drow = dt.NewRow();

        int i = 0;
        dt.Columns.Add("m" + (i + 1) + "");

        drow[0] += "hehe\n";
        drow[0] += "haha";
        drow[0] += "hoho";
        drow[0] += "hihi";

        dt.Rows.Add(drow);

        BoundField bound = new BoundField();
        bound.DataField = "m"+(i+1)+"";
        bound.HeaderText = "m" + (i + 1) + "";

        bind.gridv.Columns.Add(bound);

        bind.gridv.DataSource = dt;
        bind.gridv.DataBind();

        this.Page.Controls.Add(bind.gridv);
        PlaceHolder1.Controls.Add(bind.gridv);


text:
Q: Disable TabBar for specific Tab when keyboard is up I need to disable showing the tab bar above keyboard when its up for only specific tab.
I've searched and tried several ways:
android:windowSoftInputMode="stateVisible|adjustResize|adjustPan" works but for all tabs. I need only for one tab

*

*The only way i think should work is to send broadcast from the tab fragment to the TabActivity, it works fine but when dealing (typing/deleting) with the only edit text in the fragment something goes wrong in the tab bar goes up with the keyboard again.

The broadcast is: (Tab fragment):
    Intent intent = new Intent(TabActivityName.ACTION_SET_SOFT_INPUT_MODE);
    intent.putExtra(TabActivityName.SOFT_INPUT_MODE, WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
    getActivity().sendBroadcast(intent);

And from the TabActivityName the broadcast is being called successfully and do:
getWindow().setSoftInputMode(intent.getIntExtra(SOFT_INPUT_MODE, 0));

So my main issue is what can cause the tab activity to disable/reset/forget this softInputMode
thank for the help


text:
Q: Best practice to work with android application and .Net web Api I have a .net webApi project that contains some methods.
The methods send and get complex objects.
My android application gets the objects in json format and parsing them manually.
In any changes of the objects in the WebApi project I have to change manually the android application project.
I would like to know what is the best practice to work with android application client and .Net WebApi.
There is any tool to connect between them or to auto map the objects?
Please help me
Tal

A: U do use json parsing technique for parsing the json responses.its proper way of data parsing there is i think no tool for auto mapping.

A: From the Android Client end you have to use Spring RestTemplate together with Data Transfer Objects (DTOs). You wouldn't need to manually manipulate a JSON String values. It's all about dealing with Java Objects then. You can directly pass the Objects to the RestTemplate as Entity classes and get the JSON String Auto Mapped to your DTOs.


text:
Q: How to choose the best Linux distro depending on your hardware I have a centrino 1.7 GHz with 512 RAM. It is an old computer.
I tried to google for something that could ease my chose for a good linux distro that would run smooth on that computer and still being pretty and easy to work.
I thought on Lubuntu, but I found so many others (gOS, EeeXubuntu, Ubuntu Netbook Remix, Puppy...).
Not to mention the biggest mainstream distros that could, or couldn't, run smooth in it...
Is there a place where I can have this kind of advise based on hardware and personal preferences?
What would you suggest to my case?
Thank you!

A: For your old computer (or any old computer), you should try Damn Small Linux. It is altogether 50 MB (which is crazy small) and requires only 16 MB of RAM.
I do not know of any smaller distro that gives you all of the features that this one does.
Hope this helps (if it does, please confirm my answer).

A: I think Ubuntu with Xfce will fit.
You can download it from:
http://xubuntu.org/

A: If you are feeling froggy and brave, installing a base Arch Linux system with basic networking and a minimalist window manager has worked great for my low spec systems.
This doesn't fall under the "easy" category you are looking for but you will learn a lot as an added bonus and your low specs will thank you once all is configured.


text:
Q: Given a polygon of n-sides, why does the regular one (i.e. all sides equal) enclose the greatest area given a constant perimeter? This doesn't require much more than the title. I just need an explanation, but an algebraic proof would be a bonus.
We can demonstrate this for quadrilaterals, a square is best as shown by this graph- the area peaks when both sides are equal at 250.

A: Here is an elegant proof, but it relies on a bit of real analysis and not just euclidean geometry. I assume you are concerned with only non-self-intersecting polygons since it is not clear what should be defined as the area of a self-intersecting polygon.
[Edit: I don't know how I misread the question to be about polygons inscribed in a given circle with the maximum area. The first proof solves that and the second proof solves the original problem.]
Cyclic Polygon Maximum Area
Let $D$ be the set of vectors in $\mathbb{R}^n$ that describe the angles subtended by the sides of a non-self-intersecting cyclic polygon (which is allowed to have sides of length $0$).
Then $D$ is clearly a closed bounded set and hence compact.
Let $f(v)$ be the area of the polygon $P$ that is described by the vector $v$.
Then $f$ is continuous on $D$.
Therefore $f$ attains a maximum on $D$.
Let $a \in D$ such that $f(a) = \max_{v \in D} f(v)$ and let R be the polygon described by $a$.
If $R$ is not regular:
  $R$ has two sides $AB,BC$ of unequal length.
  Move $B$ on the arc $AC$ to make $AB,BC$ of equal length.
  Then $B$ is now further away from $AC$ and hence $Area(\triangle ABC)$ increases.
  Thus $Area(R)$ increases.
  Contradiction.
Therefore $R$ is regular.
Isoperimetric Polygon Maximum Area
Let $p > 0$ be the given perimeter.
Let $D$ be the set of points in $(\mathbb{R}^2)^n$ that describe the vertices of a directed polygon of perimeter $p$ (which is allowed to have sides of length $0$ and self intersections) such that one vertex is $(0,0)$.
Then $D$ is a closed (since it can be expressed as non-strict inequalities) bounded set and hence compact.
Let $f(v)$ be the signed area of the polygon $P$ that is described by the vector $v$.
Then $f$ is continuous on $D$.
Therefore $f$ attains a maximum on $D$.
Let $a \in D$ such that $f(a) = \max_{v \in D} f(v)$ and let R be the polygon described by $a$.
If $R$ has two sides $AB,BC$ such that $|AB| \ne |BC|$ or $Area(\triangle ABC) < 0$:
  Move $B$ to preserve $|AB|+|BC|$ but make $|AB| = |BC|$ and $Area(\triangle ABC) \ge 0$.
  The locus of $B$ that preserves $|AB|+|BC|$ is an ellipse with $AC$ as a diameter.
  Thus $Area(\triangle ABC)$ increases and hence $Area(R)$ increases.
  Contradiction.
Therefore $R$ has all sides of equal length and each internal angle being at most $180^\circ$.
If $R$ is not cyclic:
  Let $X,Y,Z,W$ be four vertices of $R$ in order that do not lie on a circle.
  These four vertices divide the sides of $R$ into four sections.
  Move those four sections rigidly so that $R$ remains a polygon but $XYZW$ becomes cyclic.
  Then $Area(R)$ increases by Bretschneider's formula.
  Contradiction.
Therefore $R$ is cyclic.
Therefore $R$ is a regular polygon (possibly a star).
Thus $R$ has area $n·\tan(α/2)$ where $α$ is the internal angle between sides of $R$.
Thus $R$ is a regular polygon since it alone maximizes $α$.
Notes
The above proofs also show with essentially no change that the regular polygon is the only case with the maximum area. My second proof uses signed area since it was easier than requiring the polygon to be non-self-intersecting, but I'll leave my first proof the way it is.


text:
Q: Arduino Serial Monitor shows strange ASCII characters I connected an ArduiMU v3+ via a FTDI-cable to my Mac (OS X 10.10) (latest VC FTDI driver is installed and loaded).
Inside the Arduino-software the Serial Monitor (monitoring /dev/cu.usbserial-AJ038NZ3) shows
a lot of weird ASCII characters.
What could be the reason for this problem?

A: Instead of using the Arduino Serial Monitor, use OS X's ability to determine the baud rate automatically.  Whenever, I use my FTDI cable, I monitor the input using the screen command.
In this case you can grep for the name of the device:
ls /dev | grep tty\.[Uu]sb | awk '{print "/dev/"$1}' | xargs screen
check out man screen for a bit more background.
or use the simple version by finding the name of the port in the /dev folder then using
screen <name_of_FTDI>


text:
Q: Error when inviting a user to google cloud I am trying to add a new member on my google-cloud project but i can't make it work.
The link inside the auto-generated email from google is well linking to the page where the user can confirm/decline the invitation inside a modal.
But when this user click "confirm" an error message appear inside the modal but disappear immediately - so quickly i can't read it. As a result i can never grant access to my project to this user.
In my browser debugger here is the error i can trace (some values are forged) :
"NetworkError: 400 Bad Request - https://console.developers.google.com/m/teams/acceptinvitation?xsrf=AFE_nuNg_V8394FDKjdfkjkjwKDFXDVg%3488T6J5783&authuser=1&action=accept&pid=apps~myproject-hosting&receive_updates=false"

This user has a custom domain which is a google-apps managed domain. I specify this because its the only kind of users we cannot invite to the project.
No problem for adding users with @gmail account.
From the google-cloud documentation i can read this :

If you are using a Premier or Google Apps domain, the administrator for your domain should first create the Google account from within the Users panel of your Admin Console.

I don't understand this sentence as my user is off-course already listed in my domain.

A: This might be expected behavior from the App Engine. I know that once you link you application to a specific domain via Google Apps, it becomes very hard to add people from outside that domain to your application.
I know that you can create a google group, enable "out-of-domain" members to that group. Then you can add that group to your project. Then you can add his email to the group, which should give him access to the project.
Only caveat here is that, if your domain is google.com, you will not be able to use this workaround, and this may require help from support.

A: Well i finally did it.
Google seems to have fixed the flashing error message making it impossible to read.
Now it display something like this : "Contact your administrator to enable AppHosting admin on your account".
This is done has follow :

*

*Login to your main google-app account on http://admin.google.com

*Go to "App"

*Go to "Additional Google services"

*Enable "Google Developers Console" for everyone

Now my user can be invite to the google-cloud project.


text:
Q: How can I change source directory from System 32? I am a newbie in Ubuntu. When I open my terminal, the source path (directory) starts with System32, how can I change it to User or Desktop ?
When I type cmd.exe :
Microsoft Windows [version 10.0.19042.1320]
(c) Microsoft Corporation. Tous droits réservés.

A: So... Windows is an operating system. Ubuntu is also an operating system. Both are operating systems, but they are different operating systems. They both have shells (see here for the difference between a terminal emulator and a shell). On Windows 10, there are two shells: PowerShell* and cmd.exe. PowerShell can do almost everything cmd.exe can, as it is far newer. There are several shells on Ubuntu. The one that it uses by default for a user is called bash. There is a second one called sh, but it is used less, as it is far less powerful, but it is more cross-platform, similar to how PowerShell is newer, but there are also a few old systems that don't have it.
On Windows, when you start a "Command Prompt" (which is just the start menu entry for cmd.exe). The default directory that cmd.exe (or I think PowerShell, too) is C:\Windows\System32.
Here's the interesting bit: In cmd.exe, to list files in a directory, you type in dir and press enter. On PowerShell, you type in Get-ChildItem, and press enter. Here's where it is confusing: there are a handful of aliases in PowerShell (you can get a list with Get-Alias). The two that matter here are dir and ls. Both are aliased to Get-ChildItem. This means that when you type in ls in PowerShell, it will print the files in the current directory. On Ubuntu, both dir and ls, also print the files in the current directory.
Here's how I know you are using PowerShell on Windows 10:
You mentioned as a comment that ls worked (e.g., it listed the files in your current directory). Remember, ls only works in PowerShell and bash (so not cmd.exe). But, you also said cmd.exe does something: it starts the cme.exe shell. But that only exists on Windows, not Ubuntu.
Now to answer your question:
On both Windows and Linux, you can change your current directory with the cd command. So basically, set your directory with cd [where you want to go]. E.g., on Linux, if you wanted to go to the /etc directory, you would do cd /etc. But if you want Ubuntu, either use something like Windows Subsystem for Linux or download it from the Ubuntu website
*Technically, yes, you can install PowerShell on Linux. But I'm talking about the defaults here.


text:
Q: SQL: Update row if the value matches one of the provided list value case insensitively I have a table with a single column like this:
fruit
------
appLe
applE
cheRry
Cherry

and the list provided is ["aPple", "chErry"].
Is it possible to run a single SQL query to update this table to be like this?
fruit
------
aPple
aPple
chErry
chErry

Basically if the row matches a value of ["aPple", "chErry"] (case insensitively), replace it with that value.
The key constraint here (what blocks me) is using a single query, so I can't do
update my_table set fruit = 'aPple' where UPPER(fruit) = UPPER('aPple')
update my_table set fruit = 'chErry' where UPPER(fruit) = UPPER('chErry')

which will be 2 queries.

A: Maybe you want this:
UPDATE my_table
SET fruit = CASE WHEN fruit = 'apple' THEN 'aPple'
                 WHEN fruit = 'cherry' THEN 'chErry'
            END

A: SQL Server has case-insensitive comparisons by default.  Have you tried?
update t
    set fruit = 'aPple'
    where fruit = 'aPple';

A: Use a case statement in the update:
UPDATE my_table
    SET fruit = CASE
      WHEN UPPER(fruit) = UPPER('aPple') THEN 'aPple'
      WHEN UPPER(fruit) = UPPER('chErry')  THEN 'chErry'
    END


text:
Q: No. Of winding reason Why dies the the shunt and series field in a compound dc machine have same no. of turns ?
What happens if we equal the value of both the turns ?

A:
Why dies the the shunt and series field in a compound dc machine have
  same no. of turns ?

I assume you mean "does" and the answer, almost certainly is that they don't.
The series winding is, as the name implies, in series with the armature and therefore carries a much bigger current that the shunt winding (parallel with the motor). Hence it has many. many fewer turns.


text:
Q: Understanding the value of $\gamma$ parameter, so that the given process is a martingale. I have a Poisson process of $X_t$ with rate $\lambda=\tilde\lambda.$ Now, given $M_t = X_t + \gamma\cdot t$ I want to uderstand, for which values of $\gamma$, $M_t$ is a martingale.
I know, that in order for $M_t$ to be a martingale, the following should hold (assuming the natural filtration, and given that $X_t$ is the only term of $M_t$ from which the variability comes):
$$
\mathbb{E}\left[M_{n+1}| \mathcal{F_n}\right] = M_n
$$
I have applied the above condition on what I have for $M_t$, but I may have done a mistake, since for some reason $\gamma$ for me does not come to be a constant, what seems quite weird..
$$
\mathbb{E}[M_{n+1}|\mathcal{F}_n] = \mathbb{E}[X_{n+1} + \gamma(n+1)|\mathcal{F}_n] = (\text{since }n \text{ is fixed}) = \gamma(n+1) + \mathbb{E}[X_{n+1}|\mathcal{F}_n] =\\= (\text{here I decided to add and subtract }X_n)=X_n + \gamma n + \gamma + \mathbb{E}[X_{n+1}|\mathcal{F}_n] - X_n = M_n +\\+\left(\gamma - X_n + \mathbb{E}[X_{n+1}|\mathcal{F}_n]\right)\implies \mathbb{E}[X_{n+1}|\mathcal{F}_n] + (\gamma - X_n) = 0~(\text{for }M_n\text{ to be a martingale}).
$$
That is, we have to have: $\mathbb{E}[X_{n+1}|\mathcal{F}_n] = X_n - \gamma \Longleftrightarrow \mathbb{E}[X_{n+1}] = X_n - \gamma \Longleftrightarrow \tilde\lambda=X_n-\gamma$. So that I finally obtain that:
$$
\gamma = X_n - \tilde\lambda.
$$
I am totally sure this result is incorrect, since $\gamma$ is definitely not supposed to involve the variable term. But how can I then obtain it, and what is my mistake?
I would appreciate any help, thank you in advance!

A: In a martingale $(M_t)$ the mean $EM_t=EM_{t+1}$. So we must have  $E(X_t+\gamma t)=E(X_{t+1}+\gamma ((t+1)))$ which gives $t \overline{ \lambda}+\gamma t=(t+1) \overline{ \lambda}+\gamma (t+1)$. Hence, we must have $\gamma =-\overline{ \lambda}$. I will let you try to prove (using independence of increments of $(X_t)$)  that this value of $\gamma$ works. (I can post details if necessary).


text:
Q: Using $.data in Firefox I am experiencing problems (only on Firefox) using jquery data.
In my case, the debugger says that the div I'm trying to use isn't defined.
Is there anything I should read or be aware about?
Here is a jsFiddle: (Sorry for the mess, but i've prepared this just for showing)
http://jsfiddle.net/Rn8rh/1/

$(document).ready(function() {
  var data = {
    "errorCode": 0,
    "errorDesc": "No Error",
    "tabelaUsers": [{
      "id": "537",
      "nome": "A3     a",
      "perfil": "Gestor Plataforma, Professor",
      "pendente": "0",
      "activo": "1",
      "numEscola": "21",
      "estado": "1"
    }, {
      "id": "52",
      "nome": "Afonso Sancho",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "0",
      "numEscola": "6",
      "estado": "1"
    }, {
      "id": "588",
      "nome": "Aluno1",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "27",
      "estado": "1"
    }, {
      "id": "619",
      "nome": "Aluno231 - editado 2x",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "38",
      "estado": "1"
    }, {
      "id": "543",
      "nome": "Alvo",
      "perfil": "Professor, Gestor Plataforma",
      "pendente": "1",
      "activo": "1",
      "numEscola": "23",
      "estado": "1"
    }, {
      "id": "585",
      "nome": "Ambr\u00f3sio II",
      "perfil": "Professor, Gestor Plataforma",
      "pendente": "1",
      "activo": "1",
      "numEscola": "25",
      "estado": "1"
    }, {
      "id": "686",
      "nome": "Barney",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "92",
      "estado": "1"
    }, {
      "id": "527",
      "nome": "Billy G",
      "perfil": "Professor, Gestor Plataforma",
      "pendente": "1",
      "activo": "1",
      "numEscola": "13",
      "estado": "1"
    }, {
      "id": "51",
      "nome": "Claudio Fernandes",
      "perfil": "Aluno",
      "pendente": "0",
      "activo": "0",
      "numEscola": "5",
      "estado": "1"
    }, {
      "id": "703",
      "nome": "Coiso",
      "perfil": "Gestor Plataforma, Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "109",
      "estado": "1"
    }, {
      "id": "636",
      "nome": "Cordeiro",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "52",
      "estado": "1"
    }, {
      "id": "530",
      "nome": "Durval Moreirinhas",
      "perfil": "Gestor Plataforma, Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "16",
      "estado": "1"
    }, {
      "id": "533",
      "nome": "George McFly1",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "19",
      "estado": "1"
    }, {
      "id": "653",
      "nome": "Grovsny Vladimir ",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "69",
      "estado": "1"
    }, {
      "id": "76",
      "nome": "Henrique Peixoto",
      "perfil": "Aluno",
      "pendente": "0",
      "activo": "1",
      "numEscola": "9",
      "estado": "1"
    }, {
      "id": "611",
      "nome": "JB teste",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "32",
      "estado": "1"
    }, {
      "id": "612",
      "nome": "Joaquim Barradas",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "33",
      "estado": "1"
    }, {
      "id": "613",
      "nome": "Joaquim Barradas - Aluno 2",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "34",
      "estado": "1"
    }, {
      "id": "614",
      "nome": "Joaquim Barradas - Professor 1",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "35",
      "estado": "1"
    }, {
      "id": "633",
      "nome": "jose 11",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "49",
      "estado": "1"
    }, {
      "id": "53",
      "nome": "Jos\u00e9 Nunes",
      "perfil": "Professor, Gestor Plataforma",
      "pendente": "0",
      "activo": "1",
      "numEscola": "7",
      "estado": "1"
    }, {
      "id": "632",
      "nome": "Jos\u00e9 Nunes1",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "48",
      "estado": "1"
    }, {
      "id": "656",
      "nome": "Josegefefefe",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "72",
      "estado": "1"
    }, {
      "id": "676",
      "nome": "Jos\u00e9s",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "87",
      "estado": "1"
    }, {
      "id": "538",
      "nome": "Laercio",
      "perfil": "Professor, Gestor Plataforma",
      "pendente": "1",
      "activo": "1",
      "numEscola": "22",
      "estado": "1"
    }, {
      "id": "544",
      "nome": "La\u00e9rcio Fernandes",
      "perfil": "Professor, Gestor Plataforma",
      "pendente": "0",
      "activo": "1",
      "numEscola": "24",
      "estado": "1"
    }, {
      "id": "77",
      "nome": "Lu\u00eds Louren\u00e7o",
      "perfil": "Aluno",
      "pendente": "0",
      "activo": "1",
      "numEscola": "10",
      "estado": "1"
    }, {
      "id": "687",
      "nome": "Magica de Spell",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "93",
      "estado": "1"
    }, {
      "id": "689",
      "nome": "Maria Alice",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "95",
      "estado": "1"
    }, {
      "id": "688",
      "nome": "Mister T",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "94",
      "estado": "1"
    }, {
      "id": "654",
      "nome": "OAOAOOAOOOA",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "70",
      "estado": "1"
    }, {
      "id": "690",
      "nome": "Olga AAA",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "96",
      "estado": "1"
    }, {
      "id": "705",
      "nome": "Oscar Burante",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "111",
      "estado": "1"
    }, {
      "id": "648",
      "nome": "Outro",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "64",
      "estado": "1"
    }, {
      "id": "649",
      "nome": "outro1",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "65",
      "estado": "1"
    }, {
      "id": "54",
      "nome": "Paulo Peixoto",
      "perfil": "Aluno",
      "pendente": "0",
      "activo": "1",
      "numEscola": "8",
      "estado": "1"
    }, {
      "id": "642",
      "nome": "Professor",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "58",
      "estado": "1"
    }, {
      "id": "668",
      "nome": "professor",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "84",
      "estado": "1"
    }, {
      "id": "644",
      "nome": "Professor 1234",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "60",
      "estado": "1"
    }, {
      "id": "645",
      "nome": "Professor 32322",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "61",
      "estado": "1"
    }, {
      "id": "528",
      "nome": "Professor Ludovico",
      "perfil": "Professor",
      "pendente": "0",
      "activo": "1",
      "numEscola": "14",
      "estado": "1"
    }, {
      "id": "89",
      "nome": "Professor Pardal",
      "perfil": "Professor",
      "pendente": "0",
      "activo": "1",
      "numEscola": "11",
      "estado": "1"
    }, {
      "id": "643",
      "nome": "Professor123",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "59",
      "estado": "1"
    }, {
      "id": "669",
      "nome": "professor2",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "85",
      "estado": "1"
    }, {
      "id": "641",
      "nome": "sada123",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "57",
      "estado": "1"
    }, {
      "id": "667",
      "nome": "sadadas",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "83",
      "estado": "1"
    }, {
      "id": "628",
      "nome": "sadasdasdas",
      "perfil": "Gestor Plataforma, Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "45",
      "estado": "1"
    }, {
      "id": "531",
      "nome": "S\u00e9rgio Azevedo",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "17",
      "estado": "1"
    }, {
      "id": "605",
      "nome": "Teste HC Aluno",
      "perfil": "Gestor Plataforma, Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "28",
      "estado": "1"
    }, {
      "id": "662",
      "nome": "Usu\u00e1rio com email",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "78",
      "estado": "1"
    }, {
      "id": "657",
      "nome": "Usu\u00e1rio1",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "73",
      "estado": "1"
    }, {
      "id": "650",
      "nome": "Usu\u00e1rio1",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "66",
      "estado": "1"
    }, {
      "id": "658",
      "nome": "Usu\u00e1rio2",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "74",
      "estado": "1"
    }, {
      "id": "659",
      "nome": "Usu\u00e1rio3",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "75",
      "estado": "1"
    }, {
      "id": "526",
      "nome": "utilizadoor A",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "0",
      "numEscola": "12",
      "estado": "1"
    }, {
      "id": "50",
      "nome": "Utilizador Coordenador Ciclo, Professor",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "4",
      "estado": "1"
    }, {
      "id": "685",
      "nome": "Utilizador Pr\u00e9-pendente",
      "perfil": "Aluno",
      "pendente": "1",
      "activo": "1",
      "numEscola": "91",
      "estado": "1"
    }, {
      "id": "46",
      "nome": "Utilizador professor",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "1",
      "estado": "1"
    }, {
      "id": "47",
      "nome": "Utilizador professor,  Coordenador Ciclo",
      "perfil": "Professor",
      "pendente": "1",
      "activo": "1",
      "numEscola": "2",
      "estado": "1"
    }]
  };

  for (var i in data.tabelaUsers) {
    $('#listUsersEscola').append("

" + data.tabelaUsers[i].numEscola + "

" + data.tabelaUsers[i].nome + "

" + data.tabelaUsers[i].perfil + "

");
  }

});
<!DOCTYPE html>

If you click on the image firebug prints the error

A: I've figured it out.
I was trying

$.data(divId, 'nameOfVar'), then $.data($('#divId'), 'nameOfVar')

I've changed to
$.data(document.getElementById(divId), 'nameOfVar') and now it works


text:
Q: Android 10 BadParcelableException ClassNotFoundException when unmarshalling using Kotlin @Parcelize In Firebase, I'm getting various crashes in my production app (uses Dexguard), while using Parcelable.
These crashes are now affecting almost 200 users and are grouped into 3 entries on Firebase.
In one entry, crashes are only on Samsung devices, in another, are only Xiaomi devices and in the other, are more brands but 81% are from HMD Global.
ALL these devices are running Android 10 so this might be a problem with this OS version. I can see that the crashes are contained to 5 or 6 custom objects. Other than that, some crashes are related to:
Fatal Exception: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: androidx.fragment.app.FragmentManagerState
   at android.os.Parcel.readParcelableCreator(Parcel.java:3059)
   at android.os.Parcel.readParcelable(Parcel.java:2981)
   at android.os.Parcel.readValue(Parcel.java:2883)
   at android.os.Parcel.readArrayMapInternal(Parcel.java:3261)
   at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292)
   at android.os.BaseBundle.unparcel(BaseBundle.java:236)
   at android.os.BaseBundle.size(BaseBundle.java:355)
   at android.app.servertransaction.LaunchActivityItem.hashCode(LaunchActivityItem.java:208)
   at java.util.AbstractList.hashCode(AbstractList.java:541)
   at java.util.Objects.hashCode(Objects.java:98)
   at android.app.servertransaction.ClientTransaction.hashCode(ClientTransaction.java:241)
   at android.app.servertransaction.TransactionExecutorHelper.tId(TransactionExecutorHelper.java:266)
   at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:86)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2220)
   at android.os.Handler.dispatchMessage(Handler.java:107)
   at android.os.Looper.loop(Looper.java:237)
   at android.app.ActivityThread.main(ActivityThread.java:8019)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)

In one of my custom objects, I'm having this type of crash (for my other custom objects, the crash is the same).
Fatal Exception: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.mypackagename.InfoData
       at android.os.Parcel.readParcelableCreator(Parcel.java:3059)
       at android.os.Parcel.readParcelable(Parcel.java:2981)
       at android.os.Parcel.readValue(Parcel.java:2883)
       at android.os.Parcel.readArrayMapInternal(Parcel.java:3261)
       at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292)
       at android.os.BaseBundle.unparcel(BaseBundle.java:236)
       at android.os.BaseBundle.size(BaseBundle.java:355)
       at android.app.servertransaction.LaunchActivityItem.hashCode(LaunchActivityItem.java:208)
       at java.util.AbstractList.hashCode(AbstractList.java:541)
       at java.util.Objects.hashCode(Objects.java:98)
       at android.app.servertransaction.ClientTransaction.hashCode(ClientTransaction.java:241)
       at android.app.servertransaction.TransactionExecutorHelper.tId(TransactionExecutorHelper.java:266)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:86)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2220)
       at android.os.Handler.dispatchMessage(Handler.java:107)
       at android.os.Looper.loop(Looper.java:237)
       at android.app.ActivityThread.main(ActivityThread.java:8019)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)

As an example, here is an example of the models that I'm having crashes.
@Parcelize
class NumberDetails(internal var numbers: ArrayList<String> = arrayListOf(), var userState: UserState = UserState.INACTIVE) : Parcelable {

    fun clear() = numbers.clear()

    fun getNumbers(): String = numbers.joinToString("")
}

Another:
@Parcelize
data class InfoData(var needsCheck: Boolean = false, var amount: Double = 0.0, var fee: Double? = null) : Parcelable

And another:
abstract class Screen(open val identifier: String = "") : Parcelable {

    @Parcelize
    data class ActivateScreen(override val identifier: String) : Screen()

   //More entries like above
 }

The first example is an inner class while the second is declared in a file where I already have other stuff (don't know if this matters)
I'm unable to replicate the crash on any of my devices.
Any idea why I'm having these crashes only on Android 10 devices?
UPDATE:
While trying to fix a crash that my app had, I was able to reproduce the FragmentManagerState crash, that is, my app crashed and then it crashed again with the FragmentManagerState crash. Although I can replicate my app crash always, the subsequent crash I was only to replicate it ONCE.
This was replicated in an Emulator running Android 10 and with Don't Keep Activities enabled.
My app crash only happened due to the Don't Keep Activities enabled (in the markets that I work on, this is common scenario due to low-end devices)
In my app, I can have the following steps:

ActivityA -> ActivityB -> ActivityC -> ActivityD (PdfViewer) ->
PickActivity (I/ActivityTaskManager: START u0
{act=android.intent.action.CREATE_DOCUMENT
cat=[android.intent.category.OPENABLE] typ=application/pdf
cmp=com.android.documentsui/.picker.PickActivity)

In ActivityD, a place where I can preview a PDF, I can click on a button to save the PDF in storage. That click on the button opens the system PickActivity. When I save the PDF and control is passed to ActivityC, my app crashes (only with DNKA enabled) since I'm not properly handling onSavedInstanceState.
From the logs (removed unnecessary stuff here) I can see:
I/ActivityTaskManager: START u0 {act=android.intent.action.CREATE_DOCUMENT cat=[android.intent.category.OPENABLE] typ=application/pdf cmp=com.android.documentsui/.picker.PickActivity (has extras)} from uid 10219
I/ActivityManager: Start proc 9418:com.android.documentsui/u0a50 for activity {com.android.documentsui/com.android.documentsui.picker.PickActivity}
I/ActivityManager: Start proc 9443:com.android.externalstorage/u0a56 for content provider {com.android.externalstorage/com.android.externalstorage.ExternalStorageProvider}
I/ActivityTaskManager: Displayed com.android.documentsui/.picker.PickActivity: +1s133ms
2016-3548/? I/ActivityTaskManager: START u0 {cmp=com.myapp.packagename/com.myapp.package.ActivityC} from uid 10219
2016-2323/? I/ActivityTaskManager: START u0 {cmp=com.myapp.packagename/com.myapp.package.ActivityC} from uid 10219

Then my app crashes due to the lack of proper handling of saved instance state
W/ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{bdaedc1 u0 com.myapp.packagename/com.myapp.package.ActivityD t1250}
W/ActivityTaskManager: Activity pause timeout for ActivityRecord{bdaedc1 u0 com.myapp.packagename/com.myapp.package.ActivityD t1250}
W/ActivityTaskManager:   Force finishing activity com.myapp.packagename/com.myapp.package.ActivityC
W/ActivityTaskManager:   Force finishing activity com.myapp.packagename/com.myapp.package.ActivityC
I/ActivityManager: Process com.myapp.packagename (pid 8990) has died: fore TOP
W/ActivityTaskManager: Force removing ActivityRecord{4b658e u0 com.myapp.packagename/com.myapp.package.ActivityB t1250}: app died, no saved state
W/ActivityTaskManager: Force removing ActivityRecord{210b4e5 u0 com.myapp.packagename/com.myapp.package.Activitya t1250}: app died, no saved state
I/ActivityManager: Start proc 9609:com.myapp.packagename/u0a219 for activity {com.myapp.packagename/com.myapp.package.ActivityD}
W/ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{5d7ded3 u0 com.myapp.packagename/com.myapp.package.ActivityC t-1 f}

I now can see by the logs that my app is launched (logs from my application class)
I/ActivityTaskManager: START u0 {flg=0x10008000 cmp=com.myapp.packagename/com.myapp.package.SplashActivity} from uid 10219
I/ActivityTaskManager: START u0 {cmp=com.myapp.packagename/com.myapp.package.SplashActivity} from uid 10219
 W/ActivityTaskManager: startActivity called from finishing ActivityRecord{bdaedc1 u0 com.myapp.packagename/com.myapp.package.ActivityD t1250 f}; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { cmp=com.myapp.packagename/com.myapp.package.SplashActivity }
W/ActivityTaskManager: Duplicate finish request for ActivityRecord{bdaedc1 u0 com.myapp.packagename/com.myapp.package.ActivityD t1250 f}
W/ActivityTaskManager: Duplicate finish request for ActivityRecord{685f9ab u0 com.myapp.packagename/com.myapp.package.ActivityC t1250 f}
W/ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{bdaedc1 u0 com.myapp.packagename/com.myapp.package.ActivityD t1250 f}
W/ActivityTaskManager: Activity pause timeout for ActivityRecord{bdaedc1 u0 com.myapp.packagename/com.myapp.package.ActivityD t1250 f}

And then:
9609-9609/com.myapp.packagename E/Parcel: Class not found when unmarshalling: androidx.fragment.app.FragmentManagerState
    java.lang.ClassNotFoundException: androidx.fragment.app.FragmentManagerState

While analyzing the logs I could see that one of my activities was appearing twice. I managed to reproduce that with fast multiple clicking on the button that launches that activity. I then tried to replicate it. Restarted the flow, double-clicked the button, tried to save the PDF, and after the app crash, I could see the FragmentManagerState crash. I was able to reproduce this only once.
1 - Since all my crashes are related to BadParcelableException (ones from FragmentManagerState and others from other things), and with the above mentioned in mind, could the crashes that I'm seeing on the play store be marked as BadParcelableException but are crashes related to other things in my app, that also triggers the BadParcelableException crashes and PlayStore and Firebase only show the later ones?
2 - Any suggestion on what could I improve to properly log the crashes in my app?

A: This problem was reported a year ago for your first stack trace, the one referring to FragmentManagerState. It seems to be tied to an Android 10-specific bug.
For your InfoState crash, putting the object into the bundle as a byte[] should clear up the problem. That is not an option for you with FragmentManagerState, though, as that is being done deeper in the Jetpack.
You might want to confirm that you are on the latest androidx.fragment and androidx.activity libraries, in case they added a workaround. Otherwise, you might review the comments on that issue, as some developers reported some solutions, but they are rather specific and may or may not relate to your scenario.


text:
Q: recorded as an Atlantic hurricane made landfall
When Hurricane Dorian slammed into Great Abaco Island in the Bahamas on September 1, instruments measured the speed of its furious winds at 185 mph—tying the legendary Labor Day hurricane of 1935 for the highest wind speeds recorded as an Atlantic hurricane made landfall

Is it a clause, "as" is a conjuction? or is it a noun phrase, "as" is a preposition? What does it mean?


text:
Q: Is it possible to broadcast to multiple headsets at once over A2DP? I'm hoping to have an Android broadcast to multiple Bluetooth headsets at once - the idea is to have a radio-like stream that users of an app can tap into. It is important that all users hear the music in sync (that is, the song ends at the same time for everyone).
I have not been able to determine if A2DP will allow streaming to multiple receivers, but I'd be open to other streaming solutions if you have them. Extra points if Android and iOS devices can play with each other!

A: I dont think streaming to multiple devices over A2DP is currently supported.

A: According to http://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html in BluetoothA2dp class overview: "Android only supports one connected Bluetooth A2dp device at a time".

A: I have two Creative WP-380 that have ShareMe function that permit to listen the same stream audio in the same time. I and my wife watch movie with our linux notebook using that couple of headsets.
One is the master, bluetooth connected with the notebook, and the second is the slave, paired with the first.
Works excellent with our android tablets!

A: It was possible with Windows Mobile 6.5 on a HTC Touch Pro 2 (a bad smartphone because of it´s slow CPU). I used two A2PD Headphones simultaneously.


text:
Q: Excepción de HRESULT: 0xFFFFFFF8 en DPFP.Verification U ARE U 4500 Estoy trabajando un reloj checador, sin embargo al realizar la verificación, me tira el error:

Excepción de HRESULT: 0xFFFFFFF8 en DPFP.Verification U ARE U 4500

He consultado esta misma pregunta en varios foros pero ninguna de las modificaciones propuestas me ha solucionado el problema, comienzo proporcionando esta información, por si fuera de utilidad:
Estoy trabajando en Visual studio 2017, windows Form y sistema operativo windows 10 de 64 bits.
Base de datos SQL Server 2014
Tabla UsuarioHuella
Id - int
UsuarioId - int
Sample1 - varbinary(MAX)
Sample2 - varbinary(MAX)
Sample3 - varbinary(MAX)

Aquí el código:
public void OnComplete(object Capture, string ReaderSerialNumber, DPFP.Sample Sample)
    {

        DPFP.FeatureSet Caracteristicas = new DPFP.FeatureSet();
        Caracteristicas = ExtractFeatures(Sample, DPFP.Processing.DataPurpose.Verification);

        if (Caracteristicas != null)
        {
            Verification Verificador = new Verification();
            bool Valido = false;

            AlbatrosCtx ctx = new AlbatrosCtx();
            var ListaHuellas = (from huella in ctx.UsuarioHuellaDB
                                join Usr in ctx.UsuarioDB
                                on huella.UsuarioId equals Usr.Id
                                join Area in ctx.TipoAreaDB
                                on Usr.TipoAreaId equals Area.Id
                                let AreaNombre = Area.Nombre
                                where Usr.Status == (byte)Usuario.EStatus.Activo
                                select new
                                {
                                    Usr.Id,
                                    Usr.Nombre,
                                    Usr.Apellidos,
                                    AreaNombre,
                                    huella.Sample1,
                                    huella.Sample2,
                                    huella.Sample3
                                }).ToList();

            foreach (var Registro in ListaHuellas)
            {
                DPFP.Template Modelo = new DPFP.Template();
                Modelo.DeSerialize(Registro.Sample1);

                DPFP.Verification.Verification.Result resultado = new DPFP.Verification.Verification.Result();
                Verificador.Verify(Caracteristicas, Modelo, ref resultado);

                if(resultado.Verified)
                {
                    Valido = true;
                    break;
                }
                else
                {
                    Modelo.DeSerialize(Registro.Sample2);
                    Verificador.Verify(Caracteristicas, Modelo, ref resultado);

                    if(resultado.Verified)
                    {
                        Valido = true;
                        break;
                    }
                    else
                    {
                        Modelo.DeSerialize(Registro.Sample3);
                        Verificador.Verify(Caracteristicas, Modelo, ref resultado);

                        if (resultado.Verified)
                        {
                            Valido = true;
                            break;
                        }
                    }
                }

                if(Valido == true)
                {
                    LblId.Text = "ID: " + Registro.Id.ToString();
                    LblNombre.Text = "Nombre: " + Registro.Nombre + " " + Registro.Apellidos;
                    LblArea.Text = Registro.AreaNombre;

                    break;
                }

            }

            if(Valido == true)
            {
                LecturaCorrecta();
            }
            else
            {
                LecturaErronea();
            }

            TmrRegistro.Enabled = true;
        }
        else
        {
            LecturaErronea();
        }

    }

protected DPFP.FeatureSet ExtractFeatures(DPFP.Sample Sample, DPFP.Processing.DataPurpose Purpose)
    {
        DPFP.Processing.FeatureExtraction Extractor = new DPFP.Processing.FeatureExtraction();  // Create a feature extractor
        DPFP.Capture.CaptureFeedback feedback = DPFP.Capture.CaptureFeedback.None;
        DPFP.FeatureSet features = new DPFP.FeatureSet();
        Extractor.CreateFeatureSet(Sample, Purpose, ref feedback, ref features);            // TODO: return features as a result?
        if (feedback == DPFP.Capture.CaptureFeedback.Good)
            return features;
        else
            return null;
    }

Justo al llegar a la linea Verificador.Verify(Caracteristicas, Modelo, ref resultado); el programa se detiene y marca el siguiente error:

System.Runtime.InteropServices.COMException: 'Excepción de HRESULT: 0xFFFFFFF8'


text:
Q: Question regarding the construction of Riemannian metrics I have problems with the proof why every manifold admits a Riemannian metric.
If the manifold $M$ has an atlas given by sets $U_i$, we can take a subordinate partition of unity $\{\phi_i\}_i$. Then $\sum \phi_i g_i$, where $g_i$ is the standard metric on $U_i \tilde = \mathbb R^n$,  defines a riemannian metric.
I don't understand why this is well defined. Isn't there some transformation condition we need to to check when switching charts on their overlap?


text:
Q: how to play youtube videos in flutter I'm trying to play YouTube Videos in my Flutter Web Application, but with the default VideoPlayer you need the YouTube src path (...googlevideos.com/...), which I couldn't get right.
I did some google research and I found the following packages:

*

*https://pub.dev/packages/youtube_player_flutter

*https://pub.dev/packages/chewie
But both of them won't play direct YouTube links, and the first one isn't supported for Flutter-Web.
Does anyone have experience with this topic or knows how to get the YouTube source links (for example with an API) ?

A: Did you try this package: youtube_player_iframe: ^2.3.0
find it here https://pub.dev/packages/youtube_player_iframe

A: EDIT1: YouTube seems to shuffle the source video file url every day, so using the source file url is not a viable solution. Another option is to add the video to your project locally and add an overlay "YouTube" button on top of the video and when the user taps it he is taken to the video on YouTube. Downside to using asset video though is the fact that you are unable to adjust the progress bar (at least in version 2.4.5).
You can use the official video_player package and get the source file path to YouTube video file by using VLC media player by following these steps:

*

*Find a video on YouTube and copy the URL from the address bar.

*In VLC, head to Media > Open Network Stream.

*Paste the YouTube link in the box and click Play.

*Under Tools, click Codec Information.

*In the box that says Location, right-click the block of text and click Select All. This is the url to your local video file.

These steps are almost a copy / paste found from here: How to obtain the direct link to a YouTube video file
You can also use the youtube_player_iframe package, but note that if you hover on top of the video when using that player, you are unable to scroll your content and there seems to be no workaround as discussed in here: Mouse scroll stuck while cursor is on top of youtube_player_iframe. That's the only reason why I decided to use the official video player package.


text:
Q: Не выдается роль с помощью сообщения Discord.py Помогите разобраться. Бот должен выдавать роль, когда получит сообщение с необходимым текстом, к примеру, "Группа С118". В итоге не выдает никаких ошибок синтаксиса и тп, просто молчит.
import discord
from discord.ext import commands
from discord.ext.commands import Bot
from discord.utils import get
@Bot.event
async def on_message(msg):
    member = utils.get(message.guild.members, id=payload.user_id)
    if "text in message" in msg.content:
        role = discord.utils.get(member.guild.roles, id = "")
        await Bot.add_roles(member, role)
Bot.run("TOKEN")

A: У вас не правильное построение кода.
Метод on_member_join() - событие и используется так:
@Bot.event
async def on_member_join(member):
    await bot.process_commands(message)#также надо добавить это, подробнее смотрите ниже.
    print(f'На сервере новый пользователь {member.mention}')

process_commands() - это надо что бы бот выдел команди(пример /help, если этого не будет он не ответит на команду)
Метод on_message() - тоже событие и используется так:
@Bot.event
async def on_message(message):
    if message.content == 'Hello':
        await message.channel.send(f'Hello {message.member.mention}')

И так, если вы хотите что бы выдавалась роль когда пользователь заходит на сервер то надо так:
@Bot.event
async def on_member_join(member):
    role = discord.utils.get(member.guild.roles, id = "")
    await member.add_roles(role)

А если по определенному слове:
@Bot.event
async def on_message(message):
    await bot.process_commands(message)
    if message.content == 'Роль':
        role = discord.utils.get(member.guild.roles, id = "")
        await message.member.add_roles(role)


text:
Q: How to refresh Jquery Data-table after event performed in angular 6 HTML

                  Project Name
                  Status
                  Download
                  Action

                  {{ project.sProjectrName}}
                   Active
                   In Active
                  File
                  Delete

Componet.ts
import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { DataTablesModule, DataTableDirective } from 'angular-datatables';
import { ActivatedRoute, Router } from '@angular/router';
import { Project } from '../project';
import { CustomerService } from '../customer.service';
import { DomSanitizer } from '@angular/platform-browser';
import { ControlPosition } from '@agm/core/services/google-maps-types';

@Component({
  selector: 'app-projectlist',
  templateUrl: './projectlist.component.html',
  styleUrls: ['./projectlist.component.scss']
})
export class ProjectlistComponent implements OnInit {
  fileUrl;
  public temp_var: Object=false;
  projects: Project[];
  dtOptions: DataTables.Settings = {};
  constructor(private http: HttpClient,
    private router: Router,private customerService : CustomerService,private sanitize : DomSanitizer) {
    }

  ngOnInit() {
    const customerId = sessionStorage.getItem('userId');
    this.dtOptions = {
      pagingType: 'full_numbers',
      pageLength: 10,
     processing: true
   };
     this.customerService.getprojectList(customerId).subscribe(data => {
     this. projects=data;
      this.temp_var=true;
    });
  }
  deleteProject(projectId)
  {
    this.http.get('http://localhost:8090/delete/'+projectId)
      .subscribe(res => {
        window.location.reload();
        }, (err) => {
          console.log(err);
        }
      );
  }

}

I have integrated j Query Data table in my Angular 6 application,i want to know How to refresh j Query data table in angular 6 app after event performed like delete and update records In Data table I'm going to delete project in the table i need to refresh i have tried many ways to do this.if any one know the answer please update

A: 'datatable="ng"' use this attribute on your table tag Or
follow this two link, and use rerender method of angular-datatables
http://l-lin.github.io/angular-datatables/#/getting-started
http://l-lin.github.io/angular-datatables/archives/#!/rerender

A: You have not taken the stream back from server after deletion,
way 1. Get the new project data after the get(i am assuming you are performing the delete in this api) and reassign the projects variable,
this.http.get('http://localhost:8090/delete/'+projectId)
  .subscribe(res => {
    // assuming res returns updated list of projects
    this.projects = res.projects;
    }, (err) => {
      console.log(err);
    }
  );

way 2: you could have used the delete method of the REST end point and performed the same operation given above in way 1

A:     this.http.get('http://localhost:8090/delete/'+projectId)
    .subscribe(res => {
    this.projects.length = 0 // use this before getting response
    this.projects = res.projects;
    $('#tblProjects').DataTable().destroy // use these two lines after getting response <--------
    this.dtTrigger.next()
    }, (err) => {
    console.log(err);
    }
    );


text:
Q: Add properties of unknown name to expando object I wanna do something like this:
 dynamic eo = new ExpandoObject();
    var line = sr.ReadLine();
    if (line.Contains(":"))
    {
        var data = line.Split(':');
        if (data.Length >= 2)
        {
            eo.data[0] = data[1];
        }
    }

That is : add a property which name is located inside this array.
I get :  'System.Dynamic.ExpandoObject' does not contain a definition for 'data'
I want to create this property at run time : the name of the property must be the same as the name of the value which is inside the data array at position 0

A: Your question is a bit ambiguous, but:
Assuming data[0] contains the string "hello" and data[1] contains the string "world", I believe what you're trying to do is this (pseudocode):
eo.hello = world;

If so, you can simply cast the ExpandoObject to IDictionary<string, object>:
var dictionary = eo as IDictionary<string, object>;
dictionary.Add(data[0], data[1]);


text:
Q: Making Bamboo detect items removed from git repo I use Bamboo CI to manage my git repos for Salesforce development. It runs my tests after each commit and if successful, then deploys to an org. This all works wonderfully except for when I've deleted files, because Salesforce needs a special xml built-up in order to remove them from the org.
What I want to know is how I can add a step to my build process that will extract a list of any files which have been removed from git since the last build. I can handle the parsing of that information myself, but how can I get it?
Note: The deployments only run when things are stable, meaning that there might be many commits between last run and current run. Bamboo does provide variables for current revision number and previous revision number, so how could I use that to my advantage?

A: You can get a list of the deleted files from the latest commit using git show and grep:
  > git show --summary HEAD | grep "delete mode"
   delete mode 100755 test.file

A: Solved it using

git log --pretty=format: --name-only --diff-filter=D ${bamboo.repository.previous.revision.number}..HEAD --summary | sort -u > removals.txt

results in a nice clean output of removed files


text:
Q: RoutePrefix Not Found in WebApi 2,2 I have build a Web API 2.2 project using Visual Studio 2015 Community Edition. Attribute RoutePrefix is not found. After searching the internet, I found PM Console Command : Update-Package Microsoft.AspNet.WebApi.Core -reinstall. It solved the problem but as soon as I right click on the Solution and Click Rebuild Solution. Attribute RoutePrefix again starts giving error of not found. Can anybody tell me what is wrong with Visual Studio.

A: Add a RoutePrefix attribute to the controller. This attribute defines the initial URI segments for all methods on the controller.
[RoutePrefix("api/Employee")]
public class EmployeeController : ApiController
{
    // ...
}


text:
Q: Why is $\sup_{n \in \mathbb{N}}\Big|\frac{n-1}{n}z_n\Big|\le\sup_{n \in \mathbb{N}}\Big|\frac{n-1}{n}\Big|\sup_{n \in \mathbb{N}}\Big|z_n\Big|$ $\sup_{n \in \mathbb{N}}\Big|\frac{n-1}{n}z_n\Big|\le\sup_{n \in \mathbb{N}}\Big|\frac{n-1}{n}\Big|\sup_{n \in \mathbb{N}}\Big|z_n\Big|$
when $z_n$ is a bounded sequence $\in \mathbb{C}$.

A: Let $a_n:=\frac{n+1}{n}$ and $c_n:=a_n|z_n|$. We want to estimate $\sup c_n$. Now, since $a_n\ge 0$,
$$
c_n\le (\sup_m a_m)|z_n|\le (\sup_m a_m)(\sup_k |z_k|), $$
so taking the $\sup$ of both sides yields
$$
\sup_n c_n \le  (\sup_m a_m)(\sup_k |z_k|),$$
as we wanted.


text:
Q: Error in last 3 months calculation in PowerBi calculating the last 3months or average was working in one PBIX file.
Now when I try to use it in another it comes up empty.
Naming seems to be right and the Calendar is a copy from the working PBIX.
What can have gone wrong between the two files, is there something obvious you can see?
Is there something I should check and possibly change?
SLS L3m (USD) =

var months = 3
var sum_period =
CALCULATE(
[Sales (USD)],
DATESINPERIOD('Calendar'[Date] , FIRSTDATE('Calendar'[Date])+1 , -months, MONTH )
)
return
IF( NOT(ISBLANK([Sales (USD)])), sum_period)
INV avg L12m (USD) =

var months = 12
var sum_period =
CALCULATE(
[Inventory (USD)],
DATESINPERIOD('Calendar'[Date] , LASTDATE('Calendar'[Date]) , -months, MONTH )
)
return
IF( NOT( ISBLANK( [Inventory (USD)] )), sum_period/months )
enter image description here


text:
Q: JQuery Accordion Tabs + Datatables If you have a Datatable (with sortable table headers) inside of a JQuery Accordion tab, what is the best way to simulate clicking a specific table header the moment the user opens the Accordion tab to view your table?
Since the Datatable's width and other relevant info isn't actually calculated until the accordion is viewed (thereby showing the Datatable for the first time at that point), I feel the use of fnAdjustColumnSizing() is required, but that alone doesn't simulate clicking on a specific column of in the table header.
Any ideas?

A: Your question is confusing.  Write what you are trying to accomplish and show some code.  To simulate clicking a header use this on the header selector
jQuery(document).ready(function(){
    $('.accordion .head').click(function() {

  ("#selector").simulate("click");

});

Edit:
$('selector').trigger('click')


text:
Q: Is there a way to use the brms function bayes_factor without having to refit models to not have prior samples? In the brms package the function bayes_factor allows you to compare two models. Personally, I prefer the WAIC or LOO methods of comparing, but it is helpful to have both these and bayes factors for those who like bayes factors for these purposes.
I fit my models with the option to save prior samples in order to be able to use the hypothesis function to obtain Savage-Dickey Bayes Factors for point null hypotheses. Because of this attempting to use the bayes_factor function to compare whole models throws the error message " Models including prior samples are not usable in method 'bridge_sampler'."
Is there a way to get rid of the prior samples or make bayes_factor ignore them in order to use this function without having to wait what can sometimes be a very long time to refit my models without the prior samples?
Again, I'm aware of the superiority of WAIC for model comparison, but not everyone I communicate results with feels that way.


text:
Q: Повышение порядка значения Как можно из 4 и 2 получить 400, ни за что более не цепляясь?

На основе следующего прототипа создайте функцию mag(), повышающую порядок значения переменной num до того уровня, который задан переменной order:
void mag (long &num, long order);

Например, если переменная num равна 4, а переменная order равна 2, то после выполнения функции mag() переменная num должна стать равной 400. Напишите демонстрационную программу, показывающую, что функция работает.

A: Могу предложить такое решение: Если правильно понял задачу.
Для всех случаев. Если есть отрицательный порядок, или нужно кидать исключения или ставить максимальное значение типа, при его превышении.
//#define USE_EXCEPTION  // выбрасывать исключение при превышении значения long
#define NEGATIVE_ORDER // при отрицательном порядке уходит в минус, иначе значение 0

void mag(long &num, long order)
{
if(order > 0)
{
for(long i = 0; i < order; i++)
{
if(((long long)num * 10) > LONG_MAX){num=LONG_MAX;
#ifdef USE_EXCEPTION
throw(std::exception("Превышено максимальное значение LONG 2147483647"));
#endif
break;}else{num *= 10;}
}
}

if(order < 0)
{
bool negative = false;
for(long i = 0; i > order; i--)
{

#ifdef NEGATIVE_ORDER
if(negative==true || (num / 10) <= 0)
#else
if(5<3)
#endif
{
negative = true;
if(((long long)num * 10) > LONG_MAX)
{
num=LONG_MAX;
#ifdef USE_EXCEPTION
throw(std::exception("Превышено минимальное значение LONG -2147483647"));
#endif
break;
}else
{
num = num * 10;
}
}
else
{
num = num / 10;
}

}
if(negative)
{
num = -num;
}
}

}

int main()
{
std::system("chcp 1251");

try
{
{//
long num = 214748364;
long order = 1;
mag(num,order);
std::cout << "\nmag=" << num;
}

{// переполнение
long num = 4;
long order = 30;
mag(num,order);
std::cout << "\nmag макс=" << num;
}

{
long num = 400;
long order = -2;
mag(num,order);
std::cout << "\nmag отрицательный=" << num;
}

{
long num = 400;
long order = -40;
mag(num,order);
std::cout << "\nmag мин=" << num;
}
}
catch(std::exception e)
{
std::cout << "\n\n#!#ИСКЛЮЧЕНИЕ#!#\a \n--" << e.what() << "--";
}

std::cout << "\n";
std::system("pause");
return 0;
}

A: void mag(long &num,long order)
{
    for (; order; order--) {
        num=num*10;
    }
}

int main(int argc, const char * argv[]) {

    long x=4;
    mag(x, 2);
    cout<<x;
    return 0;
}


text:
Q: How to use query-replace on filesets in emacs Emacs documentation states that you can use query-replace on filesets to perform find/replace on multiple files.

This lets you perform certain operations, such as visiting,
  query-replace, and shell commands on all the files at once.

I've opened my particular fileset (i.e. via fileset-open) and attempted query/replace using both:
M-%

and
M-x query-replace

but can't get it to work on anything but the file (buffer) I'm currently in.

A: In order to run a command on all the files in a fileset, you have to use the filesets-run-cmd function and the command should be one of the commands that are specified in the filesets-commands variable. Specifically, in your case, you are supposed to run M-xfilesets-run-cmdQuery Replace.

(filesets-run-cmd &optional CMD-NAME FILESET MODE)
Run CMD-NAME (see `filesets-commands') on FILESET.

filesets-commands
Commands to run on filesets. An association list of names, functions, and an argument list (or a function that returns one) to be run on a filesets' files.


text:
Q: Action Script 3. How to avoid collision with background? I'm creating simple flash game. I've added collisions for character with walls, stages, etc. But as I see for now collisions are with all objects which I add to stage. When I add background - character can't move (because is collision with background). How to avoid It?
Here is myCollisionList with character (Hero):
        var myCollisionList:CollisionList = new CollisionList(Hero);
        myCollisionList.addItem(stage1);
        myCollisionList.addItem(stage2);
        myCollisionList.addItem(stage3);

Here is part of code for moving character to left side. When added background I always get trace("Touching wall!"). How to avoid It?
     if(left){
                                Hero.x_speed = -walkspeed;
                                setDirection(1);

                                if(myCollisionList.checkCollisions().length > 0) { // checking if is anything in collision list

// I think here is problem, but don't know how to fix It?
             if (hitTestPoint(char.x - 26, char.y+20, true)){ //checking if character touching any object (have collision with anything)

                                    trace("Touching wall!");
                                    Hero.x_speed = 0;
                                }
                                else {
                                    Hero.x_speed = 8;
                                }}

I've tried to use HitTestObject too (but if possible I need to use HitTestPoint)
if (Hero.HitTestObject(stage1 || stage2 || stage3)){
.....
}

But It works only with first stage1, for other 2 doesn't work.

A: I guess your main class is a DisplayObject, otherwise
hitTestPoint(char.x - 26, char.y+20, true)

would throw an error, as it is testing the point against itself for hits. Since i guess your background is a children of this object, the pixels of the background collide with the point.
Try calling
stage1.hitTestPoint(char.x - 26, char.y+20, true)

etc...
also
if (Hero.HitTestObject(stage1 || stage2 || stage3))

is incorrect, i think you are looking for
if (Hero.HitTestObject(stage1) ||
    Hero.HitTestObject(stage2) ||
    Hero.HitTestObject(stage3))


text:
Q: Why does React-Webcam on mobile quality look so bad compared to native mobile camera? When using React-Webcam Demo on mobile, the quality always looks absolutely terrible compared to Native Mobile Camera.
Is there any way to make React-Webcam, or access the camera from React that's close as possible to native quality? Right now, the webcam feed is extremely grainy and there's no focus option.
Just adding in options like screenshotQuality, setting the width/height or aspect ratio still makes it a far cry from native camera quality.
Or is the only option to use something like React Native to access the mobile's actual camera device?


text:
Q: Need help writing a script to separate my .flac files into a separate folder library So I have a music folder full of different file formats all mixed together.  It IS well-structured: Music/[Artist Name]/[Album Name], with compilation albums in a folder called "Various".  Some folders contain just .mp3, .m4a, or .flac files, and some have multiple versions of the album in different file formats.  There are also of course various .jpegs of cover art and many of the artist folders contain a .jpeg of the artist's portrait, and there are also many miscellaneous .cue and .log files and other junk.
What I want to end up with is a separate music folder for .flac files, retaining the existing folder structure, removeing them from the existing library.  I don't want to end up with empty folders in my current library either, where the album was only in flac.  In cases of album folders with multiple formats, I want to move the flacs to the new library along with the cover art, but of course keep the existing cover art in place as well.
I haven't been able to find an application capable of handling this, but I figured a shell script could probably handle it.  However I am pathetic with bash and really don't want to break my library.
The files are on a remote disk that I can access with mac, windows, or linux so any approach is good.
Just to fully clarify, here's the logic I'm hoping to code:

*

*Find each subdirectory of /Music that contains .flac files

*Copy each of these directories in their entirety (and intermediate parent directories) to a new location in /FLAC, but exclude other audio filetypes (.mp3, .m4a, etc.) from the copy.

*If the directory has no other audio filetypes than .flac, delete the entire directory.  If it DOES have other audio files, just delete the .flac files.

*Do one final sweep through all of /Music to delete any directory that contains no audio files in itself or any subdirectory.

A: Here's another approach:
find . -type f -name \*.flac -printf "%h\n" |
sort -u |
while read -r dirname; do
    new="../flac/$dirname"
    echo mkdir -p "$new"
    echo mv "$dirname"/*.flac "$new"
    jpgs=("$dirname"/*.jpg)
    [[ ${#jpgs[@]} -gt 0 ]] && echo cp "$dirname"/*.jpg "$new"
done

*

*find with -printf will print out the directory name of each flac file (relative to the current directory

*sort -u to remove the duplicates -- now you have a list of directories containing flac files

*the while loop iterates over the directories, clones the directory hierarchy under another directory (amend to suit your needs), moves the flac files, and copies jpg files if there are any.

Remove the echo commands if you're satisfies it works for you.

A: First make a new parent folder, e.g. "MusicNew" which should be equivalent to the existing 'Music' folder. Then assuming your description of sub-folders and file type that you want to copy, the following lines of code should work.
IFS='\n'
for i in `find Music -mindepth 2 -maxdepth 3 -type f -name "*flac"`;
do
    echo ${i};
    newfold=`echo ${i} | sed -e 's/Music/MusicNew/g'`;
    filename=`basename ${i}`;
    fulldirpath="${newfold:0:${#newfold} - ${#filename}}";
    echo $fulldirpath/${filename};
    mkdir -p ${fulldirpath};
    mv ${i} ${fulldirpath}/;
done


text:
Q: Is there a point to learning Linux-specific APIs? I'm starting to move from Windows to Linux development. In the process, I need to "forget" all of the familiar Windows APIs (WaitForSingleObject, CreateTimer etc.) and learn a bunch of Linux specific APIs instead.
So, my question is... should I?
I mean, if cross platform libraries like Boost are commonly used in the Linux community, do I really need to learn ahead the Linux-specific APIs?
I'm well aware that it would be a good idea to be at least familiar with the APIs, but... what is most common in the professional industry? Do most Linux-focused software companies use cross platform libraries, or OS specific APIs?

A: It depends on how complicated things you are going to use/need. For example Linux has SEM_UNDO option for System V semaphore, which is not available, when boost is used. In general, boost portability does not come for free, you will be able to use only common subset of different O/S possibilities. If this is enough for you, go for boost and do not handle (sometimes) obscure low level API. This should not only make your programs more portable (to some extent), but also less error-prone.

A: As a pure C programmer, I rely on the long-time-successful POSIX standard. This is, for me, the best portable API I have ever used across UNIX-based systems. As @Shi points out in a comment, whether you're developing for embedded or desktop/server computers is important because Boost is quite heavy. I'm also an embedded systems developer and the POSIX standard is also quite portable even for uCLinux (a tiny tiny Linux port for embedded systems).
I think the strength of the POSIX standard resides on its low-level of implementation. It deals with fundamental computer concepts (device I/O, memory management, IPC,...) that unlikely change along the years. We are used to see changes in the way we interact with computers, not in the way computers actually work, and the POSIX standard is powerful due to its maturity on dealing with how computers work. Indeed, I'm in love with those magic functions as fork(), pipe(), read() and write() :-)


text:
Q: window.open doesn't open the link address stored in react useState I load a link address from a firestore document into a react state variable and use window.open({state_variable}) giving the state_variable as argument which should open the link address stored in the variable in a new tab but instead it opens a local link of the form:

I have created a handleUpload function for a button that uploads an image to firestore and then i call the function window.open({state_variable})

A: I believe it must be thinking its an object because you are using the curly {} which you shouldn't need, please try like this:
window.open(state_variable)
best regards


text:
Q: Showing the existence of the $\omega_\omega$-th power set of $\omega$ Can you tell me if my answer is correct:
Show that the set $P^{\omega_\omega}(\omega)$ exists.
My answer:
Let $P^0 (\omega) = \omega$, $P^{\alpha + 1}(\omega) = P(P^\alpha (\omega))$ and for a limit ordinal $\lambda$ let $P^\lambda (\omega)  =\bigcup_{\beta < \lambda} P^\beta (\omega)$.
The transfinite recursion theorem tells us that if $G: V \to V$ is a class function from the class of all sets to the class of all sets then there exists a unique function $F: ON \to V$ with $F(\alpha) = G(F\mid_\alpha)$.
Hence to show the existence of $P^{\omega_\omega}(\omega)$ we need to define a $G: V \to V$ with $G(F\mid_{\omega_\omega}) = P^{\omega_\omega}(\omega) = F(\omega_\omega)$.
Also we know that for successor ordinals $\alpha$ we want $F\mid_{\beta + 1} = F(\beta) = P^{\beta}(\omega)$. So for successor ordinals $\alpha = \beta + 1$ we define $G(F\mid_{\alpha})= G(F\mid_{\beta + 1}) = G( P^{\beta}(\omega)) := P( P^{\beta}(\omega))$.
We also know that $F\mid_\varnothing = \varnothing$ so $G(F\mid_\varnothing) = G(\varnothing) := P^0 (\omega)$.
Finally, if $\lambda$ is a limit ordinal we want $G(F\mid_\lambda) := \bigcup_{\alpha < \lambda} P^\alpha (\omega)$.
For all other sets we define $G$ to map to the empty set.
Thanks for your help.

A: Yes, your formalization of this instance of the transfinite recursion is correct.
One quibble is that when defining $G$, you shouldn't refer to $P^\beta(\omega)$ at all, since this makes your definition circular. Similarly, you shouldn't think of $G$ as defined on the unique $F$ you are trying to build, since you don't have it yet when defining $G$. Thus, you should define $G(f)$ to be $P(f(\beta))$, when $f$ is a $\beta+1$-sequence, and in the limit case, $F(f)=\bigcup_{\alpha\lt\lambda}f(\alpha)$, when $f$ is a $\lambda$-sequence for limit ordinal $\lambda$.
But I would add that I don't find it necessary to give a laborious definition of $G$ as you do in the latter part of your post. Your initial definition of $P^\beta(\omega)$ in the fourth line of your post already contains a complete definition of $P^\beta(\omega)$ from earlier instances of $P^\alpha(\omega)$, and thus serves as a complete account of the recursion. The detailed definition of $G$ that you give amounts basically to rewriting that initial definition in more detail. But the recursion is perhaps clearer without the extra detail (provided that one is clear on why recursion works).


text:
Q: Hibernate: Batch delete with executeUpdate() does not clear first level cache My intention is to use executeUpdate() to perform a single DELETE instead of looping through session.delete(), which is incredibly chatty.
The problem I'm facing is by doing executeUpdate(), it doesn't evict the existing deleted entities from first level cache.
Here's a very simple example:-
final Session session = sessionFactory.getCurrentSession();

System.out.println("---------------------------------");
System.out.println("What's currently in 1st level cache");
System.out.println("---------------------------------");

for (Object o : session.getStatistics().getEntityKeys()) {
    EntityKey entityKey = (EntityKey) o;
    System.out.println(entityKey.getEntityName() + " -> " + entityKey.getIdentifier());
}

System.out.println("---------------------------------");
System.out.println("Ensure there are 3 project users");
System.out.println("---------------------------------");

checkArgument(session.createQuery("from ProjectUser").list().size() == 3);

System.out.println("---------------------------------");
System.out.println("Deleting all 3 project users");
System.out.println("---------------------------------");

checkArgument(session.createQuery("delete from ProjectUser").executeUpdate() == 3);

session.flush();

System.out.println("---------------------------------");
System.out.println("Latest state in 1st level cache");
System.out.println("---------------------------------");

for (Object o : session.getStatistics().getEntityKeys()) {
    EntityKey entityKey = (EntityKey) o;
    System.out.println(entityKey.getEntityName() + " -> " + entityKey.getIdentifier());
}

This is the print out I'm seeing:-
---------------------------------
What's currently in 1st level cache
---------------------------------
testHibernate.domain.ProjectUser -> 2
testHibernate.domain.ProjectUser -> 1
testHibernate.domain.User -> 1
testHibernate.domain.ProjectUser -> 3
testHibernate.domain.User -> 3
testHibernate.domain.Project -> 1
testHibernate.domain.User -> 2
---------------------------------
Ensure there are 3 project users
---------------------------------
Hibernate:
    select
        projectuse0_.projectUserId as projectU1_1_,
        projectuse0_.datetime as datetime2_1_,
        projectuse0_.projectId as projectI3_1_,
        projectuse0_.userId as userId4_1_
    from
        projectUser projectuse0_
[TRACE] [BasicExtractor] [extract:74] - Found [1] as column [projectU1_1_]
[TRACE] [BasicExtractor] [extract:74] - Found [2] as column [projectU1_1_]
[TRACE] [BasicExtractor] [extract:74] - Found [3] as column [projectU1_1_]
---------------------------------
Deleting all 3 project users
---------------------------------
Hibernate:
    delete
    from
        projectUser
---------------------------------
Latest state in 1st level cache
---------------------------------
testHibernate.domain.ProjectUser -> 2
testHibernate.domain.ProjectUser -> 1
testHibernate.domain.User -> 1
testHibernate.domain.ProjectUser -> 3
testHibernate.domain.User -> 3
testHibernate.domain.Project -> 1
testHibernate.domain.User -> 2

As you can see, testHibernate.domain.ProjectUser entities are still lingering around in 1st level cache even though they are already deleted.
My question is how do I clear the deleted entities from first level cache using executeUpdate() approach? Is there any official documentation explaining about this problem?
Thank you.

A: Here's my solution but it's really untidy.
BaseEntity is just a base class for all our entities.
@PersistenceContext
transient EntityManager entityManager;

@SuppressWarnings("unchecked")
public void evict(Class<? extends BaseEntity> c)
{
    HibernateEntityManager hem = entityManager.unwrap(HibernateEntityManager.class);

    Session session = hem.getSession();

    Query query = session.createQuery("select o from " + c.getSimpleName() + " o where isObsolete = false AND isDeleted = false");

    List<? extends BaseEntity> entities = (List<? extends BaseEntity>) query.list();

    for (BaseEntity e : entities)
    {
        session.evict(e);
    }
}


text:
Q: .NET C/C++ P/INVOKE exception Runnnig this code getting this error, could any one help figure out what is going on here?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Runtime.InteropServices;

namespace LSATest
{
class Program
{

    public static List<string> listBox1 = new List<string>();
    static void Main(string[] args)
    {
        DateTime systime = new DateTime(1601, 1, 1, 0, 0, 0, 0); //win32 systemdate

        UInt64 count;
        IntPtr luidPtr = IntPtr.Zero;
        LSAClass.LsaEnumerateLogonSessions(out count, out luidPtr);  //gets an array of pointers to LUIDs

        IntPtr iter = luidPtr;      //set the pointer to the start of the array

        for (ulong i = 0; i < count; i++)   //for each pointer in the array
        {
            IntPtr sessionData;

            LSAClass.LsaGetLogonSessionData(iter, out sessionData);

            LSAClass.SECURITY_LOGON_SESSION_DATA data = (LSAClass.SECURITY_LOGON_SESSION_DATA)Marshal.PtrToStructure(sessionData, typeof(LSAClass.SECURITY_LOGON_SESSION_DATA));

            //if we have a valid logon
            if (data.PSiD != IntPtr.Zero)
            {
                //get the security identifier for further use
                System.Security.Principal.SecurityIdentifier sid = new System.Security.Principal.SecurityIdentifier(data.PSiD);

                //extract some useful information from the session data struct
                string username = Marshal.PtrToStringUni(data.Username.buffer).Trim();      //get the account username
                string domain = Marshal.PtrToStringUni(data.LoginDomain.buffer).Trim();    //domain for this account
                string authpackage = Marshal.PtrToStringUni(data.AuthenticationPackage.buffer).Trim();    //authentication package

                LSAClass.SECURITY_LOGON_TYPE secType = (LSAClass.SECURITY_LOGON_TYPE)data.LogonType;
                DateTime time = systime.AddTicks((long)data.LoginTime);                  //get the datetime the session was logged in

                //do something with the extracted data, ie, add to a display control....
                listBox1.Add("User: " + username + " *** Domain: " + domain + " *** Login Type: (" + data.LogonType + ") " + secType.ToString() + " *** Login Time: " + time.ToLocalTime().ToString());

            }
            iter = (IntPtr)((int)iter + Marshal.SizeOf(typeof(LSAClass.LUID)));  //move the pointer forward
            LSAClass.LsaFreeReturnBuffer(sessionData);   //free the SECURITY_LOGON_SESSION_DATA memory in the struct
        }
        LSAClass.LsaFreeReturnBuffer(luidPtr);   //free the array of LUIDs

    }
}

}

A: The error is because sessionData is null. That's because LsaGetLogonSessionData is failing. To diagnose this further, you need to start paying attention to the return value of the API functions and checking error codes in case of failure. That's your next step.
As an aside, you have declared the count variable incorrectly. In the C header file it is declared as ULONG. That's an unsigned 32 bit integer which makes it uint in C#. I've not checked anything more than this.


text:
Q: WooCommerce Short_Description in details order before product title I'm using Woocommerce Short_Description in Details Order
Unfortunately, the short description of the product is displayed in second place.

*

*Product name with link

*Short product description

*Design / (variants of products)

*Article number (SKU NUMBER)

But I need the Short product description FIRST!

*

*Short product description

*Product name with link

*Design / (variants of products)

*Article number (SKU NUMBER)

How can I do this / what should the code be?

A: self-help - problem solved
add_filter( 'woocommerce_order_item_name', 'add_single_excerpt_to_order_item', 10, 3 );
function add_single_excerpt_to_order_item( $item_name, $item, $is_visible ){
    $product_id = $item->get_product_id(); // Get the product Id
    $excerpt = get_the_excerpt( $product_id ); // Get the short description

    return $excerpt . $item_name;
}


text:
Q: How to fill a typescript class model in angular I created a class model and I don't know how to fill a class with values.
User.ts
export class User {
    constructor(
        username: string,
        password: string,
        token: string
    ) { }
}

app.component.ts
  ngOnInit() {

    let user = new User('uname' , 'pword', 'sampletoken');
    console.log(user);
  }

When I run this, the user is still empty.

A: Add access specifiers to constructor arguments for making it as a class property. Otherwise it will be considered as, properties in constructor method scope only.
User.ts
export class User {
    constructor(
        public username: string,
        public password: string,
        public token: string
    ) { }
}

A: The alternate way is you can also do this way :-
export class AppComponent  {
  name = 'Angular 6';

  constructor(){
     let user = new User({username: 'abc', password: '1234', token: 1});
     console.log(user);

  }
}

    class User {
        public username?: string;
        public password?: string;
        public token?: number;

        constructor(values: User) {
          Object.assign(this, values);
        }
    }

Here is the link you can check it in console..
CodeSandbox demo

A: You've forgot to add variables and assign them in constructor:
export class User {
    username: string;
    password: string;
    token: string;

    constructor(username: string,
                password: string,
                token: string) {
         this.username = username;
         this.password= password;
         this.token= token;
    }
}

A: Try like this:
Working Demo
export class User {
  username: string;
  password: string;
  token: string;
  constructor(username: string, password: string, token: string) {
    this.username = username;
    this.password = password;
    this.token = token;
  }
}

A: I will show you with an example how you can use one class in angular.
items.ts
import { Injectable } from '@angular/core';

@Injectable()
export class Items {
  items: Item[] = [];

  defaultItem: any = {
    "name": "Burt Bear",
    "profilePic": "assets/img/speakers/bear.jpg",
    "about": "Burt is a Bear.",
  };

  constructor(public name: string) {
    let items = [
      {
        "name": "Burt Bear",
        "profilePic": "assets/img/speakers/bear.jpg",
        "about": "Burt is a Bear."
      }
    ];

  }

}

lets check how to grab these data
item-details.ts
import { Items } from '../../providers';

export class ItemDetailPage {
  item: any;

  constructor(items: Items) {
    this.item =  items.defaultItem;
  }

}


text:
Q: SSH.NET RunCommand To Save Command Output to File I'm trying to run a command on a remote server via SSH.
I need the output of the command that is run to be saved in a file on that remote server.
I've been attempting to this the following way
// ssh is the SshClient which is already set up
ssh.Connect();
ssh.RunCommand("echo 1 > C:\test.csv"); //Doesn't create a file
ssh.Disconnect();

Why doesn't this work with SSH.NET? If I run this via putty using the same credentials it works perfectly fine.
EDIT (Working Code):
I did some more playing around and have found the following to work:
// ssh is the SshClient which is already set up
ssh.Connect();
var shell = ssh.CreateShellStream("cmd.exe", 80, 24, 800, 600, 1024);
var reader = new StreamReader(shell);
var writer = new StreamWriter(shell);
writer.AutoFlush = true;

while (!shell.DataAvailable)
    System.Threading.Thread.Sleep(1000); //This wait period seems required

writer.WriteLine("echo 1 > C:\test.csv");

while (!shell.DataAvailable)
    System.Threading.Thread.Sleep(1000); //This wait period seems required

ssh.Disconnect();

While that works I still don't understand what's really happening here. Could someone explain?

A: Try this function:
Just save the result to a variable or write the result using StreamWriter
private void writeMe()
{
    using (StreamWriter sw = new StreamWriter(filename)
    {
        string result = eSshCom(command);
        sw.WriteLine(result);
    }
}

private string eSshCom(string getCommand)
            {
            this.res = "";

            var connectionInfo = new KeyboardInteractiveConnectionInfo(ipaddress, 22, username);

            connectionInfo.AuthenticationPrompt += delegate(object asender, AuthenticationPromptEventArgs xe)
            {
                foreach (var prompt in xe.Prompts)
                    {
                    if (prompt.Request.Equals("Password: ", StringComparison.InvariantCultureIgnoreCase))
                        {
                        prompt.Response = password;
                        }
                    }
            };

            using (var ssh = new SshClient(connectionInfo))
                {
                    ssh.Connect();
                    var cmd = ssh.RunCommand(getCommand);
                    this.res = cmd.Result;
                    ssh.Disconnect();

                }
            return this.res;
            }


text:
Q: Datagridview won't change checkbox of first row (vb.net) I have a datagridview (here called cameraTable). One column of the datagridview is purely checkboxes. I have a button that when clicked will check all the boxes in the column, aka select all. Here's the code:
Private Sub btnSelectAll_Click(sender As Object, e As EventArgs) Handles btnSelectAll.Click

    For Each row As DataGridViewRow In cameraTable.Rows
        DirectCast(row.Cells("CheckBox"), DataGridViewCheckBoxCell).Value = _
            True
    Next
End Sub

The problem I'm having is that the initial box (i.e. row zero) never changes to checked. I tried these:
DirectCast(cameraTable(0, 0), DataGridViewCheckBoxCell).Value = True ' doesn't work
cameraTable.Rows(0).Cells(0).Value = True ' doesn't work

Neither change the box to checked, but the other rows within the column change without a problem. I even did a msgbox that prints out the value, and turns out to be "True". So the value of the checkbox has changed, but the check box in the datagridview is still unchecked. Any ideas?
Thanks for all the help!
-K

A: The datagrid will not get INotifyPropertyChanged events (or will not process them) for the row/cell that is currently selected. If you have other columns that can be edited, move the focused column to it.
If all else fails, reload the grid after seting the values by setting the datasource = nothing and then back to what it was.

A: Steve is right.  What I did was when the check box is clicked, I set the focus to another cell on that row (my dgv is set to FullRowSelect):
Private Sub dgv_CellContentClick(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgv.CellContentClick
  If e.ColumnIndex = iCBColIDX Then
    dgv.CurrentCell = dgv.Rows(e.RowIndex).Cells("sts")
  End If
End Sub

A: Make your checkbox column width=20 instead of 18.
No, I don't know why, but it helps.
Thanks this man.
PS. It isn't a joke, it's a bug.


text:
Q: ArcSDE register with gdb vs register as versioned When wanting to update tables within a sde gdb, is there a difference between registering as versioned vs registering with the gdb vs registering with sde?  I've read the question below and it hints that versioning is a subset of gdb registration.
I am hearing that Unregistering a table as versioned will allow the use of sql to update the table, I assume directly from say SSMS.
We are at ArcGIS for Server 10.1 and Microsoft SQL Server 2008 R2.
Difference between registering with ArcSDE and registering with Geodatabase?

A: Absolutely!  Registering a table with ArcSDE creates metadata in the SDE
user SDE_* tables.  Registering a table with the geodatabase does an
ArcSDE registration and populates XML metadata in the SDE.GDB_* tables.
Registering as versioned registers with the geodatabase and enables the
ArcSDE versioning capability on the table.  As such, I wouldn't describe
versioning registration as a subset -- it's more of a superset, though
it is possible to enable versioning on a table without geodatabase
registration (just not through the ArcGIS UI or via ArcObjects or Python).
Unregistering a table as versioned removes versioning.  You can always
update a versioned base table via a SQL client, but doing so will corrupt
the version tree of the instance (not exactly a recommended activity).
Note that unversioning does not unregister a table -- the cleanest way
to do that is to delete the table via ArcGIS (often with a
"CREATE TABLE newname AS SELECT * FROM tablename" to make a backup of
the table contents first).


text:
Q: Adding extra parameters in SWFUpload I'm trying to add an extra post parameter for each file uploaded using addFileParam, the documentation explains itself quite well but when I try to add anything it prepends the value to the size param, causing it to do something like this
SWF DEBUG:   'Filename' => 'image.jpeg',
SWF DEBUG:   'cnid' => 'up5121fcacd30besize=539321',
SWF DEBUG:   'Upload' => 'Submit Query',

When what I really need is this:
SWF DEBUG:   'Filename' => 'image.jpeg',
SWF DEBUG:   'cnid' => 'up5121fcacd30be',
SWF DEBUG:   'size' => '539321',
SWF DEBUG:   'Upload' => 'Submit Query',

My Javascript:
function onQueued(obj) {
    swfu.addFileParam(obj.id, 'cnid', 'up5121fcacd30be');
    swfu.startUpload();
}

Any idea what I could be doing wrong? I've tried wrapping the value like '"' too and I've also tried semi colons at the end. I'm using the Yelp version of swfupload as it seems most up to date.


text:
Q: Test whether command completed successfully in python script I have a python script that searches through a directory, and if any files were recently modified, it executes a command to run our modeling software along with another python script and generate a report. I have the report running currently, and I want to add on a section that if the report generation for some reason was aborted (the software didn't open, there was some error, etc), I want to know and send an email out stating that the run did not complete. Currently I have this below, but I realized that it returns zero since running the actual command worked, even if the report was not generated.

    ansa_call = "ansa_15.1.0 -nogui -exec
    load_script:/path/SubstructureSummary.py -exec 'SubstructureSummary (\""+path+"\")'"
    print ansa_call
    ret = os.system(ansa_call)
    print ret
    if ret != 0:
            print 'sending email'

I have injected an error into the secondary script 'SubstructureSummary.py' so that it will be forced to err. How do I grab a return value that shows the incomplete run?
Thank you!!

A: You say your script produces a report.  If this is a file and you know where it should be, then maybe the easiest and most robust way would be to do some checks to see if the output file looks OK?  Maybe check the timestamp, the file size, or other checks?
If the file is not there, or it looks corrupted, you send the email.