- Aug 2024
-
archive.org archive.org
-
benjaminreinhardt.com benjaminreinhardt.com
-
DARPA is incredibly flexible with who it hires to be program managers.
-
- Jul 2024
- May 2024
-
-
“There’s a tendency among journalists to regard the work that puts you in the public eye for the first time as your best work,” he said in “A Life in Words.”
-
- Feb 2024
-
deonde.co deonde.co
-
Discover the seamless workings of DEONDE, a cutting-edge SaaS-based food delivery app solution. Revolutionizing how food is ordered, delivered, and enjoyed, DEONDE offers a streamlined platform for restaurants, delivery partners, and customers to connect effortlessly. Check out how DEONDE works: a Comprehensive Overview of its Features, Pricing, and Process.
-
- Sep 2023
-
-
This allows reading your email offline without the need for your mail reader (MUA) to support IMAP operations. Need an attachment from a message without internet connection? No problem, the message is still there.
-
- Jun 2023
-
-
Worklist according to instrument
-
-
african-composers-edition.co.za african-composers-edition.co.za
-
Works
Surendran Reddy's works
-
- May 2023
-
www.mendeley.com www.mendeley.com
-
Go For It!
-
Toccata for John Roos
-
- Mar 2023
-
-
We're going to define a has-many relationship for a user's second factors, to be able to support multiple second factor types, e.g. TOTP, backup codes, or hardware keys.
-
- Sep 2022
-
www.lexology.com www.lexology.com
-
Can copyright vest in an AI? The primary objective of intellectual property law is to protect the rights of the creators of intellectual property.10 Copyright laws specifically aim to: (i) promote creativity and encourage authors, composers, artists and designers to create original works by affording them the exclusive right to exploit such work for monetary gain for a limited period; and (ii) protect the creators of the original works from unauthorised reproduction or exploitation of those works.
Can copyright vest in an AI?
The primary objective of intellectual property law is to protect the rights of the creators of intellectual property.10 Copyright laws specifically aim to: (i) promote creativity and encourage authors, composers, artists and designers to create original works by affording them the exclusive right to exploit such work for monetary gain for a limited period; and (ii) protect the creators of the original works from unauthorised reproduction or exploitation of those works.
-
-
www.wipo.int www.wipo.int
-
To my knowledge, conferring copyright in works generated by artificial intelligence has never been specifically prohibited. However, there are indications that the laws of many countries are not amenable to non-human copyright. In the United States, for example, the Copyright Office has declared that it will “register an original work of authorship, provided that the work was created by a human being.” This stance flows from case law (e.g. Feist Publications v Rural Telephone Service Company, Inc. 499 U.S. 340 (1991)) which specifies that copyright law only protects “the fruits of intellectual labor” that “are founded in the creative powers of the mind.” Similarly, in a recent Australian case (Acohs Pty Ltd v Ucorp Pty Ltd), a court declared that a work generated with the intervention of a computer could not be protected by copyright because it was not produced by a human.
To my knowledge, conferring copyright in works generated by artificial intelligence has never been specifically prohibited. However, there are indications that the laws of many countries are not amenable to non-human copyright. In the United States, for example, the Copyright Office has declared that it will “register an original work of authorship, provided that the work was created by a human being.” This stance flows from case law (e.g. Feist Publications v Rural Telephone Service Company, Inc. 499 U.S. 340 (1991)) which specifies that copyright law only protects “the fruits of intellectual labor” that “are founded in the creative powers of the mind.” Similarly, in a recent Australian case (Acohs Pty Ltd v Ucorp Pty Ltd), a court declared that a work generated with the intervention of a computer could not be protected by copyright because it was not produced by a human.
-
-
www.americanbar.org www.americanbar.org
-
With the advent of AI software, computers — not monkeys — will potentially create millions of original works that may then be protected by copyright, under current law, for more than 100 years.
With the advent of AI software, computers — not monkeys — will potentially create millions of original works that may then be protected by copyright, under current law, for more than 100 years.
-
- Aug 2022
-
www.amazon.com www.amazon.com
-
When Vladimir Nabokov died in 1977, he left instructions for his heirs to burn the 138 handwritten index cards that made up the rough draft of his final and unfinished novel, The Original of Laura. But Nabokov’s wife, Vera, could not bear to destroy her husband’s last work, and when she died, the fate of the manuscript fell to her son. Dmitri Nabokov, now seventy-five—the Russian novelist’s only surviving heir, and translator of many of his books—has wrestled for three decades with the decision of whether to honor his father’s wish or preserve for posterity the last piece of writing of one of the greatest writers of the twentieth century.
Nabokov's wishes were that his heirs burn the index cards on which he had handwritten the beginning of his unfinished novel The Original of Laura. His wife Vera, not able to destroy her husband's work, couldn't do it, so the decision fell to their son Dimitri. Having translated many of his father's works previously, Dimitri Nabokov ultimately allowed Penguin the right to publish the unfinished novel.
-
-
thoughtcatalog.com thoughtcatalog.com
-
And if you still need a why–I’ll let this quote from Seneca answer it (which I got from my own reading and notes): “We should hunt out the helpful pieces of teaching and the spirited and noble-minded sayings which are capable of immediate practical application–not far far-fetched or archaic expressions or extravagant metaphors and figures of speech–and learn them so well that words become works.”
-
- Jul 2022
-
www.reddit.com www.reddit.com
-
It feels like « removing spring » is one of those unchallenged truths like « always remove Turbolinks » or « never use fixtures ». It also feels like a confirmation bias when it goes wrong.
"unchallenged truths" is not really accurate. More like unchallenged assumption.
-
-
gist.github.com gist.github.com
-
1.4 Look to nature to learn how reality works.
.
-
-
www.judithragir.org www.judithragir.org
-
I have always liked the weaving loom as a metaphor for weaving the absolute and relative together into one cloth. The absolute can be the warp, the relative can be the woof, and the shuttle or the jade works , can spin them all together into one cloth. It’s not that we have to make them into one cloth, they are always manifesting together in simultaneous realization . The jade works is the activity of life itself, the total dynamic functioning of the activity of the universe. Sometimes translated as: The Whole Works. Always right here. All-at-oneness.
Weaving loom analogy! In life, weave the absolute and the relative into one clothes. The absolute is the warp The relative is the woof the Jade Works is the shuttle spinning appearances into one beautiful tapestry. one beautiful simultaneous realization The Whole Works!
OR
The absolute and relative are two sides of the same coin
-
Dogen is constantly and repeatedly trying to knock us off our intellectual center and interrupt our thinking. He does not confirm any one solid view of so-called reality. He doesn’t want us to get stuck to one side or the other in the dynamic pivoting of life’s opposite. Do not cling to the absolute or the relative truth. They dynamically and mutually work with each other. Dogen would describe this interaction as “The Whole Works.”
This is a nice way to describe this process...."repeatedly trying to knock us out of our intellectual center and interrupt our (one sided) thinking."
We should observe this inherent property of our thinknig process, its one-sided nature.
-
- May 2022
-
github.com github.com
-
I think RSpec should provide around(:context)/around(:all). Not because of any particular use case, but simply for API consistency. It's much simpler to tell users "there are 3 kinds of hooks (before, after and around) and each can be used with any of 3 scopes (example, context and suite)". Having some kinds of hooks work with only some kinds of scopes makes the API inconsistent and forces us to add special case code to emit warnings and also write extra documentation for this fact.
-
- 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
- software development: use of libraries: only use if you've read the source and understand how it works
- copy and paste programming
- learning by reading the source
- read the source code
- having a deep understanding of something
- software development: use of libraries vs. copying code into app project
Annotators
URL
-
- Nov 2021
-
www.varvet.com www.varvet.com
-
Even if #foo is originally on the page and then removed and replaced with a #foo which contains baz after a short wait, Capybara will still figure this out.
-
As long as you stick to the Capybara API, and have a basic grasp of how its waiting behaviour works, you should never have to use wait_until explicitly.
-
Let’s make that really clear, Capybara is ridiculously good at waiting for content.
-
apybara could have easily figured out how to wait for this content, without you muddying up your specs with tons of explicit calls to wait_until. Our developer could simply have done this: page.find("#foo").should have_content("login failed")
-
- Oct 2021
-
guides.rubyonrails.org guides.rubyonrails.org
-
All these problems are solved in zeitwerk mode, it just works as expected, and require_dependency should not be used anymore, it is no longer needed.
-
-
www.kylehq.com www.kylehq.com
-
And on any given day, developing with Svelte and its reactive nature is simply a dream to use. You can tell Svelte to track state changes on practically anything using the $: directive. And it’s quite likely that your first reactive changes will produce all the expected UI results.
-
- Sep 2021
-
steppsociety.com steppsociety.com
- Aug 2021
-
www.csoonline.com www.csoonline.com
-
We human beings pride ourselves on our ability to reason, but the truth is we use our brains nine times out of ten to justify what our gut wants, not what is rational to do.
-
Seeing what you want to see, and failing to understand the why and the how
-
-
www.reddit.com www.reddit.com
- Jul 2021
-
austrian-institute.org austrian-institute.org
-
Hayek draws attention to the fact that the most relevant knowledge for economic decision-making is not the general knowledge of the economist or philosopher, but rather the dispersed, local, and often tacit knowledge of myriad individuals in an economy
will big data change the situation? What used to be impossible now starts to seem likely.
-
-
about.gitlab.com about.gitlab.com
-
Epics can contain both issues and epics as children
-
- Jun 2021
-
graphql-ruby.org graphql-ruby.org
-
This kind of error handling does express error state (either via HTTP 500 or by the top-level "errors" key), but it doesn’t take advantage of GraphQL’s type system and can only express one error at a time.
-
- May 2021
-
kit.svelte.dev kit.svelte.dev
-
To set multiple cookies in a single set of response headers, you can return an array:
-
-
hashnode.com hashnode.com
-
So even if it works for you, you won't know where it breaks.
-
- Apr 2021
-
careerfoundry.com careerfoundry.com
-
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.
-
-
stackoverflow.com stackoverflow.com
-
Of course, there is no reason why you can't use <aside> for all sidenotes, if it makes your code simpler. Think of it as civil disobedience. :)
-
- Mar 2021
-
www.jackfranklin.co.uk www.jackfranklin.co.uk
-
Svelte is there when I need it with useful APIs, but fades into the background as I put my app together.
-
-
trailblazer.to trailblazer.to
-
With all this “monetization” happening around Trailblazer, we will also make sure that all free and paid parts of the project grow adult and maintan an LTS - or long-term support - status. Those are good news to all you users out there having been scared to use gems of this project, not knowing whether or not they’re being maintained, breaking code in the future or making your developers addicted to and then cutting off the supply chain. Trailblazer 2.1 onwards is LTS, and the last 1 ½ years of collaboration have proven that.
-
- Feb 2021
-
trailblazer.to trailblazer.to
-
Please note that I/O works for both “simple” tasks as well as nested activities.
-
-
sobolevn.me sobolevn.me
-
Literally, everything in this example can go wrong. Here’s an incomplete list of all possible errors that might occur: Your network might be down, so request won’t happen at all The server might be down The server might be too busy and you will face a timeout The server might require an authentication API endpoint might not exist The user might not exist You might not have enough permissions to view it The server might fail with an internal error while processing your request The server might return an invalid or corrupted response The server might return invalid json, so the parsing will fail And the list goes on and on! There are so maybe potential problems with these three lines of code, that it is easier to say that it only accidentally works. And normally it fails with the exception.
-
-
github.com github.com
-
I don't think seeing it in Rails PRs naturally means we should do it blankly. Put it another way, what's the justification in those PRs for doing it?
Tags
- why?
- rationale
- understand the ramifications/effects/consequences
- fallacy: doing something because it's popular / everyone is doing it
- understand both sides of an issue
- investing time to really understand something
- understand the trade-offs
- doing something without knowing why/how it works
- justification for existence
Annotators
URL
-
-
-
It makes me happy to see people actually think about things and not just accept a shitty API.
Tags
- describe the ideal hypothetical solution
- don't settle for/accept something that's not as good as it can be
- less than ideal / not optimal
- intentional/well-considered decisions
- actually consider / think about how it _should_ (ideally) be
- "makes me happy when ..."
- can we do even better?
- doing something without knowing why/how it works
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
Yes, i'm trying to find the union of two relations
I guess that's what I needed too. How much of the time can a or() be converted to a union?
-
- Jan 2021
-
css-tricks.com css-tricks.com
-
A robust solution is always the most desirable—in a time of crisis, it might even save a life. This might sound hyperbolic, but having a stable copy of something that works offline could make all the difference in a time of need.
-
- Nov 2020
-
github.com github.com
-
@monkeythedev can your work be used already? I would suggest not yet, i'm still doing core changes every day
-
-
mywiki.wooledge.org mywiki.wooledge.org
-
However, this construct is not completely equivalent to if ... fi in the general case.
The caveat/mistake here is if you treat it / think that it is equivalent to if a then b else c. That is not the case if b has any chance of failing.
-
- Oct 2020
-
stackoverflow.com stackoverflow.com
-
If you have a better/simpler/"more official" solution, I'd still love to see it!
The "official" solution is to use submitErrors (see Erik's answer).
-
-
-
If the react cargo cult didn't have the JSX cowpath paved for them and acclimated to describing their app interface with vanilla javascript, they'd cargo cult around that. It's really about the path of least resistance and familiarity.
-
-
dylanvann.com dylanvann.com
-
Disclaimer: I’m new to Svelte so this isn’t so much a recommendation as it is a “I guess this is a way to do it 🤷♂️”
-
-
-
If there was a place I thought reactivity would be weak, I embraced it and I worked on it until I was happy with the results.
-
- Sep 2020
-
codingwithspike.wordpress.com codingwithspike.wordpress.com
-
Even without the dedupe, you waste some drive space, but the code at least works and can resolve its dependencies!
-
- Aug 2020
-
english.stackexchange.com english.stackexchange.com
-
As a web designer, I hate that "log in" creates a visual space between the words. If you line up "Log In Register" - is that three links or two? This creates a Gestalt problem, meaning you have to really fiddle with spacing to get the word groupings right, without using pipe characters.
Sure, you can try to solve that problem by using a one-word alternative for any multi-word phrase, but that's not always possible: there isn't always a single word that can be used for every possible phrase you may have.
Adjusting the letter-spacing and margin between items in your list isn't that hard and would be better in the long run since it gives you a scalable, general solution.
"Log in" is the only correct way to spell the verb, and the only way to be consistent with 1000s of other phrasal verbs that are spelled with a space in them.
We don't need nor want an exception to the general rule just for "login" just because so many people have made that mistake.
-
- Jul 2020
-
stackoverflow.com stackoverflow.com
-
Ultimately though, I'd say the file structure that makes the most sense for your i18n workflow is the best one.
-
-
www.youtube.com www.youtube.com
-
Refrigerator Evaporator Fan Motor - How it Works & Installation TipsTroubleshooting a No Cool Refrigerator - Part 1
-
Refrigerator Evaporator Fan Motor - How it Works & Installation Tips
-
- May 2020
-
extensionworkshop.com extensionworkshop.com
-
Add-ons must function only as described, and should provide an appealing user experience. Based on the description of the add-on, a user must be able to understand and use the add-on’s features without requiring expert knowledge.
-
- Dec 2019
-
unix.stackexchange.com unix.stackexchange.com
-
Confusingly, all the distributions I use (Ubuntu, RHEL and Cygwin) had some type of check (testing $- or $PS1) to ensure the current shell is interactive. I don’t like cargo cult programming so I set about understanding the purpose of this code in my .bashrc.
-
-
unix.stackexchange.com unix.stackexchange.com
-
No, clumsily working around the root account in situations where it is absolutely appropriate to use it is not for good reasons. This is just another form of cargo cult programming - you don't really understand the concept behind sudo vs root, you just blindly apply the belief "root is bad, sudo is good" because you've read that somewhere.
-
-
en.wikipedia.org en.wikipedia.org
-
Cargo cult programming is a style of computer programming characterized by the ritual inclusion of code or program structures that serve no real purpose.
-
- Dec 2018
-
gutenberg.net.au gutenberg.net.auSanditon1
-
though it found me suffering under a more severe attack than usual of my old grievance, spasmodic bile, and hardly able to crawl from my bed to the sofa
Diana's seems to be a bit exaggerated in her account which reminds me of Mary's letters of her "illness" to Anne in Persuasion and hypochondriac Mr. Woodhouse in Emma.
Tags
Annotators
URL
-
- Jun 2018
-
ktakahata.github.io ktakahata.github.iopage 61
-
Sugar’d
-
-
ktakahata.github.io ktakahata.github.iopage vi1
-
That gentleman’s pamphlet
Colonel Martyn's An Essay upon Plantership
-
-
en.wikipedia.org en.wikipedia.org
-
best known for his The Night Before Christmas[1][2] for Narrator and Orchestra and his fifteen-minute miniature opera Hamlet
old
Tags
Annotators
URL
-
- Dec 2017
-
www.scienceintheclassroom.org www.scienceintheclassroom.org
-
(3)
Has the Earth's sixth mass extinction already arrived? A. D. Barnosky, N. Matzke, S. Tomiya, G. O. U. Wogan, B. Swartz, T. B. Quental, C. Marshall, J. L. McGuire, E. L. Lindsey, K. C. Maguire, B. Mersey, E. A. Ferrer
This article suggests that the current rate of species extinction is higher than what has been expected in the past (compared against fossil records). The authors propose that this elevated rate of extinction may possibly be the beginning of the 6th known mass extinction event on earth.
This extinction would drastically lower biodiversity by killing off many species that would otherwise function as carbon sinks. The release of such massive amounts of carbon might have dramatic effects upon the environment.
SC
-
(1).
Past and present of sediment and carbon biogeochemical cycling models By:Mackenzie, FT (Mackenzie, FT); Lerman, A (Lerman, A); Andersson, AJ (Andersson, AJ) This is a secondary study of the history of the carbon cycle, with particular respect to the onset of industrialization as well as the dynamic role the ocean plays in carbon storage. Prior to industrialization, the ocean was a net source of CO2 emissions due to the net carbon differences between photosynthesis and respiration. However, the massive CO2 releases from the burning of fossil fuels have made the ocean into a net carbon sink.
This citation is referring to the storage of carbon within calcium carbonate (CaCO3), or limescale within the ocean. This limescale comprises most of the 'rocks' in reference.
SC
-
- Oct 2017
-
srv01.shivering-isles.com:3348 srv01.shivering-isles.com:3348
-
HackMD is a realtime, multiplatform collaborative markdown note editor.
This is a test
-
- Sep 2017
-
supremecourtofindia.nic.in supremecourtofindia.nic.in
-
Anita Allen
Anita Allen
- spatial
- informational
- decisional
- reputational
- associational
-
Roger Clarke
Clarke's maslow pyramid classification
- bodily privacy
- spatial privacy
- privacy of communication
- privacy of personal data
-
Alan Westin
Westin's four states of privacy - solitude, intimacy, anonymity, reservation
-
dangers of privacy when it is used to cover up physical harm done to women by perpetrating their subjection.
Feminist critique of privacy
-
privacy should be protected only when access to information would reduce its value such as when a student is allowed access to a letter of recommendation for admission, rendering such a letter less reliable. According to Posner, privacy when manifested as control over information about oneself, is utilised to mislead or manipulate others
Economic critique of privacy - posner
-
Judith Jarvis Thomson,in an article published in 1975, noted that while there is little agreement on the content of privacy, ultimately privacy is a cluster of rights which overlap with property rights or the right to bodily security. In her view, the right to privacy is derivative in the sense that a privacy violation is better understood as violation of a more basic right
Reductionist critique of privacy - JJ Thomson used by respondents to support the argument that privacy itself is not a right, but privacy violations may lead to other violations.
-
rights which individuals while making a social compact to create a government, reserve to themselves, are natural rights because they originate in a condition of nature and survive the social compact
Patterson on natural rights surviving the social contract
-
The idea that individuals can have rights against the State that are prior to rights created by explicit legislation has been developed as part of a liberal theory of law propounded by Ronald Dworkin
Rights predating the recognition through explicit legislation (Dworkin)
-
Aristotle’s distinction between the public and private realms can be regarded as providing a basis for restricting governmental authority to activities falling within the public realm.
Aristotle's Public v private sphere. Role of government restricted to public sphere. Early conception of a sphere of rights (?) repelling state action
-
Mill posited that the tyranny of the majority could be reined by the recognition of civil rights such as the individual right to privacy, free speech, assembly and expression
Mill's conception of civil liberties to counter majoritarian actions
-
traced the recognition of an inviolable zone to an inalienable right to property. Property is construed in the broadest sense to include tangibles and intangibles and ultimately to control over one’s conscience itself
Madison's propertarian view of privacy
-
in reality not the principle of private property, but that of an inviolate personality
Warren & Brandeis - Early conception that privacy rests not in places, but in persons
-
- Aug 2017
-
www.edsurge.com www.edsurge.com
-
the problem of orphan works—those whose copyright status is murky—is yet to be solved.
There is a real sense that this orphan works problem will be whittled away...
-
- May 2017
-
edspace.american.edu edspace.american.edu
-
“Our Communities.” CPDC, Edgewater Terrace Apartments, www.cpdc.org/communities/edgewood-terrace-the-vantage-and-the-parke/. Accessed 19 Feb. 2017.
Links?
“Edgewood Commons I.” Cpdc.org, 2017, http://www.cpdc.org/communities/edgewood-terrace-the-vantage-and-the-parke/.
-
- Dec 2016
-
edspace.american.edu edspace.american.edu
-
WC page? Citing images?
-
- Nov 2016
-
edspace.american.edu edspace.american.edu
-
“Advisory Neighborhood Commission 5E.” N.p., n.d. Web. 18 Nov. 2016. Barnard, Anne. “Beirut, Also the Site of Deadly Attacks, Feels Forgotten.” The New York Times 15 Nov. 2015. NYTimes.com. Web. 16 Nov. 2016.
Double space this or try to do something to make more readable.
-
- Oct 2016
-
hypothes.is hypothes.is
- Jul 2016
-
www.hillaryclinton.com www.hillaryclinton.com
-
Effective Copyright Policy: Copyrights encourage creativity and incentivize innovators to invest knowledge, time, and money into the generation of myriad forms of content. However, the copyright system has languished for many decades, and is in need of administrative reform to maximize its benefits in the digital age. Hillary believes the federal government should modernize the copyright system by unlocking—and facilitating access to—orphan works that languished unutilized, benefiting neither their creators nor the public. She will also promote open-licensing arrangements for copyrighted material and data supported by federal grant funding, including in education, science, and other fields. She will seek to develop technological infrastructure to support digitization, search, and repositories of such content, to facilitate its discoverability and use. And she will encourage stakeholders to work together on creative solutions that remove barriers to the seamless and efficient licensing of content in the U.S. and abroad.
"Effective Copyright Policy" section of "Hillary Clinton’s Initiative on Technology & Innovation". Note, especially, the position on orphan works.
-
- Apr 2015
-
github.com github.com
-
hypothesis.js
hypothesis.js
is injected into the page by embed.js using either the browser's plugin API or (in the case of the bookmarklet) the DOM API. (embed.js
was in turn injected by the browser plugin or bookmarklet).hypothesis.js
is the "bootstrap" code that connects up and starts the various components of the Hypothesis app. -
app: jQuery('link[type="application/annotator+html"]').attr('href'),
Here we find the
<link rel="sidebar" ...
thatembed.js
injected into the page. We pass it into the constructor method of Annotator.Host below. -
window.annotator = new Klass(document.body, options);
Calling the Annotator.Host construct, passing an
options
object including our sidebar link. -
Annotator.noConflict().$.noConflict(true);
Having created our
Annotator
instance and added our custom plugins etc to it, we inject Annotator into the page.
-
-
github.com github.com
-
layout.app_inject_urls
app_inject_urls
is the list of scripts and stylesheets that we're going to inject into the page. This comes from layouts.py, which in turn gets it from assets.yaml.Most importantly these URLs to be injected include a minified version of hypothesis.js.
-
var baseUrl = document.createElement('link'); baseUrl.rel = 'sidebar'; baseUrl.href = '{{ app_uri or request.resource_url(context, 'app.html') }}'; baseUrl.type = 'application/annotator+html'; document.head.appendChild(baseUrl);
Finally, we inject a
<link rel="sidebar" type="application/annotator+html" href=".../app.html">
into the<head>
of the document. This is the HTML page for the contents of the sidebar/iframe. This link will be picked up by hypothesis.js later. -
if (resources.length) { var url = resources.shift(); var ext = url.split('?')[0].split('.').pop(); var fn = (ext === 'css' ? injectStylesheet : injectScript); fn(url, next); }
This loop is where we actually call
injectScript()
orinjectStylesheet()
on each of the resource URLs defined above. -
var injectScript = inject.script || function injectScript(src, fn) {
And we do the same thing for injecting scripts as we did for injecting stylesheets - we either use the function passed in by the browser plugin, or when called by the bookmarklet we fall back on the DOM API.
-
var injectStylesheet = inject.stylesheet || function injectStylesheet(href, fn) {
hypothesisInstall()
will use theinject.stylesheet()
function passed in to it to inject stylesheets into the page or, if no function was passed in, it'll fallback on the default function defined inline here.The default method just uses the DOM's
appendChild()
method, but this method may fail if the site we're trying to annotate uses the Content Security Policy.That's why when we're using one of the browser plugins rather than the bookmarklet, we pass in the browser API's method for injecting a stylesheet instead.
This is why the bookmarklet doesn't currently work on GitHub, for example, but the Chrome plugin does.
-
embed.js
embed.js
is responsible for "embedding" the different components of the Hypothesis frontend application into the page.First, either bookmarklet.js or one of the browser plugins injects a
<script>
tag toembed.js
into the page, thenembed.js
runs.This way the code in
embed.js
is shared across all bookmarklets and browser plugins, and the bookmarklets and plugins themselves have very little code.
-
-
github.com github.com
-
app.appendTo(@frame)
And we inject our
<iframe>
into ... the frame? (@frame
is a<div>
that wraps our<iframe>
, it's defined and injected into the page in guest.coffee). -
app = $('<iframe></iframe>') .attr('name', 'hyp_sidebar_frame') .attr('seamless', '') .attr('src', src)
Finally, this is where we create the
<iframe>
element that is the Hypothesis sidebar!
-
-
github.com github.com
-
embed = document.createElement('script'); embed.setAttribute('src', embedUrl); document.body.appendChild(embed);
Here we construct the actual
<script>
element, set itssrc
URL, and inject it into the page using the DOM's appendChild() method. -
var embedUrl = '{{request.resource_url(context, "embed.js")}}';
The whole job of the bookmarket is to inject a
<script src=".../embed.js">
element into the current page. Thesrc
URL of this script element points to embed.js, another Pyramid template rendered by the server-side Hypothesis app. -
bookmarklet.js
bookmarklet.js
is the Pyramid template (rendered by our server-side Pyramid app) for the Hypothesis bookmarklet. This little bit of JavaScript (after being rendered by Pyramid) is what the user actually drags to their bookmarks bar as a bookmarklet.
-
- Feb 2014
-
blogs.law.harvard.edu blogs.law.harvard.edu
-
Alexander v. Haley, 460 F.Supp. 40 (S.D.N.Y. 1978)
-
- Jan 2014
-
m.chronicle.com m.chronicle.com
-
The academic publisher Elsevier has contributed to many U.S. Congressional representatives, pushing the Elsevier-supported Research Works Act, which among other things would have forbidden any effort by any federal agency to ensure taxpayer access to work financed by the federal government without permission of the publisher.
What other legislation has Elsevier pushed?
-