- Nov 2023
-
www.youtube.com www.youtube.com
-
blah. this surveillance system is one big personality test.<br /> the problem is, they do not want a balance of all personality types or "natural order",<br /> but they do a one-sided selection by personality type.<br /> aka socialdarwinism, socialism, survival of the social, social credit score, civilization, high culture, progress, "made order", human laws, human rights, humanism, ...
-
- Oct 2023
-
tapoueh.org tapoueh.org
-
rubynor-web-next-lime.vercel.app rubynor-web-next-lime.vercel.app
-
where("period @> date ? ", shares_at)
-
- Sep 2023
-
dmarcly.com dmarcly.com
-
a tuple { selector, private key, public key } is created
-
-
en.wikipedia.org en.wikipedia.org
-
en.wikipedia.org en.wikipedia.org
-
A record can be viewed as the computer analog of a mathematical tuple, although a tuple may or may not be considered a record, and vice versa, depending on conventions and the specific programming language.
-
An object in object-oriented language is essentially a record that contains procedures specialized to handle that record; and object types are an elaboration of record types. Indeed, in most object-oriented languages, records are just special cases of objects, and are known as plain old data structures (PODSs), to contrast with objects that use OO features.
-
A record type is a data type that describes such values and variables.
-
In type theory, product types (with no field names) are generally preferred due to their simplicity
-
-
en.wikipedia.org en.wikipedia.org
Tags
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.org
-
Most typed functional programming languages implement tuples directly as product types
Tags
Annotators
URL
-
-
www.digitalocean.com www.digitalocean.com
-
Modules do not add anything to the global (window) scope. Modules always are in strict mode. Loading the same module twice in the same file will have no effect, as modules are only executed once. Modules require a server environment.
-
- Jun 2023
-
css-tricks.com css-tricks.com
- May 2023
-
blog.janestreet.com blog.janestreet.com
-
Emphasizing lifetime-polymorphism can also make type inference untenable, a design choice that wouldn’t fit OCaml.
References or sources? Why? Presumably there's some research into this?
-
-
archive.org archive.org
-
Marcin Wichary Typewriting, Type, and Keyboard Collection<br /> https://archive.org/details/wicharytypewriter
-
-
archive.org archive.org
-
Tags
- security
- http:header=x-frame-options
- wikipedia:en=Cross-site_request_forgery
- wikipedia:en=Clickjacking
- sri
- wikipedia:en=Man-in-the-middle_attack
- http:header=content-security-policy
- wikipedia:en=Data_breach
- http:header=strict-transport-security
- http:header=referrer-policy
- wikipedia:en=Session_hijacking
- http
- csp
- http:header=x-content-type-options
- hsts
Annotators
URL
-
-
www.tech-invite.com www.tech-invite.com
-
PDU Session types are defined: IPv4, IPv6, IPv4v6, Ethernet, Unstructured.
-
-
www.youtube.com www.youtube.com
-
Typewriter Cleaning and Repair Basics #2 Type Bars, Case, and Crinkle Finish
https://www.youtube.com/watch?v=82O_iUAI5og
Segment comb cleaning - isopropyl alcohol (gentler solvent) - odorless mineral spirits - Lacquer thinner (maybe a bit too aggressive) - naphtha (lighter fluid) take care for flammability and ventilation
Work solvent into bearing between type bar and segment comb. To dry things out one can used compressed air when done or just air dry.
If sticking keys not due to being gummed up, bend portions slightly for better alighment.
Do not lubricate the segment comb.
Only lubricate the carriage rails when necessary.
Exterior cleaning
Brass bristle or nylon bristle brushes (toothbrushes) can be used to clean the exterior of the typewriter and/or cases with mild detergents or other solvents. Depending on the finish, try the brush and solvent on a small portion to determine colorfastness and potential scratching first.
-
- Apr 2023
- Mar 2023
-
www.theguardian.com www.theguardian.com
-
www.sciencedirect.com www.sciencedirect.com
-
Does not mention foam type
-
-
www.sciencedirect.com www.sciencedirect.com
-
Does not mention foam type.
-
-
www.sciencedirect.com www.sciencedirect.com
-
Does not mention foam type.
-
- Feb 2023
-
graphql.org graphql.org
-
[Episode!]! represents an array of Episode objects. Since it is also non-nullable, you can always expect an array (with zero or more items) when you query the appearsIn field. And since Episode! is also non-nullable, you can always expect every item of the array to be an Episode object.
Note that this still allows an empty array,
[]
. It only disallows:null
and[null]
.
-
-
stackoverflow.com stackoverflow.com
-
If you want a workaround for the case where you can't just replace key with a string literal, you could write your own user-defined type guard function called hasProp(obj, prop). The implementation would just return prop in obj, but its type signature explicitly says that a true result should cause obj to be narrowed to just those union members with a key of type prop: function hasProp<T extends object, K extends PropertyKey>( obj: T, prop: K ): obj is Extract<T, { [P in K]?: any }> { return prop in obj; } and then in your function, replace key in a with hasProp(a, key): function f3(a: A) { const key = 'b'; if (hasProp(a, key)) { return a[key]; // okay } return 42; }
-
- Dec 2022
-
127.0.0.1:3999 127.0.0.1:3999
-
type switches
type switch 是一种固定的格式吗?还是基于 switch 条件控制的?
A type switch is a construct ``` func do(i interface{}) { switch v := i.(type): case int:
case string:
default:
} ```
-
Type switches
type switch 是一种固定的格式吗?还是基于 switch 条件控制的? A type switch is a construct ``` func do(i interface{}) { switch v := i.(type): case int:
case string:
default:
} ```
Tags
Annotators
URL
-
-
www.zhihu.com www.zhihu.com
-
为什么JavaScript里面typeof(null)的值是"object"?
-
-
Local file Local file
-
in this moment Chris and the deer have their owncoagulation: fusing into one “buck” (and obviously Peele was playing uponthis terminology associated with the Black male slave), they jointly chargeand kill their enemy. Together, the “vermin” strike back
-
Chris makes use of thedead deer; another (more mystical) analysis could posit that the deer takesrevenge on the hunter, using Chris’s body as a vehicle
-
First, the conflation of the deerwith the devaluation of Black life nods to the long-standing tradition of usinganimals to speak back to the power structures upheld by plantation slaveryin the form of animal folktales. And second, this deer comes roaring back tolife. He gets his revenge on the family that made his noble head into a trophy.The taxidermied deer is a speaking animal that has a kind of second life, andthere are multiple ways we might read its importance in Chris’s escape
back to life, revenge, trophy, head, speaking animal with second life, the deer also fights back
-
the deer strikes back
-
Like the trickster tales discussed above, the films we are lookingat here do not make animals the focal point, but use them as a means of“thinking with” humans.
-
The trickster is an animal low on the peckingorder (like a rabbit) who finds himself in a jam and must use his wits, charms,and other skill sets to outfox his more powerful enemies. He is an animalsurrogate that speaks softly of strategies for resistance
-
Wagner emphasizes thatsuch animal tales often provided coded ways of imparting strategies forresistance and that this story has historical connections not only to the tropeof the speaking animal from African trickster mythologies like the spiderAnansi, but also perhaps, to Aesop’s animal fable
-
educe animals to mere metaphors, similes, or symbolsdo not seem promising for theorizing ethical recognition of actual animals.Donna Haraway, for example, criticizes philosophical texts that show a “pro-found absence of curiosity about or respect for and with actual animals,even as innumerable references to diverse animals are invoked.” 15 SusanMcHugh, meanwhile, suggests that “the aesthetic structures of metaphor,though precariously supporting the human subject, seem unable to bearanimal agency.”16 An
-
She maybelieve the comparison reveals the moral horror of industrial animal agri-culture, but, as Bénédicte Boisseron argues, such comparisons “instrumen-talize” Blackness in a “self-serving” way, ignoring the complex and ongoingBlack struggle against dehumanizing discourses and institutions in order toframe “the animal” as “the new black.
-
remind us of the historical reduction of the human to the status of ananimal under transatlantic slavery, but also were used as a mode of resistancefor enslaved peoples
first half is type 1, first half is type 2
-
Rather than viewing fables as operating with a purely substitutivelogic, where the animal stands in for the human, recent criticism explores thepossibility that the fable can imagine relationality and even allyship amongspecies
-
lens of alliance, not solely analogy
-
Rather, the appearance of animals in some recentfilms highlights the unequal treatment of Black lives in America in a mannerthat continues the fable tradition, and simultaneously emphasizes the human
-
Theseworks encode various strategies of survival in an era in which Black livescontinue to be devalued
-
Any resistance must be sanitized soas to be tolerable” for the general audience. 5 But resistance also works not bybeing sanitized, but by being hidden in plain sight, coded as symbols legibleto some but not to all. The use of animal fables has a long-standing historydating back to slavery as providing such a coded language of resistance
get out use of deer ... chris, black resistance, fables...taxidermy hidden in plain sight, coded/only chris to understand
-
Wagner notes that theweaker animals use their wits as a means of overcoming the unequal powerdistribution in the world they navigated
slavery fables weak/vermin intro get out deer...wits and taxidermy
-
he “speaking animal,” which acknowledgesthe dialectic capacity of the symbolic animal of fables to stage a conversationabout subjugation and resistance, but simultaneously, to point beyond itselfto the reality of animal life.
speaking animals ... speaking through eyes/perspective
-
Paraphrasing Joel Chandler Harris, BryanWagner writes that animal stories were “political allegories in which therelative position of the weaker animals corresponded to the global per-spective of the race.”
thow dean uses deer and how poe uses cat ... not how chris uses deer
-
-
www.postgresql.org www.postgresql.org
-
interval values can be written using the following verbose syntax: [@] quantity unit [quantity unit...] [direction] where quantity is a number (possibly signed); unit is microsecond, millisecond, second, minute, hour, day, week, month, year, decade, century, millennium, or abbreviations or plurals of these units
-
-
www.postgresql.org www.postgresql.org
-
daterange — Range of date, datemultirange — corresponding Multirange
-
-
-
math.stackexchange.com math.stackexchange.com
-
My freely downloadable Beginning Mathematical Logic is a Study Guide, suggesting introductory readings beginning at sub-Masters level. Take a look at the main introductory suggestions on First-Order Logic, Computability, Set Theory as useful preparation. Tackling mid-level books will help develop your appreciation of mathematical approaches to logic.
This is a reference to a great book "Beginning Mathematical Logic: A Study Guide [18 Feb 2022]" by Peter Smith on "Teach Yourself Logic A Study Guide (and other Book Notes)". The document itself is called "LogicStudyGuide.pdf".
It focuses on mathematical logic and can be a gateway into understanding Gödel's incompleteness theorems.
I found this some time ago when looking for a way to grasp the difference between first-order and second-order logics. I recall enjoying his style of writing and his commentary on the books he refers to. Both recollections still remain true after rereading some of it.
It both serves as an intro to and recommended reading list for the following: - classical logics - first- & second-order - modal logics - model theory<br /> - non-classical logics - intuitionistic - relevant - free - plural - arithmetic, computability, and incompleteness - set theory (naïve and less naïve) - proof theory - algebras for logic - Boolean - Heyting/pseudo-Boolean - higher-order logics - type theory - homotopy type theory
-
- Nov 2022
-
github.com github.com
-
by using symbols as keys, you will be able to use the implicit conversion of a Mash via the #to_hash method to destructure (or splat) the contents of a Mash out to a block
Eh? The example below:
symbol_mash = SymbolizedMash.new(id: 123, name: 'Rey') symbol_mash.each do |key, value| # key is :id, then :name # value is 123, then 'Rey' end
seems to imply that this is possible (and does an implicit conversion) because it defines
to_hash
. But that's simply not true, as these 2 examples below prove:``` main > symbol_mash.class_eval { undef :to_hash } => nil
main > symbol_mash.each {|k,v| p [k,v] } [:id, 123] [:name, "Rey"] => {:id=>123, :name=>Rey} ```
``` main > s = 'a' => a
main > s.class_eval do def to_hash chars.zip(chars).to_h end end => :to_hash
main > s.to_hash => {a=>a}
main > s.each Traceback (most recent call last) (filtered by backtrace_cleaner; set Pry.config.clean_backtrace = false to see all frames): 1: (pry):85:in
__pry__' NoMethodError: undefined method
each' for "a":String ``` -
Hashie does not have built-in support for coercing boolean values, since Ruby does not have a built-in boolean type or standard method for coercing to a boolean. You can coerce to booleans using a custom proc.
I use:
ActiveRecord::Type::Boolean.new.cast(value)
-
-
developer.mozilla.org developer.mozilla.org
-
A File object is a specific kind of Blob, and can be used in any context that a Blob can.
-
-
en.wikipedia.org en.wikipedia.org
-
specific types of diagrams are also called a type of flow diagrams
-
- Oct 2022
-
Local file Local file
-
disport itself happily in its new and extended Quadrivium withoutpassing through the Trivium. But the scholastic tradition, though broken andmaimed, still lingered in the public schools and universities:
Is it possible that with the flowering of the storehouse of knowledge and the rise of information overload following Gutenberg's moveable type, we became overly enamored with Sayers' subject-based Quadrivium that we forgot to focus on the basics of the Trivium?
-
- Sep 2022
-
press.rebus.community press.rebus.community
-
get usually
This apparent error in the text is most likely a typo where two words should appear in the opposite order, making the sentence read "People working together in organizations usually get things done..."
Tags
Annotators
URL
-
- Aug 2022
-
en.wikipedia.org en.wikipedia.org
-
a hyponym is in a type-of relationship with its hypernym
-
-
www.eurekalert.org www.eurekalert.org
-
Yale researchers develop RNA-based therapy that clears SARS-CoV-2 from mice. (n.d.). EurekAlert! Retrieved January 9, 2022, from https://www.eurekalert.org/news-releases/934454
-
- Jun 2022
- May 2022
-
developer.mozilla.org developer.mozilla.org
-
```html
Choose your monster's colors:
<div> <input type="color" id="head" name="head" value="#e66465"> <label for="head">Head</label> </div> <div> <input type="color" id="body" name="body" value="#f6b73c"> <label for="body">Body</label> </div>```
```js colorPicker.addEventListener("input", updateFirst, false); colorPicker.addEventListener("change", watchColorPicker, false);
function watchColorPicker(event) { document.querySelectorAll("p").forEach(function(p) { p.style.color = event.target.value; }); } ```
-
-
yt-project.github.io yt-project.github.io
-
particular
in particular ?
-
supports
support or supporting
-
susbtantial
substantial
-
This collection of three classes of fields
hanging sentence
-
researcher
a researcher or researchers
Tags
Annotators
URL
-
-
hasura.io hasura.io
-
But in GraphQL, all types are nullable by default, and you opt into non-nullability
-
In other typed languages, like TypeScript, Flow, Rust, or Haskell, all types are non-nullable by default, and you opt into nullability.
-
-
blog.merovius.de blog.merovius.de
-
www.ncbi.nlm.nih.gov www.ncbi.nlm.nih.gov
-
DICER1 syndrome is a rare genetic condition predisposing to hereditary cancer and caused by variants in the DICER1
GeneName: DICER1 PMCID: PMC7859642 HGNCID: Unavailable Inheritance Pattern: Autosomal dominant. Disease Entity: Familial pleuropulmonary blastoma (PPB), cervix embryonal rhabdomyosarcoma, multinodular goiter, nasal chondromesenchymal hemartoma, Ciliary body medulloepithelioma, Sertoli-Leydig Cell Tumor (SLCT), differentiated thyroid carcinoma, pituitary blastoma, pineoblastoma, cystic nephroma, Wilm's tumor and sarcomas of different sites including, amongst others, the uterine cervix, kidney and brain. Mutation: Germline Zygosity: Heterozygose Variant: No ClinVarID present. Family Information: No family outline Case: No specified information of patients included. CasePresentingHPO's: n/a CasePrevious Testing: n/a gnomAD: n/a Mutation Type: nonsense, frameshift, or splice affected.
Tags
- Cervix embryonal rhabdomyosarcoma
- PMCID: PMC7859642
- Mutation: Germline
- Mutation type: Frameshift
- Multinodular goiter
- Inheritance Pattern: Autosomal dominant
- Wilm's tumor
- Ciliary body medulloepitheliomma
- Zygosity: Heterozygous
- Gene: DICER1
- Nasal chondromesenchymal hemartoma
- Familial pleuropulmonary blastoma (PPB)
- Sertoli-Letdig Cell Tumor(SLCT)
- Differentiated thyroid carcinoma
- Mutation type: Nonsense
Annotators
URL
-
-
watermark.silverchair.com watermark.silverchair.com
-
DICER1 syndrome is an autosomal-dominant,pleiotropic, tumor-predisposition disorder arisingfrom pathogenic germline variants in DICER1, whichencodes an endoribonuclease integral to processingmicroRNAs
DICER1 is the gene name. PubMed ID, HGCNCID, and Variant: I can't find Inheritance Pattern: autosomal-dominant The disease entity: DICER1 syndrome The type of mutation: germline. Zygosity: not known. Family Information: a family was used, DICER1 carriers, and non DICER1 variant used, some of the family members had tumors from DICER1 Case Information: mean age is 34, the range of age is 18.6 to 43 years, male, and female used, ethnicity can't find Case Presenting HPO: cancer testing, chemotherapy, radiotherapy gnomeAD: 9.2,8.3.2 Mutation type: Pleiotropic, loss of function, missense
-
- Apr 2022
-
gobookmart.com gobookmart.com
-
As we all experience the world differently, the way of learning each of us is diverse. Comprehending how we learn things would help the teachers to understand their students and they don’t have to see any students lagging. Every kid doesn’t come first in the class. It is not because they have a smaller brain size. It is because their brain would acknowledge a different procedure of learning. In this article we are going to discuss the 4 types of learning styles so that you can understand – what type of learner are you?
-
-
-
There are project layouts that put implementation files and test files together.
-
-
stackoverflow.com stackoverflow.com
-
type
this is the way to check if command is available or not in bash
-
-
twitter.com twitter.com
-
Marc Lipsitch. (2021, July 20). At the risk of boiling down too much and certainly losing some detail, one way to summarize this wonderful thread is that when we think about vaccine effectiveness, we should think of 4 key variables: 1 which vaccine, 2 age of the person, 3 how long after vax, 4 vs what outcome. [Tweet]. @mlipsitch. https://twitter.com/mlipsitch/status/1417595538632060931
-
-
-
Gutenberg used his second edition of the Catholicon to experiment with casting type not letter by letter but in two- line slugs that could be reused in later printings, saving the labor of distributing then resetting the type letter by letter.
-
- Mar 2022
-
cs3110.github.io cs3110.github.io
-
assumes that the function identifier f has a particular type
How is the initial assumption choosen? Does it start with a completely generic type and then tries to narrow it down?
-
- Feb 2022
-
github.com github.com
-
we often work hard to make symbols and strings interchangeable in contexts where it makes sense
-
-
twitter.com twitter.com
-
Deepti Gurdasani. (2022, January 10). Lots of people dismissing links between COVID-19 and all-cause diabetes. An association that’s been shown in multiple studies- whether this increase is due to more diabetes or SARS2 precipitating diabetic keto-acidosis allowing these to be diagnosed is not known. A brief look👇 [Tweet]. @dgurdasani1. https://twitter.com/dgurdasani1/status/1480546865812840450
-
-
pubmed.ncbi.nlm.nih.gov pubmed.ncbi.nlm.nih.gov
-
Su, Y., Yuan, D., Chen, D. G., Ng, R. H., Wang, K., Choi, J., Li, S., Hong, S., Zhang, R., Xie, J., Kornilov, S. A., Scherler, K., Pavlovitch-Bedzyk, A. J., Dong, S., Lausted, C., Lee, I., Fallen, S., Dai, C. L., Baloni, P., … Heath, J. R. (2022). Multiple Early Factors Anticipate Post-Acute COVID-19 Sequelae. Cell, 0(0). https://doi.org/10.1016/j.cell.2022.01.014
-
-
twitter.com twitter.com
-
Adam Kucharski. (2022, February 8). Below figure being widely shared (from: Https://cdc.gov/mmwr/volumes/71/wr/mm7106e1.htm), but think it’s important to include uncertainty (i.e. 95% confidence intervals) when reporting estimates: Cloth mask: 56% (-17%-83%) lower odds than no mask Surgical mask: 66% (10%-87%) N95/KN95: 83% (36%-95%) https://t.co/SkPhF7CAJf [Tweet]. @AdamJKucharski. https://twitter.com/AdamJKucharski/status/1490946644837543938
-
- Jan 2022
-
diabetesjournals.org diabetesjournals.org
-
Kamrath, C., Rosenbauer, J., Eckert, A. J., Siedler, K., Bartelt, H., Klose, D., Sindichakis, M., Herrlinger, S., Lahn, V., & Holl, R. W. (2022). Incidence of Type 1 Diabetes in Children and Adolescents During the COVID-19 Pandemic in Germany: Results From the DPV Registry. Diabetes Care, dc210969. https://doi.org/10.2337/dc21-0969
-
- Dec 2021
-
help.micro.blog help.micro.blog
-
Similar to the idea of {{ if .Title }}, does Micro.blog (or Hugo) have a way to identify if a post only contains images and capture that to a variable?
Another potential method (or an additional filter) for finding posts with photos, or more specifically posts whose main purpose is a photo or image is to use use the post type discovery algorithm. Given that Micro.blog is built on a variety of IndieWeb building blocks, most photos could/should have a class of u-photo on their img tags, so you could search for these instead or in addition to. I believe there are a set of parsers and tools out there that do this in a few languages already and someone in the IndieWeb Dev chat can direct you to them if they’re not linked to the page above.
-
-
-
Over these two centuries, an in-creasing impatience for the ancient art of memory based on the use of imagi-nation could be detected in the academic milieu.
Following the invention of moveable type, the information overload created in the two centuries between 1550 and 1750, placed a major burden and impatience, particularly on academic scholars, on the use of the ancient arts of memory based on the use of imagination. In addition to the education reforms by those like Peter Ramus, this may have been a major motivating factor for forgetting this prior tradition of knowledge acquisition and management.
What is one to do when there's seemingly "too much to memorize"?
-
-
blogs.orient.ox.ac.uk blogs.orient.ox.ac.uk
-
All this bears little resemblance to modern literary ideals, in which the author is constructed somewhat heroically as an individual creative source.
This is broadly true in the early West, but becomes far more prevalent after the time of Konrad Gessner (1516 - 1565) whose work coincided with the explosion of information following the use of moveable type in Europe.
-
-
-
Behind this order of paper slips that guarantees mobility and rearrange-ment, one can recognize the same economy of signs that a century earlier contributes to a major paradigmatic shift. Johannes Gutenberg ’ s invention of the printing press not only forges most obviously associations of typeset-ting, steel models, pouring mechanisms for individual letter types, special alloys, and composing sticks for setting lines of type. 28
Much the same way printing was automated with Johannes Gutenberg's moveable type invention, the writing of longer pieces may be automated with moveable ideas. Ideas written down on slips (index cards) can be moved around easily and re-used as necessary in composing longer articles.
-
- Nov 2021
-
www.typescriptlang.org www.typescriptlang.org
-
the name union comes from type theory. The union number | string is composed by taking the union of the values from each type. Notice that given two sets with corresponding facts about each set, only the intersection of those facts applies to the union of the sets themselves.
-
For example, if we had a room of tall people wearing hats, and another room of Spanish speakers wearing hats, after combining those rooms, the only thing we know about every person is that they must be wearing a hat.
-
Type aliases and interfaces are very similar, and in many cases you can choose between them freely. Almost all features of an interface are available in type, the key distinction is that a type cannot be re-opened to add new properties vs an interface which is always extendable.
-
-
-
Regarding mapped types, remember that { [K in T]: U } is a special form - it can't be combined with other properties within the { }. So there's not really a name for the [K in T: U] part because it's just part of the overall "mapped type" syntax { [K in T]: U }
-
Which... is confusing because Palette technically does have an index signature Palette is a mapped type, and mapped types don't have index signatures. The fact that both use [ ] is a syntactic coincidence.
-
-
github.com github.com
-
-
// Second case (unexpected) interface C { [x:string]: number } interface D { x: number } const d: D = { x: 1 }; const c: C = d; // error // Type 'D' is not assignable to type 'C'. // Index signature is missing in type 'D'.
-
-
stackoverflow.com stackoverflow.com
-
So now the question is, why does Session, an interface, not get implicit index signatures while SessionType, an identically-structured typealias, *does*? Surely, you might again think, the compiler does not simply deny implicit index signatures tointerface` types? Surprisingly enough, this is exactly what happens. See microsoft/TypeScript#15300, specifically this comment: Just to fill people in, this behavior is currently by design. Because interfaces can be augmented by additional declarations but type aliases can't, it's "safer" (heavy quotes on that one) to infer an implicit index signature for type aliases than for interfaces. But we'll consider doing it for interfaces as well if that seems to make sense And there you go. You cannot use a Session in place of a WithAdditionalParams<Session> because it's possible that someone might merge properties that conflict with the index signature at some later date. Whether or not that is a compelling reason is up for rather vigorous debate, as you can see if you read through microsoft/TypeScript#15300.
-
-
-
The type-fest package contains only types, meaning they are only used at compile-time and nothing is ever compiled into actual JavaScript code. This package contains functions that are compiled into JavaScript code and used at runtime.
-
- Oct 2021
-
www.medrxiv.org www.medrxiv.org
-
Hulme, W. J., Williamson, E. J., Green, A., Bhaskaran, K., McDonald, H. I., Rentsch, C. T., Schultze, A., Tazare, J., Curtis, H. J., Walker, A. J., Tomlinson, L., Palmer, T., Horne, E., MacKenna, B., Morton, C. E., Mehrkar, A., Fisher, L., Bacon, S., Evans, D., … Goldacre, B. (2021). Comparative effectiveness of ChAdOx1 versus BNT162b2 COVID-19 vaccines in Health and Social Care workers in England: A cohort study using OpenSAFELY [Preprint]. Epidemiology. https://doi.org/10.1101/2021.10.13.21264937
-
-
alannamunro.com alannamunro.com
Tags
Annotators
URL
-
-
typebrigade.com typebrigade.com
Tags
Annotators
URL
-
-
kennethormandy.com kennethormandy.com
-
Type Brigade is Vancouver’s type meetup.
-
-
-
When I was looking for a way to build small, maintainable websites as an independent contractor, I found a local Vancouver company, Chloi, that was working on a static site generator called Harp. It was a plus that Kenneth Ormandy of Type Brigade had been involved in the project. (See his contributions on GitHub)
Tags
Annotators
URL
-
- Sep 2021
-
locahost:8888 locahost:8888
-
allows
remove allows
-
- Aug 2021
-
-
This isn't too restrictive, and provides a nice type type guard.
-
-
stackoverflow.com stackoverflow.com
-
the tuple() function you need can be succinctly written as: export type Lit = string | number | boolean | undefined | null | void | {}; export const tuple = <T extends Lit[]>(...args: T) => args;
-
const list = ['a', 'b', 'c'] as const; // TS3.4 syntax type NeededUnionType = typeof list[number]; // 'a'|'b'|'c';
-
possible to tell the compiler to infer the type of a tuple of literals as a tuple of literals, instead of as, say, string[], by using the as const syntax.
-
Or, maybe better, interpret the list as a tuple type: const list: ['a','b','c'] = ['a','b','c']; // tuple
-
One problem is the literal ['a','b','c'] will be inferred as type string[], so the type system will forget about the specific values.
-
-
github.com github.com
-
function strictIsDog<T extends Dog extends T ? unknown : never>( // like <T super Dog> candidate: Dog | T // if Dog extends T then Dog | T is T ): candidate is Dog { // compiler recognizes that Dog | T can narrow to T return "bark" in candidate; } if (strictIsDog(animal)) {} // okay if (strictIsDog(dog)) {} // okay if (strictIsDog(mixed)) {} // okay if (strictIsDog(cat)) {} // error! // ~~~ <-- Cat is not assignable to Dog
-
* Now it's correct within the laws of the type system, but makes zero practical sense, * because there exists no runtime representation of the type `Date & string`. * * The type system doesn't care whether a type can be represented in runtime though.
new tag?: makes zero practical sense
makes zero practical sense because there exists no runtime representation of the type
-
Using the second type guard forces the user to write a more precise type and therefore manifest any nonsensical type guards that produce never, like: function silly<T extends number>(candidate: T): candidate is T & boolean { … }
-
-
stackoverflow.com stackoverflow.com
-
The best way to do this is to derive the type Format from a value like an array which contains all of the Format literals.
-
So is @Ryan Cavanaugh's answer the only viable solution? It seems extremely verbose...
-
My question is specifically if there is a way to do user defined type guards using the type itself
-
-
stackoverflow.com stackoverflow.com
-
function isKeyOfMcuParams(x: string): x is keyof McuParams { switch (x) { case 'foo': case 'bar': case 'baz': return true; default: return false; } }
-
Is it possible to write a user defined type guard for a keyof string type such as keyOf foo when foo is defined ONLY as a type (and not in an array)?
-
-
charlypoly.com charlypoly.com
-
It means that when having a type guard:TypeScript and JavaScript runtime are tied to the same behaviour.
-
Inside the if statement, TypeScript will assume that amount cannot be anything else than a string, which is true also at the runtime thanks to typeof JavaScript operator.
-
This “gap” between what we call “runtime” and “static analysis” can be filled using TypeScript Type Guards.
-
-
dev.to dev.to
-
we use a type guard here to say that, if this function returns true, any further usage of key will be of the specified type. Otherwise, it's still just a string.
-
function hasKey<O>(obj: O, key: PropertyKey): key is keyof O { return key in obj }
-
-
stackoverflow.com stackoverflow.com
-
Adding to the accepted answer, if you happen to need to use a type guard against a mixin, you'll get this error too, since the is operator doesn't behave as an implements would.
-
Regarding the error message, the predicate type must be assignable to the value type because the type guard is used to check whether a value with a less-specific type is in fact a value with a more-specific type. For example, consider this guard: function isApe(value: Animal): value is Ape { return /* ... */ } Ape is assignable to Animal, but not vice versa.
-
If there is no relationship between the value's type and the type in the type predicate, the guard would make no sense. For example, TypeScript won't allow a user-defined guard like this: function isString(value: Date): value is string { return typeof value === "string"; }
-
-
stackoverflow.com stackoverflow.com
-
const isValidMethodForHandler = <T extends { [i: string]: any }>(handler: T) => ( method: string ): method is Extract<keyof T, string> => Object.keys(handler).indexOf(method) !== -1;
-
-
www.geeksforgeeks.org www.geeksforgeeks.org
-
Type Annotations:These annotations can be applied to any place where a type is being used. For example, we can annotate the return type of a method.
Tags
Annotators
URL
-
-
zio.github.io zio.github.io
-
We can also define these properties for data types that we do not control, for example providing a custom way of hashing a data type implemented by someone else
-
-
-
Moss points out the implied analogy between the commonplace-book and "moveable type, capable of both setting a page of text in an apparentiy immutable form and of rearranging all the eléments of that page into other pattems for other meanings" (p. 252); with characteristie prudence, she mentions this analogy only when it finally becomes explicit in one of her later texts, Jean Oudart's Methode des orateurs oí 1668
The ideas of moveable type and moveable information can be an important idea in the evolution of commonplace books to zettelkasten and thence into digital forms of commonplaces.
-
- May 2021
-
www.washingtonpost.com www.washingtonpost.com
-
Blakemore, E. (n.d.). New diabetes cases linked to covid-19. Washington Post. Retrieved February 11, 2021, from https://www.washingtonpost.com/health/2021/02/01/covid-new-onset-diabetes/
-
- Mar 2021
-
stackoverflow.com stackoverflow.com
-
github.blog github.blog
-
We added the X-Content-Type-Options: nosniff header to our raw URL responses way back in 2011 as a first step in combating hotlinking. This has the effect of forcing the browser to treat content in accordance with the Content-Type header. That means that when we set Content-Type: text/plain for raw views of files, the browser will refuse to treat that file as JavaScript or CSS.
-
-
developer.mozilla.org developer.mozilla.org
-
en.wikipedia.org en.wikipedia.org
-
How is it that https://en.wikipedia.org/wiki/Type_theory links to https://en.wikipedia.org/wiki/Type_(model_theory) but the latter does not have any link to or mention of https://en.wikipedia.org/wiki/Type_theory
Neither mentions the relationship between them, but both of them should, since I expect that is a common question.
-
-
en.wikipedia.org en.wikipedia.org
-
In fact categories can themselves be viewed as type theories of a certain kind
-
-
en.wikipedia.org en.wikipedia.org
-