What is the '-' in multipart/form-data?

Question: I want to ask a question about the multipart/form data. I find the http header of multipart post and the Content-Type: multipart/form-data; boundary=-----...---boundaryNumber. I want to ask, how many of '-' between the boundaryNumber and '='?
Answer: Not a single - is mandatory. You can have any number of them. It is actually a mystery to me why user-agents tend to add so many. It is probably traditional because in the old days, when people still regularly looked at the actual protocol traffic, it provided some nice visual separation. Nowadays it is pointless.
Note however, that when you use the boundary in the stream, it must be prefixed by two hyphens (--). That's part of the protocol. Of course, the fact that most user-agents use lots of hyphens in their boundary makes this very hard to see by example.
Furthermore, the last boundary (which marks the end of the message) is prefixed and suffixed by two hyphens (--).
So in summary, you could call your boundary OMGWTFPLZDIEKTHX, and then your traffic could look like this:
Content-Type: multipart/form-data; boundary=OMGWTFPLZDIEKTHX

--OMGWTFPLZDIEKTHX
Content-Type: text/plain

First part (plain text).
--OMGWTFPLZDIEKTHX
Content-Type: text/html

Second part (HTML).
--OMGWTFPLZDIEKTHX--

Comment: It is not for people looking at protocol traffic. Multipart is also used for email, and pre-MIME email readers would show everything to the user, including the multipart boundaries. The long line of hyphens separating the parts would make things a bit more readable in that case.
Comment: *"The hyphens are for rough compatibility with the earlier RFC 934 method of message encapsulation, and for ease of searching for the boundaries in some implementations."* ([source](http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html))
Comment: +1 for differentiating between the two border (--) in the spec versus the superfluous (---) that are often added to the boundary...
Comment: What happens when you have content after the last line `--OMGWTFPLZDIEKTHX--` ?
Comment: I guess then you are violating the protocol.
Comment: This helped me immensely, clear and precise.
Answer: The number of dashes depends on how many you want there.  It can be zero, if you like -- it's just that more dashes makes the boundary more obvious.
The boundary consists of a line containing two dashes plus everything after "boundary=".  So if your header said boundary=ABC, the boundary looks like
--ABC

Answer: In your boundary definition, no hyphens are required. When using that boundary to separate two distinct body parts, you must start with two hyphens, followed by your previously-defined boundary string.
This is explained in RFC 1341 (MIME), and you can find additional information there in the Multipart section (as linked).
Answer: It is completely arbitrary.
The point of the boundary is to define the beginning and ending of your data. It does not matter what it is, as long as it is not part of the content.
Answer:
Multipart/form-data media type can be used by a wide variety of applications and transported by a wide variety of protocols as a way of returning a set of values as the result of a user filling out a form.

Multipart/form-data follows the model of multipart MIME data streams. A multipart/form-data body contains a series of parts separated by a boundary.
Example of multipart/form-data response:

There are four important fields which we  are important in response:
-<<boundary_value>>
Content-Disposition: form-data; name="<<field_name>>"
Content-Type: type of the data
<<field_value>>
The "Boundary" Parameter is one of the clue in the in multipart response:
As with other multipart types, the parts are delimited with a
boundary delimiter, constructed using CRLF, "--", and the value of
the "boundary" parameter.  The boundary is supplied as a "boundary"
parameter to the multipart/form-data type. The boundary delimiter MUST NOT appear inside any of  the encapsulated parts, and it is often necessary to enclose the
"boundary" parameter values in quotes in the Content-Type header
field.
Resource - https://datatracker.ietf.org/doc/html/rfc7578

What is the '-' in multipart/form-data?


I need you both the same - is it correct?

Question: Is it correct to say 'I need you both the same'?
I want to say 'I need you both equally' but need it for the song with the word 'same'.
Doesn't it mean 'I need you both to be the same'?
Do you have any idea of what I can say instead?
Thanks a lot
Answer: This question is more of an opinion, since you are writing a song and, as we know, that does not require immaculate grammar!
With a bit of context, the listener will understand your meaning, I believe.
You are meaning it to imply the word "amount".

I need you both the same [amount]

I don't think there is a better way of saying this whilst still ending with the word same.
Answer: It's not entirely correct, but you can get away with a lot in song.  As a lyric, it's fine. It implies that you need both people the same amount, as in, you are equally in love with both of them.
A crude example:

I need you both the same
  Why do we have to play the game
  Why make me have to choose
  Knowing one of us will lose
  Two loves is not too much.

Meanwhile "I need you both to be the same" implies that you want the two people to become more similar to each other.  This is probably not what you want to say.


Can I marry my Evangelical Christian non-virgin girlfriend?

Question: I recently reverted to Islam. The girl I'm dating is ok with that. We have talk about marriage and she's Evangelical Christian. I know Islam allows for Muslim men to marry Christian and Jewish women, however it does specifies that they must be "chaste" (as per what the Quran says as I understand). And she's not, she as me was sexually active before we met, and also she was molested as a child thus loosing her virginity in a non-consensual way to begin with.
But I wonder if the chastity part in the Quran refers to the idea they should be virgins before marriage or just that they should be celibate (as for example a rape victim is not virgin but can't be consider that she choose to have sex). Thank you.
Comment: Doesn't sound like she's actually an evangelical Christian. Unless you mean "evangelical" in the American political sense (where it has very little to do with religion)?
Comment: We're not Americans and we do not live in the US
Answer: In general it is permitted but not recommended to marry a non-muslim: Are inter-religious marriages encouraged in islam? All Christian denominations are the same in this respect, however political affiliation can matter as some madhabs such as the Hanafis consider it forbidden (makruh tahrimi) to marry a woman who is not a dhimmi (resident of an Islamic state).
As for your question, note that the interpretation of محصنات in 5:5 varies. One, which you have mentioned, is that it means chaste - this does not mean virgin or celibate rather it means that she must not be having illicit sexual relations outside marriage, so for example a widow or divorcee can be chaste while not being virgin. Being molested against her will does not make her unchaste as that is not within her control, but willingly engaging in sexual relations outside marriage does make her unchaste, especially if this is ongoing and not something which she regrets.
Another interpretation is that it means free i.e. not a slave. As marriage of a free man with a slave women is not permitted except in exceptional circumstances, and even then it is not permitted with a non-muslim slave according to some madhabs. This is the same as conveyed in verse 4:25. And one interpretation is that it means that she must perform the ritual bath for purification after sex and menstruation.

اختلفوا في معنى " المحصنات " فذهب أكثر العلماء إلى أن المراد منهن الحرائر ، وأجازوا نكاح كل حرة ، مؤمنة كانت أو كتابية ، فاجرة كانت أو عفيفة ، وهو قول مجاهد ، وقال هؤلاء : لا يجوز للمسلم نكاح الأمة الكتابية لقوله تعالى : " فمن ما ملكت أيمانكم من فتياتكم المؤمنات " ( سورة النساء ، 25 ) جوز نكاح الأمة بشرط أن تكون مؤمنة ، وجوز أكثرهم نكاح الأمة الكتابية الحربية ، وقال ابن عباس : لا يجوز وقرأ " قاتلوا الذين لا يؤمنون بالله " إلى قوله " حتى يعطوا الجزية عن يد وهم صاغرون " ( التوبة ، 29 ) ، فمن أعطى الجزية حل لنا نساؤه ومن لم يعطها فلا يحل لنا نساؤه .
وذهب قوم إلى أن المراد من المحصنات في الآية : العفائف من الفريقين حرائر كن أو إماء وأجازوا نكاح الأمة الكتابية ، وحرموا البغايا من المؤمنات والكتابيات ، وهو قول الحسن ، وقال الشعبي : إحصان الكتابية أن تستعف من الزنا وتغتسل من الجنابة .
There is difference on the meaning of "al-Muhsanat". The view of most scholars is that it means free women and that it is permitted to marry any free woman be she a Muslim or from the People of the Book, be she immoral or chaste, and this is the saying of Mujahid. They said: It is not permitted for a Muslim to marry a slave from the People of the Book as Allah has said: "then [marry] from those whom your right hands possess of believing slave girls" (4:25) which permits marriage to slaves with the condition that they be believers.
And many have permitted marriage to a Harbi woman from the People of the Book while Ibn Abbas said: It is not permitted and he recited: "Fight those who do not believe ... until they give the jizyah willingly while they are humbled." (9:29), so whoever pays Jizya their women are permitted to be married and those who do not their women are not permitted
And one faction said that Muhsanat in this verse means those who are chaste, be they free or slaves. And so it is permitted to marry a slave from the People of the Book and it is forbidden to marry the prostitutes from the Muslims and the People of the Book. And this is the saying of Hassan.
And Ash-Sha`bi said the Ihsan of a woman from the People of the Book is that she is abstains from fornication and performs ghusl of Janaba
— Tafsir al-Baghawy
Comment: Thank you, my only question if that if we both choose to remain celibates till marriage from now on, is there a period of time until that can be considered chaste again? And would repeteance is enough if is done according to her own religion?
Answer: A Muslim man may marry a Christian woman; the denomination or sect that the Christian woman follows does not make a difference. What does make a difference is whether the woman in question respects Islam. It would not be permissible to marry a woman who is hostile or disrespectful to Islam in any way. Especially, you should be mindful that she would be the mother of your future children; and if you care about the Islamic upbringing of your children, you should marry a woman who respects Islam (and preferably, is Muslim herself).
Chaste and virgin are not synonymous; only a woman who has engaged in illicit sexual relations willingly would be considered unchaste; and the same is true of men.
In Islam, marrying a woman who has not abstained from illicit sexual relations is at least discouraged, unless she has repented, which is characterised by the following key signs:

She feels a deep sense of regret for the sin/s committed.
She immediately stops committing the sin.
There is a strong and sincere intention not to return to the sin.

In the context of a Christian woman, her repentance could be in accordance with her own faith; but it should be sincere and genuine. It is not permissible to marry a woman who has committed zina and does not show remorse, or a firm resolution not to return to the sin.
Imam Ahmad ibn Hanbal says:

ولهذا ذهب الإمام أحمد بن حنبل - رحمه الله - إلى أنه لا يصح نكاح المرأة
البغي حتى تتوب ، وما دامت كذلك لا يصح تزويجها من رجل عفيف ، وكذلك لا
يصح عنده عقد الرجل الفاجر على عفيفة حتى يتوب ويقلع عما هو فيه من الزنا
It is not permissible for an unchaste woman to
marry a chaste man, unless she repents; and likewise it is not permissible
for an unchaste man to marry a chaste woman unless he repents and
stops committing the sin of zina. [*]


Durandal multiple V/VM for route

Question: I am creating an app using durandal.  The basic premise is

The header always using the the same V/VM with different data based on the route while the data V/VM will change based on that navigation
I have the data section changing via the router no problem.  I can't get the header section to consistently activate so I can change it.
I have tried using an activator and call activate on router.onNavigationComplete, but it doesn't always call the activate function in my viewModel.
Can somebody point me in the right direction to get this working correctly?
Thanks,
Eric
Answer: You might need to use activate: true. look at the following:

Please refer to: http://durandaljs.com/documentation/Using-Composition/

Durandal multiple V/VM for route


can I extract overlap of polygons within the same layer?

Question: I am trying to extract the overlap of polygons that are within the same layer in 10. The layer came from a buffered street centerline and I'm trying to extract and delete the intersections from the layer.
I have tried 'intersect' but it's virtually impossible to tell which records are an overlap and which ones are not. We are trying Shape tools but so far the computer gave an 'overflow' error.
Answer: I think I would use the intersect command
Then use that data to select your overlapping polygons.
Comment: @Julia, Have you adding the layer into the dialog by itself (just once)?  You don't want to add it twice, otherwise you will end up with duplicate features, like you are describing.
Comment: I have tried 'intersect' but the output includes all records, overlap and the non-overlap, because all polygons are in the same layer. It comes up with over 212k records (we started with 13k) because the overlap has multiple records. There doesn't seem to be a good system to separate overlap from non overlap.

I am using ARCGIS 10, desktop. I am trying to identify the overlap of polygons within the same class. I will apply a buffer to the overlap and use that to clip another layer.

In any case, to problem is that the overlapping polygons I'm trying to identify are in the same data layer.
Comment: +1 - Found this question and answer really helpful - so simple, yet brilliant. Also didn't know that Intersect could be used on a single input (my colleagues didn't know either).
Comment: That was so helpful! I also didn't know you could use intersect on a single layer. Thanks.
Comment: Brilliant idea. Sometimes we are thinking too  much about easy things.


Rails Model: save array of sub objects

Question: I am new to Ruby and Rails. I'm try to create a "Team" object that has a leader id and an array of users attached.
Problems
I am unable to attach the array of users to the team object
I am unable to define leader object, only store its id
Any help greatly appreciated
My Rails Models:
class Team
      include Mongoid::Document
      include Mongoid::Timestamps::Created
      include Mongoid::Timestamps::Created

      field :name
      field :slug
      field :description

      field :leader
      field :users, type: Array

      field :holiday_days_per_year, type: Integer
      field :hours_per_day, type: Integer

      field :organisation_id, type: Integer

      embeds_many :users

      validates :name, :holiday_days_per_year, :presence => true
      validates :holiday_days_per_year, :hours_per_day, :numericality => true

      before_save :set_slug

      def set_slug
        self.slug = "#{name.parameterize}"
      end
    end

    class User
      include Mongoid::Document
      include Mongoid::Timestamps::Created
      include Mongoid::Timestamps::Created

      field :slug
      field :first_name
      field :last_name
      field :birth_date, type: Date

      field :job_title
      field :job_start_date, type: Date
      field :job_probation_ends, type: Date

      field :work_email
      field :work_address
      field :work_phone_number

      field :personal_email
      field :personal_address
      field :personal_phone_number

      field :organisation_id, type: Integer

      # emails should be unique
      validates_uniqueness_of :work_email, :personal_email

      validates :first_name, :last_name, :birth_date,
      :job_title, :job_start_date, :job_probation_ends,
      :work_address, :work_phone_number,
      :personal_address, :personal_phone_number,
      :presence => true

      # validates emails
      validates_format_of :work_email, :personal_email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i

      belongs_to :team, :inverse_of => :users

      before_save :set_slug

      def set_slug
        self.slug = "#{first_name.parameterize}-#{last_name.parameterize}"
      end
    end

controller action
  # POST /teams
  # POST /teams.json
  def create
    new_params = params.permit(
        :name, :holiday_days_per_year, :hours_per_day, :leader, :users)
    @team = Team.new(new_params)

    if @team.save
      render json: @team, status: :created, location: @team
    else
      render json: @team.errors, status: :unprocessable_entity
    end
  end

JSON Sent
{
    holiday_days_per_year: 20
hours_per_day: 8
leader: "522cf27114bc38307a000004"
name: "Tester"
users: [
0: "522cf27114bc38307a000004"
1: "522d966214bc38659300000d"
2: "522dd21214bc38ac6b000011"
]
}

The object is created, but users and leader dont get saved, the object comes back as
{
_id: "522df8c714bc38ef3e000022",
created_at: "2013-09-09T16:35:19.405Z",
description: null,
holiday_days_per_year: 20,
hours_per_day: 8,
leader: "522d966214bc38659300000d",
name: "Tester",
organisation_id: null,
slug: "tester",
users: [ ]
}

Answer: In your model, redefine your "as_json" method with the following
class Team < ActiveRecord::Base
 ..
 has_many :users

 def as_json(options)
   { :name=>self.name, :leader=>self.leader, :users=>self.users }
 end
end

Comment: Leader should be a single object from User
Users should be an array of User objects

the above doesn't really define leader as an instance of user
Comment: I see, does the as_json bit help you a "bit" :) ?

Rails Model: save array of sub objects


How do you unit-test a plug-in to an application?

Question: When developing a plug-in to application, using the application API which doesn't run independently of the application, is unit-testing even a possibility? What are strategies to test a plug-in that is tightly integrated with an application?
Answer: Abstract out the host API with interfaces, and test against a mock host.
The key is that your logic is tested with the characteristic data that the host might provide.
If you have a code example, I can probably give you a better answer.
Answer: Most people miss the point of about mock objects. They aren't about testing, they're about interface discovery. Or as Michael Feather's put it a different way in a recent blurb: API Wrapping.
Don't code directly against the api. Instead create your own interfaces that abstract that api and then write tests for your code.
I've done this when writing plugins for Eclipse and the results were far better than I had expected ahead of time.


Laravel Excel Parent/Child Classes

Question: I am using the following package called Laravel-Excel for my Laravel application. Link provided below.
What I would like to be able to do is create a parent class that will generate all my reports and I can have child classes where I define column headings and the data needed to create the Excel document. I looked around to see if anyone has accomplished this. I have not found this to be the case. Any suggestions on what I have so far?
<?php

namespace App\Reports;

use Excel;

class Report
{
    protected $columnHeadings = [];

    protected $dataSet;

    public function generate()
    {
        Excel::create($filename, function ($excel) {
            $excel->sheet($sheetname, function ($sheet) {
                $sheet->appendRow($this->columnHeadings, null, 'A1', false, false);
                $dataSet->each(function($data) use ($sheet) {

                });
            });
        })->download($type);
    }
}

http://www.maatwebsite.nl/laravel-excel/docs
Answer: What you are trying to achieve it's called template pattern design. Where you can have a base class that often its not incialized it kind of serves as a resolver, so most of the time you would want an abstract class as a base class.
In that base class you can define some properties in your case filename and columns, which will be overridden from the child class. The class structure you may want its:

Base Abstract ReportGenerator

 ->Child MonthlyReport Class

 ->Child YearlyReport Class

Code in your case:
<?php

namespace App\Reports;

use Excel;

abstract class ReportGenerator
{
    protected $columnHeadings = [];

    protected $dataSet;

    protected $fileName;

    public function generate()
    {
        return Excel::create($this->filename, function ($excel) {
            $excel->sheet($sheetname, function ($sheet)use ($headings = $this->columnHeadings) {
                $sheet->appendRow($headings, null, 'A1', false, false);
                $dataSet->each(function($data) use ($sheet) {

                })->download($type);
            });
        });
    }
}

Then in your child class:
<?php

namespace App\Reports;

use App\Reports\ReportGenerator;

class MonthlyReport extends ReportGenerator {

        //set the properties for this specific class so they can override the base properties whenever this class its init.

      protected $columnHeadings = [];

      protected $dataSet;

      protected $fileName ='Monthly Report';

      public function __construct(SomeModel $model){

           //set the required headings for this specific report
           $this->columnHeadings = ['some headings'];
           $this->data = $model;

      }

      public function generateMonthlyReport(){

         return $this->generate();
      }

}

So whenever you want to generate a monthly report you might do:
MonthlyReport->generate($someModel); and you can create other classes to generate different reports but extending abstract claass!

Laravel Excel Parent/Child Classes


How to calculate sample size for a biomarker discovery nested case-control study (approach by M. Pepe)?

Question: I'm about to design a nested case-control study in which I will try to identify a biomarker (or biomarker panel) from protein expression levels (determined with mass spectronomy).
I've got a cohort of >1000 patients with endometrial cancer, out of which approx 150 later died from the disease.
I want my biomarker(s) to be able to predict whom will live and whom will die from disease.
Given that my cohort is population-based and consecutive, I believe this is exactly the type of situation in which a NCC is the proper design (where obtaining new info on biomarkers is expensive and time-consuming and thus cannot be done on the entire cohort).
Now, I've come across statistical methods papers with recommendations on how to calculate the proper sample size, specifically "Improving the Quality of Biomarker Discovery Research: the Right Samples and Enough of Them" by Pepe, Li and Feng https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4452419/pdf/nihms-676864.pdf
In their paper, they describe a situation in which a researcher wants to develop a biomarker for recurrence in low-risk colon cancer, thus very analogous to my research question. They introduce the concept of Discovery Power and False Leads Expected, and derives sample sizes from the desired performance of the new biomarker by specifying what would be a "useful" biomarker and what would be a "useless" biomarker. In their colon cancer example, a "useful" biomarker would have the same positive predictive value (PPV) as the recurrence rate in high-risk colon cancer, ie. 30%, and a "useless" would have the same PPV as the recurrence rate in low-risk colon cancer, ie. 10%. To me, this makes sense. In a low-risk population, you would be happy with a biomarker that can identify a subset of patients with the same risk of a recurrence as in those with high-risk colon cancer, and you would be unhappy if your biomarker only had the same PPV as the baseline risk of recurrence in the low-risk population. For endometrial cancer, the corresponding figures is PPV=40% is useful and PPV=10% is useless.
Still, I fail to calculate the sample size. They provide a Supplementary Material with a worked example, section B3. What I don't get is how a PPV=30% results in a ROC1(f)=0.39. For this, they refer back to the main paper, where they state that logit(PPV)=logit(p)+log(ROC(f)/f).
They also provide a Stata command rocsize, which can be found at https://research.fredhutch.org/diagnostic-biomarkers-center/en/software.html
or type net from https://research.fhcrc.org/content/dam/stripe/diagnostic-biomarkers-statistical-center/files/stata/ in the Stata command window and then press screensize.
This command runs a simulation which gives you the Discovery Power, given your sample size input and desired alpha-level. You are expected to provide;
tp_rate: true positive rate, which they in their example set as ROC1(f)=0.39 (I don't understand why, and again, I don't understand how they got the value 0.39 from a PPV=30%)
fp_rate; false positive rate, which in their example is set to 0.1. I don't really understand why it is 0.1
nd(#); number of diseased. From their formula-based sample size calculation they got 40
ndb(#); number of non-diseased. They had specified a 1:4 ratio of cases:controls, thus =160
tpn(#); the joint fixed null true rate for a sample drawn from a population with binormal ROC defined specified alternative rates (tp_rate & fp_rate) and specified sample sizes for diseased (nd(#)) and non-diseased (ndb(#)) subjects. This verbatim from the help section from Stata. I don't understand any of this, but in their example it is set as 0.1.
fpn(#); same as tpn(#), but for false positive rate instead of null true rate. In their example set to 0.1.
I tried to take a short-cut and just experiment with the values in the simulation, but I just have to many unknowns.
Can anyone walk me through this paper step-by-step, or better yet, you might have an Excel-file on hand that calculates the formulas they provide in their paper? I've tried making an Excel-file myself, but there are too many steps missing in the calculations of the formulas provided and some algebraic terms that are not explained, so I cannot follow what they did and how they got their results.
I've also asked this question on ResearchGate, where I also uploaded the Supplementary Material link to RG.
Answer: $ROC_1(f)=0.39$ can be found algebraically using $PPV=0.3$, $\rho=0.1$, and $f = 0.1$:
\begin{align*}
logit(PPV)=logit(\rho)+log(ROC(f)/f) \Leftrightarrow ROC(f)=\exp(logit(PPV)-logit(\rho))*f
\end{align*}


Zero knowledge proof in smart parking managment systems

Question: I read this paper on protecting user privacy in smart parking management system. It talks about using zero knowledge proofs to protect privacy but I am not certain how they do it.  My assumption is that the Verifier has the public key of the User and sends the User challenges that the User needs to complete with its private key. Would be great if someone could clarify this to me.
Answer: Caveat: the whole idea of protecting user privacy in electronic parking meters when cars have license plates looks like a solution in search of a problem to me.
We are told a user's device (e.g. NFC-enabled mobile phone) is loaded with some (assumed genuine) credential:

The credential encodes the User's attributes (name, vehicle registration plate and some fresh random value).

Then when a check is needed, the user's device

generates from her credentials a presentation token that contains the required information and the supporting cryptographic evidence.

What this cryptographic evidence is, how parking rights are determined from that, what actually protects name and vehicle registration plate from prying eyes, and how it is prevented that credentials are cloned to the device of another user with no right to park (like some user with right to park wants to lawlessly allow another without such right to park) is left at the imagination of the audience. The article is extremely lacking on that.
A nearly totally disconnected second part of the article explains that the user's device makes a cryptographic proof of a private key $x$ that it holds to another verifying device like a parking gate, per Schnorr's zero-knowledge protocol or well-known derivatives, run on an Elliptic Curve group. There's no discussion about the potential that the public key (necessary on the verifier side, thus customarily sent by the device on request) becomes identifying information.
But that article is far from the worse published in non-crypto journals among those  blending IoT and ECC in a would-be catchy title. I did not spot a glaring error in 10 minutes of reading. And at least, the performance reported (11 to 58s on small microprocessors for scalar multiplication on a 160-bit elliptic curve) is plausibly true.
Answer: I believe the answer lies in section 4 of the paper, titled "Privacy preserving outdoor parking management".
The authors explain the details of ZKP schemes later on, as well as the libraries they used and curve parameters chosen... which explains the "how" pretty clearly.
My understanding of this paper is that the the possession of secret information (e.g. personally identifying information) of a parking client is to be proven to the parking system operator in zero knowledge.
I would also add that they mention both interactive and non-interactive versions of ZK protocols. So in that case, only the prover sends a (single) message to the verifier, e.g. for the modified Schnorr protocol (5.3). Again, the client is the prover and the parking system is the verifier in this application, for this non-interactive scheme.
Comment: I do understand that the user is the Prover and the parking sensor is the Verifier. I am not certain if they are using public and private key for zero knowledge proof. Does the prover have a private key and the verifier the public key for the zero knowledge proof to work?
Comment: The authors aren't doing signing or encryption. There is secret information $x$ (encoded as an integer mod n) that the prover wants to prove they know (in zero knowledge), and nothing more in this scheme. I'd just keep the notions separate for clarity. Re-read the steps of the protocol in 5.2 and 5.3 and you'll plainly see that the prover does indeed transmit $x\cdot P$. In other contexts, that's a public key. But we just don't care about those semantics here.


Process Group Leader's PID reused

Question: Is it possible that a past Progress Group Leader's PID gets reused by an other process and this latter process starts a new Process Group?
In this case the first created process group and the second one have the same PGID, which situation should be avoided I consider.
Does Linux avoid assigning a PID which is a valid PGID?
Comment: Related (but not duplicate): [Two processes with identical PID after a fork call](https://unix.stackexchange.com/q/508508/86440).
Answer: No, that's not possible. It's forbidden by the standard:

The fork() function shall create a new process. The new process
       (child process) shall be an exact copy of the calling process
       (parent process) except as detailed below:

The child process shall have a unique process ID.
The child process ID also shall not match any active process group
     ID.
Comment: There's also some interesting discussion in [the rationale](http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap11.html#tag_21_11_01_02).

Process Group Leader's PID reused


Box.net acting as Identity Provider (Idp)

Question: Any roadmap for Box acting as an IdentityProvider (using OpenId) so that my application can rely on Box for login/authentication?
Answer: A fascinating question, but one that really isn't suited for StackOverflow.  Product direction questions are much more suited to sending us a direct email (api at box).  Please explain what you are trying to do, and we can talk to you about how we might work with you to solve your business needs.


Can Blender's bundled "bfont" be used for commercially?

Question: Blender, which I use to create my video intros, comes bundled with a bfont by default so the question is:
Is this font is free for commercial use and what type of license does this "bfont" font have?
Answer: The bfont is actually a modified DejaVu (which in turn is a modified Bitstream Vera).
You are free to use it commercially but:

If you modify it, it has to be under a new name (it can't be called "bfont")
You can't sell it by itself
You have to include the copyright notice (found in release/datafiles/LICENSE-bfont-ttf.txt)

Check the license notice for more info.
Comment: no i do not have any plan to sell the font seprately i m talking about if i use bfont in my video intro which i made in blender and then use the intro video for commercial purposes
Answer: I am not a lawyer. This answer is not a substitute for reading the actual license file.
Short answer: Yes

Bundled with the Blender binaries and source, you can find the licenses for all the software it depends on. For bfont, the file you want is called LICENSE-bfont.ttf.txt, in the same folder as the Blender executable in binary distributions.
It appears to be an entirely custom license, that, according to my interpretation, grants every one with all rights. Therefore, I believe it to be safe to use it commercially. (Might, however, not be the most.. appealing font :P)
Here is an excerpt of the license:

Permission is hereby granted, free of charge, to any person obtaining a copy
  of the fonts accompanying this license ("Fonts") and associated
  documentation files (the "Font Software"), to reproduce and distribute the
  Font Software, including without limitation the rights to use, copy, merge,
  publish, distribute, and/or sell copies of the Font Software, and to permit
  persons to whom the Font Software is furnished to do so (...)
Answer: While the other answers are about distributing the font file itself, the use of a font to display text in your final image is not the same as sharing the font file and is not affected by the licensing of the font file.
As explained further in this wikipedia article (that you should read)

In the United States, the shapes of typefaces are not officially copyrightable, though they may be protected de facto by copyrights on computer code and trademarks on names.

which means the use of a font to draw text contained within an image does not cause copyright issues (some countries could have differing laws). While some fonts released under commercial licenses may restrict their use to people who paid for the font, the fonts included with blender are freely distributable and you are using them legally.
While there are other things to consider, like recreating some text that resembles a company logo can get you into trademark territory and some phrases have been trademarked etc, the general displaying of text in an image or video is not a copyright issue.


What short story has astronauts studying Neanderthals on a planet with an imminent volcanic eruption?

Question: This story is about a team of astronauts on a planet studying a Neanderthal type race. They become aware that a volcanic eruption is imminent. Unfortunately, one of the members of their crew is participating in a burial ritual and might not make it back in time.
Comment: Reminded me of the opening chapter of Star Trek: Into darkness a bit..
Comment: Also more details: when did you read it, and where? Was it in English? Any other details you remember?
Comment: Did this involve a warrior dying and a need to take his entrails across the mountains?
Comment: @Stark07 - You mean it was badly written?
Answer: This might be Plutonia by Vladimir Obruchev, first published in Russian in 1924.  It is a quite hard science fiction novel, except for the conceit that the Earth is hollow.  The characters are not astronauts, but rather a group of scientists who travel to the North Pole, where there is an entrance to the hollow inside the globe.  The book features lots of interesting science about what the weather, geology, and paleolithic biota would be like in the interior world.
Late in the book, two members of the party, who were left behind at an early campsite while the rest of the group continued exploring, are taken in by a tribe of early humans, from which they eventually need to be extracted.  And there is a climactic volcanic eruption, forcing the group to flee back to the surface world.
Answer: Could be the Ugly Little Boy? https://en.wikipedia.org/wiki/The_Ugly_Little_Boy which is about a Neanderthal boy transported (maybe because of a volcano? can't remember, might have been hurt) back to present time and his relationship with his nurse. A bit of a long-shot, maybe.
Comment: It does seem like a long shot. What makes Asimov's famous story "The Ugly Little Boy" a better match for this question than the hundreds of other stories about Neanderthals? Does it have astronauts? A burial ritual?


Proof of Spivak's statement that if $0<|x-a|<\delta$, then $|g(x)-m|< \min(\frac{|m|}{2},\frac{\epsilon|m|^2}{2})$

Question: Michael Spivak, in his Calculus textbook pp 89, has tried to prove that given
$\lim \limits_{x\to a} g(x)=m $, where $m\not=0$, $\lim _{x\rightarrow a} (\frac{1}{g})(x)=\frac{1}{m}$.
To prove it, he states that if $\epsilon>0$ there is a $\delta$ such that for all $x$, if $0<|x-a|<\delta$, then $|g(x)-m|< \min\left(\frac{|m|}{2},\frac{\epsilon|m|^2}{2}\right)$.I do not understand how he gets/states that.Can you please help me prove it?He later uses a lemmma to prove the theorem but I understand the proof but not the intermediate statement.
Thanks in advance.
Comment: You can see the link http://math.stackexchange.com/questions/54754/proving-that-b-n-to-b-implies-left-frac1b-n-right-to-frac1b that may help you.
Answer: The fact that
$$\lim_{x\to a}g(x) = m$$
means: for every $\varepsilon\gt 0$, there exists $\delta\gt 0$ such that if $0\lt |x-a|\lt \delta$, then $|g(x) -m|\lt \varepsilon$.
You can pick whatever $\varepsilon\gt 0$ you want, there will be a corresponding $\delta$.
Given $\epsilon\gt 0$, the number
$$\min\left(\frac{|m|}{2},\frac{\epsilon|m|^2}{2}\right)$$
is a positive number; so letting it be $\varepsilon$, we know there exists $\delta\gt 0$ with the desired property.
So that's how he "gets/states that". It's a consequence of the limit
$$\lim_{x\to a}g(x) = m.$$
Of course, you might wonder why he chooses that particular $\varepsilon$. The reason is that it makes the proof work. Intuitively: you want to make sure that $g(x)$ is close enough to $m$ so that $\frac{1}{g(x)}$ is close enough to $\frac{1}{m}$. If you work out wha tyou need to ensure that, the condition will become apparent.
Comment: Thank you.I think I now understand it .
Comment: Arturo, Not sure your post answers the question. The key reason why Spivak's method is a proof is lacking, which is that $K(m,\epsilon)=\min(\frac12|m|,\frac12\epsilon|m|^2)$ can be made as small as desired, for suitable values of $\epsilon$ (in short $K(m,\epsilon)\to0$ when $\epsilon\to0$).
Comment: @DidierPiau: I'm not sure I agree; that would make sense if Spivak were trying to show that the limit of $g(x)$ is $m$; but he isn't. He is showing that the limit of $\frac{1}{g}$ is $\frac{1}{m}$. In the proof, $\epsilon$ is given, and the fact that $\lim g(x)=m$ is given; he makes the choices of $\delta$ to ensure that you get $|\frac{1}{g}(x)-\frac{1}{m}|\lt\epsilon$, and one of the auxiliary choices he makes uses $K(m,\epsilon)$. It really doesn't matter that $K(m,\epsilon)\to 0$ for suitable choices, since he is not trying to show $|g(x)-m|$ can be made arbitrarily small.
Comment: In other words, the idea of the proof is to show that (1) for every $\epsilon$, there exists $\delta$ such that $|x-a|<\delta$ implies $|g(x)-m|<K(m,\epsilon)$ and (2) for every $y$ ands $\epsilon$, $|y-m|<K(m,\epsilon)$ implies that $|1/y-1/m|<\epsilon$. Hmmm... Then my previous comment was off topic. Sorry about that and thanks for the explanation.
Comment: @DidierPiau: No problem! You're right that one has to be careful; there are two ways to go about these limits: show that for every $\epsilon\gt 0$ you can find $K(\epsilon)$ and $\delta\gt 0$ such that $|x-a|\lt\delta$ implies $|f(x)-m|\lt K(\epsilon)$ and $K(\epsilon)\to 0$ for suitable choices of $\epsilon$; or make inspired choices of $\delta$ that ensure some auxiliary term is less than $K(\epsilon)$ and that this implies $|f(x)-m|\lt \epsilon$. Spivak generally sticks to the latter rather than the former, but when we have the former one should definitely emphasize the $K(\epsilon)\to 0$.


Was Talos an intelligent machine?

Question: I've been playing "The Talos Principle".  In it, Talos is presented as a symbolic representation of an intelligent artificial being (a robot, if you're feeling less pretentious).  The bronze giant from the Argonautica is certainly a reasonable symbol to choose for the themes of the game.  However, is this representation, of an construct with human-like intelligence, accurate, with regards to the mythology?
I suppose I'm asking two questions in a sense:

Is he artificial? (that is, not a member of some ancient natural race of metal giants, for instance)
Is he intelligent?  He is presented as having wishes and desires of his own, and at one point this very quality is said to have been the cause of his downfall.

May we not then say that Talos, though created as a machine or a toy, had all the essential properties of a man?  He moved of his own volition.  He spoke and could be spoken to, had wishes and desires.  Indeed in the tale of the Argonauts, that was the cause of his downfall.
 Attributed in game to "Straton of Stageira", who is fictional.

What does that refer to?
Comment: A similar concept would be the [golem](https://en.wikipedia.org/wiki/Golem). They aren't usually smart, but they obey orders and serve their masters loyally.
Answer: The more popular version of the Talos story can be found in the Argonautica. In it, Talos was an automaton, a self operating machine. He was forged by Hephaistos and was tasked by Zeus to guard Europa's hideout in mount Dikti (in Crete):

And Talos, the man of bronze, as he broke off rocks from the hard cliff, stayed them from fastening hawsers to the shore, when they came to the roadstead of Dicte's haven. He was of the stock of bronze, of the men sprung from ash-trees, the last left among the sons of the gods; and the son of Cronos gave him to Europa to be the warder of Crete and to stride round the island thrice a day with his feet of bronze. Now in all the rest of his body and limbs was he fashioned of bronze and invulnerable; but beneath the sinew by his ankle was a blood-red vein; and this, with its issues of life and death, was covered by a thin skin. So the heroes, though outworn with toil, quickly backed their ship from the land in sore dismay.
Source: The Project Gutenberg EBook of The Argonautica, by Apollonius Rhodius

Pseudo-Apollodorus' version differs a bit; Talos is tasked by king Minos to patrol Crete, and he might be shaped like a bull:

Putting to sea from there, they were hindered from touching at Crete by Talos. Some say that he was a man of the Brazen Race, others that he was given to Minos by Hephaestus; he was a brazen man, but some say that he was a bull. He had a single vein extending from his neck to his ankles, and a bronze nail was rammed home at the end of the vein. This Talos kept guard, running round the island thrice every day; wherefore, when he saw the Argo standing inshore, he pelted it as usual with stones. His death was brought about by the wiles of Medea, whether, as some say, she drove him mad by drugs, or, as others say, she promised to make him immortal and then drew out the nail, so that all the ichor gushed out and he died. But some say that Poeas shot him dead in the ankle.
Source: Book 1, Apollodorus, Library, Sir James George Frazer, Ed.

Regardless of these differences Talos doesn't appear to be intelligent in either version. He is following instructions mechanically, similarly to Hephaistos' other automatons (e.g. the Khalkotauroi or the Cabeirian Horses).

As a sidenote, these coins from Phaistos tell us the Cretans thought Talos had wings.

Unfortunately a tale of a flying Talos didn't survive.
Comment: @femtoRgon Apollodorus is probably the source, yes. While the Argonautica is the more famous story, Apollodorus Library, being a compendium of myths, is where I'd look first to get the basis of a constructed quote. Btw "Straton of Stageira" is probably a reference to Aristotle: Stageira was his birthplace (and all its known for), and Stratonikeia (Stratoni today) was the closest city to Stageira.
Comment: Thank you.  Loaded up the game to get the quote I was thinking of about Talos having intelligence.  Not that I imagine it changes anything about your answer, but as a point of interest.
Comment: @femtoRgon Hm, I guess it could be argued that Talos is somewhat intelligent for a machine. His sensory abilities are exceptional, which means he is capable of at least basic pattern recognition. And of course he is capable of taking appropriate action when a threat is detected.  That said, I don't know any version of the legend where Talos speaks. As for the cause of his downfall, see: [How and why was Talos killed?](http://mythology.stackexchange.com/q/218/57)
Comment: Definitely seems to me that Apollodorus was the source in use here.  If we accept him being created by Hephaestus, and that he was brought low after Medea promised him immortality (which carries *some* implication of his independent desires and capacity for speech), [*and ignore all the rest of it*](https://en.wikipedia.org/?title=Confirmation_bias), then I think that establishes the Talos that the "Straton of Stageira" quote if referring to.
Answer: No.
The original myths are based more on ideas of "divine magic" as an explanation for the existence of various characters, rather than scientific logic as we know it today.
So the explanation for Talos, to the ancient Greek reader, would have been that he was a bronze statue endowed by the gods with a living soul & they would have considered him a man, but with a body of bronze instead of flesh, & not a machine at all.
The idea of Talos as a machine, intelligent or otherwise, is a only modern one, influenced by modern scientific logic & inventions, as well as pop culture depictions of "robots", "cyborgs", etc.

Was Talos an intelligent machine?


How do you say "My Lord and my God" in Aramaic or Hebrew?

Question: Thomas said, "O Κύριός μου καὶ ὁ Θεός μου" (koine Greek), "My Lord and my God" (English). What would he have said in Aramaic (Hebrew?) in John 20:28? Would it relate to Adonai and Yahweh?
Comment: This is speculative and hypothetical, therefore a matter of opinion. The text of scripture records the words in Greek and that is what we are to receive and believe.
Comment: I don't think this question fits the site as its not really about Christianity, maybe more biblical hermeneutics
Comment: I've asked this question https://hermeneutics.stackexchange.com/questions/76501/if-thomas-at-john-2028-was-speaking-in-aramaic-what-are-the-options-for-what-h to get a little clearer on the Aramaic.
Answer: How do you say "My Lord and my God" in Aramaic or Hebrew?
In Aramaic it is Mar Walah ("My Lord and my God").
I have a few CDs in learning Aramaic, but occasionally I go to YouTube to help me out.
Aramaic will never completely disappear. In fact the Maronite Catholic Rite to this very day say mass in Aramaic! My wife and myself have attended this Rite in Portland, Oregon (St. Sharbel Maronite Catholic Church). Heaven on earth is how I see this experience. The words of consecration in the language Jesus spoke at the last supper is very moving.
Fr. Joseph J. Palackal teaches children a simple chant My Lord and My God in a dialect of Aramaic!

A simple melody in a call-response style of singing that Sunday School children can use to celebrate the words of their Father in faith, St. Thomas the Apostle. The teaching of Syriac to the younger generation can start with this simple but profound phrase which is a succinct proclamation of the divinity and humanity of Jesus. - Aramaic Project-158. Mar Walah ("My Lord and my God"), melody for Sunday School children

Aramaic is slowly making inroads.

The Syriac heritage of the Syro Malabar Church is an essential component of the cultural fabric of India. The St. Thomas Christians had the privilege of receiving the faith directly from the Aramaic-speaking Thomas. Probably, the early converts learned the original version of the Lord's Prayer, which, in effect, is the entire Gospel in a nutshell, in the Galilean Aramaic from the Apostle. The exuberant outburst of the Apostle --- Mār walāh ("My Lord and my God")--- would have been enough for a functioning Creed. All these happened before the Christian Aramaic (i.e., Syriac) bifurcated into two different traditions --- East Syriac (Chaldean) and West Syriac (Antiochene)--- by about the sixth century A.D. Due to particular historical trajectories, the St. Thomas Christians continued the East Syriac tradition until the early eighteenth century. Two of the eight independent churches among the St. St. Thomas Christians , the Syro Malabar Church and the Assyrian Church of the East, continued the liturgy in East Syriac until the middle of the twentieth century. As a result of the vernacularization of the liturgy, the sound the East Syriac language is gradually fading from the memories of the Syro Malabar Catholics. Ironically, the Syriac language continues to be a marker of identity in the name of the "Syro" (i. e., Syriac) Malabar Church. Due to the sheer negligence of the so-called Syro Malabar Catholics, the intangible cultural heritage of the world is being lost to humanity under our watch.
It is in this context that Fr. Joseph Palackal, CMI, stepped forward with the idea of the Aramaic Project, an internet-based library and archive, to preserve and propagate the sound, melodies, and memories of the Syriac language. Three years after the launch of the website, the CNN research team working on the Hollywood-style production of "Doubting Thomas" (the final episode of Finding Jesus: Faith, Facts, and Forgery) discovered Fr. Joseph Palackal and invited him to make a guest appearance in the program. He was the only resource person from Kerala to appear on the show. Last year, the American Library of Congress took note of the mission of Fr. Joseph Palackal and invited him to deliver the Benjamin Botkin Lecture 2018. The Library also documented an interview with Fr. Joseph Palackal.
In the recent past, Fr. Joseph Palackal has initiated an international discourse on the Syriac heritage of the Syro Malabar Church and the Christian dimension of India through his scholarly presentations at such esteemed academic institutions as Oxford, London (SOAS), Harvard, and Columbia Universities. He also presented several papers on related topics at the annual meetings of the Society for Ethnomusicology in the USA. The critically acclaimed book, "Music and World Christianities" (Oxford University Press, 2016), includes a chapter on the music of the Syro Malabar Church that Fr. Palackal wrote. - Reclaiming Syriac Chants to Reaffirm Identity:
An American Story

The following my interest some:

Seeking sources for learning Aramaic
Which modern day dialect of Aramaic is the closest one to the dialect that Jesus of Nazareth spoke in Palestine some 2000 years ago?
Shlom Lech Maryam (Hail Mary) in Aramaic with Arabic, and English script YouTube
Our Father Sung in Aramaic - the Language spoken by Jesus Christ
Abwoon D'Bashmaya - The Lords Prayer in Aramaic
Comment: Thank you! Very interesting.
Answer: The Aramaic Targumim were not translated from the Greek NT. They were only translated from the Hebrew OT into Aramaic. So we only have two options to work with:

Trying to reconstruct the Aramaic from the NT Greek ("Ἀπεκρίθη Θωμᾶς καὶ εἶπεν αὐτῷ· ὁ κύριός μου καὶ ὁ θεός μου." (Ἰωάννην 20·28 THGNT-T)) This isn't too helpful to get us back to the source.
The closest we can possibly (?) get is the Syriac Peshitta: "ܘܰܥܢܳܐ ܬ݁ܳܐܘܡܰܐ ܘܶܐܡܰܪ ܠܶܗ ܡܳܪܝ ܘܰܐܠܳܗܝ" (John 20:28 PESHNT-T) "Thomas answered and said to him, 'My Lord and my God.' "

We really don't know exactly what Thomas would have said. But, to answer your questions about "Yahweh", the Peshitta has the consistent pattern of translating the Tetragrammaton as "ܡܳܪܝܳܐ" ("Lord", like ⲕⲩⲣⲓⲟⲥ in Greek). In the OT, the Targumim were very inconsistent. Sometimes they would translate the Tetragrammaton as "מָר" (Lord). Sometimes they would contract the four letters down to the two letter form we are used to seeing in the Poetic sections of the Hebrew OT ("yah"). Sometimes they did something else entirely in the Aramaic.
For all of the reasons listed above, it's difficult (most likely impossible) to reconstruct what Thomas said in the Aramaic.
Answer: The simple answer is we don't know, as it appears that John was written originally in ancient Greek.
In Hebrew or Aramaic you have a few options, and those would actually clear up some of the ambiguity in Greek. If Hebrew, the 'Lord' could be Adonai (= LORD in OT, referring to God Almighty) or Adoni (= Lord in OT, referring to a human or angel). Aramaic has equivalents. 'God' could be Yahweh (= God) or Elohim (= God or a human).
As Jeff Deuble says in Christ Before Creeds (p. 157)

Even though John penned these words in
Greek when he wrote the Gospel, we need to remember that it is highly
unlikely they were spoken in Greek by Thomas. He would have been far
more likely to express them in his native tongue (by virtue of typical
human nature, and by what is implied in the text itself, where it
mentions the use of common native speech. See John 19:13, 17, 20;
20:16).
If Thomas spoke these words in Hebrew, he could have said either "My
LORD and my God" (Adonai and Yahweh), saying Jesus was Almighty
God, or he could have said, "My Messiah and Majesty" (Adoni and
Elohim) declaring Jesus to be the (human) Messiah and king of the Jews. If Thomas spoke in Aramaic, both options are still possibilities -
marya, "Lord God" or mari, "my human Lord."
Which of these two options is the more likely? The context is key in
answering that question. Just prior to Thomas' statement, we have
Jesus' words to Mary after she recognized him in the garden:
"Jesus said, "Do not hold on to me, for I have not yet ascended to the
Father. Go instead to my brothers and tell them, 'I am ascending to my
Father and your Father, to my God and your God.'" (John 20:17)
Jesus refers to God as his Father and ours, and fully identifies with
us in the nature of our relationship to him. Then, immediately
after Thomas' interaction with Jesus, John goes on the state his
purpose for his Gospel, including his own understanding of Jesus'
nature:
"Jesus performed many other signs in the presence of his disciples,
which are not recorded in this book. But these are written that you
may believe that Jesus is the Messiah, the Son of God, and that by
believing you may have life in his name. (John 20:30-31)
Given the immediate context of John's account and the wider context
and convention of the designation "God" in the New Testament, it seems
highly improbable that Thomas is conferring deity upon Jesus. It is
far more likely that Thomas was affirming and declaring Jesus as the
"Messiah, the Son of God," the appointed king and victorious Lord in
God's kingdom - as now conclusively demonstrated by his resurrection."

I don't agree with everything Deuble says here, but it gives a decent lay of the land. The Greek is ambiguous between alternatives in Hebrew or Aramaic, knowing this would clarify to some degree what Thomas meant, and the immediate context suggests the takeaway isn't that Thomas was claiming Jesus was God, which supports 'Adoni' for 'Lord' if spoken in Hebrew.


How does the dual of a modal operator in justification logic work?

Question: In justification logic, given a formula A, one can have modal formulas of the form 't : A', read as 't justifies A' or 't is evidence for A'. Has there been any investigation of what the dual of such modal operators would be? I.e. has there been any investigation of a modal operator that would be read as 'it is not the case that t justifies not-A' or 't is consistent with A'?
Comment: Some parts of Lakatos theory of science trend that way.  You may want to see if any of that has been formalized in logic.
Comment: @jobermark what in Lakatos are you thinking of?
Comment: @ChristopherE He is the first person I read to talk about both how theories challenge one another and how they protect what is consistent with them, without treating consistency and conflict as exact opposites.
Comment: To the main point.  Why choose to see this as a modal operator?  It does not seem to function like the ordinary ones.  Markers like "necessity" or "possibility" operate on statements, rather than relations between them.  So the notion of complementary mode (which I think is the old grammar term for what you mean by dual) may not fit in here very well.  It seems to me to be more of a partial deduction mechanism than a modality.
Answer: There is a long tradition of understanding probability to mean a degree of partial entailment, or a degree of justification. This began with John Maynard Keynes in his "Treatise on Probability", and was taken further by Rudolf Carnap in his "Logical Foundations of Probability" and by Richard Cox in "The Algebra of Probable Inference". It is now referred to as the logical concept of probability and it is a close cousin to the bayesian interpretation, because both conceive probability as something epistemic, i.e. concerned with justification and evidence, rather than as being a property of the world.
Probability can in some ways function like a modal operator, but it is different from necessity because it admits of degrees. Whereas a proposition might be considered necessary or possible or neither, probability uses a numerical range to allow comparisons. The dual of probable is simply improbable: to the extent that A renders B probable, A renders not-B improbable, and if A is independent of B, then A is independent of not-B. So your use of "justifies" translates to renders probable, and "consistent with" to independent of.
As to how we cash out exactly what "renders probable" and "independent of" mean, one of the most fruitful approaches is to employ the concepts of relative entropy and mutual information. These allow us to quantify the shared information between probability distributions, which in turn allows us to interpret "A makes B probable" as if I have the information A then I have this much information about B. This does not by any means solve all the problems of statistical inference, but it allows us to explain what epistemic probability is without recourse to imprecise concepts such as "rational belief".


Understanding Interpreter pattern

Question: I am trying to understand how interpreter pattern can actually be implemented.

As per the diagram; an expression has 2 nodes: terminal & non-terminal. Can it have multiple type of nodes as well? Because I believe it is drawn considering the math expression transformed in binary tree DS where leaf nodes are number and non-leaf nodes are operations: +,-,/ etc.
Somewhere I read that java.util.Pattern is an example of interpreter pattern.
Pattern pattern = Pattern.compile("^[abc](ab|c?d)?ef$");
Matcher matcher = pattern.matcher("some RE");
if(matcher.matches()){ .. }

So I was trying to relate if my implementation of RE engine: BooleanSequence is also an example of interpreter pattern.
BooleanSequence seq = new BooleanSequence("[abc](ab|c?d)?ef");
seq.compile();seq.minimize();
Matcher matcher = seq.getCoreMatcher();
matcher.match("some RE");

Implementation note:
Main class BooleanSequence(BS) takes RE (can be considered as context) and build some kind of in-memory DS, where each char of RE is a node. There are many types of node, like: normal, range, lazy, any etc. I believe it can be considered as expression as given in diagram.
Node class also has match(). BS gives a matcher or it can be created separately. It is completely isolated from BS class. And there are many types of matchers (currently 3). Matcher calls match() of all the nodes until whole expression is evaluated.
Answer:
Can it have multiple type of nodes as well?

This diagram you are showing is a class diagram, so more-or-less by definition, you can continue to subclass.  For example you might subclass NonTerminalExpression with BinaryExpression.
If we take the diagram suggestively instead of literally, you might have BinaryExpression directly subclass from AbstractExpression, since you know you'll have exactly a left and a right instead of an arbitrary sized collection of children.  You can see that in the Wikipedia Interpreter Pattern article, they have done this for the Java version.

I don't see java.util.Pattern exhibiting that specific interpreter pattern, externally, at least, because it always involves just one object, a matcher, rather than the arbitrary number of objects that I would expect to be involved in the interpreter pattern for any given text of arbitrary length.  By contrast, the interpreter pattern would produce a tree of objects for a given expression, and there is nothing in the API that necessarily suggests such a tree is present.
java.util.Pattern may very well do something like that internally, however, it is not visible (to me without some further investigation) because it is providing encapsulated behavior.  So, the API isn't demonstrating the interpreter pattern.  Still, a regular expressions matching mechanism following that API could be implemented in a number of different ways either using or not using an interpreter pattern.
I would say that what both java.util.Pattern and your BooleanSequence follow a linguistic pattern where the first step creates a parser for a language, which is defined by specifying a grammar in some other language, and both have an additional step of applying a parser to a specific text.

See also Abstract Syntax Tree.  If we were to apply behaviors (methods) to the class hierarchy of the abstract syntax tree we could get to the interpreter pattern, and we could also get to a compiler (pattern).
Answer: This class diagram means that an AbstractExpression is either a TerminalExpression or a NonTerminalExpression.  If its a NonTerminalExpression, it is itself an aggregation of one or several AbstractExpression.
In fact this structure is a tree.  Typically the terminals would be further derived into vriables and litterals, and the non terminals would be further derived at lest in unary and binary operators, but may be even more.
An example of instantiation could be:

In your java.util.Pattern example:

the calling code is the client, who first build the abstract syntax tree when compiling a regex pattern (i.e. building an internal representation of the regex pattern).
the Pattern is the interpreter.  It would in principle correspond to the top level  AbstractExpression.  The only particularity is that the structure of the expression is encapsulated in the interpreter and not accessible.
the Pattern.matcher() is the equivalent of a call to interpret(), the string to parse being the context.
the Matcher object is the result of the interpretation with on a particular string.

Understanding Interpreter pattern


Get a news Page full HTML externally

Question: I need to get the full HTML of some news Page externally using CSOM or REST or something else. I know I have to create a CSOM app or something that will have to be register as an app on SPO.
What I cannot find is how to get the full page HTML so I can present it elsewhere. Maybe a simple http Get request. Is this possible?
I know there is a rest API that we can fetch CanvasContent1, but seems messy to parse it correctly and getting all the CSS to work correctly.
Answer: You can fetch the page columns as HTML by using the following GET request:
<code>https://{yoursite}/_api/web/lists/getbytitle('Site%20Pages')/items(1)/FieldValuesAsHtml
</code>
Comment: I think OP trying to fetch the full HTML code of news page "content" and not the column values.
Comment: This should return CanvasContent1, which is the page content.

Get a news Page full HTML externally


Could you know in advance specifically when a star will go supernova?

Question: I've been thinking about star trek 2009 and star trek Picard in which they happen to talk about a sun inside a fictional solar system which goes supernova destroying a particularly important planet to a militaristic alien species. This got thinking, could you know in advance whether it be in days/weeks/months/years/decades when a star is most definitely going to go supernova? Or is it rather indeterminate or chaotically random when such event will take place?
Answer: At the moment, our understanding of the final, pre-supernova stages of stellar evolution are not good enough to give precise warnings based on the outward appearance of a star. Typically, you might be able to say that a star might explode sometime in the next 100,000 years.
However, there is an exception. There are ways to establish when a star is approaching the final few days of its existence from an acceleration of the neutrino flux and energy from its core, associated with the higher temperatures of silicon burning.
Even more precisely, you could get a few hours notice of a core collapse supernova from a spike in the neutrino signal that should emerge some hours ahead of the shock wave reaching the visible photosphere (and which was detected on Earth for SN 1987a). Similarly, one might expect a gravitational wave signal from the core collapse event.
Comment: For a relatively near by stars, we may get significantly more then that. https://arxiv.org/pdf/2006.02519.pdf
Answer: Our models of stellar evolution tell us what life stages a star will go through if we know how massive it is. Those models also tell us in general terms how long each stage of that process will last, but the uncertainties are significant, and so the models cannot predict the time-to-supernova with any precision at all.
However, during a star's last stages of evolution, the stages get shorter and some of the uncertainties diminish; it is known for instance that a star headed for a supernova will only spend a few tens to hundreds of thousands of years in the red-giant phase before going kaboom- a process which takes only a couple of seconds at the end of a lifetime that might span hundreds of millions of years to billions of years.
So, we can't predict when a star will blow, even though we know it is in the final stages of getting ready to do so. For example, the star Betelgeuse (the reddish star indicating Orion's upper left corner) is known to be in the red giant phase, and teetering on the brink of blowing up- but it could happen tomorrow, or 10,000 years from now.


Modify Core Block Default Attributes

Question: I have a client that wants images to automatically be centered. This used to be possible with the image_default_align option for the old editor. Is there a simple way to change the default attributes for core blocks?
Comment: Gutenberg already have a align center option that appears on toolbar. You can add your editor styles via hook for some custom styling.
Comment: Thanks @MehmoodAhmad I know the center options is there. My clients wants center to be the default for the image block. I would like to change this default attribute.
Comment: I think it can be achievable via Block Filters (https://developer.wordpress.org/block-editor/developers/filters/block-filters/), but I'm not sure. Still working on this myself.
Answer: As it was mentioned in comments it is possible with Block Filters. Below is the code that allowes images to be automatically centered when inserted.
wp.hooks.addFilter( 'blocks.registerBlockType', 'misha/img', ( settings, name ) => {
    // so we check block name here if it is image we change attributes
    if( 'core/image' === name ) {

        return lodash.assign( {}, settings, {
            attributes: lodash.assign( {}, settings.attributes, {
                align: {
                    type: 'string',
                    default: 'center'
                }
            } )
        } )

  }

  return settings

})

This code can be used in any JS file enqueued with enqueue_block_editor_assets, the code snippet I took from this guide https://rudrastyh.com/gutenberg/change-default-blocks-with-block-filters.html

Modify Core Block Default Attributes


Geography error

Question: In the The Lord of the Rings: The Two Towers, when Treebeard is carrying Pippin and Merry, Pippin asks to be taken south toward Saruman's fortress. But the maps of Middle Earth clearly show Mirkwood south of Saruman's fortress, so they would have to travel north to get there.  Is there any explanation for this geographic inconsistency or is this an actual error?
Answer: Merry, Pippin and Treebeard were not in Mirkwood. They were in Fangorn Forest.
If they were toward the north of Fangorn forest, going south would indeed bring them past Isengard.

Your probably getting confused somewhere because Isengard is south-west of Mirkwood, not north.
Comment: Strangely enough, the maps show *Mirkwood* even more north than *Fangorn*.
Comment: whoops, I meant Fanghorn, not Mirkwood.  But I see I misremembered the geography.  Should have checked the map, not my memory!
Comment: @RonGove If you agree with this answer being the correct solution to your problem, you might want to [accept](http://meta.stackexchange.com/q/5234/162011) it.

Geography error


Sources of yearly electricity consumption data for India?

Question: I am looking for yearly or monthly electricity consumption data for India for the period 2013-2020. Is there any website that provides these kind of data? The data set should be at the District level at least (748 districts in total).
Answer: You can get electricity generation data and it's monthly report on central electricity authority, India website while it is hard to get electricity consumption data.
Answer: I recently came across a platform named "YouData" that has proven incredibly helpful to me in finding datasets for training AI systems. They are still in their "Beta testing" phase, though!
Check out their platform for obtaining free datasets. https://youdata-webapp.vercel.app/home.
Feel free to explore and let me know if you find it as valuable as I did! Happy researching!


Chern numbers of primitive classes in BU

Question: How does one compute Chern numbers of spherical rational homology classes
$$f: S ^{2k} \to BU.$$ These generate rational homology by Milnor-Moore theorem since BU is a connected H-space, and so $c_k$ cannot kill such a class. It seems very likely that $\langle c_k,[f] \rangle =1$ but what is the proof?
Let me add here that I meant that $[f]$ is a Milnor-Moore generator, i.e. it's the multiplicative identity in $\pi_{2k} (BU, \mathbb{Q}) \simeq {\mathbb {Q}}$.
Answer: We have that if $f\colon S^{2k}\to BU$ is an actual map of topological spaces (it is a little bit unclear from your formulation if you assume this) then $\langle c_k,[f]\rangle>$ is a multiple of $(k-1)!$ and all multiple are possible. See for instance Husemoller: Fibre bundles, Cor 18.9.8, GTM 20, Springer Verlag.
Comment: I cannot find this in Husemoller, would you give a section number or an outline of the argument?
Comment: Sorry I intended to give the precise reference but managed to forget.
Comment: I have 3rd edition but do not have this cor. What edition do you mean?
Could you just outline the argument I may be able to fill in the details.
Comment: In 3rd edition this statement is Cor 20.9.8. It's a consequence of Bott periodicity.
Comment:  I read the proof and it is pretty clear except for one part in the proof of periodicity. He looks at the Bott map $\beta:\tilde K(X)\to \tilde K(X\wedge S^2)$ coming from $\xi\mapsto \xi\otimes(\gamma -1)\in \tilde K(X\times S^2)$ where $\gamma$ is the canonical complex line bundle over $S^2=\mathbb{CP}^1$. He claims that this map is obviously onto. I don't quite see why that's true.


mistakes in the supermarket

Question: I recently started working in a discount store. I was put into the cashier with no experience and no training. In this place, bread, fruit and vegetables are weighed in the box, you have to learn some codes by heart. What happens if I enter the code wrong and issue a receipt? Do I create problems for the company, for example with inventory, or not?
Comment: Have you asked your manager?
Comment: If you're worried, consider creating a cheat sheets of sorts - write out the codes and what they all mean on a bit of paper, and have it next to you when you're manning the till. Though to be honest, the supermarket should probably have something like this themselves anyway.
Comment: They have one of two expectations: 1) that you're a kid with no experience and they're okay if you make a mistake from time to time, or 2) they're expecting you to know the codes and if you get it wrong, rather than try to train you, they fire you and find someone who seems to get it right.
Answer: You won't create problems with inventory. In a supermarket, things disappear all the time through theft, if you make a mistake or two nobody will notice.
You will get complaints if you charge people too much. You may get complaints if you charge them too little, but that's more rare. If you don't get too many complaints, you're Ok. And really, you should have printed sheets with all the fruit, breads etc. on them and not have to learn anything by heart.
And as Dan said: If you charge me $16.22 the supermarket cares little if that is the correct amount (within reason). What they do care about is that $16.22 ends up in your till, not a penny more, not a penny less. Because that's something they can check.
Comment: Yeah truthfully when I worked as a cashier in my teen years, I don't recall a single time they looked through my sales and picked out anything I did wrong. However, they do care about making sure I get the right amount of change.
Comment: "And really, you should have printed sheets with all the fruit, breads etc. on them and not have to learn anything by heart." - based on my observations as a supermarket customer, I doubt this is a realistic expectation. Unless they are really *new* in the job, all the staff I see at check-out desks know most of the product numbers by heart. Looking up every single one (in booklets that are indeed there at the check-out counter) would take *way* too long. (Note that this just concerns unlabeled items such as some fruits, vegetables, and bread; anything else has scannable labels on it.)
Answer:
Do I create problems for the company, for example with inventory, or not?

Yes, definitely, otherwise there is no point of having those codes!
As you mentioned, you did not receive any training - do you know your manager is aware that you do not have a lot of experience and need training to be up to speed? It should be a de-facto thing, but since that did not happen, no harm in asking.
Even after that, if you do not get the required training, you can do one thing, print the codes on paper and keep that handy. Sure, for starting days it'll take longer to check codes and then tally the price, but two things

You'll know what are the products being sold more often than others, and you can definitely by-heart them. For rarely sold ones, you still have the reference on paper.
You'll avoid risk of generating wrong bill/invoice.

mistakes in the supermarket


What is the most succinct term for "refusing to take the bad with the good"?

Question: I'm looking for a readily identifiable term so some reference to Falstaff or "The Pregnant Spoon" won't really work. So a broad term for the verb meaning the act of doing this or an adjective describing a person doing this or the situation in which this takes place would be aces.
Comment: I have no idea what you're asking here. What exactly do you mean by 'refusing to take the bad with the good'? There is no such thing—we have no _choice_ in whether or not we encounter both good and bad. The only word I can think of that would embody a _refusal_ to accept this would be ***suicide***, but I doubt that's what you're looking for.
Comment: I'm not sure what the reference to Falstaff or 'The Pregnant Spoon' are. They detract from the question.
Comment: @JanusBahsJacquet - You're being obtuse. Not every action has to have both positive and negative consequences. Sometimes a person might take an action which would be expected to have both good and bad consequences, but manage—through wit, strength of character, force of will, or another mechanism—to avoid the negative, leaving only the positive.
Comment: @phenry I'm not being obtuse in the slightest. To take the good with the bad means to accept that life has both positive and negative aspects, whether we like it or not, though naturally both need not be present in _every_ action. A _refusal_ to accept this makes no more sense to me than a refusal to accept that humans need oxygen to breathe, and there is no word for it that I can think of, just like there is no word for refusing to accept that we need oxygen to breathe. The asker will have to specify what exactly he's after for the question to make any sense to me.
Comment: That's an overly philosophical answer to a practical question. You might just as well argue that saying "I refuse to take no for an answer" is meaningless, because *of course* you have no control over whether the other person says "no" or not—therefore, how could you possible "refuse"? It misses the point entirely.
Answer: The closest term I can think of is opportunistic:  (from TFD)

Taking immediate advantage, often unethically, of any circumstance of possible benefit.
Answer: To answer an idiom with an idiom, this would be someone who wants to have their cake and eat it too—they want to enjoy a benefit without suffering the attendant negative consequences. This expression is usually employed pejoratively, so if you're looking for something with a more positive connotation, you wouldn't want to use it (although maybe you could get creative with it).
Answer: You could describe them as a fair-weather [noun].
From Merriam-Webster

adj. loyal or helpful only during times of success and happiness

It's most commonly used as fair-weather friend is used.

Sue is a fair-weather friend, she's happy to come for to dinner parties and celebrations, but was no where to be found when I was moving house!

But you could use it with any other noun:

Bob is a real fair-weather manager, he's happy to take credit when  the project is a success, but when it's in trouble, he's always claiming he's too busy on some other project to take responsibility.

Or use it colloquially as fair-weather sailor, meaning to apply the term generally, to any case.

He's a fair-weather sailor, happy to help when the money is flowing, too busy when times are tight.


Drawing knockout(single elimination) fixtures

Question: Okay so everyone, how can I draw a knockout fixture of matches of 24 teams? As the number of teams are even so there has to be no bye given. Also I do not require any seeding. Can someone please come with any ideas?
Answer: You can't. You can do a single elimination knockout without byes only if the number of teams is an exact power of 2 (2, 4, 8, 16, 32, etc). With 24 teams, you've got to have a bye somewhere; the simplest solution in your case is just too have 8 byes.
Answer: This is the answer to the question.
All credit to Philip Kendall.
Comment: That wouldn't be the normal way of doing it as you're "playing" bye vs bye in the first round. Take a traditional 1-32 bracket, put byes in slots 25-32 and then draw your 24 teams in the other slots.


Should one try an audit reconsideration alone or with a CPA?

Question: If anyone is following my previous questions, I have a long saga of an audit that has gone foul. I hired a CPA to help me but in 8 months he was unable to get the audit sorted out for me.
The CPA firm has recommended to request an audit reconsideration.
My question is, can one do this on their own (to avoid paying the CPA to do this) or should one use the services of a CPA so they do that best possible job that can be done?
The justification of doing it alone is that aside from being late, the actual reporting of the years in questions are accurate and if one has whatever the IRS is requesting to furnish them with. I.e. proof of reported earned income, ss #'s for family members or whatever else, one ought to be granted the right to submit the proof and the IRS can review it and accept it and reverse the penalties/fines.
What is recommended way to deal with this?
Answer:
My question is, can one do this on their own (to avoid paying the CPA to do this) or should one use the services of a CPA so they do that best possible job that can be done?

Use a CPA. They know the rules, procedures, timelines, forms, ways to frame things and present them, and properly understand and interpret the responses. Ah, they also know the law. You know nothing of these.


c# send audio from file by microphone

Question: is there a way to send recorded music from a file to my microphone to send it over voip? i mean like i say hello, i record hello and when i open the program it says hello with skype or something.
i cant explain it better by my english :P but i hope somebody got an solution.
Answer: Your question is rather unclear, but in the interest of providing at least some guidance, here is a list of open source VOIP software that may help you on your way:
http://www.voip-info.org/wiki/view/Open+Source+VOIP+Software
That page lists at least one C# implementation.

c# send audio from file by microphone


Compare the "normality" of two scales

Question: I have two scales measuring the same construct, and I would like to know which scale is distributed more closely to a normal distribution. There are various possibilities for comparing a distribution with a normal distribution (e.g., kolmogorov-smirnov test, etc.), but is there any possibility to compare the deviance from normality between two scales directly?
Comment: At a fixed sample size, this would be a matter of comparing statistics that measure deviation from normality (whether Shapiro-Wilk, Anderson-Darling, or whatever you feel captures what you want to capture). It would be difficult to compare across different sample sizes without a much more careful identification of what you're trying to achieve, which *might* help you identify a suitable metric. Why is it important to compare how normal they are?
Comment: The two scales were used in the same sample, so sample sizes are equal. I want to do this comparison because it was claimed that scale A yields a distribution which is closer to a normal distribution than scale B. Therefore I am looking for a possibility to compare the deviation from normality between the two scales directly, ideally with a significance test...
Answer: The R package nortest contains 5 normality tests that you can conduct to test the normality of your samples. The question "which scale is distributed more closely to a normal distribution?" is wrongly formulated in my opinion, unless you can come up with a satisfactory distance in your context.
Please, find a simulated example below:
library(nortest)

set.seed(123)
data = rnorm(100)

ad.test(data)
cvm.test(data)
lillie.test(data)
pearson.test(data)
sf.test(data)

Compare the "normality" of two scales


Ubuntu Server on a 32- bit Non PAE Machine

Question: I would like to install any version of Ubuntu Server on a fairly old machine to both test out Ubuntu Server and have a bit of fun. The problem I have encountered is that the machine does not have PAE so all releases of Ubuntu Server that I have tried will not work with the computer. The computer is pretty unimpressive with the following stats:
Dell Inspiron 700m
Processor: Intel Pentium-M 735 1.7GHz
RAM: 512MB
HDD: 40GB
Graphics: Intel Graphics Media Accelerator 900
So is there anyway to get Ubuntu Server on this device? If so, how?
Answer: I have an IBM Thinkpad T42 with the same or very similar Pentium M processor running at 1.7 GHz. This processor is actually capable of PAE, but does not announce it, so you can use fakepae or forcepae and a PAE version of light-weight flavours of Ubuntu will work.
You can add the boot option forcepae with the current 32-bit linux kernels i386, that are used in the Ubuntu family, for example Lubuntu and Ubuntu mini.iso until 18.10 (the newest release, when this is written). Both work in my old Thinkpad and should work in your computer too.
I suggest that you use the Ubuntu mini.iso version 18.04.1 LTS, with long time support for 5 years, in order to install your Ubuntu Server.
The mini.iso is also called Netboot.

The iso file is very small, and it requires a wired network to connect to the internet and the Ubuntu web servers to download and install most of the program packages
The installer is the old style text mode 'Debian' installer
There is a menu, where you can select what to install. You can install anything from

the most basic text mode linux system, to
Ubuntu Server
Kubuntu (too heavy for an old Pentium M processor)
Lubuntu
...
standard Ubuntu (too heavy for an old Pentium M processor)
...
Xubuntu

If you install the most basic text mode linux system, you can install your Ubuntu Server later, when you have logged into the basic text mode linux system, and later on the extra features that you want, but I think the menu in the installer makes things easier.

See also these links and links from them,
Boot options
mini.iso, minimal install, netboot iso
How do I make a bootable Ubuntu USB? - scroll down to 'How to make an Ubuntu Minimal USB using dd'
The new version 14.04 LTS 'Trusty Tahr' needs no fake-PAE. Use forcepae in the standard installers
Sometimes the boot option must be entered twice
Answer: I'd suggest a minimal install using an alternate installer:
http://www.archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/current/images/netboot/non-pae/
Download the mini.iso and install off that - when asked about the Linux Kernel choose "linux-generic"
After that you should be asked for your desktop.  Pick one, or just continue without selecting one if you genuinely want no graphical desktop (pure server)
Answer: But the server needs to be connected to the internet to install via that mini.iso...
If you want to do a standalone/offline install, download Ubuntu Server 11.04 (last server version without mandatory PAE) and it should install fine. Then you can just update it later as well via command prompt and it should correctly update to 12.04 NON-PAE for example.


How to pass an array and an int trough classes and methods?

Question: I am trying to make the compiler pass the array from one of the classes to the main method. I don't know why it does not work, the code looks like this:
This is my main method -
public class Main {
    public static void main(String[] args) {

        int[] board2;
        int userInput;
        playBoard = methods.createBoard();
        userInput = methods.input();

    }

}

And this is my methods class -
import java.util.Scanner;

public class methods {

        //Create board method

    int[] createBoard()
    {
        int[] board = new int[7];
        int randomNum =(int) (Math.random()*5);
        for (int i=0; i<2; i++)
        {
            board[randomNum+i] = 1;
        }
        System.out.println("Board created");
        return board;
    }

        //Take a guess method

    int input()
        {
            int input=0;
            Scanner reader = new Scanner(System.in);
            System.out.println("Please enter your guess now");
            input = reader.nextInt();
            System.out.println("Guess entered successfully");
            return input;
        }

}

I am aware of that I could easily put everything in one class and even one method but i'm to practice on using classes and methods therefore I create lots of them.
Comment: you need to create class object first to call the metthod(if methods are not static) try `playBoard = new methods().createBoard();` and same for other array
Comment: Thank you, I fixed the problem by making the methods static.
Answer: You'll have to create a new instance of Main and methods first or alternatively declare the createBoard() and input() methods static.
Here is the code snippet:
public class Main {
    public static void main(String[] args) {
        Main m = new Main();
        m.run();
    }

    private void run() {
        methods me = new methods();
        int[] playBoard = me.createBoard();
        int userInput = me.input();
    }
}

Also, as per the naming convention rules for the class name it should be Methods instead of methods.
Answer: You haven't declared the variable playBoard being used inside Main. Did you intend to use board2 instead. I guess you want something like below:
board2 = new methods().createBoard();
userInput = new methods().input();

You need to create an object of class methods, in order to access instance methods.


A more thermally efficient house - can I block up vents in my brickwork?

Question: I live in the UK in a typical '1930's semi' house.  It is built with two layers of good old bricks and a cavity wall inbetween them.  In my hallway, there is currently no carpet or hardwood flooring - just the original timber floor, which has gaps in.  I happened to notice the sun shining in through the floor recently when the sun was at a low angle in the sky.  I could then tell that the 'airbrick' or vent in the brickwork outside, was allowing air directly in and under this floor.  This explains why the hallway is so cold in the winter, with cold air coming directly underneath this floor.  I have several more of these airbricks around the house, and I suspect they are all letting cold air directly into the house and making it like a sieve in the winter.  Im trying to make the house more thermally efficient to save on gas bills etc and to make it bit more environmentally friendly.  Ive done triple glazing and insulated the loft.  But Ive got cold air coming directly in here so I need to do something about these vents.  My question then is - can I just remove them and put a normal brick in, and get away with it?  Will I end up with condensation / damp afterwards?  How do you make these 1930s style houses really thermally efficient?  Any tips much appreciated, thanks.
Answer: No, you cannot just block those air vents.
If you do you will cause condensation problems.
You need to investigate some cavity insulation systems - which would be more effective with your money compared to the triple glazing - think about the area of the walls and the areas of the windows. Whatever system of insulation is used, there must be some compensating air ventilation - good windows tend to have small air vents built into the top of them for exactly this.
Comment: Thanks Mike. Out of interest - I can obviously see why theres ventilation into that first row of bricks.  But why can I see daylight directly under my floor?  Is it standard to have another ventilation brick in line with the outside brick, on the inside brick wall too?  I would have guessed that a vent in the outside bricks would ventilate that gap, but ventilation on the inside too?
Comment: As most old houses had open fires, there were ventilation bricks fitted to make sure sufficient air was available.
Comment: So perhaps I do need the external wall vent brick - but less so the internal wall vent brick, eh?  the air just needs to get into the cavity - not into the house.  Perhaps I could lift the floor, replace the internal vent brick and leave the external one?
Comment: Or you could have windows with vents as I suggested... There are other options, including pipes under the floor to come up in front of the fire...