765 Matching Annotations
  1. Sep 2024
    1. Lapolaridad

      Usan el valor compound que devuelve la función polarity_scores de la clase SentimentIntensityAnalyzer de la librería nltk: https://www.nltk.org/api/nltk.sentiment.vader.html#nltk.sentiment.vader.SentimentIntensityAnalyzer.polarity_scores

    2. sedesprendeenunodeellosunatendenciaasermoderadamentesubjetivo,yaqueincluyeinformaciónmeramentedescriptivaquepodemoscatalogarcomodemayorneutralidad.

      Pero si subjetividad y objetividad se derivan de polaridad, y ésta se refiere exclusivamente a el "sentiment strength", nada se puede decir sobre la descriptividad de la información incluida o la neutralidad de la fuente.

    3. fueimportanteelegiryevaluarlasherramientasconconjuntosdedatosdepruebaparaasegurarsueficacia.

      cuál sería esta evaluación?

    4. polaridad,objetividad,subjetividad.

      es una sola medida! las otras dos derivan trivialmente de la primera

    5. objetividad

      según el código fuente, es 1 - abs(polaridad)

    6. lasubjetividad

      según el código fuente, es 1 - objetividad

    7. 6publicaciones

      no eran 6 por medio?

    8. cuatromediosperiodísticos

      son cinco

    9. Véase

      Se muestran 6 artículos (dos de Página 12 y uno por cada uno de los otros 4 medios). Cuáles son los otros artículos?

    10. analyze_sentiment_nltk:tomauntextocomoentradaydevuelvelapolaridad,subjetividadyobjetividaddeltextoutilizandoelanalizadordesentimientosdeNLTK;
    11. lasaplicacionesnonecesitancomputadoraspropias,porlocualesunagranventaja.

      Hasta ahora se habló de Streamlit como de una librería. Pero ahora parece hablar de Streamlit como un servicio.

      De cualquier modo, por qué es una ventaja? A cambio de qué ofrece Streamlit este servicio?

    12. EsteartículoexploralaherramientaStreamlit,

      El uso de esta herramienta no parece relevante para el tema el artículo. Tratándose de un artículo en el que se mide polaridad, subjetividad y objetividad como aspectos del "sentimiento", habría que destacar las librerías que se usaron para tal fin, en todo caso (que no queda claro si fue TextBlob o NLTK).

    13. Streamlitparalacreacióndelainterfazdeusuario,NLTK4paraelanálisisdesentimientos,

      no dice que usaron textblob para análisis de sentimientos?

    14. suelenmutarpermanentemente,

      esto se puede resolver indicando la versión específica utilizada

    15. bibliotecaTextBlob3queofreceunainterfazsencillapararealizaranálisisdesentimientosentexto.

      biblioteca para Python

    16. Demodoquedesdesulanzamientoen2019,hacrecidorápidamenteyactualmentemuestramásde10millonesdevistasdeaplicacionesymásde20milestrellasdeGitHub.

      No es claro. De qué está hablando? Habla de Streamlit y de polaridad de sentimientos, pero no parece haber establecido un vínculo entre ambas.

      Qué son las "vistas de aplicaciones"?

  2. Aug 2024
    1. create a locale folder in your plugin root with subfolders for each locale,

      So which locales are supported?

    1. [signed-by=/usr/local/share/keyrings/josm-apt.gpg]

      In Linux Mint 22, I needed to add arch=amd64 between the square brackets as well. Otherwise I got error repository 'https://josm.openstreetmap.de/apt noble InRelease' doesn't support architecture 'i386'.

  3. Jul 2024
    1. Pero César –precisa el historiador riocuartense– había nacido en el pueblo de Calamocha, en España (en Aragón)

      No encuentro fuentes que confirmen esto. Por el contrario, solo encuentro que habría sido portugués.

    1. dropping the idea of co-creating one or more natural language generation solutions with the community, suggesting to select either an existing natural language generation system, or to adopt the one that one of the fellows initiated during the fellowship.
    1. comunidades de proyectos de Wikimedia

      Se refiere a comunidades de "Proyectos Wikimedia" como se define en el glosario (Wikipedia en español, Wikidata, etc).

    2. Se creará un documento similar a un Memorando de Entendimiento o Acuerdo de Nivel de Servicio entre la Fundación Wikimedia y el Consejo Global

      Es como si la Fundación Wikimedia se limitara a ofrece servicios de gestión a la comunidad Wikimedia, representada por el Consejo Global.

    3. una distribución equitativa de los recursos, como la establecida por el Consejo Global en consulta con las distintas organizaciones interesadas.

      No entiendo si se refiere a la distribución que establezca el Consejo Global, o los recursos que establezca el Consejo Global.

    4. reconocidas por la Junta Directiva de la Fundación Wikimedia.

      aconsejada por el Affiliations Committee (AffCom)?

    5. la aplicación y aplicación

      "la implementación y aplicación" o "implementando y haciendo cumplir"

    6. Equidad

      Equidad en el conocimiento según Wikipedia en inglés (Knowledge equity):

      Knowledge equity is a social science concept referring to social change concerning expanding what is valued as knowledge and how communities may have been excluded from this discourse

      No habría que definirlo en la carta del movimiento?

    1. As it stands, there are many small non-Western Wikipedias, and although they may not be as big or have as many citations as English Wikipedia, their perspective reflects the community that they serve.

      I don't want to be naive, but it may be good to remember here that local communities will still have the choice whether to introduce the Abstract Wikipedia content in their local language editions, or not. That is, nobody will force anyone to use Abstract Wikipedia content in some way or another.

      But I understand this thought may be naive.

    2. Proponents argue that this project will allow marginalized editors to make changes that will propagate throughout all Wikipedias, not just their language.

      So probably it will be the case that these marginalized editors will be able to share their view of the world in topics where these views are not challenged by other more powerful views. For example, topics relevant to this marginalized communities, and unknown to the other communities.

    1. The reloading (rebuilding) of the graph from the Wikidata dumps takes between 1 and 2 months, sometimes more.

      When does the graph need to be rebuilt from Wikidata dumps? When servers crash and content in RAM memory is lost?

    1. requests for linked data in Turtle format

      Are these and other linked-data format requests created live?

    2. type owl:DatatypeProperty (linking to data literals). Most of these properties are used to encode different uses of over 4400 Wikidata properties, which simplifies data processing and filtering

      different uses of Wikidata properties

      Do they mean the same property used in different contexts, such as in statement o reference auxiliary nodes?

    3. real-time linked data and weekly RDF dumps

      What is "real-time linked data"?

    4. two formats: a complete dump of all triples in Turtle, and a smaller dump of only the simplified triples for wdt: properties in N-Triples.

      Turtle and N-Triples are data formats for storing RDF data.

    1. Figure 7: Number of pages on Wikidata:

      What do the inflection points mean? * ~March 2013 * ~July 2017: Freebase migration? Freebase was closed in 2016... Or lexicographical data from early 2018? Points in x-axis represent January or July? * ~July 2019 * ~April 2020

    2. locations of movie narratives (above),

      Some points are actually multiple points at the same place that show when you click on them. For example, many movies are narratively located in Argentina, but many of them show as a point in the middle of the country.

      As a result, it may seem that not so many movies are narratively located in one place, but actually it is because the place has not been specified down to the locality or province.

      Ideally, these "many-points" points may be bigger the more points they represent.

    3. Twitter  [23])

      Nowhere in the cited paper does it say that Twitter uses Wikidata in any way. Instead it says that the researchers of the cited paper used Wikidata for their research purposes, about Twitter.

    4. >1.44 billion

      According to Wikipedia's article about Google's Knowledge Graph, by 2020 it had 500 billion facts (statements), that is roughly 350 times the number of statements (although without annotations/qualifiers, I assume), and 5 billion items, that is roughly 50 times the number of items.

      Of course the problems with the size of Wikidata is not only technical (e.g., SPARQL queries times) but also social: how can we maintain this amount of data?

    1. answered "roughly one-third" of the 100 billion monthly searches

      I wonder how Google's Knowledge Graph role may be changing in this era of generative AI's.

    1. this deletion within minutes did not at all rely on examining "evidence of Dr. Strickland’s professional endeavors" – rather, it was done based on the "Unambiguous copyright infringement" speedy deletion criterion,

      But this seems to fail to acknowledge that in the The Signpost's article linked to above it says that once it was rejected because of copyright infringement, but another it was because of insufficient sources.

  4. Jun 2024
    1. Users of our plugin said they still visited Wikipedia directly and reported that when they knew the information they were getting from ChatGPT was coming from Wikipedia, they tended to trust it more.

      Did they control for the fact that users of the plugin are probably commited users of Wikipedia already? That is, how representative of the general population of ChatGPT users is the sample used in this survey?

    1. python manage.py runserver

      By default this runs the lawlibrary site.

      To run another site (e.g., open_by_laws, change the os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lawlibrary.settings") line in manage.py.

    2. elasticsearch

      I only found in the dokku deployment documentation how to configure the search index:

      python manage.py search_index --create

    1. Currently, auto always selects hocr.

      In OCRMyPDF v15.4.4, this doesn't seem the case. When using the --pdf-renderer hocr option explicitly: * I get a .hocr file in the temporary files folder; * I avoid segmentation errors when reading the file with Mozilla's PDF.js; * When text is selected using a PDF reader, I can see the OCRed text (instead of blank characters).

    2. Some important files include:

      What about an hOCR file?

    3. Glyphless font

      Probably an invisible font for invisible text overlay. Is it possible to use a non-glyphless font, yet invisible (i.e., it would only show when highlighting the text)?

    1. PDFs have no concept of words and lines internally

      Therefore, is it up to the PDF reader to determine what is a "word", a "line", a blank space, etc?

  5. May 2024
    1. un estudio sobre "malos viajes" realizado en la Universidad Johns Hopkins han demostrado que el 84% de los participantes, cuando les entrevistaron 6 meses después de la experiencia, dijeron que se habían beneficiado del "mal viaje", aunque fuera una de las experiencias más difíciles de su vida.

      Jesse, R., & Griffiths, R. R. (2014). Psilocybin research at Johns Hopkins: A 2014 report. Seeking the sacred with psychoactive substances: Chemical paths to spirituality and to god, 2, 29-43.

    1. somoscopyleft“avant la lettre”,simplemente porque de no existir la práctica generalizada de la copiano autorizada y el compartir entre pares, la mayoría de nosotros no ac-cederíamos a los bienes culturales: no podríamos pagar la licencia delsoftware que usamos ni los libros que leemos ni la música que escucha-mos ni las películas que vemos.

      Pero esto ha empezado a cambiar con la introducción de plataformas como Netflix, Spotify, Steam, etc

    2. algunos autores viven delcopyright: al conocer quiénesy por qué obras, seguramente, dudará de si eso es lo que quiere para suvida

      Quiénes y por qué obras??

  6. Aug 2023
  7. Feb 2023
    1. For political leanings, the Facebook Audience API[supp 2] provides five levels: Very Conservative, Conservative, Moderate, Liberal, Very Liberal.

      How does Facebook estimate this leaning? What does Facebook say about it? Is it based on a US perspective?

  8. Jan 2023
    1. Cerro Pelado Lago Club

      Al día de hoy: Acampar: $4500 noche por vehiculo Pasar el día: 2000 por vehículo no hay alquiler kayak no hya bar

      pero se puede alquilar kayak o ir al bar de dos predios alrededor (sin pagar el día en ellos)

  9. Nov 2022
    1. medios de pago equivalentes

      El texto es de la resolución general 4444 de AFIP. Menciona "medios electrónicos autorizados".

      Acá una lista de medios de pago electrónicos según el BCRA: https://www.bcra.gob.ar/mediospago/politica_pagos.asp

  10. Oct 2022
  11. Sep 2022
    1. The problem

      In addition, JavaScript implementations jsonpath and jsonpath-plus do not implement script evaluation safely.

    1. An app access token

      It may also be used {app-id}|{app-secret} as stated in the app access token documentation.

    1. The easiest way to get permissions from app users is to implement Facebook Login.

      So it's not the only way?

    1. It should, at the very least, tag the tile as "done", and not expose it as a playable tile again.

      that would be if decision was "yes" or "no", I guess.

      Does the game provider know who is playing?

    2. key-value-pairs to pass to the Wikidata API

      parece ser bastante libre

    3. yes=1,

      cuando hay varias opciones "yes" (como en los juegos de juanman), cuál se elige con el shortcut?

    4. low=1

      at the root? { tiles: [...], low: 1 }??

    5. add it permanently,

      what does this involve? what are the steps

    6. callback parameter

      query parameter?

    1. INVALID_EXPRESSION_ERR If the expression is not legal according to the rules of the XPathEvaluator, an XPathException of type INVALID_EXPRESSION_ERR is raised.

      How could this error occur? Shouldn't the XPathExpression, whose evaluate method we are running, have been created via the XPathEvaluator's createExpression method? Shouldn't the error have been raised there instead?

      Is this related to the bug described here?

    1. Use the node.exe --preserve-symlinks switch in your launch configuration runtimeArgs attribute.

      Note that this won't work if the debugger is launched via npm: // .vscode/launch.json { "request": "launch", "runtimeExecutable": "npm" }

      This is because the --preserve-synlinks argument would be passed to npm instead of to node.

      In such cases, the env attribute may be used, setting NODE_PRESERVE_SYMLINKS to 1, but note that this won't work if node is not the first command in the npm script being run (e.g., do something && node).

  12. Aug 2022
    1. "outDir": "./dist/",

      Won't this be ignored because we are using webpack?

    1. instantiate a new instance of the plugin in the plugins property and make sure that we set hotOnly to true in devServer.

      Since webpack-dev-server v4, HMR is enabled by default. It automatically applies webpack.HotModuleReplacementPlugin which is required to enable HMR.

    2. The following line lets webpack know we’re working in development mode — This saves us from having to add a mode flag when we run the development server.

      But won't this set the development mode even when I'm building for production?

    1. losusuarios no realizan directamente una donación al proyecto y lo hacen a la entidadresponsable de su desarrollo, que puede aplicar esa aportación para Wikinoticias ocualquier otro de sus proyectos, sin que el usuario tenga control sobre ello.

      lo de que el usuario no tiene control es cuestionable, ya que puede participar de discusiones en torno a qué proyectos financiar, presentar proyectos, votar miembros del concejo, etc

    2. sin embargo, al permitir lapropia filosofía de la plataforma el anonimato en los usuarios, no siempre se encuentrainformación relevante en estos perfiles

      Creo que es relevante destacar aca que se pueden ver todas las ediciones que un usuario hizo en el sitio.

    3. la libertad de los usuarios para ejecutar, co-piar, distribuir, estudiar y mejorar el software informático (Stallman, 2004).

      No es esto el software libre en vez del codigo abierto?

    Annotators

    1. Supported types are:

      Some types missing from the documentation: * files (see https://wikidata-game.toolforge.org/distributed/#game=10) * url * html * map

    2. Example JSONP:

      Is there an additional options property defining game types?

      "options":[{"name":"Entry type","key":"type","values":{"dog":"Dog","bridge":"Bridge","tree":"Tree","hieroglyph":"Hieroglyph","musical instrument":"Musical instrument","mountain":"Mountain"}}]

    3. action=tiles&num=1&lang=en&callback=xyz

      there seems to be a "type" parameter specifying the game version requested

    1. Does not work on sites that enforce Content Security Policy (CSP),

      See this workaround using HeaderEditor extension.

    1. stories may also be subject to review from time to time in case changes about the topic come to be surfaced.

      But because may stories may be made from a single article, and users can change the text they "imported" from Wikipedia, it would be cumbersome for editors changing some text in the article to make sure whether they have to change it in a story.

      Couldn't the text become linked to the Wikipedia article somehow?

  13. Jul 2022
    1. export them directly from your store setup file such as app/store.ts and import them directly into other files.

      Where would I import them into? I guess I may need to import them into my slice files. But these export reducers which are imported into the store file, creating a dependency loop. Right?

      Edit: See below; they say it's a safe circular import.

    1. If the selector returns a different value than last time, useSelector will make sure our component re-renders with the new value.

      How is this difference calculated? If the value is an array, or an object, given that state is updated immutably, won't it always be different?

    2. in a real Redux app, we're not allowed to import the store into other files, especially in our React components, because it makes that code harder to test and reuse.

      I don't understand this, because we could still call react-redux's useDispatch to get the store's dispatcher, couldn't we?

    1. Concurrent React and Suspense are coming and raise a whole bunch of questions. Will current state management solutions work the same way as before?

      This has probably been solved in React-Redux v8

    1. you have to write whatever state handling logic you need on top of that, in order to define the value that gets passed into a context provider. Typically that's just done through React component state,

      See here

    1. for the entire component tree

      Wouldn't that be of the components that have subscribed to the Redux store?

    2. mapState or useSelector).

      Both functions of React Redux.

    3. "React-Redux only re-renders the components that actually need to render, so that makes it better than context".

      I guess this could be achieved using context as well as explained above.

    4. When a context provider has a new value, every nested component that consumes that context will be forced to re-render.

      In the example above, when <ParentComponent /> is rendered, wouldn't <ChildComponent /> be rendered as well, independently of whether contextValue has changed or not, given that it is a child of the <ParentComponent />?

      Edit: Yes. See below.

    5. single user-provided value

      Does it have to be "user-provided"? Can't it be fetched data?

    6. React requires that any hook state updates must pass in / return a new reference as the new state value,

      What does "require" mean here? Does this mean that if a hook state update passes in / returns the same reference as before it won't queue a re-render?

      Edit: see below.

    7. Class components don't have to worry about accidentally creating new callback function references as much, because they can have instance methods that are always the same reference.

      In function components, one can define functions outside the function component. However, I guess they wouldn't have access to the component's props and state.

    8. rendering <MemoizedChild><OtherComponent /></MemoizedChild> will also force the child to always render, because props.children is always a new reference.

      Is this also true if <OtherComponent /> is memoized as well?

    9. if we know ahead of time that a component's props and state haven't changed, we should also know that the render output would be the same,

      Why doesn't React automatically skip rendering in these cases, given that it does know the previous and new props and state of a component?

      Edit: Well, this is what PureComponent does, below.

    10. Finally, as far as I know, state updates in useEffect callbacks are queued up, and flushed at the end of the "Passive Effects" phase once all the useEffect callbacks have completed.

      Does this mean that all of state updates occurring on this phase are also batched into a single render?

    11. React will always run renders in commit-phase lifecycles synchronously.

      Does this mean they are immediately run after each state update?

    1. wrap it in a call to React.memo

      I was wondering whether this should be done in the module defining and exporting the component, or in the code consuming it.

      Given that React.memo could be thought of as a replacement of PureComponent for function components, I think it would be appropriate to have the module export the wrapped version of the component.

    2. If your React component’s render() function renders the same result given the same props and state, you can use React.PureComponent for a performance boost in some cases.

      Aren't React components meant to be deterministic? Should this always be the case?

    1. Even if an ancestor uses React.memo or shouldComponentUpdate, a rerender will still happen starting at the component itself using useContext.

      This makes sense here because if the context is set by an ancestor component based on its state, any child component consuming the context will update, not because of the context update, but because of the state update of the ancestor (which caused the context to be updated).

      See here for a more detailed explanation.

    1. function components render the interface whenever the props are changed.

      Do they? According to this, don't they re-render whenever their parent component is re-rendered (for instance, when their state is changed)?

    1. Pruning also allows employees to eliminate redundancy

      What would be a good strategy to suggest people to remove from one's followers to reduce compactness = redundancy?

    2. We can determine this level of diversity mathematically by using the com-pactnessratio, which measures the degree to which people in the network are connected to each other.

      UNICET's definition of compactness seems to be available here: http://www.analytictech.com/ucinet/help/2cqc8q.htm

      On the other hand, there is a definition of Gephi's "density" here: the number of links divided by the maximum number of links possible.

      Do these two measures match?

    3. positive relationship between the amount of diver-sity in one’s Twitter network and the quality of ideas submitted

      How is diversity measured?

    1. additional check lists to places

      Can a regular list be converted into an additional check list?

    2. These changes should show up on GBIF

      What would happen with the DOIs that were cited before? I assume these DOIs would refer to a set of observations as they existed at a certain time.

    3. hundreds
    4. By default, the iNaturalist only displays suggested taxa that are visually similar and have been seen nearby if visually similar taxa have been seen nearby. If no visually similar taxa have been seen nearby, it displays visually similar taxa regardless of where they have been observed.
    5. Related species are sometimes inserted into the suggestions based on being seen nearby.

      What are "related species"?

    6. controversial change

      Who gets notified of these changes? How does the community make sure that no vandalism occurs?

    7. By default, all photos uploaded to iNaturalist are released under a Creative Commons Attribution-Non-Commercial license.

      This default license is not compatible with Wikimedia Commons. See this thread here: https://forum.inaturalist.org/t/a-case-for-changing-the-default-license-to-not-include-a-nc-clause/18690/119

    8. Maps and geocoding services come from Google Maps, except in the iPhone app where they are from Apple Maps.

      Why don't they use OpenStreet Maps?

      See this post by one of the creators: https://forum.inaturalist.org/t/use-openstreetmap-maps/2588/33

    1. hopefully we aren’t just replacing one set of mis-identifications with another.

      And captive observation misidentification shouldn't be such a big concern.

    1. we are continuing to work on new approaches to improve suggestions by combining visual similarity and geographic nearness.

      So this is not something they do yet

    1. y el taxón de observación.

      En este caso el taxón de observación retrocede.

    1. species checklists
    2. configuring DNS as requested by iNaturalist,

      So I assume the local affiliate doesn't have any responsibilities regarding site maintenance.

    1. it records what species aren’t present just as well as the ones that are

      Contested below

    2. No requirement for photos

      iNaturalist does not require photos either (for "Casual" observations).

  14. Jun 2022
    1. the alternative box model,

      The size defined by the width and height properties already include the padding and the border.

    2. inline-size and block-size

      Correspond to width and height, respectively, depending on the writing direction.

    3. inline-flex

      inline as outer display type, and flex as inner display type

    1. closed discussions

      How to close a discussion?

    2. viewing the history of a single section

      I guess this would be something that the main space would benefit from as well (i.e., not only talk pages).

    1. a la altura deThe Oliver Ranch

      Dónde es esto? Coordenadas? No encuentro nada en Google.

    2. y sus caños que vierten al arroyo

      ¿Qué quiere decir que los caños de la sala de bombeo "vierten al arroyo"? Entiendo que esta sala de bombeo impulsa las aguas negras hacia la planta de tratamiento. Entiendo que el derrame de 2017 se debió a un rebalse de la cisterna, producto de la insuficiencia de la bomba, y no porque ésta vierta naturalmente hacia el arroyo.

    3. La misión del municipio turístico sustentable es integral, siendo funciones del mismo desde planificar la ocupación de su suelo, tratar los residuos, comprometerse con el uso respetuoso del

      Entiendo que la "misión del municipio turístico sustentable" sería un concepto general, y no necesariamente un compromiso adoptado por la localidad de Villa General Belgrano. Creo que no se entiende perfectamente.

  15. May 2022
    1. how many composers want to allow their compositions to be completely re-written by strangers.)

      This would just be like Wikisource, I assume.

    2. third-party notation software

      We may develop a MediaWiki extension

    3. a lyrics page in the form of title=Song_(lyrics) and a music page (notes, guitar tabs, etc) in the form of Song_(music).

      These two could very well be hosted in WikiSource and Commons, respectively.

    1. throw exceptions when these expressions are attempted.

      According to this, this option disables filtering!

    1. 300 or more contributions to a Wikimedia project

      Can it be to more than one project?

    1. I wondered if suspended users were talking about topics that differed than the rest of the population.

      To remember, as he said before, that this does not necessarily mean that these tweets were the one that caused account suspension.

    1. si una edición intercambia dos párrafos (con o sin modificaciones en los párrafos), el visual diff identificará que esto es lo que ocurrió, mientras que un diff de wikitexto hace parecer que se eliminó un párrafo y se agregó un párrafo completamente nuevo.

      O sea que no sólo es una versión visual del diff, sino un diff más avanzado? O acaso es imposible representar este cambio en el diff textual (aunque sea identificado)?

  16. Apr 2022
    1. I've started adding different versions of the Social Security Act 2018 as sub-pages, i.e. Version 56, and Social Security Act 2018/Version 59

      These subpages have been deleted and uploaded as separate pages.

    1. 'p-cactions', '#', 'Wikify', 'ca-wikify', 'Mark for wikification'

      portletId, href, text[, id, tooltip, accesskey, nextnode]

    1. Multiple configs shared in a cluster

      Apparently, this is to make this data available from other wikis, not to let these other wikis create data by themselves. See my question here: https://www.mediawiki.org/wiki/Topic:Wthdmemt2rhkfxpo

    2. built-in module ID JsonConfig will be used.

      I'm getting a The content model 'JsonConfig' is not registered on this wiki. if I set model to null.

    3. namespace

      It also creates the namespace (I assume if it doesn't exist). These are the namespaces "reserved" by the JsonConfig extension: https://www.mediawiki.org/wiki/Extension_default_namespaces#JsonConfig

  17. Mar 2022
    1. it has the same usage as the class.

      but presumably it wouldn't have static (class) methods

    1. Some countries have changed their laws to affirm that researchers on non-commercial projects don’t need a copyright-holder’s permission to mine whatever they can legally access.

      right to mine

    1. make it clear what tasks they will be responsible for, give an estimate of how much time they will need to complete those tasks and any deadlines or dates where they will need to be in a particular place.

      one can do this with phabricator

  18. Feb 2022
    1. const wrap = fn => (...args) => fn(...args).catch(args[2])

      In Typescript:

      // A wrapper function. // It takes fn as parameter, with fn an async version of a RequestHandler: // it takes the same parameters (...args: Parameters<RequestHandler>), // but returns a promise (Promise<ReturnType<RequestHandler>>). // It returns a wrapped function (wrappedFn) // that takes the same parameters as a RequestHandler (req, res. next)// // and returns a promise (Promise<ReturnType<RequestHandler>>) // with its reject value sent to the "next" function // see https://expressjs.com/en/advanced/best-practice-performance.html#use-promises function wrap( fn: (...args: Parameters<RequestHandler>) => Promise<ReturnType<RequestHandler>> ) { const wrappedFn = function( ...args: Parameters<RequestHandler> ): Promise<ReturnType<RequestHandler>> { const [req, res, next] = args; return fn(req, res, next).catch(next); } return wrappedFn; }

    2. .catch(next)

      Passing errors returned from asynchronous functions to the next() function of the application’s request-response cycle: https://expressjs.com/en/guide/error-handling.html#catching-errors

    1. restart

      kills the pod and creates a new one

    2. Start the web service

      This creates a new pod, and a new container inside it named webservice

    1. will restart them.

      Is this because the restartPolicy option?

    2. Continuous jobs are programs that are never meant to end.

      I guess this is what webservice uses

    1. you don’t know beforehand the exact types and dependencies of the objects your code should work with.

      in the example, the objects are the buttons

    1. 'babel-jest',

      But: "Because TypeScript support in Babel is purely transpilation, Jest will not type-check your tests as they are run.

      https://jestjs.io/docs/getting-started

    1. before each test require('fs').__setMockFiles(MOCK_FILE_INFO);

      Why does it have to be before each test?

    2. automock is set to true

      means that all modules are always mocked

    1. create a manual mock that extends the automatic mock's behavior.

      So, in the manual mock, we use createMockFromModule to create an automatic mock, and then extend it before exporting it.

    1. .mockReturnValue('default') .mockImplementation(scalar => 42 + scalar)

      What will be returned in this case? 'default'? or 42+scalar?

    2. (err, val) => console.log(val)

      this is the function that is passed as cb argument. myMockFn returns the call to this function with null and true arguments: return cb(null, true)

    3. myMockFn

      It gets a function as argument and returns a call to that function with arguments null and true

    4. x => 42 + x

      an implementation. otherwise, it returns undefined

    5. cb => cb(null, true)

      an implementation

      If no implementation is given, the mock function will return undefined when invoked.

    6. All mock functions have this special .mock property, which is where data about how the function has been called and what the function returned is kept.

      These are all properties and methods of mock functions: https://jestjs.io/docs/mock-function-api

    7. axios.get

      It is a mock function now, just like those created with jest.fn().

    1. ES6 classes are constructor functions with some syntactic sugar. Therefore, any mock for an ES6 class must be a function or an actual ES6 class (which is, again, another function).

      Constructor functions are those meant to be called with the new operator. They set a this object at the beginning, run through the function's code, and return this at the end: https://javascript.info/constructor-new

      This is how classes worked in ES5: https://www.freecodecamp.org/news/learn-es6-the-dope-way-part-v-classes-browser-compatibility-transpiling-es6-code-47f62267661/

    2. spy on calls to the class constructor and all of its methods

      In terms of this article, this would be a mock (as opposed to as stub), useful for emulating and examining outgoing interactions: https://enterprisecraftsmanship.com/posts/when-to-mock/

    1. Try creating a simple test implementation of the interface instead of mocking it in each test, and use this test class in all your tests.

      Manual mocks in Jest?

    1. Common questions#

      It may be worth highlighting that if "module" = "commonjs" in tsconfig.json, imports such as import { something } from "module" will be transpiled to const module_1 = require("module"). As a result, something will not be available in the debug console, but module_1.something instead.

      One may change tsconfig.json to include "module" = "es6" and "moduleResolution" = "node", and package.json to include "type" = "module", but in this case imports must include the file extension.

    1. reducing redundancy and typos

      If I want to specify GET, POST, PUT, etc for a path, this way I have to write the path just once

    1. an optional options object,

      Some properties are missing in the docs: * allowAnyNamespaceForNoPrefix * isHtml

  19. Jan 2022
    1. Additional locales can be added either by adding them in a custom build or by simply including the locale definition files after Sugar is loaded (in npm, these are in the locales directory).

      use import 'sugar/locales' or import 'sugar/locales/es', for example

    1. if you wanted to treat different item types differently using the same citation template.

      Because they would use the same TemplaData

    1. returns a citation object even if no data is able to be retrieved.

      When would this happen?

    2. request the basefield instead

      How? Using mediawiki-basefields?

    1. we may find interesting uses for multiple templates in a single tool

      Which?

    2. When using the Kubernetes backend, PORT will always be 8000.

      This must be because, as said above, "Web servers running on Kubernetes have a second Nginx proxy server running as the "Ingress" component inside the Kubernetes cluster"