What is meant by a full abstract model of a lambda-calculus like language?


The simply typed lambda-calculus with numbers and fix has long been a favorite experimental subject for programming language researchers, since it is the simplest language in which a range of subtle semantic phenomena such as full abstraction arise.

I tried to find a definition for full-abstract model but I haven’t found such. This quote is from Pierce’s TAPL book. Note that there is also a related question: What is a "model" of lambda calculus? on the site that has not been answered.

MonoGame model antialiasing not working

I’ve been following the guide at https://docs.microsoft.com/en-us/xamarin/graphics-games/monogame/3d/part1 to render a model in a bare bones MonoGame project. It works but I want to apply anti aliasing to make it look better.

I made the following changes to try and make this happen:

public Game1() {     graphics = new GraphicsDeviceManager(this);      // this part is added     graphics.PreferMultiSampling = true;     graphics.GraphicsProfile = GraphicsProfile.HiDef;     graphics.ApplyChanges();      Content.RootDirectory = "Content"; } 

and

protected override void Initialize() {     graphics.GraphicsDevice.PresentationParameters.MultiSampleCount = 8;     graphics.ApplyChanges();     // TODO: Add your initialization logic here      base.Initialize(); } 

But there is still aliasing on the model.

BDC Model for ActiveDirectory

I am trying to build a BDC Model and a custom .net connector for ActiveDirectory so that users can search for data in AD from Sharepoint as well as create lists (ie: Users list that will show users from AD) and was hoping anyone has done something similar but I can’t find any material on the web. Can anyone point me in the right direction on how can this be acomplished?

How can I model this “Party Draft Pool” ability score generation method in AnyDice?

I’m looking to model an alternate to the “4d6, drop the lowest” mechanic for determining ability scores.

The proposed system works as follows:

  1. 4 players roll 4d6, drop the lowest x 6 [24 total].
  2. Combine these results into a stat pool.
  3. Players then roll initiative (1d20).
  4. Players select stats in “snake order” [1, 2, 3, 4, 4, 3, 2, 1, 1, 2…]
  5. Players assign stats to ability scores as desired.

(I am thinking this is a good way to have fun rolling dice without the inter-party balance issues of straight 4d6, drop 1.)

Obviously for modeling, this can be simplified:

  1. Roll 24 d [highest 3 of 4d6]
  2. Rank the dice
  3. Loop Player 1..4 and assign values per “snake order”, assuming highest available is always selected
  4. Output of 6 abilities per player (or of only player 1 vs player 4)

How do I model the probability distribution of the above in Anydice? I’m getting hung up on the syntax.

How can I model this “Party Draft Pool” ability score generation method in AnyDice?

I’m looking to model an alternate to the “4d6, drop the lowest” mechanic for determining ability scores.

The proposed system works as follows:

  1. 4 players roll 4d6, drop the lowest x 6 [24 total].
  2. Combine these results into a stat pool.
  3. Players then roll initiative (1d20).
  4. Players select stats in “snake order” [1, 2, 3, 4, 4, 3, 2, 1, 1, 2…]
  5. Players assign stats to ability scores as desired.

(I am thinking this is a good way to have fun rolling dice without the inter-party balance issues of straight 4d6, drop 1.)

Obviously for modeling, this can be simplified:

  1. Roll 24 d [highest 3 of 4d6]
  2. Rank the dice
  3. Loop Player 1..4 and assign values per “snake order”, assuming highest available is always selected
  4. Output of 6 abilities per player (or of only player 1 vs player 4)

How do I model the probability distribution of the above in Anydice? I’m getting hung up on the syntax.

How can I model this “Party Draft Pool” ability score generation method in AnyDice?

I’m looking to model an alternate to the “4d6, drop the lowest” mechanic for determining ability scores.

The proposed system works as follows:

  1. 4 players roll 4d6, drop the lowest x 6 [24 total].
  2. Combine these results into a stat pool.
  3. Players then roll initiative (1d20).
  4. Players select stats in “snake order” [1, 2, 3, 4, 4, 3, 2, 1, 1, 2…]
  5. Players assign stats to ability scores as desired.

(I am thinking this is a good way to have fun rolling dice without the inter-party balance issues of straight 4d6, drop 1.)

Obviously for modeling, this can be simplified:

  1. Roll 24 d [highest 3 of 4d6]
  2. Rank the dice
  3. Loop Player 1..4 and assign values per “snake order”, assuming highest available is always selected
  4. Output of 6 abilities per player (or of only player 1 vs player 4)

How do I model the probability distribution of the above in Anydice? I’m getting hung up on the syntax.

How to model multiple types of contacts?

I’m not sure if this can be called a polymorphic association – what is needed is to for each Message to have a Sender Contact and a Recipient Contact. Both Sender Contact and Recipient Contact could be one of 2+ types. Currently SMS and Email are supported but more may come.

I have this urge to eliminate a possible duplication that would appear in case of having two different tables – sender_contacts and recipient_contacts. Also type column is a kinda of a DB-modeling smell. But I’m not a DB modelling expert and rather looking for an advise from an experts how to properly model those relationships.

Any input is appreciated.

Thanks.

How do I model a fudge roll with rerolls in Anydice?

I need a little help with a probability calculation in anydice. We are making a fudge based game using 4 fudge dice, so basically a d3 system: -1,0,1

We are allowing your attribute or stats in the game go to go from -3 to 4 and high stats allows you to reroll a dice.

So basically on any fudge roll a character can reroll a number of dice up to his stat maximum. If he has a negative stat he has to take away dice from the initial roll.

I figured out how to determine the probabilities of rolling with 4 dice and lower representing a negative stat:

output 4d{-1,0,1}  

What I need help with is determining the probability of rerolling a dice when a character has a positive stat.

An example of what I am talking about: My fighter has a 1 strength and I roll my 4 fudge dice I get 3 blanks and 1 – on the dice. I decide to reroll the 1 – to try and get a better result on the second roll.

A formula I tried in any dice to represent the example above is 4d{-1,0,1}-1

The problem with this forumla is it only works if the second reroll is better their is a possibility the second reroll will be the same so it does not quite work.

Does anyone have some insight on a way I can make a proper formula in anydice to represent a reroll of 4 fate dice with the possibility of 1-4 dice being rerolled and the possibility that the second reroll has only a 66% chance of being better than the first reroll.

I am making assumptions that a player will only reroll dice if they have a negative appear on the fudge dice.

Call to undefined relationship [sub_category] on model [App\Sub_Category]

Estoy intentado hacer una llamada por get para obtener todas mis “subcategorias”, me surge el error: Call to undefined relationship [sub_category] on model [App\Sub_Category].

Estoy en duda ya que no se si el error es 100% de la base de datos o de la consulta.

Por favor si alguien pudiera ayudarme lo agradecería

Clase

public function store(Request $  request) {     // Recoger los datos     $  json = $  request->input('json', null);     $  params = json_decode($  json);     $  params_array = json_decode($  json, true);     if (!empty($  params_array)) {          $  jwtAuth = new JwtAuth();         $  token = $  request->header('Authorization', null);         $  user = $  jwtAuth->checkToken($  token, true);          // Validar los datos         $  validate = \Validator::make($  params_array, [                     'name' => 'required'         ]);         //Guardar los datos         if ($  validate->fails()) {             $  data = [                 'code' => 400,                 'status' => 'error',                 'message' => 'Envia el nombre'             ];         } else {             $  sub_category = new Sub_Category();             $  sub_category->name = $  params_array['name'];             $  sub_category->category_id = $  params->category_id;             $  sub_category->save();              $  data = [                 'code' => 200,                 'status' => 'success',                 'sub_category' => $  sub_category             ];         }     } else {         $  data = [             'code' => 400,             'status' => 'error',             'mensage' => 'No has enviado ninguna sub_categoria'         ];     }      // Devolcer Sub_Categoria     return response()->json($  data, $  data['code']); } 

Modelo

class Sub_Category extends Model {     // Referencia a la base de datos     protected $  table = 'sub_categories';      // Unos a muchos     public function give_posts(){         return $  this->hasMany('App\Post');     }      // Relación Muchos a uno     public function category(){         return $  this->belongsTo('App\Category', 'category_id');     } 

Base de datos

El objetivo es poder obtener cualquier dato para poder modificar lo posteriormente, aquí dejo las 2 talabas que se tiene que relacionar.

CREATE TABLE categories( id                  int(255) auto_increment not null, name                varchar(255)  NOT NULL, created_at           datetime DEFAULT NULL, updated_at           datetime DEFAULT NULL, CONSTRAINT  pk_users PRIMARY KEY(id) )ENGINE=InnoDb;  CREATE TABLE sub_categories( id                  int(255) auto_increment not null, name                varchar(50)  NOT NULL, category_id         int(255) NOT NULL, created_at           datetime DEFAULT NULL, updated_at           datetime DEFAULT NULL, CONSTRAINT  pk_users PRIMARY KEY(id), CONSTRAINT  fk_post_category FOREIGN KEY(category_id) REFERENCES categories(id) )ENGINE=InnoDb;