- Nov 2022
-
github.com github.com
-
So transcriptor aims to do less, and impose the bare minimum of cognitive load needed to convert a REPL interaction into a test. The entire API is four functions:
-
-
towardsdatascience.com towardsdatascience.com
-
hlthcodeus.hub.biz hlthcodeus.hub.biz
Tags
Annotators
URL
-
-
the OAuth 2.0 grant type, Authorization Code Flow with Proof Key for Code Exchange (PKCE).
-
-
-
dsmdavid commented Mar 8, 2021 @tchakabam if you right click on the status bar, do you get many options? Might be worth not showing some of the other options (in my case the line/column was not shown because there were too many options already there) and, after unselecting one:
Post about status bar in VS Code (visible at bottom of window by default).
I looked for this since I couldn't figure out the column numbers of where my cursor was in the editor.
You can toggle this setting by opening command palette and searching "View: Toggle Status Bar Visibility"
Displays Ln & Col numbers.
-
-
developer.intuit.com developer.intuit.com
-
You can also go to the Ruby OAuth Client Library to download the source code and run: 1gem build intuit-oauth.gemspec to build your own gem if you want to modify certain functions in the library.
-
-
www.youtube.com www.youtube.com
-
Louis Burki 6 months ago (edited) I have make some changes to make it work, because I had a similar error. First, I have add a ":" before the "=" in the Text variable at the beginning of the script. Now it looks like that: "Text:=". Then I have put double quotes around (**your snippets**) so now it looks like this "(***your snippets***)". Then, I also changed the sort line to make it look that: Text:= sort(Text). And now it works as intended. Also, be careful not to remove the pipe symbol in your snippets.
Someone giving a troubleshooting solution to using Joe Glines' Auto Hotkey script that inserts text from a list of the user's choosing. The problem another user had was including it in their main script file, but this was resolved with Louis Burki's answer
-
-
github.com github.com
-
Page that has some guidance on troubleshooting AutoHotkey issues in VS Code.
-
-
github.com github.com
-
An open issue on the Obsidian Hypothes.is plugin about edits in annotations not being added to Obsidian. A proposed solution is given; change the settings script with the code provided.
-
-
www.programmableweb.com www.programmableweb.com
Tags
Annotators
URL
-
-
api.stackexchange.com api.stackexchange.com
Tags
Annotators
URL
-
-
github.com github.com
-
Template: <%* const id = tp.file.creation_date("YYYYMMDDHHmmss"); await tp.file.rename(`${id} ${tp.file.title}`); %>
Templater code snippet that renames current file to add date & time creation to title of note.
-
-
til.simonwillison.net til.simonwillison.net
-
You can then edit files in that repository and commit and push them like this: cd 0a30d52feeb3ff60f7d8636b0bde296b # Edit files here git commit -m "Edited some files" -a git push
-
But if you want to be able to make local edits and then push them back, you need to use this recipe instead: git clone git@gist.github.com:0a30d52feeb3ff60f7d8636b0bde296b.git You can find this in the "Embed" menu, as the "Clone via SSH" option.
-
You can clone them anonymously (read-only) just using their URL: git clone https://gist.github.com/simonw/0a30d52feeb3ff60f7d8636b0bde296b
-
-
-
The GitHub repository for source code that generates the knowledge garden by @wfinck (which he calls a "digital garden"
-
-
gitlab.com gitlab.com
-
how was your code review experience with this merge request? Please tell us how we can continue to iterate and improve: Leave a 👍 or a 👎 on this comment to describe your experience.
-
-
www.reddit.com www.reddit.com
-
Run in WSL to return current total "word count": find /mnt/c/path/to/obsidian -type f -name "*.md" -exec cat '{}' \+ | wcThis will also count words in syntax - like the word "query" in an embedded query. In fact it probably counts anything separated by whitespace as separate words. But you could do some preprocessing between the cat and the wc if you like.
Linux command for WSL to count all lines, words count, & character count. OP states at end -wc restricts to word count only
-
-
codemeta.github.io codemeta.github.io
-
-
-
A second problem is that once your process has exited, Bash will proceed to exit as well. If you're not being careful, Bash might exit with exit code 0, whereas your process actually crashed (0 means "all fine"; this would cause Docker restart policies to not do what you expect). What you actually want is for Bash to return the same exit code your process had.
-
- Oct 2022
-
www.metooo.io www.metooo.io
-
HLTH Code Australia on Metooo
-
-
en.wikipedia.org en.wikipedia.org
-
Several templates and tools are available to assist in formatting, such as Reflinks (documentation), reFill (documentation) and Citation bot (documentation)
I clicked the link for reFill and thought it looked interesting. Would like to look into this further.
-
-
stackoverflow.com stackoverflow.com
-
opts = method(__method__).parameters.map(&:last).map { |p| [p, eval(p.to_s)] }.to_h SomeOtherObject.some_other_method(opts)
-
that's right, we don't want to do params = { ... } because then we're hardcoding the implementation and it becomes very coupled. The benefit of doing it like in my examples is that you can change the method signature and still automatically capture all keyword parameters.
-
-
stackoverflow.com stackoverflow.com
-
You may need pathname2url
(Author:: [[neurino on Stack Overflow]])
python from urllib.request import pathname2url pathname2url('dir/foo, bar.mp3')
∎
-
-
www.education.gouv.fr www.education.gouv.fr
-
L'échelle des sanctions fixée à l'article R. 511-13 du code de l'Éducation est reproduite dans le règlement intérieur. Toutefois, le juge administratif (CE, 16 janvier 2008, MEN c/Mlle Ayse A, n° 295023) considère que, même en l'absence de toute mention dans le règlement intérieur, l'échelle des sanctions réglementaires est applicable de plein droit.
-
-
www.reddit.com www.reddit.com
-
idk how to use this hypothesis thing but here we are
-
-
www.mioola.com www.mioola.com
-
hlthcodeaus on Mioola
Tags
Annotators
URL
-
-
unix.stackexchange.com unix.stackexchange.com
-
Functions are much more flexible than aliases. The following would overload the usual ls with a version that always does ls -F (arguments are passed in $@, including any flags that you use), pretty much as the alias alias ls="ls -F" would do: ls () { command ls -F "$@" }
-
-
-
www.boredpanda.com www.boredpanda.com
-
HLTH Code on Bored Panda
-
- Sep 2022
-
douglasorr.github.io douglasorr.github.io
-
First, to clarify - what is "code", what is "data"? In this article, when I say "code", I mean something a human has written, that will be read by a machine (another program or hardware). When I say "data", I mean something a machine has written, that may be read by a machine, a human, or both. Therefore, a configuration file where you set logging.level = DEBUG is code, while virtual machine instructions emitted by a compiler are data. Of course, code is data, but I think this over-simplified view (humans write code, machines write data) will serve us best for now...
-
-
www.syndicatetheory.com www.syndicatetheory.com
-
Do yourself and your peers a favor, write code with them in mind.
-
-
-
medium.com medium.com
-
Writing Code for Humans — A Language-Agnostic Guide…because code which people can’t read and understand is easy to break and hard to maintain.
-
-
github.com github.com
-
I don't like the first syntax because then you have weird looking code due to all the leading whitespace, and you lose a lot of real estate.
-
Aligning everything with however long the method name is makes every indention different. belongs_to :thing, class_name: 'ThisThing', foreign_key: :this_thing_id has_many :other_things, class_name: 'ThisOtherThing', foreign_key: :this_other_thing_id validates :field, presence: true Compared to the following, which all align nicely on the left. belongs_to :thing, class_name: 'ThisThing', foreign_key: :this_thing_id has_many :other_things, class_name: 'ThisOtherThing', foreign_key: :this_other_thing_id validates :field, presence: true
-
This one bugs me a lot, but honestly, I don't like either style of the "normal method calls" above. I'm definitely voting to change the rule, but I'd also recommend trying to use the following syntax. In my opinion, it's the best of both worlds. a_relatively_long_method_call( :thing, :another_thing ) Or, if there are a lot or arguments, or the arguments are long: a_relatively_long_method_call( :a_long_argument, :another_long_argument, :a_third_long_argument )
-
-
medium.com medium.com
-
In collusion, writing good code not only require knowledge but also require compassion. To understand people's pain and mistakes, to think about your teammate and to help everyone achieve a better life.
-
Think about how good it is if you can build a system at “2 half brain quality” and then people just need use 1 half of their brain to maintain it. You can fix bug in a blink of an eye, run tests and give it to tester, done. Everything will be done in a easiest way and fixing bug or refactoring can be easy like breathing. The most heavy task in programming is not about building application, but it’s about maintain them and if you wrote something you can’t understand, then you will suffer for the rest of your life.
-
Write code for human, not for God
-
-
github.com github.com
-
really begin/end is just a way to pass several expressions where you normally need to pass only one. In this way I think it's much closer to something like conditionals (e.g. if, than to do).
-
-
metalblueberry.github.io metalblueberry.github.io
-
your cognitive load increases with the level of indentation. 1 2 3 4 5 6 7 8 9 10 if r.Method == "GET" { if r.Header.Get("X-API-KEY") == key { // ok return nil }else{ return errors.New("Key is not valid") } } else { return errors.New("Invalid Method") }
-
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
-
To see if you are writing good code, you can question yourself. how long it will take to fully transfer this project to another person? If the answer is uff, I don’t know… a few months… your code is like a magic scroll. most people can run it, but no body understand how it works. Strangely, I’ve seen several places where the IT department consist in dark wizards that craft scrolls to magically do things. The less people that understand your scroll, the more powerfully it is. Just like if life were a video game.
-
Avoid indentation levels, If you find yourself with more than 3, you should create a function.
-
Code explains what and how Documentation explains why.
-
This is so clear that you don’t even need comments to explain it.
-
Another type of comments are the ones trying to explain a spell.
-
Do you really need those lines? Isn’t it clear enough? Well, I still find comments like this in a lot of cases and it gets funnier when the comment is obsolete and the code is doing other things. Following the example, let’s imagine that another developer adds support for PUT method. I think that this is what would happen.
-
The rule of thumbs is, never use code that you do not understand.
Tags
- +1.0
- source code: comments
- source code: comments: explain why, not what or how
- write code that humans can understand
- documentation: good
- cognitive load
- source code: avoid unneeded indentation levels
- answer the "why?"
- if you have to explain it, rewrite it to be simpler
- becomes outdated quickly
- quotable
- documentation: inaccurate/outdated
Annotators
URL
-
-
pubs.acs.org pubs.acs.org
-
github.com github.com
-
In particular, it allowed for organizing common traits (such as extensibility, or different ways of showing examples as schemas that can be mixed in to the main object definitions.
-
-
www.symbaloo.com www.symbaloo.com
-
HLTH Code Australia on Symbaloo
Tags
Annotators
URL
-
-
rubystyle.guide rubystyle.guide
-
Prefer alias when aliasing methods in lexical class scope as the resolution of self in this context is also lexical, and it communicates clearly to the user that the indirection of your alias will not be altered at runtime or by any subclass unless made explicit.
reassurance of lack of possibility for run-time shenanigans
-
-
bitfieldconsulting.com bitfieldconsulting.com
-
For example, whereas C programmers have argued for years about where to put their brackets, and whether code should be indented with tabs or spaces, both Rust and Go eliminate such issues completely by using a standard formatting tool (gofmt for Go, rustfmt for Rust) which rewrites your code automatically using the canonical style. It’s not that this particular style is so wonderful in itself: it’s the standardisation which Rust and Go programmers appreciate.
-
- Aug 2022
-
-
Danger runs after your CI, automating your team's conventions surrounding code review.
Tags
Annotators
URL
-
-
gitlab.com gitlab.com
-
A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge.
-
Each commit should meet the following criteria: Have a well-written commit message. Has all tests passing when used on its own (e.g. when using git checkout SHA). Can be reverted on its own without also requiring the revert of commit that came before it. Is small enough that it can be reviewed in isolation in under 30 minutes or so.
-
-
github.com github.com
-
Reuses OmniAuth strategy implementation, such as facebook or google
-
-
paste.mozilla.org paste.mozilla.org
-
-
searchfox.org searchfox.org
-
-
-
Atari, M., Reimer, N. K., Graham, J., Hoover, J., Kennedy, B., Davani, A. M., Karimi-Malekabadi, F., Birjandi, S., & Dehghani, M. (2021). Pathogens Are Linked to Human Moral Systems Across Time and Space. PsyArXiv. https://doi.org/10.31234/osf.io/tnyh9
Tags
- purity
- moral behavior
- psychiatry
- care
- morality
- cultural psychology
- culture
- infectious diseases
- research
- COVID-19
- cultural difference
- social and personality psycholgy
- moral code
- is:preprint
- Pathogen Avoidance
- behavioral science
- cross-cultural psychology
- moral foundation theory
- computational linguistics
- loyalty
- lang:en
- US
- pathogen
- social and behavioral science
- linguistics
- adaptive moral system
- evolution
Annotators
URL
-
-
-
Don’t make claims unless you can cite documentation, formalized guidelines, and coding examples to back those claims up. People need to know why they are being asked to make a change, and another developer’s personal preference isn’t a good enough argument.
-
-
hal.archives-ouvertes.fr hal.archives-ouvertes.fr
-
A recent study [25]of more than a million notebooks in public GitHub reposito-ries found many indicators of poor quality, some of whichsupport earlier criticisms of notebooks encouraging bad soft-ware engineering habits
-
-
hal.archives-ouvertes.fr hal.archives-ouvertes.fr
-
perhaps the mostfrequent motivation for adding dependencies in layer-3 soft-ware is the desire to write less code oneself
-
-
tuxedolabs.blogspot.com tuxedolabs.blogspot.com
-
This describes one of the most pleasing hacks I've ever come across. I just now tracked it down and added it to my bookmarks. (Not sure why it wasn't already there.)
You could also conceive of going one step further. When your app (doesn't actually have to be a game, though admittedly it's much easier for you if it is) is compiled with tweak.h, it gives it the power to paint the source file on the screen—so you don't actually have to switch over to your text editor to save it, etc. Suppose you want to provide custom inputs like Bret Victor-style sliders for numeric values. You could edit it in your text editor, or you could derp around with it in-app. Tweaking the value in-app should of course both update it wrt the app runtime but also still write the file to disk, too, so if live reloading is turned on in your text editor, whatever changes you make inside the live process image gets synced out.
-
-
stackoverflow.com stackoverflow.com
-
Check out GistBox. It supports searching, editing and labels. Here's a screenshot:
现在叫cacher
-
-
www.roboleary.net www.roboleary.net
- Jul 2022
-
www.freecodecamp.org www.freecodecamp.org
-
You are context switching between new features and old commits that still need polishing.
-
-
www.codependentcodr.com www.codependentcodr.com
-
blogs.microsoft.com blogs.microsoft.com
-
because it only needs to engage a portion of the model to complete a task, as opposed to other architectures that have to activate an entire AI model to run every request.
i don't really understand this: in z-code thre are tasks that other competitive softwares would need to restart all over again while z-code can do it without restarting...
-
Z-code models to improve common language understanding tasks such as name entity recognition, text summarization, custom text classification and key phrase extraction across its Azure AI services. But this is the first time a company has publicly demonstrated that it can use this new class of Mixture of Experts models to power machine translation products.
this model is what actually z-code is and what makes it special
-
have developed called Z-code, which offer the kind of performance and quality benefits that other large-scale language models have but can be run much more efficiently.
can do the same but much faster
-
-
github.com github.com
-
Interestingly, Rails doesn't see this in their test suite because they set this value during setup:
-
-
ipese-web.epfl.ch ipese-web.epfl.ch
-
data = np.array(self.X)
You can even annotate code !
Tags
Annotators
URL
-
-
www.vpri.org www.vpri.org
-
This opens the possibility of doing a design much better than Squeak's, both fundamentally and at the user-level, to create a model of an entire personal computer system that is extremely compact (under 20,000 lines of code)
See: Oberon
-
the Squeak system, which was derived from PARC Smalltalk, includes its own operating system, GUI, development tools, graphics, sound, Internet sockets, and many applications including Etoys and Croquet, yet is only about 230,000 lines of code. The executables are about 2.8MB and only half of this code is generally used.
-
- Jun 2022
-
www.javatpoint.com www.javatpoint.com
-
Difference between Map and HashMap The Map is an interface in Java used to map the key-pair values. It is used to insert, update, remove the elements. Whereas the HashMap is a class of Java collection framework. The Map interface can only be used with an implementing class. It allows to store the values in key-pair combination; it does not allow duplicate keys; however, we can store the duplicate values. Its implementing classes are as follows: HashMap Hashtable TreeMap ConcurrentHashMap LinkedHashMap HashMap is a powerful data structure in Java used to store the key-pair values. It maps a value by its associated key. It allows us to store the null values and null keys. It is a non-synchronized class of Java collection.
Tags
Annotators
URL
-
-
openclassrooms.com openclassrooms.com
-
Vous connaissez maintenant la différence entre conteneur et machine virtuelle ; vous avez ainsi pu voir les différences entre la virtualisation lourde et la virtualisation légère.Un conteneur doit être léger, il ne faut pas ajouter de contenu superflu dans celui-ci afin de le démarrer rapidement, mais il apporte une isolation moindre. À contrario, les machines virtuelles offrent une très bonne isolation, mais elle sont globalement plus lentes et bien plus lourdes.
-
-
www.pythoncentral.io www.pythoncentral.io
-
Definition of Tuple in Python.
-
-
github.com github.com
Tags
Annotators
URL
-
-
docs.angularjs.org docs.angularjs.org
-
Lots of info on form validation
Tags
Annotators
URL
-
- May 2022
-
about.gitlab.com about.gitlab.com
-
As you've probably already guessed, we've decided to replace the current Web IDE with one built on top of VS Code. In the coming milestones, we will build out custom support for the features not already available in the VS Code core, and validate that the workflows you already depend on in the Web IDE are handled in the new experience. We're working with the team that builds our amazing GitLab Workflow extension for VS Code to make it available in the browser so we can bundle it in the Web IDE, and bring all those great features along for the ride. That includes bringing merge request comments into the Web IDE for the first time ever!
GitLab is planning to onboard VS Code web IDE
-
-
algs4.cs.princeton.edu algs4.cs.princeton.edu
Tags
Annotators
URL
-
-
gist.github.com gist.github.com
-
# Defines all Languages known to GitHub.
Tags
Annotators
URL
-
-
-
-
code.activestate.com code.activestate.com
-
Machine Tags
A new kind of tags — machine tags — are supported now. A machine tag, e.g.
meta:language=python
consists of a namespace (meta), a key (language) and a value (python). Everyone can created machine tags, but the meta: namespace is protected and tags in there will be created by the site itself.The codesite itself uses machine tags to make various properties of recipes accessible to the search:
-
meta:language
The programming language of the recipe, e.g. python, perl or tcl.
-
meta:min_$lang_$majorver
Those tags describe the minimum language version. If a recipe requires Python 2.5 it would have the tag
meta:min_python_2=5
. -
meta:license
The license that was selected by the author, e.g. psf, mit or gpl.
-
meta:loc
This tag contains a number describing the lines of code in a recipes. It counts only the number of lines in the code block but not any lines in the discussion of in comments. This makes it possible to search for short recipes with less than ten lines or very large ones.
-
meta:score
The current score of the recipe. This is the same number that is displayed besides the recipe title and can only be influenced by voting on recipes. That way you could even search for down-voted recipes
-
meta:requires
Stores information about additional requirements of the recipes, e.g. required python modules. You can find recipes using python's collections module that way.
All those tags cannot be changed directly because they are generated from a recipe's properties.
-
Tags
Annotators
URL
-
-
code.activestate.com code.activestate.com
Tags
Annotators
URL
-
-
news.ycombinator.com news.ycombinator.com
-
typeof v === "number"
Using triple equals to check the results of
typeof
is totally unnecessary, and a sure sign that someone, somewhere has unthinkingly adopted some dubious advice; it's a code smell/red flag.A standard equality comparison (using
==
) does exactly the right thing while also avoiding association with questions/doubts about the quality of the surrounding code.
-
- Apr 2022
-
github.com github.com
-
Instead read this gems brief source code completely before use OR copy the code straight into your codebase.
Tags
- read the source code
- software development: use of libraries: only use if you've read the source and understand how it works
- software development: use of libraries vs. copying code into app project
- learning by reading the source
- copy and paste programming
- having a deep understanding of something
Annotators
URL
-
-
-
There are project layouts that put implementation files and test files together.
-
-
medium.com medium.com
-
-
-
-
https://github.com/deathau/obsidian-snippets
Some code and clever hacks for Obsidian
-
-
duncanlock.net duncanlock.net
-
I sometimes wondered why the VS Code team put so much effort into the built-in terminal inside the editor. I tried it once on Linux and never touched it again, because the terminal window I had right next to my editor was just massively better in every way. Having used Windows terminals for a while, I now fully understand why it’s there.
VS Code terminal is not as efficient on Linux
-
- Mar 2022
-
askubuntu.com askubuntu.com
-
Yes they are the same command. This part of apt's cmdline/apt.cc source file proves it:
-
-
-
If you want to organize said migrations in their purpose you'll probably have a folder for the struture ones and another for the data ones.
-
not as good/useful as some other gem options/approaches, such as the one that adds a
data
method per migration, or that lets you tag with:post_deploy
, etc.
-
-
github.com github.com
-
-
db/migrate/core/user/
-
-
www.cs.cmu.edu www.cs.cmu.edu
-
○ This changes the format and structure of the code but preserves the semantics (what it does)○ Can change lots of details for optimization, as long as the overall effect is the same
compiler 部分的流程是什么?
-
-
-
-
people.csail.mit.edu people.csail.mit.edu
-
Lesson: avoid use of this; work around by defining that
No. Actual lesson: don't do crazy shit; if you're trying to code defensively against
this
, then your code is too hard to understand, anyway, and you've got bigger problems. (See also: overuse of triple equals and treating it like an amulet to ward off unwanted spirits.)
-
-
codes.droit.org codes.droit.org
Tags
Annotators
URL
-
-
news.ycombinator.com news.ycombinator.com
-
tlrobinson interpreted right that codebase size should be measured in number of tokens
Bob Nystrom is fond of avoiding LOC measurements in favor of number of semicolons.
-
- Feb 2022
-
www.colbyrussell.com www.colbyrussell.com
-
let zeta = getProcessControl.bind(this); Object.setPrototypeOf(zeta, Object.getPrototypeOf(this)); return zeta;
useful pattern
Tags
Annotators
URL
-
-
blog.51cto.com blog.51cto.com
-
-
- Visual Studio Code 快捷键
-
调出快捷键设置: Ctl + k Ctrl + s (这是代表联合一起的)
- 当前行快速换行 : Ctrl + Enter
- 快速删除某一行:Shift + Delete / Ctrl + Shift + K
- 查找: Ctrl + F
- 文件中查找: Ctrl + Shift + F
- 替换:Ctrl + H
- 文件中内容替换: Ctrl + Shift + H
-
-
-
cs.brown.edu cs.brown.edu
-
The %rip register on x86-64 is a special-purpose register that always holds the memory address of the next instruction to execute in the program's code segment.
%rip 有什么作用?
Tags
Annotators
URL
-
-
www.cs.cmu.edu www.cs.cmu.edu
-
• %rax: return value• %rsp: stack pointer• %rdi: 1st argument• %rsi: 2nd argument• %rdx: 3rd argument• %rcx: 4th argument• %r8: 5th argument• %r9: 6th argument
有那几个常用且重要的 register?
-
-
www.abc.net.au www.abc.net.au
-
Health sector facing ‘challenges not seen in a century’ as Victoria issues rare Code Brown. (2022, January 17). ABC News. https://www.abc.net.au/news/2022-01-18/victoria-records-more-covid-19-deaths-hospitalisations-and-cases/100762978
-
-
www.theatlantic.com www.theatlantic.com
-
Schwitzgebel, E. (2022, February 3). The COVID Jerk. The Atlantic. https://www.theatlantic.com/ideas/archive/2022/02/covid-jerk-sarah-palin/621466/
-
- Jan 2022
-
www.defenseurdesdroits.fr www.defenseurdesdroits.fr
-
En outre en juin 2020, l’article D. 131-3-1 du Code de l’éducation42, ajouté par le décret du 29 juin 2020, affirme que seuls les documents justifiant de l’identité de l’enfant, des personnes qui en sont responsables et de leur domicile peuvent être exigés pour appuyer leur demande d’inscription. Dans le cas où l’un de ces documents serait impossible à produire, il peut être justifié par tous moyens, y compris une attestation sur l’honneur43.
-
-
github.com github.com
-
I value this pattern because it allows concise concurrency.
-
-
www.mobindustry.net www.mobindustry.net
-
Code Audit Services
-
-
github.com github.com
-
i implemented this myself this way:
code syntax highlighting: pasted both his highlighted version (as an image) and unhighlighted version (as text, so that it can be copied/pasted, indexed, whatever)
-
-
www.cs.sfu.ca www.cs.sfu.ca
-
If one of those two expressions couldpossibly generate an error condition or a side effect, this could lead to invalidbehavior. Such is the case for our earlier example
有什么情况下必须使用 branching 方式,而不能使用 conditional move?
-
It is important to recognize that the suffixes forthese instructions denote different conditions and not different operand sizes. Forexample, instructions setl and setb denote “set less” and “set below,” not “setlong word” or “set byte.”
set 指令的后缀代表的含义是什么?
-
-
-
let info, id
let id = response.headers.get("X-Request-ID"); if (id) { let info = this._pendingRequests.get(id); if (info) {
-
filter = null
This is unused.
-
- Dec 2021
-
canvas.rocks canvas.rocks
-
-
qr.antopie.org qr.antopie.org
-
-
www.newscientist.com www.newscientist.com
-
author.fullName}. (n.d.). Fake covid-19 vaccine certificates are being sold on the dark web. New Scientist. Retrieved December 7, 2021, from https://institutions.newscientist.com/article/2299962-fake-covid-19-vaccine-certificates-are-being-sold-on-the-dark-web
Tags
- is:news
- EU
- hospitality
- USA
- fake
- restrictions
- COVID-19
- dark web
- lang:en
- vaccine passport
- leak
- security
- vaccine certificate
- vaccine
- QR code
Annotators
URL
-
-
www.itpedia.nl www.itpedia.nl
-
What is an assembler language? https://en.itpedia.nl/2019/11/11/wat-is-een-assembler-taal/ An #assembler_language is a low-level programming_language designed for a specific processor type. We can produce Assembler by compiling #source_code from a high-level programming language (such as C / C ++). But we can also write #programs in this language ourselves. In turn, we can convert Assembler_code into machine_code using an assembler.
-
- Nov 2021
-
www.cs.sfu.ca www.cs.sfu.ca
-
The destination operand must be a register.
load effective address 的 destination 需要是什么?
-
The ability of the leaq instruction to perform addition and limited forms ofmultiplication proves useful when compiling simple arithmetic expressions suchas this example.
leaq 在什么情况下有用?
-
local variables such as x are often kept in registers rather thanstored in memory locations. Register access is much faster than memory access.
local variables 通过会存在哪里,为什么?
-
we see that whatwe call “pointers” in C are simply addresses. Dereferencing a pointer involvescopying that pointer into a register, and then using this register in a memoryreference.
dereference pointer 在 assembly code 中如何实现?
-
The most general form is shown at the bottomof the table with syntax Imm(rb,ri,s). Such a reference has four components: animmediate offset Imm, a base register rb, an index register ri, and a scale factors, where s must be 1, 2, 4, or 8. Both the base and index must be 64-bit registers.The effective address is computed as Imm + R[rb] + R[ri] . s.
访问 $$Imm(r_b, r_i, s)$$ 的内存应该如何计算,有哪些限制条件?
-
C declaration Intel data type Assembly-code suffix Size (bytes)
不同数据类型的 size 以及在 assembly 中的后缀?
-
A final difference is that we see two additional lines of code (lines8–9). These instructions will have no effect on the program, since they occur afterthe return instruction (line 7). They have been inserted to grow the code for thefunction to 16 bytes, enabling a better placement of the next block of code in termsof memory system performance.
为什么有时候通过 disassembly 生成的 assembly 代码会在 ret 之后通过 nop 增加一些空格?
-
Its main feature isthat it is in a more readable textual format, as compared to the binary format ofmachine code.
assembly code 和 machine code 相比最大的区别是什么?
-
-
stackoverflow.com stackoverflow.com
-
-
The consumer component will barely change from our last example. The only difference is the way we'll get a reference to our store (since now the store is exported from the JS module):
-
Now your whole WS logic can be encapsulated in your JS module. That makes for good separation of concern.
-
Stores are the idiomatic Svelte way when you need to import "reactivity" from your normal JS sources.
-
-
towardsdatascience.com towardsdatascience.com
-
To review, the Forget gate decides what is relevant to keep from prior steps. The input gate decides what information is relevant to add from the current step. The output gate determines what the next hidden state should be.Code DemoFor those of you who understand better through seeing the code, here is an example using python pseudo code.
-
-
askubuntu.com askubuntu.com
-
Perhaps not a good idea, in general, to use a random PPA for such sprawling software as a browser. Auditability near zero even if it is open source.
-
-
-
connection
Unused. Caller can/should be passing this in so we can handle the quota check internally.
-
-
svelte.dev svelte.dev
-
-
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
-
leancanvas.bldrs.co leancanvas.bldrs.co
-
Lean Canvas
For the builders collective, I created some tools that are open source and useful for design and social architecture. Other projects are coding challenges to experiment with what is possible on the web.
This experiment is based on the Lean Canvas, based on the Business Model Canvas from the book Business Model Generation.
Type in the grey box at the top of the page. Click or tap in the boxes to add the text as a box in each section of the Lean Canvas. Click on the box to delete.
There is no save functionality, so be sure to take a screenshot. Or roll your own by using the code on Codepen and GitHub.
-
-
ptgmedia.pearsoncmg.com ptgmedia.pearsoncmg.com
-
it’s a matter ofprofessional survival
It is always human survival
-
-
matspike.github.io matspike.github.ioorigins1
-
Log into TopHat and select the course “Origins and Evolution of Language” Navigate to the ‘Assigned’ tab Select the relevant quiz and complete all items (note that the quiz will automatically close on Monday at 1pm)
I logged in to Top Hat and found two courses called Origins and Evolution... both do not have any quizzes in the assigned tab. Can someone please point me to the right course? What's the join code?
Tags
Annotators
URL
-
- Sep 2021
-
-
this.ontokencontent = this.ontokencontent.call(this, result)
The implicitness that this "protocol" pushes into the implementing methods (seemingly odd return values) is undesirable. Make it explicit. The implementing methods should be able to do something like
Validator.changeExpectation(this, this.onresource)
(which in turn changes the target'sontokencontent
handler).
-
-
www.gitmemory.com www.gitmemory.com
-
Couldn't start client Svelte
-
-
twitter.com twitter.com
-
Jeremy Howard. (2021, August 29). I’ve been analyzing the UK covid data and I’ve just discovered something shocking. Cases in chidrens in England have just smashed all-time highs. Nearly double what they’ve ever been before. And rising VERY rapidly. Schools are about to reopen. With far fewer restrictions. Https://t.co/rNhW4U98BR [Tweet]. @jeremyphoward. https://twitter.com/jeremyphoward/status/1432118975060594691
-
-
eduscol.education.fr eduscol.education.fr
-
(art. R. 421-20 du code de l’éducation)
Le conseil d'administration est l'organe décisionnel de l'établissement. Il adopte le projet d'établissement, le budget et le compte financier de l’établissement ainsi que le règlement intérieur de l’établissement. Il donne notamment son accord sur le programme de l'association sportive, sur les principes du dialogue avec les parents d'élèves. Il délibère sur les questions relatives à l'hygiène, la santé et la sécurité. Il donne son avis sur les principes de choix des manuels et outils pédagogiques, sur la création d'options et de sections (art. R. 421-20 du code de l’éducation).
-
-
www.colbyrussell.com www.colbyrussell.com
-
|| minted == hinted
Unnecessary check.
Tags
Annotators
URL
-
- Aug 2021
-
www.fredrikholmqvist.com www.fredrikholmqvist.com
-
You have to completely comprehend your idea in order to fully realize it.
-
-
stackoverflow.com stackoverflow.com
-
def compare_state_dict(dict1, dict2): # compare keys for key in dict1: if key not in dict2: return False for key in dict2: if key not in dict1: return False for (k,v) in dict1.items(): if not torch.all(torch.isclose(v, dict2[k])) return False return True
Comparing two pytorch dicts
-
-
medievalbooks.nl medievalbooks.nl
-
Since the reader was able to shape hand and finger as he or she saw fit, we can sometimes recognise a particular reader within a single manuscript, or even within the books of a library. The charming hands function as a kind of fingerprint of a particular reader, allowing us to assess what he or she found important about a book or a collection of books.
I've heard the word "hand" as in the phrase "an operator's hand" used in telegraphy to indicate how an experienced telegraph operator could identify the person at the other end with whom they were communicating by the pace and timbre of the code. I've particularly heard reference to it by code breakers during wartime. It's much the same sort of information as identifying someone by their voice on the phone or in a distinctive walk as seen at a distance. I've also thought of using this idea in typing as a means of secondary confirmation for identifying someone while they input a password on a keyboard.
I wonder if that reference predates this sort of similar "hand" use for identifying someone, if this may have come first, or if they're independent of each other?
-
-
blog.alexdevero.com blog.alexdevero.com
-
Aside to global and local scope there is also something one could call a “block” scope. This is not an “official” type of scope, but it does exist. Block scope was introduced to JavaScript as a part of the ES6 specification. It was introduced along with two new types of variables let and const.
-
-
en.wikipedia.org en.wikipedia.org
-
github.com github.com
-
In javascript prettier-ignore ignores the next block, so what I did was just make the next few lines a block.
-
-
github.com github.com
-
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
-
-
salferrarello.com salferrarello.com
-
git commit -e --file=$(git rev-parse --git-dir)/COMMIT_EDITMSG;
Tags
Annotators
URL
-
-
www.microsoft.com www.microsoft.com
-
Copy and pastethe module’s code into your system and make whatever changes you find nec-essary.This is usually the right thing to do for a small component
-
-
sionwilliams.com sionwilliams.com
-
conda env update --prune --quiet --name $envname --file "$envfile"
-
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.kernel_name=python3 --output output.ipynb <path_to_ipynb>
Tags
Annotators
URL
-
-
docs.google.com docs.google.com
-
asfvaerv
erwerf
erver
-
-
code.visualstudio.com code.visualstudio.com
-
If you want more, you can do so by directly specifying TextMate theme color rules
code
{ "editor.tokenColorCustomizations": { "[Noctis]": { "textMateRules": [ { "scope": "markup.list", "settings": { "fontStyle": "" } }, { "scope": "text.markdown.notes.tag", "settings": { "fontStyle": "italic" } } ] } } }
Inspect the scope using the command "Developer: Inspect Editor Tokens and Scopes"
Tags
Annotators
URL
-
- Jul 2021
-
apple.stackexchange.com apple.stackexchange.com
-
sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'"
-
-
www.codemotion.com www.codemotion.com
-
hyper-parameters, i.e., parameters external to the model, such as the learning rate, the batch size, the number of epochs.
-
-
blog.appsignal.com blog.appsignal.com
-
the interesting thing here is that there are comments that say which concern depends on which.
-
This works nicely wherever we show authors, but after we deploy to production, the folks from other parts of the world won’t get notified anymore about their songs. Mistakes like these are easy to make when using concerns.
-
-
www.colbyrussell.com www.colbyrussell.com
-
body script, body style {
This doesn't work well with scripts (and style elements) injected by the Hypothesis bookmarklet or the Wayback Machine's toolbar. On that note, it's pretty poor hygiene on their part to (a) inject this stuff in the body to begin with, and (b) not include at the very least a class attribute clearly defining the origin/role of the injected content. As I described elsewhere:
set the class on the injected element to an abbreviated address like
<style class="example.org/sidebar/2.4/injected-content/">
. And then drop a page there explaining the purpose and requirements (read: assumptions) of your injected element. This is virtually guaranteed not to conflict with any other class use (e.g. CSS rules in applied style sheets), and it makes it easier for other add-ons (or the page author or end user) to avoid conflicts with you. -
* Monospace fonts always render at 80% of normal body text for some * reason that I don't understand but is still annoying all the same.
Dealing with it this way is a mistake. The only reasonable thing to do is to tell the user to adjust their browser's default font settings or deal with it. (This seems to only affect Firefox's default UA stylesheet/preferences, not Chrome.)
Check out how the most recent iteration of the w2g streamline "client" https://graph.5apps.com/LP/streamline approaches styling.
Tags
Annotators
URL
-
-
www.colbyrussell.com www.colbyrussell.com
-
this._figureElement = this._page.querySelector("script");
Better to use
querySelectorAll
and then filter based on figure designation (e.g.nodeValue.startsWith(" (Fig. 1) ")
). -
document
Unused!
(Caller should also probably look more like:
let system = new SystemB(document); system.attach(document.querySelectorAll("script"))
... where the
querySelectorAll
return value's role is to act as a list of document figures, for the reasons described elsewhere https://hypothes.is/a/-n-RYt4WEeu5WIejr9cfKA.)
Tags
Annotators
URL
-
-
stackoverflow.blog stackoverflow.blog
-
Useful advice for commenting code.
-
-
hachettebugs.koszko.org hachettebugs.koszko.org
-
I only allowed smaller closures in the code and refactored the rest into separate top-level functions. This is a deliberate move against the common practice of js programmers. Why? Because I noticed closures make code harder to read.
-
- Jun 2021
-
blog.viktoradam.net blog.viktoradam.net
-
This compatibility simply means that you can have a .githooks folder at the root of your project, where you can organize your individual hooks into folders.
-
-
github.com github.com
-
shareup.app shareup.app
-
We’ve broken our project up into three different types of packages: apps which are preact apps intended to be bundled and deployed somewhere, modules which are plain npm packages for node/browsers and do not bundle their dependencies, and workers which are either Worker or ServiceWorker scripts entirely bundled up with no imports or exports. We don’t have to keep these three types of packages separated, but it helps us navigate around.
-
-
www.wired.com www.wired.com
-
Johnson, Khari. ‘AI Could Soon Write Code Based on Ordinary Language’. Wired. Accessed 21 June 2021. https://www.wired.com/story/ai-write-code-ordinary-language.
-
-
www.mutuallyhuman.com www.mutuallyhuman.com
-
Rather than write new tooling we decided to take advantage of tooling we had in place for our unit tests. Our unit tests already used FactoryBot, a test data generation library, for building up test datasets for a variety of test scenarios. Plus, we had already built up a nice suite of helpers that we coud re-use. By using tools and libraries already a part of the backend technology’s ecosystem we were able to spend less time building additional tooling. We had less code to maintain because of this and more time to work on solving our customer’s pain points.
-
-
naildrivin5.com naildrivin5.com
-
It also makes it hard to centralize type coercions and default values.
-
-
disqus.com disqus.com
-
On the security side I think code injection is still a danger. If someone does smuggle js into your js app they'll be able to read your CSRF cookie and make ajax requests using your logged-in http session, just like your own code does
Tags
Annotators
URL
-
-
pragmaticstudio.com pragmaticstudio.com
-
That means if an attacker can inject some JavaScript code that runs on the web app’s domain, they can steal all the data in localStorage. The same is true for any third-party JavaScript libraries used by the web app. Indeed, any sensitive data stored in localStorage can be compromised by JavaScript. In particular, if an attacker is able to snag an API token, then they can access the API masquerading as an authenticated user.
-
-
docs.gitlab.com docs.gitlab.com
-
You can find code to generate test fixtures
-
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
I am not sure if this is an improvement. To me it does not seem very pretty. Of course I am biased since I also prefer () in method definitions if they have arguments; although I think it is fine that ruby does not mind omitting the (). For my brain, I like the () for visual separation.
-
-
stackoverflow.com stackoverflow.com
-
One of the consequences (although arguably not the primary motivation) of DRY is that you tend to end up with chunks of complex code expressed once, with simpler code referencing it throughout the codebase. I can't speak for anyone else, but I consider it a win if I can reduce repetition and tuck it away in some framework or initialisation code. Having a single accessor definition for a commonly used accessor makes me happy - and the new Object class code can be tested to hell and back. The upshot is more beautiful, readable code.
new tag?:
- extract reusable functions to reduce duplication / allow elegant patterns elsewhere
-
-
stackoverflow.com stackoverflow.com
-
( user_id int , user_name varchar , last_activity timestamptz )
-
-
docs.gitlab.com docs.gitlab.com
-
o help us meet this vision, the frontend should use GraphQL in preference to the REST API for new features.
-
-
-
A litmus test on whether an option belongs to adapter config or kit config, would be to ask whether the option becomes irrelevant when you switch the adapter to static.
-
-
github.com github.com
-
'set-cookie': response.headers.get('set-cookie')
-
- May 2021
-
-
You can see the implementation here: https://github.com/sveltejs/sapper/blob/339c417b24e8429d3adc9c9f196bf159a5fce874/runtime/src/server/middleware/get_page_handler.ts#L137
-