194 Matching Annotations
  1. Last 7 days
  2. Feb 2021
    1. While you could program this little piece of logic and flow yourself using a bunch of Ruby methods along with a considerable amount of ifs and elses, and maybe elsif, if you’re feeling fancy, a Trailblazer activity provides you a simple API for creating such flow without having to write and maintain any control code. It is an abstraction.
    1. A Monad wraps a value or a computation with a particular context. A monad must define both a means of wrapping normal values in the context, and a way of combining computations within the context.
    1. This text wound up founding the discipline which we today call "metaphysics", and one way to describe what this subject encompasses is that it covers things at a level of abstraction above physics.
    1. ActiveInteraction also supports merging errors. This is useful if you want to delegate validation to some other object. For example, if you have an interaction that updates a record, you might want that record to validate itself. By using the #merge! helper on errors, you can do exactly that.
    1. People often hear what they think should be said, not the words that are actually spoken. This comes from the tendency of people to think faster than they talk. A listener makes assumptions about what they expect because their minds race ahead. This can be especially problematic when you misinterpret what your boss said. 
    1. For now I feel ActiveForm is still a bit early to transition to a gem  as there are still things to improve and work out. One day I'll invest more time into making it extendable and release it as a gem. For now I feel it's an unnecessary complexity.

      If he's like most of us, though, this means it will never happen...

    1. An intent filter is an expression in an app's manifest file that specifies the type of intents that the component would like to receive. For instance, by declaring an intent filter for an activity, you make it possible for other apps to directly start your activity with a certain kind of intent. Likewise, if you do not declare any intent filters for an activity, then it can be started only with an explicit intent.
    1. 100vw is 100% of the viewport width not accounting for scrollbars (unless the root element has anything other than overflow: auto set, but auto is the default value). Thus, when the page content overflows the viewport vertically, the browser renders the vertical scroll bar, which reduces the visible viewport area by a few pixels. But the 100vw value doesn't update to account for this, so the selected div retains the same width as before the vertical scrollbar appeared. This results in the horizontal scroll bar rendering.
    1. the 2 hardest problems in computer science are essentially the 2 hardest problems of life in general, as far as humans and information are concerned.
    2. The non-determinism is why cache invalidation — and that other hard problem, naming things — are uniquely and intractably hard problems in computer science. Computers can perfectly solve deterministic problems. But they can’t predict when to invalidate a cache because, ultimately, we, the humans who design and build computational processes, can’t agree on when a cache needs to be invalidated.
    3. I like the answers already given, but I think they both could use an even more top-level, generalized explanation.
    4. Cache invalidation is hard because: Everything in life we want to know, changes.Those changes are non-deterministic.
    1. # Returns a new relation, which is the logical union of this relation and the one passed as an # argument. # # The two relations must be structurally compatible: they must be scoping the same model, and # they must differ only by #where (if no #group has been defined) or #having (if a #group is # present). Neither relation may have a #limit, #offset, or #distinct set.
    1. justify-content Sometimes the total size of your grid might be less than the size of its grid container. This could happen if all of your grid items are sized with non-flexible units like px. In this case you can set the alignment of the grid within the grid container.
    1. All those names of things - topology, complex analysis, and differential geometry - might not sound like much to you now, but you'll soon learn that they're really just describing the shapes of things in our Universe, and the way those shapes change in time and space are explained by things like calculus and chaos theory.
  3. Jan 2021
    1. Because .subtitle has a width of 100%, the min-width: auto calculation that flexbox makes says that its container should be larger than we want.
    1. When you give an element a width of 100% in CSS, you’re basically saying “Make this element’s content area exactly equal to the explicit width of its parent — but only if its parent has an explicit width.” So, if you have a parent container that’s 400px wide, a child element given a width of 100% will also be 400px wide, and will still be subject to margins, paddings, and borders — on top of the 100% width setting.
    1. The explanation here is that the minimum size of an fr unit is auto. Grid then looks at the min-content size of the item. If the item has a size (you’ve given it a width) or has something in it with a size such as an image, the min-content size might be much bigger than the share of available space you think 1fr will give you. It’s easy to think of 1fr as being “one part of the space in the grid container” when it is really one part of the space left over. If there is space to grow then the tracks grow from that min-content size assigning space. Using minmax, as you have pointed out, is the best thing to do if you want to forcibly have equal width tracks, as that says “I want this track to have a min-content size of 0”, you could potentially in that situation end up with overflows as you lose the squishiness.
    1. Basically the typescript compiler emits no code for interfaces, so webpack can not find them in the compiled module; except when a module consists of only interfaces. In that case the module will end up completely empty and then webpack will not investigate the exports.
    1. I don't know what I'd expect this to do, if not create an infinite loop. You're asking Svelte to do something before every update, and one of the things you're asking it to do is to flush any pending changes and trigger an update.
    1. In other words, programs that send messages to other machines (or to other programs on the same machine) should conform completely to the specifications, but programs that receive messages should accept non-conformant input as long as the meaning is clear.
    1. For example, we might request some data from a stock exchange API, and along with our usual API parameters, we give it a callback, like ?callback=callThisWhenReady. The web service then wraps the data with our function and returns it like this: callThisWhenReady({...data...}). Now as soon as the script loads, your browser will try to execute it (as normal), which in turns calls our arbitrary function and feeds us the data we wanted.
    1. Explained: Reason for the “The following packages have been kept back” error and how it was fixed The above suggested fix should solve the problem for you. But are you curious what caused the error and how was it fixed? Let me explain that to you. Normally, when you run the sudo apt update and sudo apt upgrade commands, it updates all the installed packages to their available newer versions. However, if the dependencies of an installed package have been changed such that it requires installation of new packages, the installed package won’t be upgraded with the system update and you’ll see package kept back error.
    1. Dialogs use text buttons because the absence of a container helps unify the action with the dialog text. Align text buttons to the right edge for left-to-right scripts.
    2. Text buttons are often embedded in contained components like cards and dialogs, in order to relate themselves to the component in which they appear. Because text buttons don’t have a container, they don’t distract from nearby content.
  4. Dec 2020
    1. A listener watches for an event to be fired. For example, a KeyListener waits for KeyEvents, a MessageListener waits for messages to arrive on a queue and so on. The handler is responsible for dealing with the event. Normally, listeners and handlers go hand-in-hand. For example, the KeyListener tells the ExitHandler that "the letter Q was pressed" and the handler performs logic such as cleaning up resources and exiting the application gracefully. Similary a ButtonClickListener would tell the same ExitHandler that the "Exit button was clicked". So, in this case you have two different events, two different listeners but a single handler.

      You can use the same handler for multiple events/listeners.

    2. The most basic difference is the association Listener is associated with Event Source (Ex: key board) Handler is associated with an Event (Ex: keydown)
    1. For safety reasons, certain pumps and sprayers cannot be returned to the store if opened.

      More likely: they don't want to deal with these returns because of risk to store and because they want to keep the money they made from the sale.

  5. Nov 2020
    1. The notion that the state of our gut governs our state of mind dates back more than 100 years. Many 19th- and early 20th-century scientists believed that accumulating wastes in the colon triggered a state of “auto-intoxication,” whereby poisons emanating from the gut produced infections that were in turn linked with depression, anxiety and psychosis. Patients were treated with colonic purges and even bowel surgeries until these practices were dismissed as quackery.

      腸の状態が心の状態と関係しているという概念は100年以上も昔から存在しているが、その治療法事態は正しいものではなかった。この部分を要約に入れる必要は全くないが、導入としてはいい働きをしており、以降腸と心の関連性について正しいデータや知識をもとに述べられていくことを示唆している。

    1. passive: true instructs chrome that no body will call e.preventDefault() so chrome can optimized scrolling just because no body will call e.preventDefault and so there is no need to wait listeners...
    1. As mentioned in #2937, this is the sort of thing that happens when you have two copies of Svelte's internal scheduler running. If you're importing the compiled version of an external Svelte component into another Svelte component, this is what you end up with. There's a svelte field in package.json that's respected by rollup-plugin-svelte and which is intended to point at the uncompiled Svelte source, so that the external component can be bundled together with the main app, without any duplicated internals.
    1. positive feedback loops, in which a change in a given direction causes additional change in the same direction.For example, an increase in the concentration of a substance causes feedback that produces continued increases in concentration. negative feedback loops, in which a change in a given direction causes change in the opposite direction.For example, an increase in the concentration of a substance causes feedback that ultimately causes the concentration of the substance to decrease.
    1. Gas engines are so complicated/intricate/messy. I wish we could just use electric motors for everything. Clean, simple, and maintenance-free.

    1. Linear mixed models are an extension of simple linear models to allow both fixed and random effects, and are particularly used when there is non independence in the data, such as arises from a hierarchical structure
    1. So let's say we pull down evil/foo which is FROM ubuntu followed by RUN apt-get update except with a small surprise included in the image. Subsequent builds using those same commands will be compromised.
    1. With the advent of JavaScript modules (import and export), it's possible to build libraries that are tree-shakeable. This means that a user of your library can import just the bits they need, without burdening their users with all the code you're not using.
    1. From the viewpoint of the formal theory of sto- chastic processes, what we are looking at now is equivalent to a generalized "Polya urn scheme.

      random processes theory explains: a Pólya urn model, named after George Pólya, is a type of statistical model used as an idealized mental exercise framework, unifying many treatments. In an urn model, objects of real interest are represented as colored balls in an urn or other container - wikipedia ---- the proverbial plucking a ball from a jar to explain randomness.

    2. The advent of "touch" typing, a distinct advance over the four-finger hunt-and-peck method, came late in the 1880's and was critical, because this innovation was from its inception adapted to the Remington's QWERTY keyboard. Touch typing gave rise to three features of the evolving production system which were crucially important in causing QWERTY to become "locked in" as the dominant keyboard arrangement. These features were technical interrelatedness, econ- omies of scale, and quasi-irreversibility of investment. They constitute the basic in- gredients of what might be called QWERTY- nomics.

      Explanatory variables as to why qwerty became a thing.

    3. an effort to reduce the frequency of typebar clashes, there emerged a four-row, upper case keyboard approaching the mod- ern QWERTY standard

      qwerty emerged as a way of avoiding jamming keyboards.

    Tags

    Annotators

    1. they have higher IQs and score better on other aptitude tests.

      Intervening variables.

    2. preferences of would-be criminals but also by the economic and social environment created by public policies, including expenditures on police, punishments for different crimes, and opportunities for em- ployment, schooling, and training program

      the variables that may correlate to criminality.

    3. actual discrimination in earnings and employment is deter- mined by tastes for discrimination, along with the degree of competi- tion in labor and product markets, the distribution of discrimination coefficients among members of the majority group, the access of mi- norities to education and training, the outcome of median voter and other voting mechanisms that determine whether legislation favors or is hostile to minorities, and other considerations

      Variables that influence discrimination

    4. Actual discrimination in the marketplace against a minority group depends on the combined discrimination of employers, workers, con- sumers, schools, and governmen

      actors in discrimination are institutions.

    1. Historical Institutionalists are first interested in explaining an outcome (say, for example, why France and Britain have pursued such different styles of industrial Policy (Hall 1986) or why some welfare states generate more popular support than others (Rothstein 1998) ) they THEN proceed to explore alternative explanations for the outcomes they observe.

      Historical institutionalist – approach is explaining outcomes based on theories. They take inductive approaches – observe the outcomes and then attempt to create alternative explanations for the outcomes (Steimo p 2)

    Tags

    Annotators

  6. Oct 2020
    1. e vision. All Western cultural narratives about objectivity are allegories of the ideologies governing the relations of what we call mind and body, distance and responsibility. Feminist objectivity is about limited location and situated knowledge, not about trans- cendence and splitting of subject and object. It allows us to become answerable for what we learn how to see.
    1. Look at their Readme:

      Well we have had a great time adding field validations, but there are validations that are tied up to the whole record we are editing than to a given field, for instance let's face this scenario:
      
      - You are not allowed to transfer more than 1000 € to Switzerland using this form (for instance: you have to go through another form where some additional documentation is required).
      
      - The best place to fire this validation is at record level.
      
      - Record validation functions accept as input parameter that whole form record info, and return the result of the validation (it accepts both flavours sync and promise based), let's check the code for this validator:
      
      ...
      
    1. One of the significant differences between the two is that a call to a partially applied function returns the result right away, not another function down the currying chain; this distinction can be illustrated clearly for functions whose arity is greater than two.
    2. As such, curry is more suitably defined as an operation which, in many theoretical cases, is often applied recursively, but which is theoretically indistinguishable (when considered as an operation) from a partial application.
    1. Not all application state belongs inside your application's component hierarchy. Sometimes, you'll have values that need to be accessed by multiple unrelated components, or by a regular JavaScript module.
    2. A store is simply an object with a subscribe method that allows interested parties to be notified whenever the store value changes. In App.svelte, count is a store, and we're setting count_value in the count.subscribe callback.
    1. Just like elements can have children... <div> <p>I'm a child of the div</p> </div>...so can components. Before a component can accept children, though, it needs to know where to put them. We do this with the <slot> element.
    1. virtual-dom is a collection of modules designed to provide a declarative way of representing the DOM for your app. So instead of updating the DOM when your application state changes, you simply create a virtual tree or VTree, which looks like the DOM state that you want. virtual-dom will then figure out how to make the DOM look like this efficiently without recreating all of the DOM nodes.
    1. Escaping is a subset of encoding: You only encode certain characters by prefixing a special character instead of transferring (typically all or many) characters to another representation.
    1. To practice alternative media as critical media allows to question rulingideas and to contribute to the realization of suppressed societal alternatives. Such alternatives are based on the vision of atruly democratic society without oppression, in which grassroots participation is not restricted to interaction, but shapes allrealms of society.

      Why is this critique important. Positions itself into an ideology of radical humanism.

    2. The minimum requirement for speaking of an alternative medium is critical content and/orcomplex form.

      SETS A NEW CRITERIA FOR DEFINING ALTERNATIVE MEDIUM -

      IT'S TIED TO CONTENT THAT CRITICIZE SOCIETAL CONSTRUCTS AND IS MORE EXTENSIVE IN ITS FORMAT THAN THE MAINSTREAM.

    3. Critical media are negative in so far as they relate phenomena to societal problems, to what societyhas failed to become and to tendencies that question and contradict the dominant and dominative mode of societal opera-tion and have the potential to become positive forces of change towards a better society. Critical media in one or the otherrespect take the standpoint of oppressed groups or exploited classes and make the judgement that structures of oppressionand exploitation benefit certain classes at the expense of others and hence should be radically transformed by social strug-gles. They aim at advancing social struggles that transform society towards the realization of co-operative and participatorypotentials.

      Explains why it's important to produce media that is critical of societal problems and the effects of being critical. .

    4. alternative media at some levels can also employ capitalist tech-niques of media production in order to advance their political aims.

      Alt media bust break from the ideal-type to use "capitalist structures" to its benefit.

    5. Realizing an ideal model of alternative media presupposes different societal conditions. This means that itrequires that people have enough time and skills for not only consuming, but also producing media content and that thenecessary technologies for media production are freely available.

      Authors discuss the societal, economic constraints around an ideal model of alternative media.

      They cannot reach a broad audience So they cannot effect much transformation politically

    6. ‘Alternative med-ia” should be discussed in relation to the role they play in capitalism and therefore in the context of capitalism.

      Supports the author's thesis.

    7. Giving ordinary peoplea voice by opening up access to media production is not enough for a truly democratic media system to emerge. Participationremains very limited if people can only talk but are not heard. Thus, the discussion on emancipatory media potentials alsohas to consider structural inequalities as a central feature of capitalism.

      The authors summarize the idea that access to production isn't enough to democratize the media. (again, this appears to be just wrong based on today's evidence)

    8. Public visibility is still stratified through powerrelations.

      False, doesn't include observations about influencers and their role in increasing visibility of alternative points of view.

    9. alternative media are not located outside the capitalist system and therefore are dependent on financial resources for theproduction and distribution of their products, which can hardly be obtained without making use of commercial mechanismsof financing.

      To be alternative doesn't signify separateness.

    10. reporting about topics, which capitalist mass media tend to neglect and by criticizing structures ofdomination and oppression. Such alternative media need to gain public attentio

      The author advocates for a media the covers alternative topics and that evaluates existing societal constructs and presents different points of view than what's in the mainstream.

    11. lack of re-sources

      Can't compete financially

    12. remain margina

      Here the authors begin to support the criticism that alternative media is niche and won't have much effect on broader society.

    Tags

    Annotators

    1. Any variable referenced on the lines marked with $: is marked as a dependency of the derived variable.
    2. It's possible to run a function whenever some reactive state changes using the useEffect hook. In the example we log the length of the todoList whenever it changes. The first argument to useEffect is the function we want to run, and the second is a list of reactive values to track - whenever one of these values changes the effect will run again.
  7. Sep 2020
    1. using modulesOnly behaves exactly as expected when it warns you that the listed npm libraries do not use the ES6 format and are in fact ignored. This option is meant as a way to determine if you still have commonjs libraries in your dependencies that require special treatment via rollup-plugin-commonjs. Your code will probably not work since the listed dependencies will be missing. You should remove modulesOnly and instead add rollup-plugin-commonjs.
    1. The difference between default and named affects how other people can consume your bundle. If you use default, a CommonJS user could do this, for example:

      include the following content

    2. In other words for those tools, you cannot create a package interface where const lib = require("your-lib") yields the same as import lib from "your-lib". With named export mode however, const {lib} = require("your-lib") will be equivalent to import {lib} from "your-lib".
    1. globals are assumed to have their field value on the window object and can be referenced inside the bundle by their field name globals: { name: 'Value', }, assumes that some other script tag or whatever establishes window.Value and the emitted umd bundle for example, calls the factory like factory(global.Value). So globals is just stuff to bring into the factory on the globals object. It doesn't even make it "global" inside the bundle. Basically, the resolver does not check the globals object during the loading process. The resolver needs to be told how to link these globals and that's what the external option is for. external: ['name'], Then you can reference it like import myName from 'name'; myName();
    2. we've learned why you might want to use external but not globals: libraries. We've started to factor some of our client-side JS as libraries to share between projects. These libraries import $ from 'jquery'. However they don't want to presume how that import might be "fulfilled". In most projects it's fulfilled from a global i.e. a script loaded from a CDN. However in one project it's fulfilled from a local copy of jQuery for reasons I won't get into. So when these libraries bundle themselves for distribution, as ES6 modules, they mark 'jquery' as an external and not as a global. This leaves the import statements in the bundle. (Warning: Don't bundle as an IIFE or UMD, or Rollup will guess at fulfilling the import from a global, as @Rich-Harris mentions above.)
  8. Aug 2020
  9. Jul 2020
  10. Jun 2020
  11. May 2020
    1. In depth
    2. The Analytics JavaScript Tag When a JavaScript-enabled web browser loads a page with the Analytics tag (ga.js or analytics.js), it does two things asynchronously: load and process the Analytics function queue and request the Analytics JavaScript. The function queue is a JavaScript array where the different Analytics configuration and collection functions are pushed. These functions, which are set by the site owner when implementing Analytics can include functions like specifying the Analytics account number and actually sending page view data to the Analytics Collection Network for processing. When the Analytics JavaScript runs a function from the function queue that triggers data to be sent to the Analytics Collection Network (this function is typically ga('send', 'pageview') in the analytics.js JavaScript library and _trackPageview in the ga.js library), it sends the data as URL parameters attached to an HTTP request for http://www.google-analytics.com/_utm.gif (for ga.js) and http://www.google-analytics.com/collect (for analytics.js). If the anonymization function has been called prior to the page tracking function, an additional parameter is added to the pixel request. The IP anonymization parameter looks like this: &aip=1 The Analytics Collection Network The Analytics Collection Network is the set of servers that provide two main services: the serving of ga.js and analytics.js (the Analytics JavaScript) and the collection of data sent via requests for _utm.gif and /collect. When a request for ga.js, analytics.js, _utm.gif, or /collect arrives, it includes additional information in the HTTP request header (i.e. the type of browser being used) and the TCP/IP header (i.e. the IP address of the requester). As soon as a request for _utm.gif arrives, it is held in memory for anonymization. If the &aip=1 parameter is found in the request URL (as it would have been placed by the Analytics JavaScript after processing the anonymization function in ga.js or analytics.js ), then the last octet of the user IP address is set to zero while still in memory. For example, an IP address of 12.214.31.144 would be changed to 12.214.31.0. (If the IP address is an IPv6 address, the last 80 of the 128 bits are set to zero.) Only after this anonymization process is the request written to disk for processing. If the IP anonymization method is used, then at no time is the full IP address written to disk as all anonymization happens in memory nearly instantaneously after the request has been received.
  12. developer.chrome.com developer.chrome.com
    1. If a user clicks on that button, the onclick script will not execute. This is because the script did not immediately execute and code not interpreted until the click event occurs is not considered part of the content script, so the CSP of the page (not of the extension) restricts its behavior. And since that CSP does not specify unsafe-inline, the inline event handler is blocked.
    1. This topic is not a support question

      This is hard to answer because I don't know what they classify as a "support question". For example, are bugs classified as a support question? So if it's a bug, should I check this or no?

      What is the purpose of this checkbox? If you could describe that, it would make it much easier to answer the question.

    1. whose personal data you collect and process as “controller” (that is the word that GDPR uses for whoever determines the purposes and means of the processing of personal data).
    2. If you’re selling products and keep record of users’ choices for marketing purposes, dividing them into meaningful categories, such as by age, gender, geographical origin etc., you’re profiling them.
  13. Apr 2020
    1. English tends to build new compound nouns by simply writing them as separate words with a blank. Once the compound is established (and the original parts somewhat "forgotten"), it's often written as one word or hyphenated. (Examples: shoelaces, aircraft...)
    1. A website (also written as web site) is a collection of web pages and related content that is identified by a common domain name and published on at least one web server
    1. In math, idempotence describes only unary functions that you can call on their own output. Math-idempotence is, “If you take the absolute value of a number, and then you take the absolute value of that, the result doesn’t change on the second (or subsequent) operations.” Math.abs is math-idempotent. Math-idempotence only applies to functions of one parameter where the parameter type and return type are the same. Not so useful in programming.
    1. Since the authenticity token is stored in the session, the client cannot know its value. This prevents people from submitting forms to a Rails app without viewing the form within that app itself. Imagine that you are using service A, you logged into the service and everything is ok. Now imagine that you went to use service B, and you saw a picture you like, and pressed on the picture to view a larger size of it. Now, if some evil code was there at service B, it might send a request to service A (which you are logged into), and ask to delete your account, by sending a request to http://serviceA.com/close_account. This is what is known as CSRF (Cross Site Request Forgery). If service A is using authenticity tokens, this attack vector is no longer applicable, since the request from service B would not contain the correct authenticity token, and will not be allowed to continue.
    1. Watts, D. J., Beck, E. D., Bienenstock, E. J., Bowers, J., Frank, A., Grubesic, A., Hofman, J., Rohrer, J. M., & Salganik, M. (2018). Explanation, prediction, and causality: Three sides of the same coin? [Preprint]. Open Science Framework. https://doi.org/10.31219/osf.io/u6vz5

  14. Mar 2020
    1. The process of collecting and storing user consent from a technical perspective
    2. First-party cookies are the lifeblood of every website, enabling businesses to remember key pieces of information about users and to collect analytics data. Third-party cookies are the bread and butter of AdTech, allowing publishers to monetize their websites, and brands to run advertising and marketing campaigns.
    1. They are in place to prevent brute forcing a password. If you had to complete these every time you login, a person has to be there to answer it. This makes it so you can’t leave a guessing software to break your password. So, in short, it's for your account’s safety.
    1. The visitors of that blog post will get third-party non-essential cookies unless they previously set their browser to block cookies.
    1. the feature was dropped to “lack of use.”

      I don't find the reason "lack of use" sufficient in its own right. (I personally didn't use this feature.) People might not use it because they don't know about. And those that do use may find it extremely useful; it's not their fault if others don't know about it or use. It seems to discriminate a bit against the minority who may use a useful feature. They would rather be in the majority, safe from having one of their favorite features removed.

      But I do understand and appreciate the good explanation given below.

  15. Feb 2020
  16. Jan 2020
    1. Europium is used in the printing of euro banknotes. It glows red under UV light, and forgeries can be detected by the lack of this red glow.

      When they scan a bill they are looking for the europium flash.

    2. Low-energy light bulbs contain a little europium to give a more natural light, by balancing the blue (cold) light with a little red (warm) light.