What is the meet of two polymorphic function types in “Local Type Inference”

How does one take the meet of two polymorphic function types? The issue I’m finding is that the two function types can have a different number of type variables. Or the same number of variables, but distinct names.

I’m following along with Local Type Inference (Pierce and Turner). On page 7, they give the rule for taking the meet of two polymorphic function types as:

$$ S wedge T = All(bar X ) bar J to M space textrm{if} \ S = All(bar X)(bar V) to P \ T = All(bar X)(bar W) to Q \ bar V vee bar W = bar J \ bar P wedge bar Q = bar J \ \ Bot space textrm{otherwise} $$

The overbars represent multiple parameters in a parameter list, so $bar X$ means something like $X_1, X_2, X_3$. $wedge$ is meet and $vee$ is join. $Bot$ is the bottom of the type latttice.

Is the rule saying that the meet of two polymorphic functions is $Bot$ unless the two functions have the same number of type variables and those type variables have the same names? That surprises me, because I’d expect $(All(X)X to X)space wedge space (All(Y) to Y) = All(X)X to X$ because I wouldn’t expect choice of type variable name to matter.

How join an existing Google Meet meeting from widget, with an URL?

We have a regular “chat” meeting in our group, and we use a Google Meet URL for this meeting, always the same, and we meet at known times a day. I’ve just received one list with all meets code. How can I insert this meet from my schedule without any e-mail? How can I create “widget” with this received link?.

Can I add multiple moderators in a Google Meet call?

I created an event using Google Meet. Can I add someone else as a moderator to the event (I will be the presenter and I am the even’t owner).
I could not find any way. I am not sure if this feature is available in Google Meet.

numerics – Generate random numbers in such a way that their combinations meet the specified conditions

We need to generate 5 numbers $alpha,beta,p,q,k$ so that they meet the following conditions:

  1. $alpha,beta,p,q,k>0$
  2. $k cdot p <1$
  3. $k cdot q >1$

Edit:

I think, that this code may be solution:

region = ImplicitRegion[[Alpha] > 0 && [Beta] > 0 && p > 0 && q > 0 && k > 0 && k p < 1 && k q > 1, {[Alpha], [Beta], p, q, k}];

RandomPoint[region]

But this still very slowly!

Generate two random numbers with constraints

How can I neither immediately deny entry or admit a new participant in Google Meet?

From time to time, I would like to wait before clicking on deny entry or admit for a new participant in Google Meet. However, waiting prevents me from unmute/mute the microphone/camera. Is there a way around it?

enter image description here

random – Randomly Choose from list but meet conditions

Here is a procedural approach that does not require the list to be sorted.

I will first make some test data:

testlist = RandomSample(Range(0, 99), 50);

Then define a selector function:

testlist = RandomSample(Range(0, 99), 50);

ClearAll(selector)
selector(list_) :=
 TimeConstrained(
  Module({choice},
   While(! 
     ContainsAll(list, (choice = RandomChoice(list)) + {0, 1, 2}));
   choice
   ),
  0.5,
  "None found"
  )

selector(testlist)

Wrapping the function in TimeConstrained ensures that, in case there are no such elements, the function won’t get stuck in an endless loop. The return value could be the default ($Aborted), or it could be modified to taste as shown above. For example:

selector(Range(0, 99, 2))

(* Out: None found *)

SQL to add zeros in front of existing data to meet field length

How to add zeros in front of existing data of NationalityCode field to make the length 5 ?

enter image description here

c# – this code filter posible meet times between 2 calenders

i wrote a filter that uses 2 calender of different persons, and returns a list of posible meet times.
this code have a problem. the return is just one posible meet time, and i dont see why.
the code is the follow one:

string() times1, times2;
        times1 = new string() { "10:00 , 11:00", "12:00 , 13:00", "16:00 , 18:00" };
        times2 = new string() { "08:30 , 09:30", "10:30 , 12:30", "15:00 , 17:00" };

        //24h time to military time, separate strings
        int len = times1.Length * 2;
        string() times1split, times2split;
        times1split = new string(len);
        times2split = new string(len);
        times1split = times1.SelectMany(s => s.Replace(":", "").Replace(" ", "").Split(",")).ToArray();
        times2split = times2.SelectMany(s => s.Replace(":", "").Replace(" ", "").Split(",")).ToArray();


        int i = 0;
        int o = 0;
        List<string> horarios = new List<string>();

        while (i < times1split.Length - 1)
        {
            int temp1 = Convert.ToInt32(times1split(i));
            int temp2 = Convert.ToInt32(times2split(o));

            if (temp1 > temp2)
            {
                if (i % 2 != 0 && o == i + 1 && temp1 - temp2 > 30)
                {
                    string posiblemeet = temp2 + " - " + temp1;
                    posiblemeet.Insert(2, ":").Insert(10, ":");
                    horarios.Add(new string(posiblemeet));
                    o++;
                    i++;
                }

                else
                {
                    o++;
                }
            }

            if (temp1 < temp2)
            {
                if (o % 2 == 0 && o == i - 1 && temp2 - temp1 > 30)
                {
                    string posiblemeet = temp1 + " - " + temp2;
                    posiblemeet.Insert(2, ":").Insert(10, ":");
                    horarios.Add(new string(posiblemeet));
                    o++;
                    i++;
                }

                else
                {
                    i++;
                }
            }
        }

        foreach (string horario in horarios)
        {
            Console.WriteLine(horario);
        }

        Console.ReadKey();

stack exchange – Why do i get a: This question doesn’t meet our quality standards?

Stack Exchange Network


Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

php – Does gd and mbstring meet requirements?

I am about to install open cart on my server. I am confirming I have all system requirements before I being installation.

Open cart needs “GD Library” I have “gd” and “Mbstrings” is required I have “mbstring”.
Is this fine? Or do I need to make sure php -m shows GD Library and mbstrings

Here is what my system looks like at the moment

$ php -m
Unable to open logfile '/var/log/zarafa/php-mapi.log' as user 'orca'
Not enough permissions to append logfile '/var/log/zarafa/php-mapi.log'. Reverting to stderr.
[PHP Modules]
amqp
apc
apcu
bcmath
bz2
cairo
calendar
Core
ctype
curl
date
dba
dio
dom
enchant
ereg
event
exif
fann
fileinfo
filter
ftp
gd
gearman
geoip
gettext
gmp
hash
horde_lz4
iconv
idn
igbinary
imap
intl
json
judy
krb5
ldap
libsmbclient
libsodium
libvirt
libxml
lzf
mailparse
mapi
maxminddb
mbstring
mcrypt
memcache
memprof
mhash
mongo
mongodb
msgpack
mysql
mysqli
ncurses
OAuth
odbc
openssl
parsekit
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
phpiredis
pimple
posix
pq
propro
pspell
psr
radius
raphf
readline
recode
redis
Reflection
rrd
runkit
session
shmop
SimpleXML
smbclient
snmp
soap
sockets
solr
SPL
sqlite3
ssdeep
ssh2
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
twig
uuid
wddx
xattr
XCache
XCache Cacher
XCache Coverager
XCache Optimizer
xdebug
xhprof
xml
xmldiff
xmlreader
xmlrpc
xmlwriter
xsl
yac
yaml
Zend OPcache
zip
zlib
zstd

[Zend Modules]
XCache
XCache Cacher
XCache Coverager
XCache Optimizer
Xdebug
Zend OPcache