text:
Q: Commenting Generics - Is it possible to refer to generic type parameter not as T but as its actual type? Given a method like this:
/// <summary>
/// Given a <see cref="T1"/>, return a <see cref="T2"/>.
/// </summary>
public T2 ExampleMethod(T1 t1)
{
   // omitted
}

can I write a comment such that Visual Studio will correctly display it, if T1 is an int and T2 is a string, for example? Or, am I stuck with T1 and T2 appearing in the comment?
Said differently: is there something I can do so that in Visual Studio, the tooltip on this method shows the actual type names?
Edit: I seem to have not explained what I'm actually interested in knowing.
Suppose I have a class called Widget<T1,T2>. Suppose I have a method like the one above.
Then, when I do
Widget<int,string> myExample = new Widget<int,string>();

myExample.ExampleMethod(... );  // HERE - if I mouse over the method

// I get a tooltip. Is there something I can do to the comment in my
// example method above that will allow me to say
// "Given a System.Int32, return a System.String"?

Edit 2: Someone commented here a moment ago but their comment was deleted. They suggested I use
///Given a <see cref="T1"/>, return a <see cref="T2"/>.

Which is what I'm using now. This is fine. My question, phrased differently for the third time now, is Visual Studio smart enough to infer what T1 and T2 are from a constructor? I can figure out what T1 and T2 are from the method signature, and I thought maybe Visual Studio could do the same and support this in the comment.
My gut feeling is no, but hence the question.

A: To supplement @Martin Mulder's answer as well as a couple of the comments for this question, I have submitted a problem report to the Visual Studio developer community to fix this "issue" as a feature request. I have basically requested that the Intellisense, when hovering over a statement that substitutes a generic for a specific type, shows the specific type in the comments when using the <typeparamref name=""/>  tag in the comments. I am not sure if doing the same when using <see cref=""/> is appropriate, but if you feel like it is, feel free to add a comment to the problem report to request its inclusion in a fix!
Substitute Generics For Actual Type In Intellisense For XML Comments

A: No, Visual Studio does not support that. You should ask yourself why you would want to use the specific type in your comments.
A good method documentation is done by describing it function in non-technical terms. And describe its parameters by using clear names and a good description what is expected of that parameter. The type is hardly ever need. If you do need it, you probably are trying to document your methods in a thechnical way, which is hardly ever a good idea.


text:
Q: Is there an Search Location in mapbox ? To finding distance between the two places like google map I am trying to find distance between two places by searching the place name how to do it with mapbox in unity 3d
Thanks

A: Use this method:
 Distance(Double[], Double[])

Find the squared distance between two n-dimensional points.
Declaration:
public double Distance(double[] p1, double[] p2)

Parameters:
System.Double[] p1

The first point.
System.Double[] p2

The second point.
Returns:
System.Double, The n-dimensional squared distance.
Implements
DistanceFunctions.Distance(Double[], Double[])

redpajama_set_name: RedPajamaStackExchange


text:
Q: angular select 'track by' resets selected I'm struggling getting "selected" to work with 'track by' for Angular select element. I have the following select:
    <select id="licenseType" ng-model="selectedLicense"
            ng-options="key for (key, value) in licenseMap track by key"
            ng-change="doUpdate()">
    </select>

with this js:
$scope.selectedLicense = $scope.licenseMap["Please Select"];

The above js works when I get rid of 'track by key' - the initial selection gets preset. With 'track by key' in place the pre-selection is a blank. I need 'track by key' in place to get hold of selected value, it is the only thing that worked so far. I have tried teh following combination so far that did not work:
/*
var license = document.getElementById('licenseType');
license.options.selectedIndex = 1;
license.options[license.options.selectedIndex].selected = true;
$("#licenseType").val("Please Select");
$('#licenseType').children('option[value="1"]').attr('selected', true);
*/

I will most appreciate some help here getting it to work. Thank you.

A: do something like this: http://codepen.io/alex06/pen/XjarJd
div(data-ng-app="app")
 div(ng-controller="appController")
   select.form-control(ng-model="selectedItem", ng-options="option.value as option.name for option in typeOptions track by option.value" ng-init="selectedItem=typeOptions[0]")

(function(){
  'use strict'
  angular
    .module('app', [])
    .controller('appController', ['$scope', function($scope){

      $scope.typeOptions = [
        { name: 'Feature', value: 'feature' },
        { name: 'Bug', value: 'bug' },
        { name: 'Enhancement', value: 'enhancement' }
       ];
    }])
})()

The example is made in jade, but it's almost the same syntax.By the way, if you still want to work with an object instead of array you can also do this:
<!DOCTYPE html>
<html ng-app="app">

<head>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js">              </script>
  <link rel="stylesheet" href="style.css" />
  <script type="text/javascript">
    angular.module('app', [])
      .controller('IndexCtrl', ['$scope', function($scope) {
        $scope.types = {
          1: "value1",
          2: "value2",
          5: "value3"
        };
      }]);
    </script>
  </head>
  <body ng-app="app" ng-controller="IndexCtrl">
    <select ng-model="type" ng-options="k as v for (k, v) in types">
      <option value="">Please select</option>
    </select>
  </body>

</html>


text:
Q: How to know if cronjob is failing (running a python command) When I run this command, the output message is being saved into ok.txt:
 /home/admin/virtualenvs/x.com/bin/python /home/admin/www/x.com/x/app/manage.py help | tee ok.txt

I have this cronjob:
* * * * * /home/admin/virtualenvs/x.com/bin/python /home/admin/www/x.com/x/app/manage.py help | tee ok.txt

But nothing is saved to ok.txt
When I see the cron log
> sudo grep CRON /var/log/syslog

May 10 22:16:01 localhost CRON[23397]: (admin) CMD (/home/admin/virtualenvs/x.com/bin/python /home/admin/www/x.com/x/app/manage.py help | tee ok.txt)

No hints here, what am I doing wrong? thanks in advance.

A: try with this :
* * * * * /home/admin/virtualenvs/x.com/bin/python /home/admin/www/x.com/x/app/manage.py help > /tmp/ok.txt 2&>1

it should put all outputs (stderr and stdout) into your ok.txt file

A: first i see that you don't have the correct syntax for crontab:
Example of job definition:
.---------------- minute (0 - 59)
|  .------------- hour (0 - 23)
|  |  .---------- day of month (1 - 31)
|  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
|  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
|  |  |  |  |
*  *  *  *  * user-name command to be executed

you are missing the user-name.
And the second thing. Don't assume that your .bashrc is loaded. In cron you just get the environment that is defined on top of the file. So if your script is using something that you have defined in your bashrc then it might be, that it doesn't execute correctly.


text:
Q: GCP Bucket - create link for upload I've looked all over but can't seem to see how this might be done.
I have a GCP bucket, which is publicly accessible. I need a link to give to an associate which they can use to upload some files into that bucket. There is no need for authentication, the files are just public domain anyway. I need the process to be super simple for the associate.
Once the files are uploaded I can grab them and destroy the bucket/project anyway.
Is this possible?

A: Use a signed URL.  From the documentation (emphasis mine):

In some scenarios, you might not want to require your users to have a Google account in order to access Cloud Storage, but you still want to control access using your application-specific logic. The typical way to address this use case is to provide a signed URL to a user, which gives the user read, write, or delete access to that resource for a limited time. You specify an expiration time when you create the signed URL. Anyone who knows the URL can access the resource until the expiration time for the URL is reached or the key used to sign the URL is rotated.


text:
Q: Word for research method I'm doing research for my school and I have to describe the research method that I used.
I have had a conversation with a person in the company where I did my internship.
But I can't name the research method interviewing because it is not an interview. It's a conversation where the company explained the subject of the internship and answered some questions I had. If I name it an interview, my school will request me to have more interviews, because one interview is not a reason to do something.
Does anyone have an idea how to name this kind of research?

A: A face-to-face conversation would seem to cover it.

A: I postulate that you sought particular information from the person you had a conversation with and that being said you could label your research as an investigation.

Definition: a searching inquiry for ascertaining facts


text:
Q: Division of big numbers I need some division algorithm which can handle big integers (128-bit).
I've already asked how to do it via bit shifting operators. However, my current implementation seems to ask for a better approach
Basically, I store numbers as two long long unsigned int's in the format
A * 2 ^ 64 + B with B < 2 ^ 64.
This number is divisible by 24 and I want to divide it by 24.
My current approach is to transform it like
A * 2 ^ 64 + B     A             B
--------------  = ---- * 2^64 + ----
      24           24            24

           A               A mod 24                    B         B mod 24
= floor( ---- ) * 2^64 +  ---------- * 2^64 + floor( ---- ) +   ----------
           24               24.0                      24           24.0

However, this is buggy.
(Note that floor is A / 24 and that mod is A % 24. The normal divisions are stored in long double, the integers are stored in long long unsigned int.
Since 24 is equal to 11000 in binary, the second summand shouldn't change something in the range of the fourth summand since it is shifted 64 bits to the left.
So, if A * 2 ^ 64 + B is divisible by 24, and B is not, it shows easily that it bugs since it returns some non-integral number.
What is the error in my implementation?

A: Could this possibly be solved with inverse multiplication? The first thing to note is that 24 == 8 * 3 so the result of
a / 24 == (a >> 3) / 3

Let x = (a >> 3) then the result of the division is 8 * (x / 3). Now it remains to find the value of x / 3.
Modular arithmetic states that there exists a number n such that n * 3 == 1 (mod 2^128). This gives:
x / 3 = (x * n) / (n * 3) = x * n

It remains to find the constant n. There's an explanation on how to do this on wikipedia. You'll also have to implement functionality to multiply to 128 bit numbers.
Hope this helps.
/A.B.

A: The easiest way I can think of to do this is to treat the 128-bit numbers as four 32-bit numbers:
A_B_C_D = A*2^96 + B*2^64 + C*2^32 + D

And then do long division by 24:
E = A/24 (with remainder Q)
F = Q_B/24 (with remainder R)
G = R_C/24 (with remainder S)
H = S_D/24 (with remainder T)

Where X_Y means X*2^32 + Y.
Then the answer is E_F_G_H with remainder T. At any point you only need division of 64-bit numbers, so this should be doable with integer operations only.

A: You shouldn't be using long double for your "normal divisions" but integers there as well. long double doesn't have enough significant figures to get the answer right (and anyway the whole point is to do this with integer operations, correct?).

A:
Since 24 is equal to 11000 in binary, the second summand shouldn't change something in the range of the fourth summand since it is shifted 64 bits to the left.

Your formula is written in real numbers. (A mod 24) / 24 can have an arbitrary number of decimals (1/24 is for instance 0.041666666...) and can therefore interfere with the fourth term in your decomposition, even once multiplied by 2^64.
The property that Y*2^64 does not interfere with the lower weight binary digits in an addition only works when Y is an integer.

A: Don't.
Go grab a library to do this stuff - you'll be incredibly thankful you chose to when debugging weird errors.
Snippets.org had a C/C++ BigInt library on it's site a while ago, Google also turned up the following: http://mattmccutchen.net/bigint/


text:
Q: Passing Byte (VB.NET) I need to pass encoded string to php page.
To convert string to iso:
Dim result As Byte() = Encoding.Convert(Encoding.UTF8, Encoding.GetEncoding("iso-8859-1"), input)

I have this code to pass string, but how I must do it to pass Byte (variable result) instead of the string (variable MyVarString)?
Dim client As WebClient
Dim data As Stream
Dim reader As StreamReader
Dim baseurl As String
baseurl = "http://example.com/api/mypage2.php"
client = New WebClient
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)")
client.QueryString.Add("mensaje", MyVarString)
data = client.OpenRead(baseurl)
reader = New StreamReader(data)
s = reader.ReadToEnd()
data.Close()
reader.Close()
Etc.

A: If your question is how to pass a byte array then just Base64 encode it:
Dim encResult = Convert.ToBase64String(result)

Then in PHP use the built-in decoder base64_decode(string)


text:
Q: Is every property of the integers provable? I've been researching provability of properties, and I came across and interesting argument which states that every property of the integers is provable, yet doesn't the incompleteness theorem tell us that this is false? The proof is:
Let $P(n)$ be a property of the integers. Let us assume that ($\forall n:P(n)$) is unprovable, therefore it is impossible to prove it false. This means that it is impossible to give a counterexample, and thus no such counterexample exists. Because no counterexample exists, the statement must be true, and is therefore provable (we just proved it), which is a contradiction.
Wouldn't this mean that all properties of the integers are provable?

A: One of many good strategies for understanding what's going on in a proof (whether it's a good proof or a bad proof) is to go through it with an example. You know that the incompleteness theorem should supply examples of properties $P(n)$ such that $\forall n : P(n)$ is unprovable, so let's pick one. The example I'll use is that $P(n)$ asserts that $n$ does not code a proof of a contradiction in Peano arithmetic (PA).
So $\forall n : P(n)$ asserts that PA is consistent, and by the incompleteness theorem, we know that PA cannot prove this statement unless it is itself inconsistent. So let's see what happens when we run this example through the proof. The problem is here:

Because no counterexample exists, the statement must be true, and is therefore provable

No! Part of the lesson of all this incompleteness business is that there can be statements that are true but unprovable, such as the consistency of PA (assuming it is true)!

(we just proved it)

We didn't prove it in PA! Whenever you say that a statement is unprovable, you mean unprovable with respect to some fixed axiom system, which here is PA. This proof is not a proof in that axiom system. Instead, it's a proof in a "metatheory" that we are using to analyze properties of axiom systems such as PA.
Also, assuming that $\forall n : P(n)$ is unprovable is equivalent to assuming that PA is consistent, and as we know, PA can't prove this.

A: This is true for certain types of expression $P$, but by no means all.
For example, if the statement is of the form $\exists m>n(Q(m,n))$, then there might not be an example.
And if this $P$ is true, it still might not be provable because you can find, for each $n$ a value $m$ by trial and error, but you can't prove it by a finite proof. Indeed, this is one of the limits of proof - the finiteness. For example, the Collatz Conjecture might be true, but it might not be provable with a finite number of steps.
How do you prove that you have a counter-example to the Collatz conjecture? It might not be possible.

A: No. The proof contains all sorts of badness. In any particularly useful definition of "provable" (i.e. provable by a consistent system with a recursively enumerable set of axioms), Godel's theorem does indeed hold. The fact that the proof doesn't address exactly what it means by "provable" is another issue altogether - and a slightly worse one is that it doesn't say what it means by "property".
Let me address two issues. The first is that what this proof actually claims is:

If $P(n)$ is unprovable, then $P(n)$ is true.

However, in order to extend this to $P(n)$ is provable, we would need to prove that $P(n)$ is unprovable, not just take it as an assumption. This proof does not suppose that we can prove $P(n)$ is unprovable - merely that it is. If we cannot prove $P(n)$ is unprovable, then we cannot prove it is true by the logic of the proof. It is actually a necessary consequence of Godel's theorem that there are statements which are unprovably unprovable (see here). The proof does nothing to fix this hole.
A much worse issue is that the proof assumes that it is "easy" to verify any counterexample. The proof is introducing another assumption in thinking that a counterexample would provably be a counterexample - really, the statement it proves is:

If $P(n)$ is unprovable, but one could construct a proof of $\neg P(n)$ for any counterexample $n$, then $P(n)$ is true.

We could consider something like the negation of Fermat's Last Theorem - in particular let $P(n)$ be the statement that there are solutions to $x^{n}+y^n=z^n$. To prove $P(n)$ was false for some specific $n$, we would need to prove that there were no solutions - and there's no formulaic way to do that. Sure, we can get away with setting $P(n)$ to statements like "this turing machine halts in $n$ steps", where we can run it for $n$ steps to verify or disprove the statement (i.e. a proof of $\neg P(n)$ exists if it is true), but this is far from every statement we might be interested in.

A: I think this is a simple counterexample: every integer represents a Turing machine and 'halts' is a property.
So if I understand correctly what you mean by prove and property, you're secretly trying to solve the halting problem. So in fact there is a property which is not just unprovable but worse, undecidable.


text:
Q: Как изменить один элемент GridView? как в этом примере, на клик по элементу GridView поменять его содержимое?
например Чили(выбран)
http://metanit.com/java/android/5.5.php
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <GridView
    android:id="@+id/gridview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:columnWidth="100dp"
    android:numColumns="2"
    android:verticalSpacing="10dp"
    android:horizontalSpacing="10dp"
    android:stretchMode="columnWidth"
    android:gravity="center" />

</LinearLayout>

MainActivity:
public class MainActivity extends ActionBarActivity{

    String[] countries = { "Бразилия", "Аргентина", "Чили", "Колумбия", "Уругвай", "Парагвай"};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);

        // получаем элемент ListView
        GridView countriesList = (GridView) findViewById(R.id.gridview);

        // создаем адаптер
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, countries);
        countriesList.setAdapter(adapter);

        OnItemClickListener itemListener = new OnItemClickListener() {

            @Override
            public void onItemClick(AdapterView<?> parent, View v,
                                int position, long id) {
                Toast.makeText(getApplicationContext(),"Вы выбрали "
                            + parent.getItemAtPosition(position).toString(),
                    Toast.LENGTH_SHORT).show();
            }
        };
        countriesList.setOnItemClickListener(itemListener);
    }
}

A: Есть мнение, что напрямую работать со списком String из-за их immutability не очень правильно, возможно стоит завернуть их в объект модели. Тогда будет работать вот такой вариант https://stackoverflow.com/a/30711959/5892568
public void onItemClick(AdapterView<?> parent, View view, int position, long id){

            String beforeName = itemListAdapter.getItem(position).getItemName().toString();

            String changedName = beforeName.concat("(chosen)");
            itemListAdapter.getItem(position).setItemName(changedName);
            itemListAdapter.notifyDataSetChanged();

        }

Для GridView надо видимо еще и изменить сам список:
public void onItemClick(AdapterView<?> parent, View view, int position, long id){

            String beforeName = itemListAdapter.getItem(position);

            String changedName = beforeName..getItemName().toString().concat("(chosen)");

            itemListAdapter.remove(beforeName);
            itemListAdapter.insert(new Item(changedName), position);

            itemListAdapter.notifyDataSetChanged();

        }


text:
Q: Postgres: ERROR: operator does not exist: point <@> point Using PostgreSQL 11 on Windows.
Both cube and earthdistance installed and verified by pg_available_extensions.
Restarted PostgreSQL.

[42883] ERROR: operator does not exist: point <@> point.

Setup:
CREATE EXTENSION IF NOT EXISTS cube SCHEMA temp;
CREATE EXTENSION IF NOT EXISTS earthdistance SCHEMA temp;

Tried the following code from StackOverflow
create table temp.lat_lon (
  city varchar(50) primary key,
  lat float8 not null,
  lon float8 not null
);

insert into temp.lat_lon values
('London, GB', 51.67234320, 0.14787970),
('New York, NY', 40.91524130, -73.7002720);

select
  (
  (select point(lon,lat) from temp.lat_lon where city = 'London, GB') <@>
  (select point(lon,lat) from temp.lat_lon where city = 'New York, NY')
  ) as distance_miles;

Throws:

[42883] ERROR: operator does not exist: point <@> point.

Extensions installed and Postgres was restarted.
select * from pg_available_extensions where name IN ('cube', 'earthdistance');
cube            1.4     data type for multidimensional cubes
earthdistance   1.1     calculate great-circle distances on the surface of the Earth

Is this because of PostgreSQL v11 on Windows? Yes, Lat/Long in correct order (long is first).
Note: Table F.6 Point-based Earthdistance Operators
Update in regards to: schema / search path:
SELECT extname, extnamespace::regnamespace FROM pg_extension
WHERE  extname IN ('cube', 'earthdistance');

cube            temp
earthdistance   temp

SHOW search_path;

temp

Note: I CREATE EXTENSION hstore SCHMEA temp; and can use hstore and its operators. So doesn't seem to be all extensions.

A: Possible explanation: you installed the extension in a schema that's missing from your current search_path.
Diagnose with:
SELECT extname, extnamespace::regnamespace FROM pg_extension
WHERE  extname IN ('cube', 'earthdistance');

SHOW search_path;

Is the schema of the extensions in your current search_path? If not, there is your explanation. Either install to a different schema or adapt your search_path.
And:
SELECT oprnamespace::regnamespace, oprleft::regtype, oprname, oprright::regtype
FROM   pg_operator
WHERE  oprname = '<@>';

Related:

*

*Is it recommended to install extensions into pg_catalog schema?

*How does the search_path influence identifier resolution and the "current schema"


text:
Q: Why doesn't my SQL query select any row from the sqllite database In my database, I have two tables "classes" and "classes_sessions", I have created a foreign key linking the two tables. I am trying to retrieve data from these tables using the query below
Code
String selectQuery = "SELECT * FROM " +
            TABLE_CLASSES +
            " INNER JOIN " + TABLE_CLASSES_SECTIONS +
            " ON " +
            TABLE_CLASSES_SECTIONS + "." + COLUMN_CLASSES_SECTIONS_ID +
            " = " + TABLE_CLASSES + "." + COLUMN_CLASSES_SECTIONS +
            " WHERE " +
            TABLE_CLASSES + "." + COLUMN_CLASSES_ID +
            " = " + String.valueOf(id);

in the getAllSectionsByClassesID() method below
 public ArrayList<SectionsBean> getAllSectionsByClassesID(long id){

    String selectQuery = "SELECT * FROM " +
            TABLE_CLASSES +
            " INNER JOIN " + TABLE_CLASSES_SECTIONS +
            " ON " +
            TABLE_CLASSES_SECTIONS + "." + COLUMN_CLASSES_SECTIONS_ID +
            " = " + TABLE_CLASSES + "." + COLUMN_CLASSES_SECTIONS +
            " WHERE " +
            TABLE_CLASSES + "." + COLUMN_CLASSES_ID +
            " = " + String.valueOf(id);

    SQLiteDatabase db = this.getReadableDatabase();

    ArrayList<SectionsBean> sectionsBeanList = new ArrayList<SectionsBean>();

   Cursor cursor = db.rawQuery(selectQuery,null);

    Log.i("Query details", String.valueOf(cursor));
    Log.d("DataDetails", DatabaseUtils.dumpCursorToString(cursor));

    while (cursor.moveToNext()) {

        ClassesBean classesBean = new ClassesBean();
        classesBean.setId(cursor.getLong(cursor.getColumnIndex(COLUMN_CLASSES_ID)));
        classesBean.setClasses_name(cursor.getString(cursor.getColumnIndex(COLUMN_CLASSES_NAME)));

        SectionsBean sectionsBean = new SectionsBean();
        sectionsBean.setSectionsID(cursor.getLong(cursor.getColumnIndex(COLUMN_CLASSES_SECTIONS_ID)));
        sectionsBean.setSections_name(cursor.getString(cursor.getColumnIndex(COLUMN_CLASSES_SECTIONS_NAME)));

        sectionsBean.setClassesBean(classesBean);
        sectionsBeanList.add(sectionsBean);

    }
    return sectionsBeanList;

}

But it does not return any thing. I am using the line to check for data returned by the cursor in the database Log.d("DataDetails", DatabaseUtils.dumpCursorToString(cursor)); and the result is blank. There are contents in both tables as seen below
Database contents
Classes Table
-05 22:06:23.728 31258-31310/com.example.demeainc.demea D/DataC: >>>>> Dumping cursor android.database.sqlite.SQLiteCursor@88a8264
                                                                     0 {
                                                                        classes_id=1
                                                                        class_item_index=null
                                                                        classes_name=jss1
                                                                        classes_codename=null
                                                                        classes_sections_id=null
                                                                        classes_teachers=null
                                                                        classes_students=null
                                                                     }
                                                                     1 {
                                                                        classes_id=2
                                                                        class_item_index=null
                                                                        classes_name=villa
                                                                        classes_codename=null
                                                                        classes_sections_id=null
                                                                        classes_teachers=null
                                                                        classes_students=null
                                                                     }
                                                                     2 {
                                                                        classes_id=3
                                                                        class_item_index=null
                                                                        classes_name=two
                                                                        classes_codename=null
                                                                        classes_sections_id=null
                                                                        classes_teachers=null
                                                                        classes_students=null
                                                                     }
                                                                     <<<<<

Database contents for the sessions table
03-05 22:09:03.943 31258-31258/com.example.demeainc.demea D/DataS: >>>>> Dumping cursor android.database.sqlite.SQLiteCursor@eaadf23
                                                                     0 {
                                                                        classes_sections_ids=1
                                                                        classes_sections_name=cooolanet
                                                                        classes_sections_description=bbdbn
                                                                     }
                                                                     1 {
                                                                        classes_sections_ids=2
                                                                        classes_sections_name=morrals
                                                                        classes_sections_description=mills
                                                                     }
                                                                     2 {
                                                                        classes_sections_ids=3
                                                                        classes_sections_name=live
                                                                        classes_sections_description=bxn
                                                                     }
                                                                     3 {
                                                                        classes_sections_ids=4
                                                                        classes_sections_name=testing2
                                                                        classes_sections_description=coll
                                                                     }
                                                                     4 {
                                                                        classes_sections_ids=5
                                                                        classes_sections_name=tool
                                                                        classes_sections_description=vi
                                                                     }
                                                                     5 {
                                                                        classes_sections_ids=6
                                                                        classes_sections_name=colls
                                                                        classes_sections_description=
                                                                     }
                                                                     6 {
                                                                        classes_sections_ids=7
                                                                        classes_sections_name=more
                                                                        classes_sections_description=coll
                                                                     }
                                                                     7 {
                                                                        classes_sections_ids=8
                                                                        classes_sections_name=testing
                                                                        classes_sections_description=ttt
                                                                     }
                                                                     8 {
                                                                        classes_sections_ids=9
                                                                        classes_sections_name=threevill
                                                                        classes_sections_description=cool
                                                                     }
                                                                     <<<<<

More details on table creation.
// create classes_table sql query
private String CREATE_CLASSES_TABLE = "CREATE TABLE IF NOT EXISTS " + TABLE_CLASSES + "("
        + COLUMN_CLASSES_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + COLUMN_CLASS_ITEM_INDEX + " NUMBER,"
        + COLUMN_CLASSES_NAME + " VARCHAR," + COLUMN_CLASSES_CODENAME + " VARCHAR, " + COLUMN_CLASSES_SECTIONS + " INTEGER," + COLUMN_CLASSES_TEACHERS
        + " VARCHAR," + COLUMN_CLASSES_STUDENTS + " VARCHAR,"
        + "FOREIGN KEY(" + COLUMN_CLASSES_SECTIONS + ") REFERENCES " + TABLE_CLASSES_SECTIONS  + "(" + COLUMN_CLASSES_SECTIONS_ID + ")  ON DELETE CASCADE  " + ");";

//create sections sql query
private String CREATE_CLASSES_SECTIONS_TABLE =  "CREATE TABLE IF NOT EXISTS " + TABLE_CLASSES_SECTIONS + "("
        + COLUMN_CLASSES_SECTIONS_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," + COLUMN_CLASSES_SECTIONS_NAME + " VARCHAR,"
        + COLUMN_CLASSES_SECTIONS_DESCRIPTION + " VARCHAR" + ")";

What could be the issue. Is the foreign key actually Linking the two tables. what am I getting wrong in the code above.

A: Your issue is that the class_sections_id column is null so there is never a matching entry in the classes_sections_table (sessions table) so there is no JOIN made and thus nothing to show.
As an example of how this would work take the following classes table :-

Now the classes_sections table :-

For English you will see that the classes_sections_id's value is 1 this can correspond (aka associate with/reference etc) the classes_sections_ids column whose value is 1.
The query
SELECT * FROM classes
    INNER JOIN classes_sections
        ON classes_sections.classes_sections_ids = classes.classes_sections_id
    WHERE classes.classes_id =1

Would result in :-

However, if the following row were added to the classes table (note the reference to the classes_sections_id column has a value of 700 and that there is no such row in the classes_sections table) :-

If the query were changed to get id 4 then no rows will be returned because even though id 4 does exist (Chemistry) in the classes table there is no associated classes_sections row (with a classes_sections_ids as 700) so there is no JOIN and thus no row to return.
In short you need to have the sections_id column reference/associate/link to the classes_sections_ids column to retrieve any data.

Is the foreign key actually Linking the two tables.

Specifying a FOREIGN KEY only specifies that a constraint exists (noting that ON DELETE CASCADE limits the constraint). It does not automatically define links, you have to do this.
You would likely do this programatically (I manually made the above links) e.g. when adding a class you would select one of the available sections, perhaps presented via a spinner (aka drop down selector). You then insert the class with the id of the selected section.

Additional
I believe that you will end up having issues with your design primarily due to how your are referencing/linking.
For example your design has a classes table that includes a column to link to the sections table. This without introducing the complexity of handling a list of links in a single column restricts a class to having a single section (same applies for teachers and students).
On the basis of the assumption that a class may have multiple sections then there is a further consideration, could a section be used by many classes (an example may be that all classes must start with evacuation procedures).
If the latter doesn't apply then the relationship between classes and sections could be one-many (or could be handled by a many-many relationship).

*

*In this case a section could have a column as a link to the class.

If the latter applies then the relationship between classes and sections would/should be a many-many relationship.

*

*In this case a link table (aka associative table, reference table, mapping table .....) would be used.

*Such a table has at least two columns each holding a link to the related tables (the combination would/should be unique).

As such I would suggest that you consider the following design (perhaps more to come) :-
DROP TABLE IF EXISTS classes;
CREATE TABLE IF NOT EXISTS classes ( class_id INTEGER PRIMARY KEY, class_name TEXT, class_codename TEXT );
DROP TABLE IF EXISTS sections;
CREATE TABLE IF NOT EXISTS sections ( section_id INTEGER PRIMARY KEY, section_name TEXT, section_description TEXT);
DROP TABLE IF EXISTS teachers;
CREATE TABLE IF NOT EXISTS teachers ( teacher_id INTEGER PRIMARY KEY, teacher_name TEXT);
DROP TABLE IF EXISTS students;
CREATE TABLE IF NOT EXISTS students ( student_id INTEGER PRIMARY KEY, student_name TEXT);
-- LINK TABLES
-- Note usess column constraints to define foreign keys i.e. REFERENCES
DROP TABLE IF EXISTS class_section_links;
CREATE TABLE IF NOT EXISTS class_section_links (
    class_link INTEGER NOT NULL REFERENCES classes (class_id),
    section_link INTEGER NOT NULL REFERENCES sections (section_id),
    PRIMARY KEY (class_link, section_link));
DROP TABLE IF EXISTS class_teacher_links;
CREATE TABLE IF NOT EXISTS class_teacher_links (
    class_link INTEGER NOT NULL REFERENCES classes (class_id),
    teacher_link INTEGER NOT NULL REFERENCES teachers (teacher_id),
    PRIMARY KEY (class_link, teacher_link));
DROP TABLE IF EXISTS class_student_links;
CREATE TABLE IF NOT EXISTS class_student_links (
    class_link INTEGER NOT NULL REFERENCES classes (class_id),
    student_link INTEGER NOT NULL REFERENCES students (student_id),
    PRIMARY KEY (class_link, student_link));

This will load some data including some basics links between classes and sections :-
-- LOAD some data
-- CLASSES
INSERT INTO classes (class_name, class_codename) VALUES('English Language','EL100');
INSERT INTO classes (class_name, class_codename) VALUES('English Literature','EL101');
INSERT INTO classes (class_name, class_codename) VALUES('Applied Mathermatics','MA200');
INSERT INTO classes (class_name, class_codename) VALUES('Pure Mathematics','MA201');
INSERT INTO classes (class_name, class_codename) VALUES('Chemistry','SC300');
INSERT INTO classes (class_name, class_codename) VALUES('Physics','SC301');
INSERT INTO classes (class_name, class_codename) VALUES('Biology','SC302');
INSERT INTO classes (class_name, class_codename) VALUES('GEOGRAPHY','GE400');
-- SECTIONS
INSERT INTO sections (section_name, section_description) VALUES('Class Introduction','Evacuation procedures, amenities etc..');
INSERT INTO sections (section_name, section_description) VALUES('Sentence Construction','Blah');
INSERT INTO sections (section_name, section_description) VALUES('Word types','Basic word types such as VERB, ADJECTIVE etc');
INSERT INTO sections (section_name, section_description) VALUES('Puntuation','Blah');
INSERT INTO sections (section_name, section_description) VALUES('Under Milk Wood','Blah');
INSERT INTO sections (section_name, section_description) VALUES('Catcher in the Rye','Blah');
INSERT INTO sections (section_name, section_description) VALUES('The War of the Worlds','Blah');
-- CLASS SECTION LINKS (note assumes ID's of classes/sections in order 1,2,3......)
-- a) All classes have Class Introduction
INSERT INTO class_section_links VALUES(1,1); -- Class 1 English language
INSERT INTO class_section_links VALUES(2,1); -- Class 2 English Lit
INSERT INTO class_section_links VALUES(3,1);
INSERT INTO class_section_links VALUES(4,1);
INSERT INTO class_section_links VALUES(5,1);
INSERT INTO class_section_links VALUES(6,1);
INSERT INTO class_section_links VALUES(7,1);
INSERT INTO class_section_links VALUES(8,1);
-- b) specific sections
INSERT INTO class_section_links VALUES(1,2); -- Class 1 has section 2
INSERT INTO class_section_links VALUES(1,3); -- Class 1 has section 3
INSERT INTO class_section_links VALUES(2,4);
INSERT INTO class_section_links VALUES(2,5);
INSERT INTO class_section_links VALUES(2,6);
INSERT INTO class_section_links VALUES(2,7);

A query such as :-
SELECT class_name, class_codename, section_name, section_description
FROM class_section_links
    JOIN classes ON class_link = class_id
    JOIN sections ON section_link = section_id
ORDER BY class_name, section_name;

Would result in :-

If you look at Class Introduction you will see that just the one section is used many times, thus only needing a single set of data. So if there were a directive that instead of Class Introduction it be changed to Introduction then a single change would update ALL classes.
e.g. using the following to perform the update :-
UPDATE sections SET section_name = 'Introduction' WHERE section_name = 'Class Introduction';

and running the same query results in :-

A: Although not an answer to the question this may of of use.
Here's a quickly put together demo of how you can implement a link table within an App. Note it's very rudimentary.
The app will initially allows the input of a class (requires both fields to have data), clicking the button Add Class will attempt to add a class (should if both inputs have at least 1 character).
When a class has been added three additional inputs are made available (made visible) and additionally the class added will be listed. The new inputs are :-

*

*EditText For the Section Name

*EditText for the Section Description

*Spinner for the linked class (only single link is catered for, multiple's would come later)

When a section has been added then the section will be listed on the right and additionally the combined linked data will be listed below the column and section lists.
e.g.

The Code
Layout - activity_main.xml

*

*(note package name would have to be changed)

<TextView
    android:id="@+id/heading"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />

<EditText
    android:id="@+id/class_name"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />
<EditText
    android:id="@+id/class_codename"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />
<Button
    android:id="@+id/addclass"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Add Class"/>
<EditText
    android:id="@+id/section_name"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />
<EditText
    android:id="@+id/section_description"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />
<Spinner
    android:id="@+id/classselection"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
</Spinner>
<Button
    android:id="@+id/addsection"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Add Section"/>
<LinearLayout
    android:orientation="horizontal"
    android:id="@+id/lists"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <ListView
        android:id="@+id/classlist"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_height="wrap_content">
    </ListView>
    <ListView
        android:id="@+id/sectionlist"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_height="wrap_content"></ListView>
</LinearLayout>
<ListView
    android:id="@+id/classsectionsinfo"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
</ListView>

Database Helper - DBHelper.java
public class DBHelper extends SQLiteOpenHelper {

    public static final String DBNAME = "educator";
    public static final  int DBVERSION = 1;

    public static final String TB_CLASSES = "classes";
    public static final String TB_SECTIONS = "sections";
    public static final String TB_CLASS_SECTION_LINKS = "class_section_links";

    public static final String COL_CLASSID = BaseColumns._ID;
    public static final String COl_CLASSNAME = "class_name";
    public static final String COl_CLASSCODENAME = "class_codename";
    public static final String COL_SECTIONID = BaseColumns._ID;
    public static final String COL_SECTIONNAME = "section_name";
    public static final String COL_SECTIONDESCRIPTION = "section_description";
    public static final String COL_CLASSLINK = "class_link";
    public static final String COL_SECTIONLINK = "section_link";
    public static final String COL_COMBINED = "info";

    SQLiteDatabase mDB;

    public DBHelper(Context context) {
        super(context, DBNAME, null, DBVERSION);
        mDB = this.getWritableDatabase();
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String crttab = "CREATE TABLE IF NOT EXISTS ";
        String crtclasses = crttab + TB_CLASSES +
                "(" +
                COL_CLASSID + " INTEGER PRIMARY KEY, " +
                COl_CLASSNAME + " TEXT, " +
                COl_CLASSCODENAME + " TEXT " +
                ")";
        String crtsections = crttab + TB_SECTIONS +
                "(" +
                COL_SECTIONID + " INTEGER PRIMARY KEY, " +
                COL_SECTIONNAME + " TEXT, " +
                COL_SECTIONDESCRIPTION + " TEXT " +
                ")";
        String crtclasssectionlink = crttab + TB_CLASS_SECTION_LINKS +
                "(" +
                COL_CLASSLINK + " INTEGER " +
                " REFERENCES " + TB_CLASSES + "(" + COL_CLASSID + ")," +
                COL_SECTIONLINK + " INTEGER " +
                " REFERENCES " + TB_SECTIONS + "(" + COL_SECTIONID + ") " +
                ")";
        db.execSQL(crtclasses);
        db.execSQL(crtsections);
        db.execSQL(crtclasssectionlink);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
    public long addClass(String classname, String classcode) {
        if (classname.length() < 1 || classcode.length() < 1) {
            return -1;
        }
        ContentValues cv = new ContentValues();
        cv.put(COl_CLASSNAME,classname);
        cv.put(COl_CLASSCODENAME,classcode);
        return mDB.insert(TB_CLASSES,null, cv);
    }

    public long addSection(String sectioname, String sectiondescription, long baseclass) {
        long sectionid = -1;
        if (sectioname.length() < 1 || sectiondescription.length() < 1) {
            return -1;
        }
        ContentValues cv = new ContentValues();
        cv.put(COL_SECTIONNAME,sectioname);
        cv.put(COL_SECTIONDESCRIPTION,sectiondescription);
        sectionid = mDB.insert(TB_SECTIONS,null,cv);
        if (sectionid > 0 && baseclass > 0) {
            cv.clear();
            cv.put(COL_CLASSLINK,baseclass);
            cv.put(COL_SECTIONLINK,sectionid);
            mDB.insert(TB_CLASS_SECTION_LINKS,null,cv);
        }
        return sectionid;
    }

    public Cursor getClassAndSectionDetailsCombined() {
        //SELECT class_name||class_codename||section_name||section_description AS info
        // FROM class_section_links
        // JOIN classes ON class_link = classes._id
        // JOIN sections ON section_link = sections._id
        // ORDER BY class_name, section_name;

        return mDB.query(
                TB_CLASS_SECTION_LINKS +
                        " JOIN " + TB_CLASSES + " ON " +
                        COL_CLASSLINK + " = " + TB_CLASSES + "." + COL_CLASSID +
                        " JOIN " + TB_SECTIONS + " ON " +
                        COL_SECTIONLINK + " = " + TB_SECTIONS + "." + COL_SECTIONID,
                new String[] {
                        COl_CLASSNAME + "||" +
                                COl_CLASSCODENAME + "||" +
                                COL_SECTIONNAME + "||" +
                                COL_SECTIONDESCRIPTION +
                                " AS " + COL_COMBINED,
                "1 AS " + BaseColumns._ID},
                null,null,null, null,
                COl_CLASSNAME + "," + COL_SECTIONNAME
        );
    }

    public Cursor getClasses() {
        return mDB.query(TB_CLASSES,null,null,null,null,null,null);
    }

    public Cursor getSections() {
        return mDB.query(TB_SECTIONS,null,null,null,null,null,null);
    }
    public long getSectionsCount() {
        return DatabaseUtils.queryNumEntries(mDB,TB_SECTIONS);
    }
    public long getClassesCount() {
        return DatabaseUtils.queryNumEntries(mDB,TB_CLASSES);
    }
}

*

*getClassAndSectionDetailsCombined differs a little from the commented SQL in that the cursor has two columns one being _id, this is to facilitate using CursorAdapters which require an _id column.

*

*This is a quick/dirty/simplicity fix as _id will always be 1

the Activity - MainActivity.java
public class MainActivity extends AppCompatActivity {

    EditText mClassName, mClassCode, mSectionName, mSectionDescription;
    Button mAddClass, mAddSection;
    ListView mClassList, mSectionList, mClassSectionInfoList;
    Spinner mClassSelection;
    DBHelper mDBHlpr;
    Cursor mClasses, mSections, mCLassSectionInfo;
    SimpleCursorAdapter mSCAClasses, mSCASections, mSCAClassSecInfo;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mClassName = (EditText) this.findViewById(R.id.class_name);
        mClassCode = (EditText) this.findViewById(R.id.class_codename);
        mSectionName = (EditText) this.findViewById(R.id.section_name);
        mSectionDescription = (EditText) this.findViewById(R.id.section_description);
        mAddClass = (Button) this.findViewById(R.id.addclass);
        mAddSection = (Button) this.findViewById(R.id.addsection);
        mClassList = (ListView) this.findViewById(R.id.classlist);
        mSectionList = (ListView) this.findViewById(R.id.sectionlist);
        mClassSectionInfoList = (ListView) this.findViewById(R.id.classsectionsinfo);
        mClassSelection = (Spinner) this.findViewById(R.id.classselection);
        mDBHlpr = new DBHelper(this);
        refreshDisplay();
        handleButtons();
    }

    private void handleButtons() {
        mAddClass.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if ((mClassName.getText().toString().length() > 0) &&
                        mClassCode.getText().toString().length() > 0) {
                    mDBHlpr.addClass(
                            mClassName.getText().toString(),
                            mClassCode.getText().toString()
                    );
                    refreshDisplay();
                }
            }
        });
        mAddSection.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if ((mSectionName.getText().toString().length() > 0) &&
                        (mSectionDescription.getText().toString().length() > 0)) {
                    mDBHlpr.addSection(
                            mSectionName.getText().toString(),
                            mSectionDescription.getText().toString(),
                            mClassSelection.getSelectedItemId()
                    );
                    refreshDisplay();
                }
            }
        });
    }

    private void refreshDisplay() {
        // Only allow sections to be added if at least one Class exists
        if (mDBHlpr.getClassesCount() < 1) {
            mSectionName.setVisibility(View.GONE);
            mSectionDescription.setVisibility(View.GONE);
            mAddSection.setVisibility(View.GONE);
        } else {
            mSectionName.setVisibility(View.VISIBLE);
            mSectionDescription.setVisibility(View.VISIBLE);
            mAddSection.setVisibility(View.VISIBLE);
        }
        // Get Cursors from DB
        mClasses = mDBHlpr.getClasses();
        mSections = mDBHlpr.getSections();
        mCLassSectionInfo = mDBHlpr.getClassAndSectionDetailsCombined();

        // Prepare the Classes List Adapter or swap the cursor
        if (mSCAClasses == null) {
            mSCAClasses = new SimpleCursorAdapter(this,
                    android.R.layout.simple_list_item_1,
                    mClasses,new String[]{DBHelper.COl_CLASSNAME},
                    new int[]{android.R.id.text1},
                    0
            );
        } else {
            mSCAClasses.swapCursor(mClasses);
        }
        // Prepare the Sections List Adapter
        if (mSCASections == null) {
            mSCASections = new SimpleCursorAdapter(this,
                    android.R.layout.simple_list_item_1,
                    mSections,
                    new String[]{DBHelper.COL_SECTIONNAME},
                    new int[]{android.R.id.text1},
                    0
            );
        } else {
            mSCASections.swapCursor(mSections);
        }
        if (mSCAClassSecInfo == null) {
            mSCAClassSecInfo = new SimpleCursorAdapter(this,
                    android.R.layout.simple_list_item_1,
                    mCLassSectionInfo,
                    new String[]{DBHelper.COL_COMBINED},
                    new int[]{android.R.id.text1},
                    0
            );
        } else {
            mSCAClassSecInfo.swapCursor(mCLassSectionInfo);
        }
        mClassList.setAdapter(mSCAClasses);
        mClassList.setBackgroundColor(0xFF5555ff);
        mSectionList.setAdapter(mSCASections);
        mSectionList.setBackgroundColor(0xFF55FF55);
        mClassSelection.setAdapter(mSCAClasses);
        mClassSectionInfoList.setAdapter(mSCAClassSecInfo);
        mClassSectionInfoList.setBackgroundColor(0xFFFFFFDD);
    }
}


text:
Q: What are the 'big problems' in statistics? Mathematics has its famous Millennium Problems (and, historically, Hilbert's 23), questions that helped to shape the direction of the field.
I have little idea, though, what the Riemann Hypotheses and P vs. NP's of statistics would be.
So, what are the overarching open questions in statistics?
Edited to add:
As an example of the general spirit (if not quite specificity) of answer I'm looking for, I found a "Hilbert's 23"-inspired lecture by David Donoho at a "Math Challenges of the 21st Century" conference: High-Dimensional Data Analysis: The Curses and Blessings of Dimensionality
So a potential answer could talk about big data and why it's important, the types of statistical challenges high-dimensional data poses, and methods that need to be developed or questions that need to be answered in order to help solve the problem.

A: As an example of the general spirit (if not quite specificity) of answer I'm looking for, I found a "Hilbert's 23"-inspired lecture by David Donoho at a "Math Challenges of the 21st Century" conference:
High-Dimensional Data Analysis: The Curses and Blessings of Dimensionality

A: A big question should involve key issues of statistical methodology or, because statistics is entirely about applications, it should concern how statistics is used with problems important to society.
This characterization suggests the following should be included in any consideration of big problems:

*

*How best to conduct drug trials.  Currently, classical hypothesis testing requires many formal phases of study.  In later (confirmatory) phases, the economic and ethical issues loom large.  Can we do better?  Do we have to put hundreds or thousands of sick people into control groups and keep them there until the end of a study, for example, or can we find better ways to identify treatments that really work and deliver them to members of the trial (and others) sooner?

*Coping with scientific publication bias.  Negative results are published much less simply because they just don't attain a magic p-value.  All branches of science need to find better ways to bring scientifically important, not just statistically significant, results to light.  (The multiple comparisons problem and coping with high-dimensional data are subcategories of this problem.)

*Probing the limits of statistical methods and their interfaces with machine learning and machine cognition.  Inevitable advances in computing technology will make true AI accessible in our lifetimes.  How are we going to program artificial brains?  What role might statistical thinking and statistical learning have in creating these advances?  How can statisticians help in thinking about artificial cognition, artificial learning, in exploring their limitations, and making advances?

*Developing better ways to analyze geospatial data.  It is often claimed that the majority, or vast majority, of databases contain locational references.  Soon many people and devices will be located in real time with GPS and cell phone technologies.  Statistical methods to analyze and exploit spatial data are really just in their infancy (and seem to be relegated to GIS and spatial software which is typically used by non-statisticians).

A: Mathoverflow has a similar question about big problems in probability theory.
It would appear from that page that the biggest questions are to do with self avoiding random walks and percolations.

A: You might check out Harvard's "Hard Problems in the Social Sciences' colloquium held earlier this year. Several of these talks offer issues in the use of statistics and modeling in the social sciences.

A: Michael Jordan has a short article called What are the Open Problems in Bayesian Statistics?, in which he polled a bunch of statisticians for their views on the open problems in statistics. I'll summarize (aka, copy-and-paste) a bit here, but it's probably best just to read the original.
Nonparametrics and semiparametrics

*

*For what problems is Bayesian nonparametrics useful and worth the trouble?

*David Dunson: "Nonparametric Bayes models involve infinitely many parameters and priors are typically chosen for convenience with hyperparameters set at seemingly reasonable values with no proper objective or subjective justification."

*"It was noted by several people that one of the appealing applications of frequentist nonparametrics is to semiparametric inference, where the nonparametric component of the model is a nuisance parameter. These people felt that it would be desirable to flesh out the (frequentist) theory of Bayesian semiparametrics."

Priors

*

*"Elicitation remains a major source of open problems."

*'Aad van der Vaart turned objective Bayes on its head and pointed to a lack of theory for "situations where one wants the prior to come through in the posterior" as opposed to "merely providing a Bayesian approach to smoothing."'

Bayesian/frequentist relationships

*

*"Many respondents expressed a desire to further hammer out Bayesian/frequentist relationships. This was most commonly evinced in the context of high-dimensional models and data, where not only are subjective approaches to specification of priors difficult to implement but priors of convenience can be (highly) misleading."

*'Some respondents pined for non-asymptotic theory that might reveal more fully the putative advantages of Bayesian methods; e.g., David Dunson: "Often, the frequentist optimal rate is obtained by procedures that clearly do much worse in finite samples than Bayesian approaches."'

Computation and statistics

*

*Alan Gelfand: "If MCMC is no longer viable for the problems people want to address, then what is the role of INLA, of variational methods, of ABC approaches?"

*"Several respondents asked for a more thorough integration of computational science and statistical science, noting that the set of inferences that one can reach in any given situation are jointly a function of the model, the prior, the data and the computational resources, and wishing for more explicit management of the tradeoffs among these quantities. Indeed, Rob Kass raised the possibility of a notion of "inferential solvability," where some problems are understood to be beyond hope (e.g., model selection in regression where "for modest amounts of data subject to nontrivial noise it is im- possible to get useful confidence intervals about regression coefficients when there are large numbers of variables whose presence or absence in the model is unspecified a priori") and where there are other problems ("certain functionals for which useful con- fidence intervals exist") for which there is hope."

*"Several respondents, while apologizing for a certain vagueness, expressed a feeling that a large amount of data does not necessarily imply a large amount of computation; rather, that somehow the inferential strength present in large data should transfer to the algorithm and make it possible to make do with fewer computational steps to achieve a satisfactory (approximate) inferential solution."

Model Selection and Hypothesis Testing

*

*George Casella: "We now do model selection but Bayesians don't seem to worry about the properties of basing inference on the selected model. What if it is wrong? What are the consequences of setting up credible regions for a certain parameter $β_1$ when you have selected the wrong model? Can we have procedures with some sort of guarantee?"

*Need for more work on decision-theoretic foundations in model selection.

*David Spiegelhalter: "How best to make checks for prior/data conflict an integral part of Bayesian analysis?"

*Andrew Gelman: "For model checking, a key open problem is developing graphical tools for understanding and comparing models. Graphics is not just for raw data; rather, complex Bayesian models give opportunity for better and more effective exploratory data analysis."

A: My answer would be the struggle between frequentist and Bayesian statistics. When people ask you which you "believe in", this is not good! Especially for a scientific discipline.

A: I'm not sure how big they are, but there is a Wikipedia page for unsolved problems in statistics.  Their list includes:

Inference and testing

*

*Systematic errors

*Admissability of the Graybill–Deal estimator

*Combining dependent p-values in Meta-analysis

*Behrens–Fisher problem

*Multiple comparisons

*Open problems in Bayesian statistics

  Experimental design

*

*Problems in Latin squares

  Problems of a more philosophical nature

*

*Sampling of species problem

*Doomsday argument

*Exchange paradox


text:
Q: SQL Server - Password Field Encoding First Question :
Which One is better to encode password ?

*

*SHA1

HashBytes('SHA1','MySecret Phrase')

*

*Encrypt

EncryptByPassPhrase('secretKey', '123456789')
Is there any better way that is more safe ?
And other question is :
Can we encode password for more than 1 time ? for example two times encoding ?

A: *

*Neither. Hash without a salt is vulnerable to attack by rainbow tables. Passphrase, on the other hand, has to be submitted in clear text, which makes it vulnerable to SQL trace.

*I have recently studied this particular question for my current project and eventually settled down on using salted X.509 signatures. You create a certificate in your database and use its private key for creating password signatures (+ personalised GUID salt). The resulting hash cannot be reverted back to the original password, even when the salt is stored as plain text.
Basically, the code looks like this:
create function [dbo].[security_GetPasswordHash]
(
    @Password sysname,
    @Salt uniqueidentifier
)

returns binary(128) with schemabinding, returns null on null input as begin

declare @CertId int, @CertPwd sysname;

set @CertId = ...; -- Get your cert however you like it
set @CertPwd = ...; -- If your cert is encrypted with password, get it too

return SignByCert(
    @CertId,
    SignByCert(@CertId, @Password, @CertPwd) + cast(@Salt as binary(16)),
    @CertPwd
);
end;
go

This way, even the knowledge of a private key' password will not help an attacker to reverse the hash. And in your authentication stored procedure, you may use code like this to determine whether the password is correct:
-- Try to validate the user
select @UserId = u.Id
from dbo.Users u
where u.LoginName = @Login
    and u.PasswordHash = dbo.security_GetPasswordHash(@Password, u.PasswordSalt);

-- Special case of user existence - there may be a wrong password here, too.
if @UserId is null begin
    -- The specified user either does not exist, or wrong password has been supplied.
    set @Error = 51008;
    set @Message = dbo.sys_FormatErrorMessage(@Error, @CultureId, default, default, default, default);
    throw 50000, @Message, 1;
end;

And despite all warnings about expensive computations when using certificates, this algorithm works sufficiently fast even on a 2-year old laptop.


text:
Q: Regex won't capture past \n I've been trying to clean some data with the below, but my regex won't go past the \n. I don't understand why because i thought .* should capture everything.
table = POSITIONS AND APPOINTMENTS  2006  present Fellow, University of Colorado at Denver Health Sciences Center, Native Elder Research Center, American Indian and Alaska Native Program, Denver, CO  \n2002  present Assistant Professor, Department of Development Sociology, Cornell \n   University, Ithaca, NY   \n \n1999  2001

output = table.encode('ascii', errors='ignore').strip()
pat = r'POSITIONS.*'.format(endword)
print pat
regex = re.compile(pat)
if regex.search(output):
    print regex.findall(output)
    pieces.append(regex.findall(output))

the above returns:
['POSITIONS AND APPOINTMENTS  2006  present Fellow, University of Colorado at Denver Health Sciences Center, Native Elder Research Center, American Indian and Alaska Native Program, Denver, CO  ']

A: . does not match a newline unless you specify re.DOTALL (or re.S) flag.
>>> import re
>>> re.search('.', '\n')
>>> re.search('.', '\n', flags=re.DOTALL)
<_sre.SRE_Match object at 0x0000000002AB8100>

regex = re.compile(pat, flags=re.DOTALL)


text:
Q: Get data except for data in a column So I have the following code:
require_once('db.php');

$getUsers = mysqli_query($db, 'SELECT * FROM users');
$rows = [];

while ($r = mysqli_fetch_assoc($getUsers)) {
    $rows[] = $r;
    $getSkills = mysqli_query($db, "SELECT * FROM skills WHERE id = '" . $r['id'] . "'");
    while($r = mysqli_fetch_assoc($getSkills)) {
        $rows['skills'] = $r;
    }
}

print(json_encode($rows));

Which outputs:
[{"id":"1","name":"user1","skills":{"woodcutting":"6","mining":"10"}},{"id":"2","name":user2"}]

There are two problems:

*

*I'd like to get all of the data in the table skills EXCEPT for the id, or at-least cut it off before encoding it with json.

*For some reason I can't get the "skills" shown after the first user. user2 should also have a skills object.

What am I doing wrong?

A: It looks like you need something similar to this:
while($r = mysqli_fetch_assoc($getSkills)) {
    unset($r['id']);
    $rows['skills'] = $r;
}

A: *

*Point-1: Unset id like unset($r['id']) to remove from array() $r. Before unsset id keep id to a variable because you used it for next query.

*Point-2: May be there is no data exist in skills those IDs. As a result you did not get skills. Suggest you to query by those IDs whether any data exist or not in skills table.
while ($r = mysqli_fetch_assoc($getUsers)) {
    $id = $r['id'];
    unset($r['id']);
    $rows[] = $r;
    $getSkills = mysqli_query($db, "SELECT * FROM skills WHERE id = '$id'");
    while($r = mysqli_fetch_assoc($getSkills)) {
        $rows['skills'] = $r;
    }
 }

A: To get all the columns except the id from table skills, you can either list all the columns that you want to select, like this:
mysqli_query($db, "SELECT column1, column2, another_column FROM `skills` WHERE id = '" . $r['id'] . "'");

Or, you can SELECT everything and use unset() to weed out the id column before json-encoding:
$getSkills = mysqli_query($db, "SELECT * FROM skills WHERE id = '" . $r['id'] . "'");
while ($r = mysqli_fetch_assoc($getSkills))
{
    unset($r['id']);

    // whatever it is that you want to do.
}

The skills are not shown except for the last user (?) because you are re-assigning it in every iteration of the while loop. Here is something you can do instead:
require_once('db.php');

$getUsers = mysqli_query($db, 'SELECT * FROM users');
$rows = array();

while ($r = mysqli_fetch_assoc($getUsers))
{
    $skills = array();
    $tempRow = $r;
    $getSkills = mysqli_query($db, "SELECT * FROM skills WHERE id = '" . $r['id'] . "'");
    while ($r = mysqli_fetch_assoc($getSkills))
    {
        unset($r['id']);  // since you don't want the `id`.
        $skills[] = $r;
    }
    $tempRow['skills'] = $skills;
    $rows[] = $tempRow;
}

print(json_encode($rows));

Hope that helps :)


text:
Q: Perl/Java Byte Encoding Differences So right now, my Java code is creating a different SHA-256 hash than our Perl code, but only when UTF8 characters come into play. I did some debugging and found the byte[] representation of the name Jörg is as follows in the languages:
Java 74, -61, -74, 114, 103
Perl 74, 195, 182, 114, 103
Could be causing the difference in the hashes? It appears Java uses signed bytes, while Perl uses unsigned. Further information if needed/requested!
Thanks!

A: So the issue turned out to be that in Java, when I was reversing the String it was reversing the characters (as expected). In Perl, reverse actually works on the bytes. This means that Jörg when reversed looked like this in the languages:
Java 103 114 -61 -74 74
Perl 103 114 195 182 74
Hope this helps somebody else out!


text:
Q: jQuery mobile form validation with no results I am trying to learn jQuery form validations for jQuery Mobile. I keep coming across this tutorial, which I am trying to replicate but must be doing something wrong with the resource links cause the html looks good. In theory, when a user hits enter and the email and password field are blank, a message should appear telling the user that "this field is required".
Here is the entire code:

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />

<meta name="viewport" content="width=device-width, initial-scale=1">

Acme Corporation

    <form id="frmLogin">

          *  Email:
          <input type="text" id="email"
            name="email" class="required email" />

          * Password:
          <input type="password" id="password"
            name="password" class="required" />

        <button class="btnLogin" type="submit"
          data-theme="a">Login</button>

    </form>

A: Typically, you'd initialize any jQuery plugin within a DOM ready event handler.  This ensures the HTML is constructed before .validate() is called and initialized. As you can see, you're calling it up top before the HTML form exists.  Putting it inside a ready event handler prevents the code from firing until after the page's HTML is fully constructed.
Since you're using jQuery Mobile (it uses ajax to load pages), use a .on('pageinit') handler like this...
$(document).on('pageinit', function() { // <-- ensures the DOM is ready

    $("#frmLogin").validate({
        // your rules & options
    });

});

Working DEMO:  http://jsfiddle.net/5p9N5/
From your browser, do a "view source" of this page to see how the scripts are properly included.  http://jsfiddle.net/5p9N5/show/....

        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <title>jsFiddle demo</title>
        <link rel="stylesheet" type="text/css" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.css">
        <link rel="stylesheet" type="text/css" href="/css/result-light.css">

        <form id="myform">
             .....
        </form>

For a non-jQuery-mobile webpage, you'd typically enclose your jQuery code within a .ready() handler like this...
$(document).ready(function() { // <-- ensures the DOM is ready

    $("#frmLogin").validate({
        // your rules & options
    });

    // any other jQuery

});


text:
Q: Handling an empty 'else if' I recently came across a situation in C I've never encountered before.
I have a C statement similar to the example below.  What is considered the best practice in such a situation? If I don't want to do anything for that input, but don't want to error, would empty {}'s suffice or is there a better standard?
for( traverse = input; *traverse != '\0'; traverse++ )
{
    if( *traverse == 'a' ) {
        // do things
    }
    else if( *traverse == 'b' ) {
        // do other things
    }
    else if( *traverse == 'c' ) {
        // don't do anything
        // continue loop, but don't error
    }
    else
        // error handling here
}

A: I think I'd write it as:
else if( *traverse == 'c' )
    continue;

This makes it fairly explicit that you want to continue with the next iteration of the loop without doing anything else in this iteration.
While an empty pair of braces would work just as well from the compiler's viewpoint, I think the continue makes the intent more apparent to anybody else reading the code (and helps ensure they won't think there were intended to be statements there that were accidentally deleted, or something on that order).

A: Another option is to use switch:
for( traverse = input; *traverse != '\0'; traverse++ )
{
    switch( *traverse ) {
        case 'a':
            // do things
            break;
        case 'b':
            // do other things
            break;
        case 'c':
            // don't do anything
            break;
        default:
            //error handling
    }
}

A: I think the question is how to handle an empty else. But the solution in this specific case would be to change this lines:
else if( *traverse == 'c' ) {
// don't do anything
// continue loop, but don't error
}
else
// error handling here

into:
else if( *traverse != 'c' ) {
// error handling here
}

A: This is a typical example of a XY-problem (see http://xyproblem.info/) where the question is about, basically, the wrong problem.
You should just write your code for the last bit as:
else if( *traverse != 'c' ) {
    // error handling here
}


text:
Q: How to use jsdoc to declare a nodejs variable type in visual studio code? For example, this is correct:
const net = require('net');
const Socket = net.Socket;
/**@type {Socket} */
var s;
s.setTimeout(0);

But these not correct:
const net = require('net');
/**@type {NodeJS.Socket} */
var s1; //the type is 'interface Socket' not 'class Socket'

/**@type {typeof net.Socket} */
var s2; //the type is 'interface Socket' not 'class Socket'

/**@type {net.Socket} */  //Can't find namespace "net"
var s3;

So, how can I declare a Socket without extra const Socket = net.Socket;


text:
Q: Restful API: Best practice for admin and user scope I am building an API where users and admins can interact with the same data, but with different needs.
A user can also have access to the admin panel, if he has the "admin" role.
Let's see for example we have a resource like Badges. A Badge is simply a reward when you achieve some actions into the app.
GET http://localhost/api/v1/badges

An authenticated user can call this endpoint and it returns the list of all badges, if they have it or not, with progress details.
GET http://localhost/api/v1/badges?user_id=2

with user_id parameter, we can see these details of another user (if he allows it).
But from the admin scope, I just need to see the list of all badges, without achievement details (CRUD operations).
So I have 2 options in mind:

*

*Create "admin" endpoints: GET http://localhost/api/v1/admin/badges.

*Adding custom header "X-App-Scope" to identify if I am in admin or user.

I don't like the second one because I think I will have so many if statements and behavior in the same endpoint, depending of the scope.
Because I have lots of use cases like this, I want to make sure my API architecture is good to handle user/admin needs.
Do you guys have any idea/example to manage stuff like this?
Thanks!

A: My personal preference is to separate admin API routes from user ones. i.e. having two routes
/api/v1/badges
/api/admin/v1/badges

*

*You will have two unique documentation, one for each route, which makes it easier to maintain and understand

*It will be easier to tell the difference between the user and the admin versions

*There is no need extra code to check for request headers or url params.

*It makes your middleware less complicated, especially if authentication and permissions are handled there.

*It is more scalable for teams as there is only one kind of request and response format per API.

A: TL;DR: REST is designed in the expectation that you would use two different resources here.
The core problem is this: how would a general purpose component, like a browser, know that your special resource needs to have this custom header added?
In particular, consider the case where I send to you a copy of the URL for this resource, and nothing else.  How are you to know to add the customer header to the request?
On the other hand, if you use different resources to share this information with each audience, everything just works.

A: The only way I found to stay as simple/clear as possible is to make multiple endpoints, for each use case:
GET http://localhost/api/v1/badges to get all badges in raw data
GET http://localhost/api/v1/users/badges to get all badges with user stats (progression, achievement...) in a transformed format
GET http://localhost/api/v1/users/{uuid}/badges to get all badges with user stats (progression, achievement...) in a transformed format for the specified user, if his profile is public
Now I have a lot of /users/XYZ endpoints, but my code seems easier to read & maintain, and I don't really need to see the code to guess what data will be returned, the conditions, etc...
I keep wondering how the other APIs are written when you have an admin section, because having /users everywhere isn't really "pretty", and I don't see that anywhere else.


text:
Q: BroadcastReceiver for ACTION_MEDIA_BUTTON doesn't work Here is what's inside the manifest(this is inside
<receiver android:name=".MediaButtonIntentReceiver">
<intent-filter android:priority="2147483647">
    <action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
        </receiver>

Main activity
private MediaButtonIntentReceiver receiver = new MediaButtonIntentReceiver();

onCreate(Bundle savedInstanceState){
..
IntentFilter filter = new IntentFilter(Intent.ACTION_MEDIA_BUTTON);
        filter.setPriority(1000);
        registerReceiver(receiver,filter);
..
}

And this is MediaButtonIntentReceiver.class
public class MediaButtonIntentReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent)

{

KeyEvent v_Event = (KeyEvent)intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
if (v_Event == null) {
    return;
}
int v_Action = v_Event.getAction();
if (v_Action == KeyEvent.ACTION_DOWN) {
// do something
    Toast.makeText(context, "BUTTON PRESSED!", Toast.LENGTH_SHORT).show();
    }
    abortBroadcast();
}

For some reason, whenever I launch my application and click my headset button I don't get any Toast message. Music starts playing though. I've tried searching for what I'm doing, but no luck for me.

A: not 100% sure if it makes a difference but in the declaration of your receiver you have a '.' before the function name, any time I have registered a receiver I haven't had that there and it's worked fine.
Do you know how far into the BroacastReceiver the code gets? for example could v_Event be null? or is v_Action definitely KeyEvent.ACTIONDOWN?


text:
Q: Input fields not working I am showing a simple <input type="text" /> in a ModalPopupExtender which is shown in top of a ColorBox. It shows fine, but the user can't write in it. Can anyone tell what's wrong?
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">

</asp:Content>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

    <input id="testbutton" type="button" value="click" />

        <asp:Button ID="open" runat="server" />

    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender" runat="server" BackgroundCssClass="modalBackground"
        DropShadow="true" PopupControlID="Panel1" TargetControlID="open">
    </ajaxToolkit:ModalPopupExtender>

        <input type="text" name="foo" value="" />   <--- **This shows, but can't enter text**

</asp:Content>

A: I wrote to the author of Colorbox, and he tracked the issue down to the following lines:
if (document.addEventListener) {
    document.addEventListener('focus', //trapFocus, true);
                $events.one(event_closed, function (){
                document.removeEventListener('focus', trapFocus, true);
                ;}

I outcommented those, and now it seems to work (don't know about older IE versions and other problems though).

A: the name attribute is misssing. and maybe you could try to give it an empty value
<input type="text" name="foo" value="" />

what does onClosed and onOpen do?
how does your css look like?
or is the popup layer (or an overlay) over the input? check z-index.

A: Try to assign name and value attribute as well Like
<input type="text" name="myText" value="Enter Your Name">

Or if you want to assign empty value then try
<input type="text" name=myText value="">

Hope it works.


text:
Q: How to pass array of javascript to PHP web page using ajax? I am new to JQuery and I use JSON stringify to pass my jquery array to the PHP but I've got an error. Can anyone help me to pass this jquery array into PHP?
JQUERY
    <script>
        $(document).ready(function(){
            let arraySelected = [];
            var arrayJSON = JSON.stringify(arraySelected);
            $(".btn").click(function(){
                const find = jQuery.inArray($(this).val(),arraySelected);
                if(find !==-1){
                    arraySelected.splice(find, 1);
                    console.log($(this).val() +" has been deleted");
                    $(this).css("background-color", "");
                }else{
                    console.log($(this).val() +" has been pushed");
                    arraySelected.push($(this).val());
                    $(this).css("background-color", "red");

                    $.ajax({
                        type: "POST",
                        url: "index.php",
                        data: { myArray : arraySelected },
                        success: function() {
                                alert("Success");
                            }
                    });

                }
                console.log(arraySelected);

            })
        });
    </script>

PHP
    <?php
        $myArray = json_decode($_POST['myArray']);
    ?>

This is the error shown on my webpage

Notice: Undefined index: myArray in C:\xampp\htdocs\JQuery PHP\JQuery
PHP 1\index.php on line 13

A: You decode an json object and not an array. See here: json-decode. You must call it like so
json_decode($json, true);

In your case
json_decode($_POST['myArray'], true);


text:
Q: join table A first row with table B first row without common identifiers (for all rows) . Mysql I messed up with identifiers and my two tables can't be joined by any column. But their order is the same. First row in table A is first row in table B, second row in table A is second row in table B and the same with rest. Is there any way to join those two tables by their row number or something like that?
For example:
Table A:
two
three
one

Table B:
cat
dog
mouse

Expected result would be:
two - cat
three - dog
one - mouse

Or is it not possible and I need to start everything all over again ?

A: You could add an auto increment column to each table:
ALTER TABLE TableA ADD COLUMN (id INT AUTO_INCREMENT PRIMARY KEY);
ALTER TABLE TableB ADD COLUMN (id INT AUTO_INCREMENT PRIMARY KEY);

Then you can do a join
SELECT num, animal
FROM TableA
JOIN TableB ON TableA.id = TableB.id

Output:
num     animal
two     cat
three   dog
one     mouse

A: Use the query
select a.c1, b.c1
from
(select c1 ,@rownum:=@rownum+1 as rn1 from taba,(SELECT @rownum:=0) r ) a
join
(select c1 ,@rownum1:=@rownum1+1 as rn2 from tabb,(SELECT @rownum1:=0) s ) b
on a.rn1 = b.rn2

SQL Fiddle :- http://sqlfiddle.com/#!9/a046b5/22


text:
Q: Why is my IEnumerable UserControl disposed after I enumerate over it with foreach? I have a usercontrol with an internal list which I have exposed publically by implementing IEnumerable. When I use foreach to enumerate over it, the usercontrol gets disposed. Why is this happening?
Example to reproduce:
using System;
using System.Collections;
using System.Drawing;
using System.Windows.Forms;

public class VanishingControl : UserControl, IEnumerable, IEnumerator
{
    string[] strings = { "uno", "due", "tres" };
    int position = -1;

    public IEnumerator GetEnumerator()
    {
        return this;
    }

    public object Current
    {
        get { return strings[position]; }
    }

    public bool MoveNext()
    {
        position++;
        return position < strings.Length;
    }

    public void Reset()
    {
        position = 0;
    }

    protected override void Dispose(bool disposing)
    {
        Console.WriteLine("bye!");
        base.Dispose(disposing);
    }
}

public class Vanish : Form
{
    private VanishingControl vc = new VanishingControl();

    public Vanish()
    {
        vc.BackColor = Color.Black;
        vc.Click += vc_Click;
        Controls.Add(vc);
    }

    void vc_Click(object sender, EventArgs e)
    {
        foreach (string s in vc)
            Console.WriteLine(s);
    }

    [STAThread]
    static void Main()
    {
        Application.Run(new Vanish());
    }
}

Run it in the debugger and click the black square.

A: Because your control is its own enumerator :-)
The enumerator is disposed after foreach automatically.
I would suggest making the enumerator into a separate class. Or, alternatively, just use a standard collection as a member, and not make the control to be IEnumerable itself.

A: One of the interfaces implemented by IEnumerator is IDisposable.  The foreach loop will call Dispose on the source of the loop once it's done processing the items.
A much better solution would be to factor your UserControl into 2 parts

*

*The UserControl minus the enumerable interfaces

*A property / method which exposes the collection it contains

For example
public class VanishingControl : UserControl
{
  string[] strings = { "uno", "due", "tres" };

  public IEnumerable<string> GetItems() {
    foreach (var current in strings) {
      yield return current;
    }
  }
}

A: This is the cause:
public IEnumerator GetEnumerator()
{
    return this;
}

One of the IEnumerator interface is IDisposable, the foreach loop at the end of work invoke the Dispose method.
You should provide new IEnumerator each time the GetEnumerator method is called and avoid to use both interfaces in one implementation. This is done by LINQ by but this is specific situtation.
Instead of IEnumerator in the class VanishingControl you should have a subclass that implement the IEnumerator and in GetEnumeratiorn the new instace of that class is returned.


text:
Q: Properties become inexplicably null I'm building a RBAC .NET Application with Identity. Actually there are 6 Roles already stored. I'm trying to add one of these roles to the current signed in user. The error raise exactly when i try to click the add user to role button. The specific button is the following :
Add

This is the property that represents the current role in the page es. "Dev, Admin, Manager, Helper etc."

public IdentityRole role { get; set; } = new IdentityRole();

When i go to the page, the role property is correctly populated with all the properties(ID, name, normalizedName) through the OnGetAsync handler. And it's ok.

public async Task<IActionResult> OnGetAsync(string id)
        {

            // Find the role through id
            IdentityRole roleFound = await RoleManager.FindByIdAsync(id);

            // The population happens here(and it's ok)
            role = roleFound;

            // Get all users
            IQueryable<IdentityUser> usersMembers = UserManager.Users;

            // Loop through users to find who has the role and who doesn't have the role
            foreach (IdentityUser user in usersMembers)
            {
                bool? result = await UserManager.IsInRoleAsync(user, role.Name);

                if (result != null)
                {
                    if (result == true)
                    {
                        members.Add(user); // User
                    }
                    else
                    {
                        nonMembers.Add(user); // No user
                    }
                }
            }

            return Page();
        }

AddUserToRole(where the error occurs)

The error says that role properties "name" and "normalizedName" are null, except the ID. So the roleName property that I need in "OnGetAddUserToRole()" is null. And I don't understand why this property becomes null. **

public async Task<IActionResult> OnGetAddUserToRoleAsync(string id)
        {

            IdentityUser user = await UserManager.FindByIdAsync(id);

            // The error appears exactly here cause of "role.NormalizedName" is inexplicably null.
            IdentityResult res = await UserManager.AddToRoleAsync(user, role.NormalizedName);

            if (res.Succeeded)
            {
                Console.WriteLine($"role {role.Name} is added with success to {user.UserName}");
                return Redirect("/Account");
            }
            else
            {
                Console.WriteLine("error occured in 'AddUserToRole()'");
                return Page();
            }
        }

This is the Razor page :

                #
                ID
                Email
                Name
                Add

            @for (int i = 0; i < Model.nonMembers.Count(); i++)
            {
                IdentityUser user = Model.nonMembers[i];

                    @(i + 1)
                    @user.Id
                    @user.Email
                    @user.UserName

                        Add

            }


text:
Q: Assembly jumps automatically to next label I've written a program in assembly that look like this:
%macro print 1

    push rbp

    mov rdi, %1
    xor rax, rax

    call _printf

    pop rbp

%endmacro
section .data
    e db 'Equal', 0
    l db 'Less than', 0
    g db 'Greater than', 0
section .text
        global start
        extern _printf
    start:
        mov rax, 5
        mov rbx, 5
        cmp rax, rbx ; Compare 4 and 5
        je _equal ; je = jump if equal
        cmp rax, rbx
        jl _less ; jl = jump if less
        cmp rax, rbx
        jg _greater ; jg = jump if greater

        ret

_equal:
    print e
_less:
    print l
_greater:
    print g

But when I run the program it jumps to _equal, but it then jumps to _less, and _greater. How can I disable this auto-jumping?

A:
mov rax, 5

This is an inefficient way to write mov eax, 5. If you're only moving a 32-bit value into a 64-bit register, then you don't need to specify the 64-bit register as an operand. Just specify the 32-bit register, and the upper 32 bits will be implicitly zeroed.
Same thing for:

xor rax, rax

You can just write xor eax, eax, and let the upper 32 bits be implicitly zeroed.

cmp rax, rbx ; Compare 4 and 5

Since you know that you are only comparing 32-bit values, you can write cmp eax, ebx to compare only the lower 32-bit halves. This is smaller and more efficient. You only need cmp rax, rbx if you actually want to compare the entire 64-bit values in those registers.
Of course, the whole code is a little bit silly, as you already know how 4 compares to 5—this doesn't need to be executed at runtime.
But let's assume that these were run-time values, and you did need to do the comparison. You still only need to do the comparison once. So this code:

cmp rax, rbx ; Compare 4 and 5
je _equal ; je = jump if equal
cmp rax, rbx
jl _less ; jl = jump if less
cmp rax, rbx
jg _greater ; jg = jump if greater

can be simplified to:

cmp rax, rbx
je  _equal
jl  _less
jg  _greater

since conditional-jump instructions do not alter flags.

But when I run the program it jumps to _equal, but it then jumps to _less, and _greater. How can I disable this auto-jumping?

As has already been pointed out in the comments and another answer, it is not actually jumping, since it's not skipping any instructions. It's just falling through to the next label.
One way to prevent this—as user3344003 advised—is to add an unconditional jump instruction after each case. Something like:
    cmp rax, rbx
    je  _equal
    jl  _less
    jg  _greater
finished:
    ret

_equal:
    print e
    jmp   finished
_less:
    print l
    jmp   finished
_greater:
    print g
    jmp   finished

Actually, though, all you're doing is jumping back to return. A single ret instruction is smaller in size than a jmp instruction, and also more efficient since no branch needs to be taken. You would only use this pattern if you had a bunch of clean-up code that needed to run before returning. In this simple case, you can do:
    cmp rax, rbx
    je  _equal
    jl  _less
    jg  _greater

_equal:
    print e
    ret
_less:
    print l
    ret
_greater:
    print g
    ret

Notice that I've omitted the ret after the jg instruction. You don't need it—equal, less, and greater exhaustively cover every possibility, so one of the three branches is guaranteed to be taken. In fact, that means you can rearrange the code to eliminate one of the branches, taking advantage of the very fall-through that was originally confusing you:
    cmp rax, rbx
    jl  _less
    jg  _greater

    ; fall through to 'equal' case
    print e
    ret

_less:
    print l
    ret

_greater:
    print g
    ret

Fun fact: this is essentially identical to the code that GCC would generate if you'd written this in C.

A: You need to put a jump instruction after each case (print macro expansion). It's just falling through, not jumping.


text:
Q: Is there a terminal program that differentiates between input, output, and commands? Is there a terminal program that shows the difference between input, standard output, error output, the prompt, and user-entered commands?  It should also show when standard input is needed vs. running a command.
One way would be to highlight each differently.  The cursor could change color depending on if it was waiting for a command, running a command, or waiting for standard input.
Another way would be to have 3 frames -- a large frame on the top for output (including prompt and commands running), a small frame near the bottom for standard input, and an one-line frame at the bottom for command line input.  That would possibly even allow running another command to provide input while the previous command is still waiting for standard input.
From http://jamesjava.blogspot.com/2007/09/terminal-window-with-3-frames.html

A: Hotwire could be a good candidate, but it's not doing that out of the box, AFAIK

A: For now it appears that there is no such program.

A: My program gush (Graphical User SHell) does part of this.
It uses different colours for commands and program stdin/stdout/stderr.
Note that the traditional separation of shell and terminal makes this
impossible because the interface between them models an old serial
terminal connection and therefore only has a single input and single
output channel.  I get around this problem by combining shell and
terminal into one program.
It would be nice to also indicate when a program is waiting for input,
but I don't think there's any way to detect this, unless you traced the
system calls of the child program to detect when it tries to read stdin.
For interactive programs, you can guess that if the last output did not
end with newline it's probably prompting for input, but this would not
work for non-interactive programs, eg. sed.


text:
Q: $\frac{d}{dt}$ on $\mathbb{R}$ is not a Fredholm operator? I encountered a statement in a book that $\frac{d}{dt} : L^2_1(\mathbb{R}) \longrightarrow L^2 (\mathbb{R})$ is not a Fredholm operator, where $L^2_1$ is the first Sobolev space of the $L^2$ space. Consider a sequence of function $g_n$ such that $g_n \equiv 1$ on $[-n,n]$, increasing on $[-n-1,-n]$ and decreasing on $ [n,n+1]$, and vanishes outside of $[-n-1,n+1]$. We have $\operatorname{lim}_{n\longrightarrow \infty}\limits \lVert g_n \rVert_{L^2_1} = \infty$ and $\lVert \frac{d}{dt} g_n \rVert_{L^2} \leq C$ for some constant $C$. Then the author says if $\frac{d}{dt} $ is Fredholm, then the sequence will imply a non-trivial kernel which is a contradiction. My question is how he knows the implication of non-trivial kernel?
Thank you
edit:
The book I'm reading is "Floer homology groups in Yang-Mills theory" by Donaldson and this problem is on page 58.

A: In general, if $L : A \to B$ is Fredholm and injective, then $L : A \to L(A)$ is bounded bijective between Banach space (Since $L$ has closed range) and so has a bounded inverse, by the bounded inverse theorem. As a result, there is no sequence $g_n \in A$ so that
$$ \|g_n\|_A \to \infty \ \ \text{and } \ \ \|Lg_n\|_B \le C$$
Since this would imply that the inverse is unbounded. As a result, $\frac{d}{dt} : L_1^2 \to L^2$ cannot be Fredholm since it is injective.
Remark:
Indeed, it is easy to see that $\frac{d}{dt}$ is not Fredholm as it does not has closed range: For all $f\in C_c(\mathbb R) \subset L^2(\mathbb R)$, the function
$$ f_n = f- \frac{c}{n} \chi_{[0,n]},\ \ \text{where } \ \ c = \int_{\mathbb R} f$$
satisfies $\|f-f_n\|_{L^2(\mathbb R)} \to 0$ and $f_n = \frac{d}{dt} g_n$, where
$$g_n(x): = \int_{-\infty }^x f_n(s)ds \in C^{0,1}_c(\mathbb R).$$
Thus the image of $\frac{d}{dt}$ is dense in $L^2$ but is not the whole $L^2$ (pick an element $f \in C_c(\mathbb R)$ with $c\neq 0$ for example)