1,258 Matching Annotations
  1. Oct 2021
    1. Desktop files are NOT executed. The line inside them that has an executable command line is the one that gets executed. The rest of the file is parsed by the Desktop Environment.
    1. const fetchWithJSONHeaders = applyDefaults(fetch, { headers: { "Content-Type": "application/json" } }); const fetchWithTextHeaders = applyDefaults(fetch, { headers: { "Content-Type": "application/text" } }); // Fetch JSON content const response = await fetchWithJSONHeaders("/users", { method: "GET" });
    1. This function allows you to modify (or replace) a fetch request for an external resource that happens inside a load function that runs on the server (or during pre-rendering). For example, your load function might make a request to a public URL like https://api.yourapp.com when the user performs a client-side navigation to the respective page, but during SSR it might make sense to hit the API directly (bypassing whatever proxies and load balancers sit between it and the public internet).
    1. Today, countries, municipalities and NGOs are the entities that supposedly take care of common goods, but their capacity to do so is very limited due to their centralized structure. They are limited by the relative ineffectiveness of centralized constructs — in sense-making, scalable action, engagement and alignment of interests, and more severely, by the personal interests of the people steering them, which often override their interest to take care for the benefit of the community they are in charge of steering. Indeed, neglecting such common goods is one of the biggest problems of humanity in almost every possible domain and circle we can think of.

      Pith articulation of the central problem of central, hierarchical human governance systems.

    1. For example, there is no point in defining reloadable Rack middleware, because changes would not be reflected in the instance stored in the middleware stack anyway
  2. Sep 2021
    1. My question is, wye is a sanitary tee directional? I maintain that a two way sweep would be a more efficient vent.
    1. Does this daemon benefit me in anyway or is it only used for mismatched resolutions like 1440p with a 1080p display?
    1. If your configuration is not provided by a name server (like the information given in /etc/hosts) those tools will not show them, because they directly ask the name server.
    1. Question: Why a cable for a wireless keyboard? Answer: .noScriptDisplayLongText { display : none; } <style> .noScriptNotDisplayExpander { display : none; } .noScriptDisplayLongText { display : block; } </style> because it is not a wireless keyboard...
    1. These thing can save you literally thousands of dollars associated with repair of water damage. I have installed one under every sink, dishwasher, behind every toilet, washing machine and refrigerator (ice maker water supply). Essentially, any place where there is a water supply to a faucet or appliance.
    1. When we describe a language as type-checked, we mean that the language won't let you perform operations invalid for the type. Neither statically nor dynamically typed languages will let you multiply strings together, call a number in the place of a function, etc. A language without type checking would let you do all of those things without complaint.
    1. Conversely, the more dynamically typed the language is, the less I am using an IDE and the more I am using a text editor. Of course, my productivity plummets at that point. Refactoring becomes more difficult and more (completely) reliant on unit tests to ensure they are done properly.
    1. TypeScript is an extension of JavaScript. You can think of it as JavaScript with a few extra features. These features are largely focused on defining the type and shape of JavaScript objects. It requires that you be declarative about the code you're writing and have an understanding of the values your functions, variables, and objects are expecting.While it requires more code, TypeScript is a fantastic means of catching common JavaScript bugs while in development. And for just that reason, it's worth the extra characters.
    1. It is advised to inline any css @import in component's style tag before it hits css-loader. This ensures equal css behavior when using HMR with emitCss: false and production.
    2. Webpack's resolve.mainFields option determines which fields in package.json are used to resolve identifiers. If you're using Svelte components installed from npm, you should specify this option so that your app can use the original component source code, rather than consuming the already-compiled version (which is less efficient).
    1. I feel like app/packs (or something like it) is a good name because it communicates to developers that it's not just JavaScript that can be bundled, it's also CSS, images, SVGs — you name it. I realize what can be bundled is wholly dependent on the bundler you use, but even esbuild supports bundling CSS. So couldn't this possibly be confusing?
    1. Some would argue that the phrase ''survival of the fittest'' is tautological, in that the fittest are defined as those that survive to reproduce.
    1. have a philosophy that if someone can provide any more meaningful information to a problem even if it indirectly solves the problem, I think that should also be rewarded.
    2. The important thing to understand is that there is no such thing as a class method in Ruby. A class method is really just a singleton method. There is nothing special about class methods. Every object can have singleton methods. We just call them "class methods" when the object is a Class because "singleton method of an instance of Class" is too long and unwieldy.
  3. Aug 2021
    1. So for each word, we create a Query vector, a Key vector, and a Value vector. These vectors are created by multiplying the embedding by three matrices that we trained during the training process.
    1. I always had to set the height of them literally almost 50% taller than the content itself to accommodate for the innards growing when the form was submitted with errors (the error messaging expanded the height). If I didn’t, the submit button would get cut off making the form un-submittable.
    1. An essay is good if it has sprung from necessity

      If someone has a personal need to write about something then their passion for the topic will hopefully shine through and make it a great essay. Saying "an essay is good if it has sprung from necessity".. is just not true in my opinion. I might need to write about pollen in Australia for a class. If i am not passionate about pollen my essay probably won't be that great.

    1. The TypeScript team has made it clear. They do not follow semver. "minor" (X.X) releases can contain breaking changes. . The fact that someone has made a bad policy clear, does not mean that the policy is therefore good. Major releases (X) have very little meaning. This negates the usefulness of using such versioning in the first place.
    2. If you dig into the details, you will see that the TypeScript team take breaking changes very seriously and with consideration.
    3. I think the TS team generally tries to minimize breaking changes from version to version and don't do so unless there is a good reason.
    1. which seems to resolve the issue for me and makes no casts, ensuring that Typescript can keep doing its good job of widening as much as necessary and narrowing as much as possible without me having to claim I know better than the compiler. I'm posting it here since it doesn't seem to have been mentioned anywhere.

      makes no casts, ensuring that Typescript can keep doing its good job of widening as much as necessary and narrowing as much as possible without me having to claim I know better than the compiler.

    1. * 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

    2. What I don't understand is why you need to make it explicit? Given: function isBarAlsoFoo(obj: Bar): obj is Foo; Without resorting to any, how can we get any code to typecheck in which you pass an object that's not a Bar to isBarAlsoFoo()?
    1. In the vast majority of cases when I'm using prettier-ignore I'm only really looking to prevent it from breaking my code into new lines, whilst keeping its other transformations such as switching quotes and adding space between brackets. When ignoring single lines, fixing these formatting problems by hand is very manageable. With the ability to have Prettier ignore entire blocks of code I think the ability to specify what you want it to ignore is essential.
    1. Using a flag to disable prettier for a line, the next line or until I activate it again (ESLint like syntax). // prettier-disable border: { sep: "║", topLeft: "╔", topMid: "╦", top: "═", topRight: "╗", midLeft: "╠", midMid: "╬", mid: "═", midRight: "╣", botLeft: "╚", botMid: "╩", bot: "═", botRight: "╝" }, // prettier-enable
    1. We focus so much on black magic and avoiding it that we rarely have a chance to enjoy any of the benefits. When used responsibly and when necessary, it gives a lot of power and expressiveness.
    1. Isolation ensures that concurrent execution of transactions leaves the database in the same state that would have been obtained if the transactions were executed sequentially
    1. Here is one of the most confusing cases: def foo(x, **kwargs) p [x, kwargs] end def bar(x=1, **kwargs) p [x, kwargs] end foo({}) #=> [{}, {}] bar({}) #=> [1, {}] bar({}, **{}) #=> expected: [{}, {}], actual: [1, {}]
    2. If you extend a method to accept keyword arguments, the method may have incompatibility as follows: # If a method accepts rest argument and no `**nil` def foo(*args) p args end # Passing keywords are converted to a Hash object (even in Ruby 3.0) foo(k: 1) #=> [{:k=>1}] # If the method is extended to accept a keyword def foo(*args, mode: false) p args end # The existing call may break foo(k: 1) #=> ArgumentError: unknown keyword k
    3. However, this style is not recommended in new code, unless you are often passing a Hash as a positional argument, and are also using keyword arguments
  4. Jul 2021
    1. For user-contributed data that's freeform and unstructured, use jsonb. It should perform as well as hstore, but it's more flexible and easier to work with.
    1. The difference between PUT and POST is that PUT is idempotent: calling it once or several times successively has the same effect (that is no side effect), whereas successive identical POST requests may have additional effects, akin to placing an order several times.
  5. Jun 2021
    1. I wouldn't consider it switching behavior. Ultimately it's including a module -- either a manually defined and referenced one from the user, or a RSpec::Core::SharedExampleGroupModule created for the user when they defined the shared example group and referenced via the group name.
    1. When we use a GraphQL API there are two kinds of errors we may encounter: Network Errors and GraphQL Errors from the API. Since it's common to encounter either of them, there's a CombinedError class that can hold and abstract either.
    1. Whether you agree or not, to me there's nothing in this world that is entirely apolitical - when there are people there is politics. You don't have to agree with my views, nor do I expect you to. Diversity and disagreement is what drives mankind forward.
    2. I'm not sure if there's any cost in terms of contributing either, especially when by design git can have any branch as default, and will not hinder your experience when you use something other than master.

      git is neutral/unbiased/agnostic about default branch name by design

      And that is a good thing

    3. to be honest I think it is more about sentiment than actual engineering practices now.
    4. The primary branch in git can have any name by design.
    5. Personally I think it is a very bad idea to leverage political views, even if I may share them, through software.
    1. There's no official Chrome or Chromium package for Linux don't install it this way because it's either outdated or unofficial, both are bad. Download it from official source.
    1. The problem domain and the data involved in this project was complicated enough. We decided that not having to worry about unknowns with the frontend end-to-end testing stack helped mitigate risk. This isn’t to say you should always going with the tool you know, but in this instance we felt it was the right choice.
    2. There are times to stretch individually and as a team, but there are also times to take advantage of what you already know.
    1. “The data does not exist independently in the world, nor is it generated spontaneously. Data is constructed by people, from people,” (source 1).
    1. TensorFlow.js provides theLayers API,which mirrors the Keras API as closely as possible, in-cluding the serialization format.

      Surfing TensorFlow I was orbiting this conclusion. It's good to see it it stated clearly.

    1. I've seen (and fixed) Ruby code that needed to be refactored for the client objects to use the accessor rather than the underlying mechanism, even though instance variables aren't directly visible. The underlying mechanism isn't always an instance variable - it can be delegations to or manipulations of a class you're hiding behind a facade, or a session store with a particular format, or all kinds. And it can change. 'Self-encapsulation' can help if you need to swap a technology, a library, an object specification, etc.
    2. a principle I use is: If you have an accessor, use the accessor rather than the raw variable or mechanism it's hiding. The raw variable is the implementation, the accessor is the interface. Should I ignore the interface because I'm internal to the instance? I wouldn't if it was an attr_accessor.
    1. SELECT base.nr, multiples.multiple FROM (SELECT generate_series(1,10) AS nr) base, LATERAL ( SELECT multiples.multiple FROM ( SELECT generate_series(1,10) AS b_nr, base.nr * 2 AS multiple ) multiples WHERE multiples.b_nr = base.nr ) multiples;
    1. Critical to the acceptance of the position of the script subtag was the inclusion of information in the registry to make clear the need to avoid script subtags except where they add useful distinguishing information. Thus, the registry entry for the language subtag "en" (English) has a field called "Suppress-Script" indicating that the script subtag "Latn" should be avoided with that language, since virtually all English documents use the Latin script.
      • not worth saying
      • not necessary to say/write
      • useless information

      Suppress-Script

    2. Language Range ... matches ... does not match de de, de-CH, de-AT, de-DE, de-1901, de-AT-1901 en, fr-CH
    1. Mitch Hedberg - "I play the guitar. I taught myself how to play the guitar, which was a bad decision... because I didn't know how to play it, so I was a shitty teacher. I would never have went to me."
    1. SELECT * FROM ( -- build virtual table of all hours between -- a date range SELECT start_ts, start_ts + interval '1 hour' AS end_ts FROM generate_series( '2017-03-01'::date, '2017-03-03'::timestamp - interval '1 hour', interval '1 hour' ) AS t(start_ts) ) AS cal LEFT JOIN ( -- build virtual table of uptimes SELECT * FROM ( VALUES ('2017-03-01 01:15:00-06'::timestamp, '2017-03-01 02:15:00-06'::timestamp), ('2017-03-01 08:00:00-06', '2017-03-01 20:00:00-06'), ('2017-03-02 19:00:00-06', null) ) AS t(start_ts, end_ts) ) AS uptime ON cal.end_ts > uptime.start_ts AND cal.start_ts <= coalesce(uptime.end_ts, current_timestamp)
    1. We need to be really careful about what's 'same origin' because the server has no idea what host/path the various cookies are associated with. It just has a list of cookies that the browser had determined to be relevant for this SSR'd page, and not for any other subrequests.
    1. I've been thinking more about how to best do this. The preferred way might be to use the same domain and have an application load balancer like nginx split traffic on the URL path (e.g. /api). This is for two reasons. Firstly, you might not necessarily want to cookie the primary/apex domain and have the cookie shared across all subdomains. You also might not want to do CORS because preflight requests add latency and CORS adds complication.
  6. May 2021
    1. Budget your time. MTH 124 is a 5-credit course with no meetings, so you will need to plan on spending about 15-20 hours per week doing mindful work. That’s 3-4 hours per weekday if you choose not to work on weekends. If you are taking other courses or have job of family responsibilities, you’ll need to think about where to put these hours in your daily and weekly schedules. In my experience, the #1 reason students don’t succeed in online courses is overcommitment and not managing time well.
    1. Feel free to hint, brag, or both! The best CS reps should easily take a hint from clear language and a signature like John Appleseed, JavaScript/Ruby Developer, but any will catch on with a simple line like "I know what I'm doing, so I'd appreciate an extra-technical explanation!"
    2. One solution that fixed this issue with my ISP was that when I went through the first and second line and got in touch with the people that fixed my problem, I asked them if they could give me one of their personal numbers in case the same problem happened again. The problem did occur a couple more times, and I just directly called the same guy.
    3. Some people, regardless of their experience level are horrible as teachers. A school teacher gets asked the same question every year. Every year they answer them, even if it seems redundant, and the answers are simple to THEM. Teaching requires patience and the acceptance of being asked "dumb questions" repeatedly. If they cannot handle that, then they should simply not teach or pretend to be a teacher.
    4. If the person answering the call misses something, nothing prevents them from asking you to repeat something. I think the key point that should be added to this answer is to not sound or act annoyed if the support tech asks for something you've already rattled off. To accept that you gave them a whole bunch of information at once, and that they might legitimately have missed or forgot one bit of it. Or, especially if you know the order in which they ask these questions, to take it slower; don't say it all in five seconds, take half a minute. Give them time to click!
    5. So, +1 for play ball. Level 1 is supposed to filter out all simple issues (and once upon a time, you'll have forgotten something, happens to all of us), and they are not supposed to be creative. They get a script that has been refined over and over. Learn the scripts, prepare the answers, and you'll get to Level 2 more quickly than with any other method.
    6. Please don't write answers in comments; we have a policy against this. If you have an answer to the question, write it up as an answer. Thanks.
    7. So my best advice if you need to stick with them is just to expect the treatment you have become used to and 'play along'. Actually, I find some things often run smoother when you act dumber than you are.
    1. Also, it is definitely NOT okay to recommend --force on forums, Q&A sites, or in emails to other users without first carefully explaining that --force means putting your repositories’ data at risk. I am especially bothered by people who suggest the flag when it clearly is NOT needed; they are needlessly putting other peoples' data at risk.
    1. Use cases: Volumes are most useful when you need more storage space but don’t need the additional processing power or memory that a larger Droplet would provide, like: As the document root or media upload directory for a web server To house database files for a database server As a target location for backups As expanded storage for personal file hosting platforms like ownCloud As components for building more advanced storage solutions, like RAID arrays
    1. For this very reason, we have the hx’s on our site dynamically create id’s. I love being able to direct people directly to a particular part of a page when I find something interesting, but the problem is that only we, as developers, know how to do this.
    2. I like the idea in theory, however it doesn’t feel very robust – you are relying on the layout of the page in question. Many authors regularly revisit articles and add new sections and paragraphs. Now your #h2:3 link points to a previous section. (This is far less likely to happen with IDs.)
    3. Linking directly to someone’s blog comment is very useful. Even if a blog doesn’t have an active link for each comment, it’s pretty easy to use developer tools to find the comment’s id and link to it. I’ve done this many times on Smashing Magazine (they don’t have live links on each comment). If there was no way to link to an individual blog comment, this would be a great hindrance to linking on the web. It would not be enough to link to the “#comments” section and then hope for the best. So CMSs like WordPress do the right thing by dynamically adding a unique identifier to each comment.
    4. The reason fragments should be identifiable by users is because a user, not the content creator or the developer, will ultimately decide whether or not a portion of content is valuable or notable in some way.
    5. Yes, the content creator should have the ability to decide how a page is generally divided, if they choose to do so. But the end user should not be restricted from linking to content fragments just because a developer couldn’t be bothered to add id attributes to every element on the page. And that’s besides the fact that it would be a waste of time for a developer to do that or to have to build a CMS that does it automatically.
    6. The simple problem that I see with fragment identifiers is that their existence and functionality relies completely on the developer rather than the browser. Yes, the browser needs to read and interpret the identifier and identify the matching fragment. But if the developer doesn’t include any id attributes in the HTML of the page, then there will be no identifiable fragments. Do you see why this is a problem? Whether the developer has coded identifiers into the HTML has nothing to do with whether or not the page actually has fragments. Virtually every web page has fragments. In fact, sectioning content as defined in the HTML5 spec implies as much. Every element on the page that can contain content can theoretically be categorized as a “fragment”.

      at the mercy of author

    7. So why is it up to the developer (or content creator) to define whether or not a specific portion of the content can be linked to? When any page of content is created, there is no way of knowing which sections of the page are worthy of being identified.
    1. Making effective use of this mechanism requires either control of the targeted document or generous creators of targeted documents who have liberally applied id attributes throughout a document.

      unlikely for anyone/most people to actually do that

    1. Why are there so many programming languages and frameworks? Everyone has their own opinion on how something should be done. Some of these systems, like AOL, Yahoo, etc... have been around for a decade, and probably not updated much.
    2. Simple fact is that HTML support is different in them because mail clients are so old, or others are allowed to operate in browsers where not all CSS or even HTML can be applied in a secure manner. Older clients have outdated browsers that you'll likely NEVER see brought up to standards; what with Opera's standalone aging like milk, and thunderbird lagging behind the firefox on which it's even built. Don't even get me STARTED on older clients like Eudora or Outlook.
    3. That's something that has been bugging me too. I mean, it's fine if not everything is supported, but if everyone could agree on what is or should be supported then that would make a huge difference. But until then, it's going to be a struggle.
    1. Components are the core of MJML. A component is an abstraction of a more complex email-responsive HTML layout. It exposes attributes, enabling you to interact with the final component visual aspect.
    2. MJML has been designed with responsiveness in mind. The abstraction it offers guarantee you to always be up-to-date with the industry practices and responsive. Email clients update their specs and requirements regularly, but we geek about that stuff - we’ll stay on top of it so you can spend less time reading up on latest email client updates and more time designing beautiful email.
    1. They don't look like advertisements. The second the recipient interprets your email as an ad, promotion, or sales pitch—and it does take just a second—its chances of being read or acted upon plummet towards zero. A plain email leads people to start reading it before jumping to conclusions.

      forces you to read before deciding

    1. An escalator is a great example of progressive enhancement and graceful degradation in real life. The late comedian Mitch Hedberg joked, “An escalator can never break: it can only become stairs. You should never see an Escalator Temporarily Out Of Order sign, just Escalator Temporarily Stairs. Sorry for the convenience.” Regardless of its environment, an escalator maintains its functionality.
  7. Apr 2021
    1. That should make for interesting puzzles, except they're timed, your guys never stop moving (why not?), and the camera and controls mean it's very hard to translate intent into the game world.
    1. You don’t see a lot of them, but there are a number of “super trucks,” that people build custom. They’re essentially RVs built onto a stretched truck and used like a truck. These trucks, depending on how built, often have the same facilities RVs have, including private showers, toilets, and other plumbing essentials. They dump and refill at rest areas and rv parks that have these facilities, and live the best of both worlds - trucking without the hassle.
    1. Actually a very interesting concept allthough not perfectly executed (even considering it's based on a board game)
    2. It's a nice idea but godawful implementation.
    3. Unfortunately, it’s in the execution where “US and THEM” starts to fall apart. The game’s major problems stem from the user interface and some design choices range from questionable to downright horrible. For starters, the world map that takes up more than half of the screen can be neither scrolled nor zoomed. In a game where your interaction heavily relies on clicking various nations, this becomes a problem. While larger countries like Canada, the US and Russia are easily accessible, smaller nations require pixel perfect accuracy to interact with. Try clicking on Cuba, Ireland or Hungary and you’ll find yourself maniacally clicking shades and outlines and a handful of visible pixels in the area of these countries in vain hope that the game will acknowledge your actions.
    1. >(...) starts the process ... and returns a file representing its standard input. exec &> ... redirects both standard output and standard error into ... for the remainder of the script (use just exec > ... for stdout only). tee -a appends its standard input to the file, and also prints it to the screen.
    1. Why your original solution does not work: exec 2>&1 will redirect the standard error output to the standard output of your shell, which, if you run your script from the console, will be your console. the pipe redirection on commands will only redirect the standart output of the command.
    1. This gem uses a Rack middleware to clear the store object after every request, but that doesn't translate well to background processing with Sidekiq. A companion library, request_store-sidekiq creates a Sidekiq middleware that will ensure the store is cleared after each job is processed, for security and consistency with how this is done in Rack.
    1. Don’t replace words with emojis One thing you definitely don’t want to do is have your emojis get in the way of people being able to comprehend your subject lines. Emojis should be a complement to the words in your subject lines – they should never replace words themselves. It’s when people leave out words, right?
    1. It should be defined inline. If you are using the img tag, that image should have semantic value to the content, which is why the alt attribute is required for validation. If the image is to be part of the layout or template, you should use a tag other than the img tag and assign the image as a CSS background to the element. In this case, the image has no semantic meaning and therefore doesn't require the alt attribute. I'm fairly certain that most screen readers would not even know that a CSS image exists.

      I believed this when I first read it, but changed my mind when I read this good rebuttal: https://hyp.is/f1ndKJ5eEeu_IBtubiLybA/stackoverflow.com/questions/640190/image-width-height-as-an-attribute-or-in-css

    2. From a practical point of view it's highly desirable to specify them to prevent page reflows as mentioned above. However those suggesting it should be in the html because of this are missing the fact browsers use css when building the page initially. If they didn't the page would have to be redrawn for floated elements, specified padding, margins etc.
    3. Ah yes, excactly the right answer. Img tags are for information, css backgrounds are for layout.
    4. CSS seems like the right place to put visual information. On the other hand, few would argue that image "src" should not be specified as an attribute and the height/width seem as tied to the binary image data as the "src" is.
    5. What's the "correct" semantic way to specify image height and width? In CSS... width:15px; or inline... <img width="15" ?
    1. the double bind faced by every politician: responding to scurrilous charges only gives them unwarranted publicity; not responding to such charges is often interpreted as an admission of guilt
    1. is a mechanism designed for creating an external host for character-mode subsystem activities that replace the user interactivity portion of the default console host window

      My paraphrase: A pseudoterminal replaces (fakes/pretends to be?) the user interactivity portion.

    1. "It ain't over 'til it's over,"
    2. "You can observe a lot by watching."
    3. Yet, in all these instances, life offers no crystal ball; there's no way of knowing what the future holds, or to be cognizant of something we are unaware of. This is the essence of "You don't know what you don't know," only it's being expressed in a comical way
    4. If I had known your plane was going to be two hours late, I wouldn't have rushed to the airport.
    1. I intend to live forever. So far, so good. Whenever I think of the past, it brings back so many memories. I think it's wrong that only one company makes the game Monopoly. If it's a penny for your thoughts and you put in your two cents worth, then someone, somewhere is making a penny. What's another word for Thesaurus? I used to work in a fire hydrant factory. You couldn't park anywhere near the place.
    2. Adding another Steven Wright gem: "24 hour banking? I don't have time for that."
    3. Comedian Henny Youngman was famous for one-liners delivered in a deadpan manner. Much of his humor was both wry and dry. For example, his most famous line: Take my wife ... please. If you never saw the delivery, "Take my wife" was said as if he was using his wife as an example to set up a situation, as in "Take my wife [for example]." After a brief pause, the "please" turned it into a request.
    4. I'm sorry I hurt your feelings when I called you stupid. I really thought you already knew.
    1. British HumorDry humor is particularly associated with British humor. Fawlty Towers, a British television comedy that aired from 1975 to 1979 is considered an unusually good example of dry humor. The series is set in a family run seaside hotel operated by a cynical and snobbish man, played by John Cleese, who finds himself in constant conflict with hotel guests. No matter how outlandishly silly each episode becomes, there is never any sense that the characters are trying to be funny.
    1. Is there an OS agnostic way of doing this? I like the script command on macOS because you don't have to wrap the command in quotes. The script runs and sends output to the tty which is duplicated in the supplied file, but I can't seem to get the linux version to behave the same way... I'm probably doing something wrong. So what's the equivalent linux script command for this on macOS: script -q -t 0 tmp.out perl -e 'print "Test\n"' Test cat tmp.out Test
    2. If you want to pipe it into something interactive, like less -R, where terminal input goes to less -R, then you need some extra trickery. For example, I wanted a colourful version of git status | less. You need to pass -R to less in order that it respect the colours, and you need to use script to get git status to output colour. But we don't want script to keep ownership of the keyboard, we want this to go to less. So I use this now and it works well: 0<&- script -qfc "git status" /dev/null | less -R . Those first few characters close stdin for this one commmand.

      Just git status | less -R worked for me without any additional trickery, but I see now that's because I told it to "always" use color in my .gitconfig:

      .[color]
        ui = always
        status = always
      

      I tried disabling that and then trying the

      0<&- script -qfc "git status" /dev/null | less -R
      

      trick, but it didn't work for me. It didn't show any output and I couldn't exit out with Ctrl-C or anything I tried. Had to force kill from another terminal.

      But it's a good example of the related but different problems:

      1. forcing less to respect colors (easy)
      2. force/trick git status to think it has a terminal
      3. force/trick it so you can control keyboard with less
    1. I just don't understand why a finished episodically released game is still offered episodic.
    1. Building a wonky factory is way more fun than it has any right to be - and being rewarded for leaving last turn's pieces where they are (or punished for moving them) means that you're always working on top of the mess you made last turn, though you're never completely stuck.
    1. This question does not show any research effort; it is unclear or not useful Bookmark this question. Show activity on this post. I'm trying to filter the output of the mpv media player, removing a particular line, but when I do so I am unable to control mpv with the keyboard. Here is the command: mpv FILE | grep -v 'Error while decoding frame' When I run the command, everything displays correctly, but I am unable to use the LEFT and RIGHT keys to scan through the file, or do anything else with the keyboard. How do I filter the output of the program while retaining control of it?
    1. But we can use a two characters delimiter: / (space slash) That pair of characters could only exist at the beginning of a new (absolute) path:
    2. If a program receives file names as arguments, don't join them with spaces. Use "$@" to access them one by one.
    1. “Who cares? Let’s just go with the style-guide” — to which my response is that caring about the details is in the heart of much of our doings. Yes, this is not a major issue; def self.method is not even a code smell. Actually, that whole debate is on the verge of being incidental. Yet the learning process and the gained knowledge involved in understanding each choice is alone worth the discussion. Furthermore, I believe that the class << self notation echoes a better, more stable understanding of Ruby and Object Orientation in Ruby. Lastly, remember that style-guides may change or be altered (carefully, though!).
    1. Secondly, the difficulty ramps up very quickly - once I'd got a handle on things and started getting in to it, it threw me off that the Novice level 7 is just WAY TOO HARD - it's not a game centered on difficulty so it's not like that's an excuse, nor is this a later on level where you'd except difficulty, but having just 15 seconds to do that lap, that needs to be changed to 20 at least!
    1. You'll usually only take this sales tax deduction if you live in a state that doesn't have state income tax, but it's available to everyone.
    1. He says: Did you know that all sod is grown on 100% sunny sod farms? Have you ever seen a tree on a sod farm? So if you take that sunny seed sod and transplant to shady area, it will slowly die off.

      So you should overseed your sod after transplanting.

    1. shared_contexts is any setup code that you can use to prepare a test case . This allows you to include test helper methods or prepare for the tests to run.
    1. Incredible Mandy is a great example of design by subtraction, focusing on puzzle-solving and atmosphere and eschewing mechanics which do not contribute to the developer’s singular vision.
    1. The good news: everyone had a genuine blast. We knew we had experimented our way into something fun, even if the rules and designs still needed a lot of work.
    1. An example of this would be a button that looks clickable but isn’t, underlined text that doesn’t contain a link, or a TV remote that turns on your lights but not the TV. False affordances are often present by mistake or occur due to lack of effective design techniques.
    2. Many designers strive to create products that are so easy to navigate, their users can flow through them at first glance. To design something with this level of intuitiveness, it’s imperative designers understand affordances—what they are and how to use them.
    1. Which HTML tag I should use to enclose such notes to add a semantic meaning of a note that may be useful to read at a given point of a tutorial, but is not part of the main tutorial flow?
    2. I respectfully disagree with your assessment. You are referencing the quote "It's not appropriate to use the aside element just for parentheticals, since those are part of the main flow of the document." However the OP specifically said that they are looking for a semantic element for "a note that may be useful to read at a given point of a tutorial, but is not part of the main tutorial flow". That is what "aside" is for. It's not part of the main content flow.

      That's a tough one. I can see it both ways.

    1. I actually think this is Not Constructive, since there's no absolute rule about which pairings can be joined into a single word or hyhenated, and it's pointless having "votes" here about each specific case. Follow a style guide if you have one, or search Google Books and copy whatever the majority do. Or just make your own decision.
    1. If you like puzzle games, this is certainly a game for you. Well designed level progression that helps you build a good understanding of the underlying rules of the world
    1. Motivation is provided by an ever-escalating difficulty, though not to the point where you feel frustrated.
    1. There were a few times I felt like making notes, but never ended up needing to because the scale of the puzzles is kept manageable throughout.
    1. class AuthConstraint def initialize(&block) @block = block || ->(_) { true } end def matches?(req) user = current_user(req) user.present? && @block.call(user) end def current_user(req) User.find_by_id(session[:user_id]) end end This is a flexible approach to defining route access based on any desired variable (roles, auth, etc...)

      Good solution, and might be needed if you want to base routes on roles, etc. — but this one is even easier if all you need is for it to be conditional based on signed in or not (because devise provides authenticated helper):

      https://hyp.is/lRq8tpNXEeuNn_9NxqJvdA/stackoverflow.com/questions/32407598/rails-4-devise-set-default-root-route-for-authenticated-users

  8. Mar 2021
    1. The reason Final Form does this is so that pristine will be true if you start with an uninitialized form field (i.e. value === undefined), type into it (pristine is now false), and then empty the form field. In this case, pristine should return to true, but the value that the HTML DOM gives for that input is ''. If Final Form did not treat '' and undefined as the same, any field that was ever typed in would forever be dirty, no matter what the user did.
    1. A business with a low barrier to entry would be those people in poor countries who “wash” your windscreen at traffic lights. A bucket, a cloth, some water and you are in business. A business with a high barrier to entry might be airlines: planes are expensive, staff with the right skills hard to find, the necessary permits to fly hard to obtain.
    1. The hierarchical structure of semantic fields can be mostly seen in hyponymy.

      Good explanation about semantic fields.

      I assume the same or an even stronger statement can be made about semantic classes (which to me are like more clear-cut, distinct semantic fields), then? 

    1. Some types exist as descriptions of objects, but not as tangible physical objects. One can show someone a particular bicycle, but cannot show someone, explicitly, the type "bicycle", as in "the bicycle is popular."
    2. The sentence "they drive the same car" is ambiguous. Do they drive the same type of car (the same model) or the same instance of a car type (a single vehicle)?