Preparation time
1-2 hours
Cooking time
30 mins to 1 hour
Soft pasta filled with zesty seafood and served in a full-flavoured seafood bisque.
To make the pasta, put the flour into a large bowl and make a well in the centre. Stir in the eggs and yolks, lemon zest and a pinch of salt, and gradually work into a dough. Knead for 10 minutes, then wrap in cling film and refrigerate for 30 minutes.
Meanwhile, to make the filling, place a frying pan over a medium heat. Add a dash of oil and fry the prawns with a pinch of salt and pepper and the lemon juice. Leave to cool slightly, then remove the prawns from their shells, reserving the shells for later.
Place the prawn and crab meats in a food processor and blend until smooth. Add the egg white and seasoning and blend again until just mixed. Stir in the chives, cover and set aside.
To make the bisque, heat the oil in a heavy-based saucepan and fry the onion until brown. Add the garlic and prawn shells and cook for another 30 seconds. Stir in the brandy, tomatoes, bay leaf, tomato purée and star anise. Stir in the stock and simmer for 20 minutes.
Strain the sauce using a funnel and muslin cloth and return to the pan. Stir in the cream and cook over a medium heat until it is the consistency of single cream. Season to taste.
To make the ravioli, cut the pasta into four pieces and roll out each piece using a pasta machine, working it through the settings until it is on the thinnest setting. Sprinkle semolina flour onto a work surface and lay a sheet of the pasta on top. Spoon tablespoons of the filling up the centre of the pasta, leaving a 4cm/1½in gap between each spoonful. Brush around the filling with beaten egg, lay a second sheet of pasta over the top and seal each one by cupping and expelling any air.  Repeat with the last two sheets of pasta until you have 12–16 individual ravioli.
Bring a large saucepan of water to the boil and cook the ravioli for 3–4 minutes. Transfer to the bisque pan to coat.
Place three or four ravioli on each plate, spoon over the sauce and garnish with the chives and a small drizzle of extra virgin olive oil.


Calculating elasticity of demand involves Division of Fractions, Ratios, Subtraction of Fractions, Rates, Percent, the Cartesian Coordinate Grid, and the Midpoint Formula… Here’s an example elasticity problem…
Which is a better buy: 14.5 oz can for $1.99 or 28 oz. can for $3.59?
Convert to unit price equation: $1.99/14.5 and $3.59/28


Contact
About
Portfolio
Home
Cottonwood Canyon Website Design
2022 Olympics Design
Joe Duffy Booklet
CCF Donation Package Design
Powell Peralta Website Redesign
Curel Redesign
Hydro Flask Redesign
Trail Finder App Design


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/parsing.20a.20bool.html ---
I would like to have a tactic argument which could a bool (or perhaps a true
or false
), or a nat
. Can someone show me how to construct the appropriate parser?
doesn’t iterate
parse a (small) nat
You could parse an expression and match against the result
private meta def bool_or_nat : parser (bool ⊕ ℕ) := (sum.inr <$> small_nat) <|> (sum.inl <$> (texpr >>= (λ e, of_tactic $ to_expr e >>= eval_expr bool)))
is my attempt so far
but I get VM does not have code for 'bool.tt'
(when I try to actually use it; compiles fine)
eval_expr'
also of_tactic'
Can't find of_tactic'
But it looks like it's not needed.
Perhaps that's been patched in core already.
eval_expr'
does the trick... :-(
Hmm.. and what if I want to all true
?
(I'm trying to allow something close to set_option pp.all true
inside a tactic block.)
For parsing a bool
, it's starting to look pretty complicated. Why not just do tt <$ tk "tt" <|> ff <$ tk "ff"
?
because tk
only works on keywords
and if you declare tt
as a keyword then it won't work as the actual expression
If you parse an expression, use to_expr `(%%e: bool)
and then evaluate it, then this will also work on boolean expressions as well as true
and false
which will be interpreted via to_bool
If you want a more syntactic interpretation, you can pattern match the pre-expression you get from texpr
and just see if it is the constants tt
, true
, ff
or false
(or numerals) and dispatch accordingly
I do something like this for being able to recognize the non-keyword SOP
in ring
That's disappointing. parsing an expressing seems overkill and if you have to parse something after the bool and that it could be read as an expression, it will just mix up the parser
In fact, the most disappointing thing is that you can't have an interactive tactic called set_option
anyway.
So this is all a moot point, I think. :-)
That could be an argument for having a bool
parser like small_nat
What about using the ident
parser?
that won't read any more than it has to
Actually I think this is the right answer, since true
and false
are definitely treated as identifiers by the lean parser
about pp.all
, try:
meta def set_pp_all : tactic unit := do opt ← get_options, set_options (opt.set_bool `pp.all tt) example : 1 + 1 = 1 := begin do { set_pp_all } end
You can't use set_option
because that's a command keyword, but you could use any variation on that like set_opt
or option
let_option
or even better, with_option { tac }
Alternatively, you could just declare every option name as an interactive tactic so that pp.all true
is a tactic
strangely enough, I don't think there are any conflicts that arise this way
You can even generate them with metaprogramming so that boolean options parse a boolean and numeric options parse a nat
Mario Carneiro said:
or even better,
with_option { tac }
Perhaps whether one wants this scoped syntax depends on whether the set_option
tactic is intended to remain in the final version of the proof. For pp
options it would probably just be annoying to have to use {}
most of the time (if you really want to scope the option, then you can probably achieve it with {}
anyways).
another benefit of having options-as-tactics is that you can copy the docstring of the option to the tactic so that you get a nice hover, while set_opt pp.all true
wouldn't be able to provide that
If you write pp.all
in an interactive tactic does it mean tactic.interactive.pp.all
?
pretty sure
confirmed, it works just like other interactive tactics
Maybe something like pretty_print all
would be more in line with the kind of naming conventions that we follow
I think it would be better to stick to the naming convention used by options so that people don't have to learn both
I thought there was an API for querying the list of all options, but I can't find one. options.fold
only gives you the options that have been set on the current object
there is also no way to ask what type an option has, you just use get_string
or get_nat
and hope you got it right
In the absence of an API for this, we can still just make a list of options and their types. Here's a plausible metaprogram for building these option tactics:
open lean.parser lean namespace tactic open interactive meta def pbool : parser bool := do n ← ident, match n with | `tt := return tt | `true := return tt | `ff := return ff | `false := return ff | _ := failure end meta def set_option_bool (n : name) (b : parse pbool) : tactic unit := do opt ← get_options, set_options (opt.set_bool n b) run_cmd [(`pp.all, ``set_option_bool)].mmap $ λ e:name × name, do let v := (@expr.const tt e.2 []).app (reflect e.1), t ← infer_type v, tactic.add_decl $ declaration.defn (`tactic.interactive ++ e.1) [] t v (reducibility_hints.regular 1 tt) ff example : 0 = 1 := begin -- ⊢ 0 = 1 pp.all true, -- ⊢ @eq.{1} nat (@has_zero.zero.{0} nat nat.has_zero) (@has_one.one.{0} nat nat.has_one) end
Mario Carneiro said:
I thought there was an API for querying the list of all options, but I can't find one.
options.fold
only gives you the options that have been set on the current object
Do you mean #help options
?
yes, but via tactics
In fact, everything you can get to via #help
should be available to tactics
In fact, #help
should be a user command
Another possible tactic name is set_option.pp.all
; this does not run afoul of the command keyword and puts all the option tactics in one namespace
Mario Carneiro said:
I thought there was an API for querying the list of all options, but I can't find one.
options.fold
only gives you the options that have been set on the current object
But we could add one.
Although at that point maybe it makes more sense to just add a new core tactic
to achieve the originally desired result, I mean
a new core tactic for what? your two proposals sound the same
A set_option
tactic
Versus a method that just returns the list of all options and their arguments
there is already a set_option
tactic
I used it above
in order to implement the metaprogram though, I need to be able to list all options a la #help options
. From there we can create tactics that use set_options
to set any individual option as desired
oh okay, I guess I don't understand what I meant either, then
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


| IOCTL-FAT(2) | Linux Programmer's Manual | IOCTL-FAT(2) |
#include <linux/msdos_fs.h> #include <sys/ioctl.h>
int ioctl(int fd, FAT_IOCTL_GET_ATTRIBUTES, uint32_t *attr); int ioctl(int fd, FAT_IOCTL_SET_ATTRIBUTES, uint32_t *attr); int ioctl(int fd, FAT_IOCTL_GET_VOLUME_ID, uint32_t *id); int ioctl(int fd, VFAT_IOCTL_READDIR_BOTH, struct __fat_dirent[2] entry); int ioctl(int fd, VFAT_IOCTL_READDIR_SHORT, struct __fat_dirent[2] entry);
The fd argument contains a file descriptor for a file or directory. It is sufficient to create the file descriptor by calling open(2) with the O_RDONLY flag.
The attr argument contains a pointer to a bit mask. The bits of the bit mask are:
The zero value ATTR_NONE can be used to indicate that no attribute bit is set.
The fd argument can be a file descriptor for any file or directory of the filesystem. It is sufficient to create the file descriptor by calling open(2) with the O_RDONLY flag.
The id argument is a pointer to the field that will be filled with the volume ID. Typically the volume ID is displayed to the user as a group of two 16-bit fields:
printf("Volume ID %04x-%04x\n", id >> 16, id & 0xFFFF);
The short filenames in a directory can be read with VFAT_IOCTL_READDIR_SHORT. VFAT_IOCTL_READDIR_BOTH reads both the short and the long filenames.
The fd argument must be a file descriptor for a directory. It is sufficient to create the file descriptor by calling open(2) with the O_RDONLY flag. The file descriptor can be used only once to iterate over the directory entries by calling ioctl(2) repeatedly.
The entry argument is a two-element array of the following structures:
struct __fat_dirent { long d_ino; __kernel_off_t d_off; uint32_t short d_reclen; char d_name[256]; };
The first entry in the array is for the short filename. The second entry is for the long filename.
The d_ino and d_off fields are filled only for long filenames. The d_ino field holds the inode number of the directory. The d_off field holds the offset of the file entry in the directory. As these values are not available for short filenames, the user code should simply ignore them.
The field d_reclen contains the length of the filename in the field d_name. To keep backward compatibility, a length of 0 for the short filename signals that the end of the directory has been reached. However, the preferred method for detecting the end of the directory is to test the ioctl(2) return value. If no long filename exists, field d_reclen is set to 0 and d_name is a character string of length 0 for the long filename.
For VFAT_IOCTL_READDIR_BOTH and VFAT_IOCTL_READDIR_SHORT a return value of 1 signals that a new directory entry has been read and a return value of 0 signals that the end of the directory has been reached.
For further error values, see ioctl(2).
FAT_IOCTL_GET_ATTRIBUTES and FAT_IOCTL_SET_ATTRIBUTES first appeared in Linux 2.6.12.
FAT_IOCTL_GET_VOLUME_ID was introduced in version 3.11 of the Linux kernel.
The following was recorded when applying the program for the file /mnt/user/foo:
# ./toggle_fat_archive_flag /mnt/user/foo Archive flag is set Toggling archive flag Archive flag is not set
#include <fcntl.h> #include <linux/msdos_fs.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> #include <unistd.h> /* * Read file attributes of a file on a FAT filesystem. * Output the state of the archive flag. */ static uint32_t readattr(int fd) { uint32_t attr; int ret; ret = ioctl(fd, FAT_IOCTL_GET_ATTRIBUTES, &attr); if (ret == -1) { perror("ioctl"); exit(EXIT_FAILURE); } if (attr & ATTR_ARCH) printf("Archive flag is set\n"); else printf("Archive flag is not set\n"); return attr; } int main(int argc, char *argv[]) { uint32_t attr; int fd; int ret; if (argc != 2) { printf("Usage: %s FILENAME\n", argv[0]); exit(EXIT_FAILURE); } fd = open(argv[1], O_RDONLY); if (fd == -1) { perror("open"); exit(EXIT_FAILURE); } /* * Read and display the FAT file attributes. */ attr = readattr(fd); /* * Invert archive attribute. */ printf("Toggling archive flag\n"); attr ^= ATTR_ARCH; /* * Write the changed FAT file attributes. */ ret = ioctl(fd, FAT_IOCTL_SET_ATTRIBUTES, &attr); if (ret == -1) { perror("ioctl"); exit(EXIT_FAILURE); } /* * Read and display the FAT file attributes. */ readattr(fd); close(fd); exit(EXIT_SUCCESS); }
The following output was recorded when applying the program for directory /mnt/user:
$ ./display_fat_volume_id /mnt/user Volume ID 6443-6241
#include <fcntl.h> #include <linux/msdos_fs.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> #include <unistd.h> int main(int argc, char *argv[]) { uint32_t id; int fd; int ret; if (argc != 2) { printf("Usage: %s FILENAME\n", argv[0]); exit(EXIT_FAILURE); } fd = open(argv[1], O_RDONLY); if (fd == -1) { perror("open"); exit(EXIT_FAILURE); } /* * Read volume ID. */ ret = ioctl(fd, FAT_IOCTL_GET_VOLUME_ID, &id); if (ret == -1) { perror("ioctl"); exit(EXIT_FAILURE); } /* * Format the output as two groups of 16 bits each. */ printf("Volume ID %04x-%04x\n", id >> 16, id & 0xFFFF); close(fd); exit(EXIT_SUCCESS); }
The following was recorded when applying the program to the directory /mnt/user:
$ ./fat_dir /mnt/user . -> '' .. -> '' ALONGF~1.TXT -> 'a long filename.txt' UPPER.TXT -> '' LOWER.TXT -> 'lower.txt'
#include <fcntl.h> #include <linux/msdos_fs.h> #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> #include <unistd.h> int main(int argc, char *argv[]) { struct __fat_dirent entry[2]; int fd; int ret; if (argc != 2) { printf("Usage: %s DIRECTORY\n", argv[0]); exit(EXIT_FAILURE); } /* * Open file descriptor for the directory. */ fd = open(argv[1], O_RDONLY | O_DIRECTORY); if (fd == -1) { perror("open"); exit(EXIT_FAILURE); } for (;;) { /* * Read next directory entry. */ ret = ioctl( fd, VFAT_IOCTL_READDIR_BOTH, entry); /* * If an error occurs, the return value is -1. * If the end of the directory list has been reached, * the return value is 0. * For backward compatibility the end of the directory * list is also signaled by d_reclen == 0. */ if (ret < 1) break; /* * Write both the short name and the long name. */ printf("%s -> '%s'\n", entry[0].d_name, entry[1].d_name); } if (ret == -1) { perror("VFAT_IOCTL_READDIR_BOTH"); exit(EXIT_FAILURE); } /* * Close the file descriptor. */ close(fd); exit(EXIT_SUCCESS); }
| 2019-03-06 | Linux |


--- layout: example categories: example/v1.0.0 version: v1.0.0 title: Arc.js description: Drawing a great arc with arc.js tags: - plugins ---


This is a second attempt at a portfolio for the UT Full Stack coding Bootcamp. This website utilizes HTML, CSS, Javascript, and Materialize. The goal was to take our original portfolio and make it more unique to show off what we've learned. Please visit the portfolio page to see other projects I have worked on. The projects feature technologies like Node, Sequelize, Heroku and many more. Currently, my Contact page is under construction.
I recently moved to Austin but I've lived in the Austin area for the past 8 years. I have two kitties, Calcifer and Sofie, named after characters from one of my favorite movies, Howl's Moving Castle. I try to spend as much time outside as my laziness will allow. I like to hunt for mushrooms or nice little shady spots to read and draw. I also really enjoy playing D&D and video games.  I've worked in IT adjacent jobs for the past few years and I'm ready to actually do some real creative computer work!
Cheers!


Defence options
You must submit your defence on or before 7 July or the claimant can request a County Court Judgment (CCJ) against you.
However, you could suggest a resolution first, to try to settle the claim.
What do you want to do?
You must submit your defence on or before 7 July or the claimant can request a County Court Judgment (CCJ) against you.
However, you could suggest a resolution first, to try to settle the claim.
What do you want to do?


The RIGHTMARGIN record specifies the right margin in inches. The num field is in 8-byte IEEE floating-point format.
Record Data
|
Offset |
Name |
Size |
Contents |
|
4 |
num |
8 |
Right margin |


Demand for Assamese language in Kendriya Vidyalayas
Staff Reporter
GUWAHATI: The guardians of the students of the Kendriya Vidyalayas (KVs) in Assam are a worried lot as their wards are compelled to give the Assamese language a miss.
This feeling has made a number of guardians of KV students here to get into a huddle recently and form an association – Kendriya Vidyalaya Abhibabok Santha. The association has, among others, raised two issues – inclusion of the regional language (Assamese) in the KV curricula and observing the summer vacation in Assam in July-August, instead of May-June.
The Santha has already moved a number of MPs of the State with memoranda on its two demands. They have met BJP MPs Queen Oja, Dillip Saikia, Pallab Lochan Das and Topon Kumar Gogoi and Congress MPs Ripun Bora and Pradyut Bordoloi. The Santha has also sent a memorandum to the Union Human Resources Development (HRD) Minister on the two demands both by post and by email. Yet another memorandum has also been submitted to Kamrup (M) DC Biswajit Pegu, who happens to be the chairman of KV, Khanapara in Guwahati.
Meanwhile, raising the issue in the Parliament currently in session, Guwahati MP Queen Oja has appealed to the HRD Minister to include the regional language (Assamese) in CBSE (Central Board of Secondary Education) curricula so as to let KV the students of Assam and students of schools affiliated under the CBSE in the State learn their own tongue.
Also Read: Asomiya Yuva Mancha demands comprehensive use of Assamese language
Also Watch: Actress Amrita Gogoi promotes ‘Pratighat’ at Namti in Sivasagar


Native Windows GUI: Raw handles
Native windows controls handle are public and always accessible using the field
handle
.
For example, here's the definition of
ControlHandle
and the Window control:
#[derive(Default)]
pub struct Window {
pub handle: ControlHandle
}
pub enum ControlHandle {
NoHandle,
Hwnd(HWND),
/// (Parent menu / Menu).
/// Parent menu must be there as WINAPI does not have any function to fetch the parent
Menu(HMENU, HMENU),
/// (Parent window / Menu).
PopMenu(HWND, HMENU),
/// (Parent menu / Unique ID).
MenuItem(HMENU, u32),
/// Notice control
Notice(HWND, u32),
/// Timer control
Timer(HWND, u32),
/// System tray control
SystemTray(HWND)
}
Unwrapping window handles
Assuming you know the handle on the control and want to directly access it's content, the ControlHandle object has those methods:
pub fn hwnd(&self) -> Option<HWND>
pub fn hmenu(&self) -> Option<(HMENU, HMENU)>
pub fn pop_hmenu(&self) -> Option<(HWND, HMENU)>
pub fn hmenu_item(&self) -> Option<(HMENU, u32)>
pub fn timer(&self) -> Option<(HWND, u32)>
pub fn notice(&self) -> Option<(HWND, u32)>
pub fn tray(&self) -> Option<HWND>
Wrapping external handles
Wrapping external handles should only be done on a
Window
as it only control that doesn't expose
window class specific functions. Wrapping external handles should be considered unsafe.
pub fn wrap_extern_window(hwnd: HWND) -> nwg::Window {
nwg::Window {
handle: nwg::ControlHandle::Hwnd(hwnd)
}
}


Blog
Welcome to my blog! I post things like tutorials, showcases, random ideas - in fact, really just anything I can think of. Subscribe to the RSS feed here:
Random Post:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque a cursus libero.
1st January 2017
Read


--- layout: default title: Reference nav_order: 9 has_children: true permalink: /docs/reference ---
Magic Copy List .
Dear reader,
This is my personal marketing and copy archive. It is not indexed by search engines, which means, you shouldn't be seeing this.
And yet, you do see this page.
Oh well, lucky you I guess.


{% import "lib/paramList.html" as params -%}
{% extends 'class.template.html' -%}
{% block additional -%}
{% include "includes/selectors.html" %}
{% include "includes/outputs.html" %}
{% include "includes/inputs.html" %}
{% include "includes/export-as.html" %}
{% endblock %}


This content was rendered lazily
This content was also rendered lazily
This content was rendered eagerly


"THYINE WOOD "mentioned only in Revelation 18:12 among the articles which would cease to be purchased when Babylon fell. It was called citrus, citron wood, by the Romans. It was the Callitris quadrivalvis of botanists, of the cone-bearing order of trees, and of the cypress tribe of this order. The name of this wood is derived from the Greek word thuein, “to sacrifice,” and it was so called because it was burnt in sacrifices, on account of its fragrance. The wood of this tree was reckoned very valuable, and was used for making articles of furniture by the Greeks and Romans. Like the cedars of Lebanon, it is disappearing from the forests of Palestine.
"THYINE WOOD "mentioned only in Revelation 18:12 among the articles which would cease to be purchased when Babylon fell. It was called citrus, citron wood, by the Romans. It was the Callitris quadrivalvis of botanists, of the cone-bearing order of trees, and of the cypress tribe of this order.
The name of this wood is derived from the Greek word thuein, “to sacrifice,” and it was so called because it was burnt in sacrifices, on account of its fragrance. The wood of this tree was reckoned very valuable, and was used for making articles of furniture by the Greeks and Romans.
Like the cedars of Lebanon, it is disappearing from the forests of Palestine.


Let's get started
First, log into your Integromat account and set up your Integromat API access.
Full set-up details: The Importer by Integromat How-to.
First, log into your Integromat account and set up your Integromat API access.
Full set-up details: The Importer by Integromat How-to.