text:
Q: How do I build up a stealth-mage early in Skyrim? I have just started out out playing a a High Elf stealth-mage in Skyrim and am wondering how to build up my character. I will definitely need Stealth and Illusion so I should should start sneaking everywhere and casting Fury and Muffle, I guess. My offensive options magic-wise are either Conjuration or Destruction. I also dislike followers since they get in the way and prevent me using my spells. My goal is to get Quiet Casting perk so I can attack enemies without being heard by sneaking around them. The problem is that perk comes only at 50 Illusion. Since I will need Illusion no matter which offensive magic path I take I am wondering which one I should take to stay alive early on.
Destruction has good attacks especially with dual casting but with Conjuration I can have someone else do my fighting for me or build up one-handed or archery by conjuring swords and bows. Also, does Calm or Pacify work on Dragons early on? I'm thinking I could run away instead of fighting them early. I currently have a level 8 character at 29 Destruction but pretty weak on other skills. I can kill bandits with one blast using Lightning dual cast but magic NPCs are a lot tougher. I get killed easy. I'm thinking of branching into other schools of magic. So whats the recommendation for an early on character trying to play this path? Which type/guild quests should I take? I realize Winterhold is a must but may come across many magic NPCs in that, don't know. Maybe I should focus on side/misc quests first? I guess my main questions are how I should play early on and which guild quests to focus on at this stage?

A: You just spam Muffle whenever you can. Reaching 50 points in illusion is not too difficult thanks to that, so you should have that perk pretty fast.
Using destruction or conjuration is another, very difficult to answer question. Personally, i got a few mods which add more creatures to summon like draugr, animal spirits, later powerful dremoras or undead dragons and so on. That makes conjuration much more effective and fun, especially since the creatures you can summon early without mods are only familiars and fire atronachs, which are both not really strong.
If you play without mods, you're better off with destruction. Once you got the adept spells like icestorm or fireball, you can take out enemies in no time.
You should also try to run through the Dawnguard DLC as fast as possible until you get the royal vampirearmor which grants 125% magickaregeneration, if I'm not wrong, you find it once you try to get into the soul cairn, in the room before with the 4 gargoyles and the secret door which leads into the hidden laboratory. You can also run through the entire Winterhold Academy quest where you get arch mages robes and krosis which will increase your magicka regeneration by ~200%, but i think they look ugly, so i don't use them.
If you got no problems with mods, i can only recommend the mod Balanced Magic which balances the magickacost early on. Playing a mage in skyrim is hard, especially early since your manapool is so low.
Hope this helps. If you got any more questions, just let me know.

A: If you wear robes Alteration is pretty much a must, since it has spells that give you much needer armor (and perks that empower those spells if you wear NO armor at all).
Since you talk about mods there is one that fits the archetype you're thinking about, it allows spells to deal Sneak damage ; it changes the Sneak perks tree, if I remember correctly. I tried and remember it conflicting a bit with other spell mods, but that doesn't seem to be an issue for you :)
Witches are actually fairly strong, I've always done the hargraven quest much later in the game.
In vanilla Conjured Weapons are really strong, so a perfectly viable path is "being a sneak Guy who uses conjured weapons", HOWEVER sneak often won't work well on bosses; against them Destruction works better.
You should hoard soul gems to level enchanting later: that skill will allow you to drastically reduce the magicka costs of a couple of magic schools, or provide other bonuses as needed, and the max level perk is far too strong to skip it :)
As far as guilds go Winterhold and the Thieves Guild are your obvious choice. The Dark Brotherhood give other VERY STRONG sneak items, so look into them if you're fine being EEEEVIIIILLL :)
To address potions: YES, they are extremely useful, use them whenever and make them, they do have 2 weaknesses though:

*

*Weight

*Alchemy is SLOW

Both the potions and the ingredients weigh a LOT. Really, I found myself with a 700-carrying character bringing around something like 400-worth of ingredients ( modded game of course ;) ).
You do have options to address this problem, there are a couple really nifty Reweight mods which can make all potions and ingredients lighter or weightless ( I used to make potions weigh 0.1 and reduce ingredients weight by 50%, up to personal choice of course).
Alchemy is really a pain to level, so viable, yes, but also quite time-consuming IMHO.
Again, there might be mods that make it faster, can't tell for sure as I've never looked for one.
This would allow you to beat the game, BUT if instead you use both Potions AND Alteration you'll get the best results :)


text:
Q: checking for equality on dispatch_queue_t How can I check for equality between dispatch_queue_t vars?
dispatch_queue_t currentQueue = dispatch_get_current_queue();
dispatch_queue_t mainQueue = dispatch_get_main_queue();
if (currentQueue == mainQueue) {

}

from the docs:
typedef struct dispatch_queue_s *dispatch_queue_t;

I'm not sure but does this mean that it's a pointer to a dispatch_queue_s struct?
Since I can't check equality on pointers, I'm not sure how can I check if a dispatch_queue_t is the same as another?

A: Since dispatch_get_current_queue() is deprecated, we could compare current and your queues by their labels (or specifics as @jkh suggested)
For label use
dispatch_queue_get_label(dispatch_queue_t queue);

and pass DISPATCH_CURRENT_QUEUE_LABEL for get label of current queue
For specific:
dispatch_queue_get_specific(dispatch_queue_t queue, const void *key);

for get you queue specific and
dispatch_get_specific(const void *key);

for current
It's require to set one or both of label and specific for your queue.
For example when you create it
dispatch_queue_create(const char *label, dispatch_queue_attr_t attr);

or using setters for specific
dispatch_queue_set_specific(dispatch_queue_t queue, const void *key,
    void *context, dispatch_function_t destructor);

A: This depends on the queue you're on. In this particular case use:
if ([NSThread isMainThread]) {}

In general, you can use dispatch_get_current_queue() to test which queue your're on. In that case you can use the == operator to do so. To quote the Dispatch Queues page in Apple's Concurrency Programming Guide:

Use the dispatch_get_current_queue function for debugging purposes or
  to test the identity of the current queue. Calling this function from
  inside a block object returns the queue to which the block was
  submitted (and on which it is now presumably running). Calling this
  function from outside of a block returns the default concurrent queue
  for your application.

A: First part of answer:  What are you trying to do?  Why do you need to compare queues?  If all you need to do is "tag" a queue with some specific piece of metadata, consider using dispatch_queue_{set, get}_specific() instead.
Second part of answer:  Don't use dispatch_get_current_queue() for, well, anything.  It's just for debugging purposes and its use has always been discouraged.

redpajama_set_name: RedPajamaStackExchange


text:
Q: tcolorbox not loading I'm actually not sure if it's a loading or compiling issue.  The package tcolorbox itself seems to load, together with its inclusions pgf, verbatim, etoolbox, and environ.
\documentclass{article}

\usepackage{tcolorbox}

\begin{document}

Hello World!

\end{document}

However, this package call results in 39 errors, the first two of which are:
pdflatex> ! Undefined control sequence.
pdflatex> 1.137 \ExplSyntaxOn
pdflatex> ! Undefined control sequence.
pdflatex> 1.141 \ExplSyntaxOff

There's also:
pdflatex> ! Undefined control sequence.
pdflatex> 1.2161 \NewDocumentCommand
pdflatex> {\tcblistof}{ O{\section} m o m }

and later:
pdflatex> ! LaTeX Error:  Missing \begin{document}.

Any insight would be appreciated.


text:
Q: Restart rails app automatically after a crash I have a Rails 4 app hosted on heroku ( cedar stack ), which crashes sometimes.
Is it possible to automatically restart the server whenever this happen?
Usually I do it manually with heroku restart but... hey I'm not in front of a console 24/7!


text:
Q: Automated tests in RPA I'm not very familiar with a concept of testing in programming languages although I know the basic idea and some of the principles to test your code like unit tests and stuff. I haven't written any tests myself yet but the general idea is more or less clear. But when it comes to Robotic Process Automation I get stuck with how I should properly test my workflows.
If I have modules which don't interact with any interface then I can clearly create a test environment, that is a function and this function will pass some arguments and get the result which will be compared to the expected one.
But what are best practices to test the parts of a workflow which interact with interface and contain clicks, type into and all those things?
If anyone has any experience of creating automated tests in RPA, for instance, in UiPath, I would be grateful to see it explained. Any ideas, irrespectively to the proper experience lack or presence, would be highly appreciated anyway.
By the way if anyone worked in UiPath he could notice that they developed the so called ReFramework which follows best practices in RPA deployment according to their words. In this Framework they got a test folder and some test modules but I don't get how they work and how I should adjust them in order to match a program developed by myself.

A: Thanks for the question.
I am a RPA developer, and also tested the workflows but don't as a "Tester" perspective.
If you look there are many things to test.
case#1
As you said you are dealing with web portal, you might use click activity. There is one property called selector which is auto generated. Selector identify the UI element. There are many attribute in selector that may be static.This is wrong practice
lets take example
Submit
in this idx and uipath_custom_id attribute are a static, this might change accordingly but the name Submit and class never change, So as a tester you can find this type of mistakes by the Developer...
Keep in mind that never give static values or numbers to any attribute in the selectors...Instead of that use
(* and ?)
https://studio.uipath.com/v2017.1/docs/selectors-with-wildcards
It also happen that there are two buttons in web page having same name, same class so the selector which is generated is also some what same except ID so you need to take care of this also as considering ID always changes.
Always keep your workflow small, use proper activity and keep business logic in separate sequence activity Such things you can test. Also you can test the Optimization of the flow.
If you are dealing with other application like Excel or SAP check that you can close it after your work done.
Such things you can test
Thanks
It will be better if you tell the scenario so that community can help you tell about the test cases...:)


text:
Q: What Open Source Software has Quality ASP.NET MVC C# code I am looking to read other peoples software to learn how to produce quality, speedy, reusable code. If the code has JQuery in it that would be great because I am learning JQuery as well. Thanks

A: Maybe you can take a look at SharpArquitecture for a complete arquitecture reference With ASP.Net MVC and NHibernate, include an example project.
http://wiki.sharparchitecture.net/:

Focused on Domain Driven Design,
  Loosely coupled, Preconfigured
  Infrastructure, Open
  Ended Presentation.

Another Complete Reference is the BeerHouse CMS from ASP.NET MVC 1.0 Website Programming: Problem - Design - Solution book:
http://thebeerhouse.codeplex.com/

Concept of Model View
  Controller,Creating RESTful
  URLs,Leveraging jQuery to make a lean
  and scalable website that incorporates
  AJAX, Using Membership & Profile
  modules in the MVC Framework,
  Incorporating LINQ to SQL to generate
  your data access layer , Use of inline
  C# code inside of your markup

A: I have found NerdDinner to be a good place to start.
This site has several examples.

A: sutekishop which you can download at http://code.google.com/p/sutekishop/ is a very good example to learn asp.net MVC. I am going through the source code and found a lot to learn. I agree NerdDinner is a little bit basic thought it's a good starting example.

A: The Storefront tutorial is a more mature application than NerdDinner. I'd suggest looking into that.


text:
Q: citeproc-lua for individual CSL style? Need help on setup my university has its own (I know stupid) ciation style, for which they provide a csl file to be used with zotero.
Does anyone have similar regulations to follow at their university and maybe could provide some help or work-around?
I came across: https://github.com/zepinglee/citeproc-lua but am not too experienced with LaTex, just enjoy learning it bit by bit.
This is my uni's csl file https://www.zotero.org/styles/universitatsmedizin-gottingen
Help would be highly appreciated!!
EDIT3 (for the solution below with removed duplicates): Produces the following error.

/Library/TeX/texbin/lualatex -file-line-error -interaction=nonstopmode -synctex=1 these.tex

This is LuaHBTeX, Version 1.15.0 (TeX Live 2022) restricted system commands enabled. (./these.tex LaTeX2e <2021-11-15> patch level 1 L3 programming layer <2022-02-24> (./MastersDoctoralThesis.cls Document Class: MastersDoctoralThesis (/usr/local/texlive/2022/texmf-dist/tex/latex/etoolbox/etoolbox.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/l3packages/xparse/xparse.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/l3kernel/expl3.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-luatex.def))) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/book.cls Document Class: book 2021/10/04 v1.4n Standard LaTeX document class (/usr/local/texlive/2022/texmf-dist/tex/latex/base/bk11.clo)) (/usr/local/texlive/2022/texmf-dist/tex/generic/babel/babel.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/babel/luababel.def) (/usr/local/texlive/2022/texmf-dist/tex/generic/babel/luababel.def) (/usr/local/texlive/2022/texmf-dist/tex/generic/babel-english/american.ldf (/usr/local/texlive/2022/texmf-dist/tex/generic/babel-english/english.ldf))) (/usr/local/texlive/2022/texmf-dist/tex/latex/koma-script/scrbase.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/koma-script/scrlfile.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/koma-script/scrlfile-hook.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/koma-script/scrlogo.sty))) (/usr/local/texlive/2022/texmf-dist/tex/latex/graphics/keyval.sty)) (/usr/local/texlive/2022/texmf-dist/tex/latex/koma-script/scrhack.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/koma-script/scrkbase.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/xpatch/xpatch.sty)) (/usr/local/texlive/2022/texmf-dist/tex/latex/setspace/setspace.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/koma-script/setspace.hak) (/usr/local/texlive/2022/texmf-dist/tex/latex/tools/longtable.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/siunitx/siunitx.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/translations/translations.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/infwarerr/infwarerr.sty) (/usr/local/texlive/2022/texmf-dist/tex/generic/iftex/iftex.sty) (/usr/local/texlive/2022/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty))) (/usr/local/texlive/2022/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/local/texlive/2022/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/tools/array.sty)) (/usr/local/texlive/2022/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/graphics/graphics.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/graphics/trig.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/local/texlive/2022/texmf-dist/tex/latex/graphics-def/luatex.def))) (/usr/local/texlive/2022/texmf-dist/tex/latex/booktabs/booktabs.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/caption/caption.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/caption/caption3.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/caption/ltcaption.sty)) (/usr/local/texlive/2022/texmf-dist/tex/latex/xcolor/xcolor.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/graphics-cfg/color.cfg) (/usr/local/texlive/2022/texmf-dist/tex/latex/xcolor/x11nam.def)) (/usr/local/texlive/2022/texmf-dist/tex/latex/geometry/geometry.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/iftex/ifvtex.sty)) (/usr/local/texlive/2022/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/koma-script/scrlayer.sty)) 1: chapter 1: chapter 1: section ) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/inputenc.sty

Package inputenc Warning: inputenc package ignored with utf8 based engines.

) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/fontenc.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/lm/t1lmr.fd)) (/usr/local/texlive/2022/texmf-dist/tex/latex/framed/framed.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/csquotes/csquotes.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/csquotes/csquotes.def) (/usr/local/texlive/2022/texmf-dist/tex/latex/csquotes/csquotes.cfg)) (/usr/local/texlive/2022/texmf-dist/tex/latex/hyperref/hyperref.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty) (/usr/local/texlive/2022/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty) (/usr/local/texlive/2022/texmf-dist/tex/generic/pdfescape/pdfescape.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/hycolor/hycolor.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/auxhook/auxhook.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/kvoptions/kvoptions.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/hyperref/pd1enc.def) (/usr/local/texlive/2022/texmf-dist/tex/generic/intcalc/intcalc.sty) (/usr/local/texlive/2022/texmf-dist/tex/generic/etexcmds/etexcmds.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/hyperref/puenc.def) (/usr/local/texlive/2022/texmf-dist/tex/latex/url/url.sty) (/usr/local/texlive/2022/texmf-dist/tex/generic/bitset/bitset.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty)) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/atbegshi-ltx.sty)) (/usr/local/texlive/2022/texmf-dist/tex/latex/hyperref/hluatex.def (/usr/local/texlive/2022/texmf-dist/tex/generic/stringenc/stringenc.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/atveryend-ltx.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty))) (/usr/local/texlive/2022/texmf-dist/tex/generic/nth/nth.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/float/float.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/koma-script/float.hak (/usr/local/texlive/2022/texmf-dist/tex/latex/koma-script/tocbasic.sty)) (/usr/local/texlive/2022/texmf-dist/tex/latex/minipage-marginpar/minipage-marginpar.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/tools/multicol.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/tools/enumerate.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/arydshln/arydshln.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/pdflscape/pdflscape.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/graphics/lscape.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/koma-script/lscape.hak)) (/usr/local/texlive/2022/texmf-dist/tex/latex/tools/afterpage.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/textcomp.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/wrapfig/wrapfig.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex) (/usr/local/texlive/2022/texmf-dist/tex/latex/pgfplots/pgfplots.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex) (/usr/local/texlive/2022/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/pgf.revision.tex))) (/usr/local/texlive/2022/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-luatex.def (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def))) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics.code.tex))) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfint.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex))) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty)) (/usr/local/texlive/2022/texmf-dist/tex/latex/pgf/utilities/pgffor.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/latex/pgf/math/pgfmath.sty (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex))) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex))) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/libs/pgfplotslibrary.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/libraries/pgflibraryfpu.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/libraries/luamath/pgflibraryluamath.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsliststructureext.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsarray.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsmatrix.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstableshared.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/liststructure/pgfplotsdeque.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.data.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.verb.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/libs/pgflibrarypgfplots.surfshading.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def))) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/util/pgfplotscolormap.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/util/pgfplotscolor.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplotsstackedplots.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplotimage.code.tex))) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplots.errorbars.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplots.markers.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/pgfplots.paths.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathmorphing.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathmorphing.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathreplacing.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.contourlua.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotmarks.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex))) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.coltype.code.tex))) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex) (/usr/local/texlive/2022/texmf-dist/tex/latex/caption/subcaption.sty) (/usr/local/texlive/2022/texmf-dist/tex/latex/placeins/placeins.sty) (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/libs/pgflibrarypgfplots.colorbrewer.code.tex (/usr/local/texlive/2022/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarycolorbrewer.code.tex)) (/usr/local/texlive/2022/texmf-dist/tex/latex/citation-style-language/citation-style-language.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/filehook/filehook.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/filehook/filehook-2020.sty)))

./these.tex:205: LaTeX Error: Command \bibfont undefined.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...

l.205 \renewcommand*{\bibfont} {\scriptsize} (./these.aux (./Chapters/Chapter1.aux)) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/ts1cmr.fd) (/usr/local/texlive/2022/texmf-dist/tex/latex/translations/translations-basic-dictionary-english.trsl) (/usr/local/texlive/2022/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/usr/local/texlive/2022/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) geometry driver: auto-detecting geometry detected driver: luatex (/usr/local/texlive/2022/texmf-dist/tex/latex/hyperref/nameref.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/refcount/refcount.sty) (/usr/local/texlive/2022/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty)) (./these.out) (./these.out) Package pgfplots notification 'compat/show suggested version=true': you might benefit from \pgfplotsset{compat=1.18} (current compat level: 1.7).

Package hyperref Warning: Token not allowed in a PDF string (Unicode): (hyperref) removing `math shift' on input line 221.

Package hyperref Warning: Token not allowed in a PDF string (Unicode): (hyperref) removing `\alpha' on input line 221.

Package hyperref Warning: Token not allowed in a PDF string (Unicode): (hyperref) removing `math shift' on input line 221.

Package hyperref Warning: Token not allowed in a PDF string (Unicode): (hyperref) removing `math shift' on input line 221.

Package hyperref Warning: Token not allowed in a PDF string (Unicode): (hyperref) removing `\beta' on input line 221.

Package hyperref Warning: Token not allowed in a PDF string (Unicode): (hyperref) removing `math shift' on input line 221.

1: section [1{/usr/local/texlive/2022/texmf-var/fonts/map/pdftex/updmap/pdftex.map}<./Figures//Logo.png>] [2]

Declaration of Authorship

Underfull \hbox (badness 10000) in paragraph at lines 283--284

1: section [3] [4]

Abstract

1: section [5] [6]

Acknowledgements

1: section [7] [8] (./these.toc) 1: section [9] [10] (./these.lof) 1: section [11] [12] (./these.lot) 1: section [13] [14] 1: section [15] [16]

Dedicatory

1: section [17] [18] 1: section (./Chapters/Chapter1.tex Chapter 1. 1: section [1]

LaTeX Warning: h' float specifier changed to ht'.

./Chapters/Chapter1.tex:51: Undefined control sequence. ...0; Emamzadeh 2016; Lautenschl{\textbackslasha }ger et al. 2018) l.51 ...h2016alpha,bartels2010n,lautenschlager2018c} . Importantly, the C-termi... ./Chapters/Chapter1.tex:53: Undefined control sequence. l.53 ...settings \cite{svensson2015vagotomy}. \cites {kordower2008lewy} investi... ./Chapters/Chapter1.tex:53: Undefined control sequence. l.53 ...om host tissue to the graft. Further, \cites {luk2012intracerebral} sho... ./Chapters/Chapter1.tex:53: Undefined control sequence. l.53 ...s came to full circle when a study by \cites {kim2019transneuronal} rev... ./Chapters/Chapter1.tex:72: Undefined control sequence. l.72 ...tasis and vesicular cycling. In fact, \cites {giguere2019increased} ind... [2] [3<./Figures/Aetiology.png>] [4 Missing character: There is no ' (U+2019) in font ec-lmr10! <./Figures/synucleins.png>] [5]

LaTeX Warning: Hyper reference `fig:Mitochondria' on page 6 undefined on input line 82.

./Chapters/Chapter1.tex:91: Undefined control sequence. (Tol{\textbackslasho } et al. 2018) l.91 ...tive value \cite{tolo2018pathophysiological} .\

Underfull \hbox (badness 10000) in paragraph at lines 78--93

[6] ./Chapters/Chapter1.tex:108: Undefined control sequence. l.108 ...di2007non}. Furthermore, research by \cites {liddelow2017neurotoxic} c... ./Chapters/Chapter1.tex:112: Undefined control sequence. (Lindstr{\textbackslasho }m et al. 2017; Rostami et al. 2017) l.112 ...te{lindstrom2017extensive,rostami2017human} . Nonetheless, astrocytes ... ./Chapters/Chapter1.tex:114: Undefined control sequence. l.114 .... Moreover, 6-OHDA lesion studies by \cites {kuter2019increased} ident... ./Chapters/Chapter1.tex:114: Undefined control sequence. ...ovic 2008; Schlaudraff and Sp{\textbackslasho }rkel 2014) l.114 ...ankovic2008parkinson,schlaudraff2014morbus} .\ [7] [8 Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! ] ./Chapters/Chapter1.tex:151: Undefined control sequence. l.151 ...poradic disease, however research by \cites {polymeropoulos1997mutatio...

LaTeX Warning: Hyper reference `fig:Genes' on page 9 undefined on input line 151.

./Chapters/Chapter1.tex:151: Undefined control sequence. l.151 ...r, $\alpha$-syn proteomic studies by \cites {sulzer2017t} identified t... ./Chapters/Chapter1.tex:167: Undefined control sequence. l.167 ...in ligase, respectively. Research by \cites {matheoud2016parkinson} in... [9] [10] ./Chapters/Chapter1.tex:235: Undefined control sequence. l.235 ...epidemiological clinical research by \cites {li2012subsequent} investi... [11 Missing character: There is no ' (U+2019) in font ec-lmr10! ] [12<./Figures/Immunity.png>] [13]

LaTeX Warning: h' float specifier changed to ht'.

./Chapters/Chapter1.tex:264: Undefined control sequence. l.264 ...2004cytokines}. Moreover, a study by \cites {jangula2013lipopolysaccha... ./Chapters/Chapter1.tex:264: Undefined control sequence. l.264 ...e with the latter, a recent study by \cites {dohgu2019monomeric} expos... ./Chapters/Chapter1.tex:265: Undefined control sequence. l.265 Next, post-mortem research by \cites {gray2015striatal} pointed towards B... ./Chapters/Chapter1.tex:265: Undefined control sequence. l.265 ... any other brain area. For instance, \cites {chen2009severe} have show... ./Chapters/Chapter1.tex:266: Undefined control sequence. (Erd{\textbackslashH {o}} et al. 2017) l.266 ...eimer's disease, and PD \cite{erdHo2017age} . In addition, ageing is n... ./Chapters/Chapter1.tex:266: Undefined control sequence. l.266 ...ou2008altered}. Notably, research by \cites {vincent2008functional} di... ./Chapters/Chapter1.tex:267: Undefined control sequence. l.267 ...oimmunity. Specifically, research by \cites {louveau2018cns} using the... [14] [15<./Figures//BBB.png>] [16]

Package hyperref Warning: Token not allowed in a PDF string (Unicode): (hyperref) removing `math shift' on input line 269.

Package hyperref Warning: Token not allowed in a PDF string (Unicode): (hyperref) removing `\alpha' on input line 269.

Package hyperref Warning: Token not allowed in a PDF string (Unicode): (hyperref) removing `math shift' on input line 269.

LaTeX Warning: h' float specifier changed to ht'.

Underfull \hbox (badness 10000) in paragraph at lines 321--331

[17]) [18<./Figures//SNARE.png>] [19] [20] ./these.tex:470: Undefined control sequence. l.37 ... Calopa M, Mestre M, Mollev{\textbackslashi } DG, Cutillas B, Ambrosi... l.470 \printbibliography

1: section [21 Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! ] ./these.tex:470: Undefined control sequence. l.55 ..., Pakkenberg B, Pedersen L {\textbackslashO }stergaard (2017): Autoim... l.470 \printbibliography

./these.tex:470: Undefined control sequence. l.61 ..., Buchman V, Etherton MR, S{\textbackslashu }dhof TC (2010): alpha-sy... l.470 \printbibliography

Underfull \hbox (badness 1067) in paragraph at lines 73--74 []\T1/lmr/m/n/10.95 Chaud-huri KR, Schapira AH (2009): Non-motor symp-toms of parkin-son's dis-ease: [22 Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no ' (U+2018) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no ' (U+2019) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! Missing character: There is no – (U+2013) in font ec-lmr10! ] ./these.tex:470: Undefined control sequence. l.124 Erd{\textbackslashH {o}} F, Denes L, de Lange E (2017): Age-associate... l.470 \printbibliography

./these.tex:470: Undefined control sequence. l.127 ...to A, Dohm CP, Kermer P, B{\textbackslasha }hr M, Wouters FS (2007):... l.470 \printbibliography

-> Continues like this

A: It seems that styles that are not built-in can be referenced by their filename without extension. So copy the file universitatsmedizin-gottingen.csl to the directory with your TeX file, and then you can use something like:
\documentclass{article}

\usepackage{citation-style-language}
\cslsetup{style = universitatsmedizin-gottingen}
\addbibresource{examples.bib}
\addbibresource{examples.json}

\begin{document}

\cite{texbook,latex2e,ITEM-1}
\printbibliography

\end{document}

It uses two databases, one is traditional BibTeX file, examples.bib:
@book{texbook,
  author = {Donald E. Knuth},
  year = {1986},
  title = {The {TeX} Book},
  publisher = {Addison-Wesley Professional}
}

@book{latex:companion,
  author = {Frank Mittelbach and Michel Gossens
            and Johannes Braams and David Carlisle
            and Chris Rowley},
  year = {2004},
  title = {The {LaTeX} Companion},
  publisher = {Addison-Wesley Professional},
  edition = {2}
}

@book{latex2e,
  author = {Leslie Lamport},
  year = {1994},
  title = {{LaTeX}: a Document Preparation System},
  publisher = {Addison Wesley},
  address = {Massachusetts},
  edition = {2}
}

@article{knuth:1984,
  title={Literate Programming},
  author={Donald E. Knuth},
  journal={The Computer Journal},
  volume={27},
  number={2},
  pages={97--111},
  year={1984},
  publisher={Oxford University Press}
}

@inproceedings{lesk:1977,
  title={Computer Typesetting of Technical Journals on {UNIX}},
  author={Michael Lesk and Brian Kernighan},
  booktitle={Proceedings of American Federation of
             Information Processing Societies: 1977
             National Computer Conference},
  pages={879--888},
  year={1977},
  address={Dallas, Texas}
}

Other possibility is to use CSL JSON, like this examples.json:
[
    {
        "author": [
            {
                "family": "D'Arcus",
                "given": "Bruce"
            }
        ],
        "citation-key": "ITEM-1",
        "id": "ITEM-1",
        "issued": {
            "date-parts": [
                [
                    2005,
                    11,
                    22
                ]
            ]
        },
        "note": "The apostrophe in Bruce's name appears in proper typeset form.",
        "publisher": "Routledge",
        "title": "Boundaries of dissent: Protest and state power in the media age",
        "type": "book"
    },
    {
        "author": [
            {
                "family": "Bennett",
                "given": "Frank G.",
                "suffix": "Jr."
            }
        ],
        "citation-key": "ITEM-2",
        "container-title": "Pac. Rim L. & Pol'y J.",
        "id": "ITEM-2",
        "issued": {
            "date-parts": [
                [
                    2009,
                    8
                ]
            ]
        },
        "page": "463-509",
        "title": "Getting property right: "informal" mortgages in the Japanese courts",
        "type": "article-journal",
        "volume": "18"
    },
    {
        "author": [
            {
                "family": "Lamport",
                "given": "Leslie"
            }
        ],
        "citation-key": "ITEM-3",
        "edition": "2",
        "id": "ITEM-3",
        "issued": {
            "date-parts": [
                [
                    1994
                ]
            ]
        },
        "publisher": "Addison-Wesley",
        "publisher-place": "Reading, MA, USA",
        "title": "LaTeX: A document preparation system: User's guide and reference manual",
        "type": "book"
    },
    {
        "author": [
            {
                "family": "Mittelbach",
                "given": "Frank"
            },
            {
                "family": "Goossens",
                "given": "Michel"
            },
            {
                "family": "Braams",
                "given": "Johannes"
            },
            {
                "family": "Carlisle",
                "given": "David"
            },
            {
                "family": "Rowley",
                "given": "Chris"
            }
        ],
        "citation-key": "ITEM-4",
        "edition": "2",
        "id": "ITEM-4",
        "issued": {
            "date-parts": [
                [
                    2004
                ]
            ]
        },
        "publisher": "Addison-Wesley",
        "publisher-place": "Reading, MA, USA",
        "title": "The LaTeX companion",
        "type": "book"
    }
]

It produces the following result with lualatex:

A: A bug report is always welcome at https://github.com/zepinglee/citeproc-lua/issues. It would be appreciated if you provide the full example that reproduce the errors.
From the output log, I can only provide the following suggestions.

*

*The CSL-JOSN format is preferred over the .bib format. The former is used in the internal of citeproc-lua as well as Unicode. The .bib database needs to be converted to CSL-JSON before processing. Unfortunately the current implementation of this converter is rather naive and it can't handle the conversion from \"o to Unicode. I'll try to implement this conversion in the next couple of weeks and can you provide the .bib file for testing? In general, if you use Zotero for maintaining the bibliographies, it's more convenient to export the items directly in CSL-JSON format so the conversion procedure can be skipped.

*The correct way to set the font in bibliography is \cslsetup{bib-font = \scriptsize} rather than \renewcommand*{\bibfont}. The latter is used in natbib and biblatex packages. It is necessary to add the traditional \bibfont interface? I generally prefer the key-value interface in many modern packages like siunitx.


text:
Q: How to access the abstract class method without extending the Abstract class in java I am new to java and when i am searching over internet for getting the HTTP response code through java, i came to know about [HttpURLConnection] Class in java. This class is abstract class hence i cant instantiate this class. So my queestion is I have a URL object and how to use this abstract class in my code. This could be Very Basic Question but your answer would help to understand java fundamentally.
Thanks in Advance
https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html

A: You get a HttpURLConnection object from a URL instance that represents an http: (or https:) protocol URL, from its openConnection method. What you get back is a reference to an object conforming to the interface defined by the URLConnection abstract class (but it'll be an instance of an HttpURLConnection subclass).
You often don't need to know the concrete class you're working with;  you code to an interface that defines the things you should be able to do with what you have. Those things then get done by the concrete class of the object you have a reference to.
Re this specifically:

is there way to user methods of Abstract class without using the class which extends the Abstract Class

Not if they're instance methods, no. The clue is in the name. ;-) To use an instance method, you must have an instance. To have an instance, you must have a concrete (non-abstract) class that the instance is a member of.
But again: Often you don't care what that class is, just that you have an instance conforming to the interface you need to use.

A: You can't instantiate an abstract class needs an subclass to implement specific methods.
You can access its method with an anonymous class for example:
new HttpURLConnection() { /* here you need to implement many empty methods */ }.getOutputStream();

But for your problem, I think you want a real HttpURLConnection that can be acquired by the URL object.
HttpURLConnection connection = urlObject.openConnection();
connection.setDoInput(true);
connection.setDoOutput(false);
// input = true & output = false means a GET
// input = true & output = true means a POST
connection.connect();
InputStream content = connection.getInputStream();

A: You have to use a concrete class which is sub class of the abstract class to call the method.
Or if the function you want to use is static, you can call it directly. Below is a very small example to show it.
abstract class SimpleAbstract {
public static String testString() {
    return "You got me";
}

public abstract void doMagic();}
public class AbstractExample {
public static void main(String[] args) {
    System.out.println(SimpleAbstract.testString());
}}

A: Here is a example to intialize abstract class without extending it
    abstract class Abstractclass{
       public void someMethod(){
          System.out.println("Hello");
       }
       abstract public void anotherMethod();
    }
    public class Demo {
       public static void main(String args[])
       {
         //creation of object .........................

          Abstractclass obj = new Abstractclass(){
              public void anotherMethod(){
                 System.out.println("Hello12222");
                              }
                };
         obj.anotherMethod();
         obj.someMethod();
       }
    }

output : Hello12222 Hello


text: Q: On-screen keyboard does not appear on screen upon focus of input in browser I am using Fedora 21. I have activated the on-screen keyboard using the universal access. I cannot get the on-screen keyboard to appear when working in a browser, LibreOffice Calc or directory. The only time it pops up is when I am using the terminal. Is there a way to fix this?


text:
Q: Toggle touchpad map to hotkey My laptop does not have a fn+touchpad key.
I found the toggle in the system settings. But I'm looking for a hotkey.
How can I create a shortcut to toggle the touchpad off and on?
Did I mis a setting or do I need a custom command?
I'm using Ubuntu 18.10 with default Gnome-3.
Update: for anyone wondering I've also opened a issue on gitlab

A: does this do it?
gsettings set org.gnome.desktop.peripherals.touchpad send-events disabled


text:
Q: Cause of Warning: PowerShell detected that you might be using a screen reader and has disabled PSReadLine for compatibility purposes Steps
Launch PowerShell 7 on Windows 10.
Actual result
PowerShell 7.0.0
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/powershell
Type 'help' to get help.

Warning: PowerShell detected that you might be using a screen reader and has disabled PSReadLine for compatibility purposes. If you want to re-enable it, run 'Import-Module PSReadLine'.

Expected result
No warning is displayed when PowerShell starts, since I am not using a screen reader.
Workaround
Run the specified command Import-Module PSReadLine. I haven't run this since I first want to understand why the warning is here.
$PSVersionTable output:
Name                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Microsoft Windows 10.0.18362
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Additional info
I have Visual Studio 2017, 2019 installed

A: Set the following registry key:
Windows Registry
Computer\HKEY_CURRENT_USER\Control Panel\Accessibility\Blind Access\On

to value 0 and reboot.
I discovered this alternative solution via the issue mentioned by @Znatz.
Source

A: There is a fix for this error.
Powershell issue #11751
Create a .ps1 file, paste the following code and run it with powershell.
Add-Type -TypeDefinition '
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

public static class ScreenReaderFixUtil
{
    public static bool IsScreenReaderActive()
    {
        var ptr = IntPtr.Zero;
        try
        {
            ptr = Marshal.AllocHGlobal(sizeof(int));
            int hr = Interop.SystemParametersInfo(
                Interop.SPI_GETSCREENREADER,
                sizeof(int),
                ptr,
                0);

            if (hr == 0)
            {
                throw new Win32Exception(Marshal.GetLastWin32Error());
            }

            return Marshal.ReadInt32(ptr) != 0;
        }
        finally
        {
            if (ptr != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(ptr);
            }
        }
    }

    public static void SetScreenReaderActiveStatus(bool isActive)
    {
        int hr = Interop.SystemParametersInfo(
            Interop.SPI_SETSCREENREADER,
            isActive ? 1u : 0u,
            IntPtr.Zero,
            Interop.SPIF_SENDCHANGE);

        if (hr == 0)
        {
            throw new Win32Exception(Marshal.GetLastWin32Error());
        }
    }

    private static class Interop
    {
        public const int SPIF_SENDCHANGE = 0x0002;

        public const int SPI_GETSCREENREADER = 0x0046;

        public const int SPI_SETSCREENREADER = 0x0047;

        [DllImport("user32", SetLastError = true, CharSet = CharSet.Unicode)]
        public static extern int SystemParametersInfo(
            uint uiAction,
            uint uiParam,
            IntPtr pvParam,
            uint fWinIni);
    }
}'

if ([ScreenReaderFixUtil]::IsScreenReaderActive()) {
    [ScreenReaderFixUtil]::SetScreenReaderActiveStatus($false)
}


text:
Q: Multisite - How sync posts to multi sites I have a network with multi-site and I need that there's a "main" site where I can add posts, taxonomies, and pages (and also translations about them) and I want the possibility to share the different post types to different sites along my network. For example:
My network has:

*

*Main Site

*Site 1

*Site 2

*Site 3

On the Main Site I have these posts:

*

*Post 1

*Post 2

*Post 3

Each post could have a lot of data related (taxonomies, custom fields, translations, etc.)
So for the "Post 1" I want that is shared with Site 1 and Site 2.
For the "Post 2" I want that is shared only to Site 2.
All these posts type should be synced.
Is possible to do this?
I thought of two solutions, but I have no idea to make them.
1° Solution:
Using the Main Site to create posts and then sync them to other sites where I want to share my post. So If the post doesn't exist, it should be created or otherwise updated.
2° Solution
In the Main Site, I create posts where I specify in which sites the post should be shared, and then on each site, I pull out the related posts from the Main Site.
What is the best solution to manage this scenario? There are other solutions? There is a WP function that helps me to do it? I think that Multisite in this scenario is ok for manage in easy way plugins and themes, but I need that some things are shared across the sites of my network.

A: If you need to share them automatically, you can use save_post action hook and switch_to_blog and get_post() + wp_insert_post functions.
I can suggest this tutorial. I think there is no reason to copy all the code from there to here.


text:
Q: React property map issue I'm trying to do example of React Website and I got this:
function renderSuperheroesTable(props) {
    return (

                    Name
                    Powers

                {props.superheros.map(superhero =>

                        {superhero.name}
                        {superhero.powers}

                )}

    );
}

While Im running I got below message:
TypeError: Cannot read property 'map' of undefined
**renderSuperheroesTable**

How can I fix this?

A: At the first time props.superheros prop value maybe is undefined and undefined has not the map property to iterate, So you have to check its type and it was not an array, you should assign an array to the map property.
Try to use this way:
{(Array.isArray(props.superheros) ? props.superheros : []).map(superhero =>

      {superhero.name}
      {superhero.powers}

)}

A: you can check the length of array first, then iterate over it using map:
function renderSuperheroesTable({ superheroes }) {

    return (

                    Name
                    Powers

                {superheros.length > 0 && superheros.map(superhero =>

                        {superhero.name}
                        {superhero.powers}

                )}

    );
}

A: well you got to use return when you map in render and please check if the props.superheros is an array and
{props.superheros?props.superheros.map((element)=>{
  //your code
 })
 :null  //if undefined it prints nul
 }


text:
Q: In Windows, is there a way to get a notification when a new MIDI port is available? In Windows, is there a way to get a notification when a new MIDI port is available?
Is there a better solution that polling the list of ports?

A: Your window could listen for WM_DEVICECHANGE messages with the DBT_DEVICEARRIVAL event, but that data might or might not be useful for you.

A: The Windows Runtime API provides a device watcher:
Windows Runtime API  Windows.Devices.Enumeration  DeviceInformation CreateWatcher. The watcher sends events when a device is added, updated, or removed.
It's most convenient to use the AQS filter variety with the selector from MidiInPort::GetDeviceSelector or MidiOutPort::GetDeviceSelector.
The provided IDs are used to open the device using MidiInPort and MidiOutPort::FromIdAsync.


text:
Q: ASP .net MVC - Master page I am new to MVC. Where to write C# code to common functionalists that is comming under master page(Eg: Login)?

A: Create partial *.ascx view for login in shared folder and add it to master page like this:
<% Html.RenderPartial("LoginUserControl"); %>

A: Html.RenderAction() / Html.Action(), which do not require a Model to be passed.
That is, what @x2 suggested is OK if the control is not dependent on any model, but if it is, use one of the above methods.
See: The difference between Html.Action and Html.RenderAction
And: http://haacked.com/archive/2009/11/18/aspnetmvc2-render-action.aspx


text:
Q: Resolving Lexer and Parser ambiguities in ANTLR4 In ANTLR4 I have a lexer rule that says that I can get any word using any character but spaces and line breaks. It is defined as this:
WORD : ~[ \t\r\n:,]+;

I also have a lexer rule (defined before than WORD) for going to an EVAL mode:
OPENEVAL : '${' -> pushMode(EVAL);

mode EVAL;
CLOSEEVAL : '}' -> popMode;
... (more lexer definitions for EVAL mode) ...

In the parser file I'm trying to detect a grammar rule OR a word. So I do the following:
eval : evaluation
     | WORD;

evaluation : OPENEVAL somestuff CLOSEEVAL;

somestuff uses lexer rules defined in the EVAL mode. The problem is, when evaluating the eval rule, it identifies the text as a WORD token, and not as a evalution grammar rule. I mean, if I enter some text like:
${stuff to be evaluated}

It should go to the evaluation rule, but instead, it identifies it as a WORD (taking the "${stuff" part only)
I know that there is an ambiguity between evaluation and WORD, but I thought that ANTLR was going to take the first coincidence of the parser rule (evaluation in this case).
Sorry if this is too confusing, I tried to summarize this as good as possible (I didn't want to put the full parser and lexer contents to avoid a wall of text basically).
Another option I considered was to define "WORD" as anything but text surrounded by ${ and }. But I don't know how to create such a lexer rule.
How could I solve this? To distinguish between evaluation and WORD?

A: You need to include a predicate preventing the inclusion of $ in a WORD when its followed by {.
WORD
  : ( ~[ \t\r\n:,$]
    | '$' {_input.LA(1) != '{'}?
    )+
  ;


text:
Q: how do you pull XML data from a C# file If I have XML data in a C# file, instead of using setXMLUrl(/blah.blah.xml); to retrieve the XML information from an XML file, what function or code do I need to pull XML data from a C# file that is used in ASP.net?
This is what the code is:
myChart.setXMLUrl("/Controls/TaskOrder/TaskSummary.asc/TaskSummary.ascx.cs");

I am rendering a chart so in the setXMLUrl(""); area is where the data is being read from. Usually it is from an XML file like this:
myChart.setXMLUrl("data/data.XML");

but since my XML data is appended in a C# file, I can't use setXMLUrl since it is not referencing XML directly.
Here is an updated look at the code behind:
    public void SetLine3Chart(DataSet exDT)
    {
        StringBuilder xmlData = new StringBuilder();

        xmlData.Append("<chart caption='Current Period: Total Months: 12' chartBottomMargin='8' chartTopMargin='04' captionPadding='01' xAxisNamePadding='-20' yAxisNamePadding='05' chartRightMargin='20' showBorder='0' yAxisName='' xAxisName='' numberPrefix='$' formatNumberScale='0'>");
        xmlData.Append("<categories>");
        xmlData.Append("<category label='January'/>");
        xmlData.Append("<category label='February'/>");
        xmlData.Append("<category label='March'/>");
        xmlData.Append("<category label='April'/>");
        xmlData.Append("<category label='May'/>");
        xmlData.Append("<category label='June'/>");
        xmlData.Append("</categories>");

        xmlData.Append("<dataset seriesName='Budget Spent' >");
        xmlData.Append("<set value='3478'/>");
        xmlData.Append("<set value='2557'/>");
        xmlData.Append("<set value='5379'/>");
        xmlData.Append("<set value='4987'/>");
        xmlData.Append("<set value='1790'/>");
        xmlData.Append("<set value='6367'/>");
        xmlData.Append("</dataset>");

        xmlData.Append("<dataset seriesName='Average Spending' renderAs='Line'>");
        xmlData.Append("<set value='4375'/>");
        xmlData.Append("<set value='4675'/>");
        xmlData.Append("<set value='6354'/>");
        xmlData.Append("<set value='7648'/>");
        xmlData.Append("<set value='4578'/>");
        xmlData.Append("<set value='4763'/>");
        xmlData.Append("</dataset>");
        xmlData.Append("<styles>");
        xmlData.Append("<definition>");
        xmlData.Append("<style name='Font_0' type='font' font='Arial' size='12' color='666666' rightMargin='15' />");
        xmlData.Append("</definition>");
        xmlData.Append("<application>");
        xmlData.Append("<apply toObject='CAPTION' styles='Font_0'/>");
        xmlData.Append("</application>");
        xmlData.Append("</styles>");
        xmlData.Append("</chart>");

        Literal9.Text = FusionCharts.RenderChart("/Dashboard/Charts/MSCombi2D.swf", "", xmlData.ToString(), "line3Chart", "100%", "100%", false, false);
    }

A: This looks very strange:
myChart.setXMLUrl("/Controls/TaskOrder/TaskSummary.asc/TaskSummary.ascx.cs");

You are probably wrong. :-)
You must connect xml/json data from url. So, create ashx handler to provide XML/json data by some arguments and than put url of this handler to your script. Also take a look, if there would be possibility to give data to FusionChart object from javascript variable. It may help.
Here you can see ashx handler sending XML data: C# Change my sitemap from ashx to xml (only data are missing).


text:
Q: Showing timer with WebSockets I have an application (Laravel + MongoDB running on Nginx) where I pull some data from the database and render it on the screen. The application focusses on multiple real life objects. Once an object is turned on (is_on equals to true in the database), the timer on the screen needs to start ticking. Once the object is turned off (is_on equals to false in the database) the clock stops ticking and resets to 0. The format of the clock is HH:MM:SS. So it shows how long the real life object is turned on.
My problem is that I don't really now how to save/implement such timer. When the user request the page, I pull the necessary data from the database. If I also save the timer in the database, you have to make a query every second which is very bad practice.
I remembered something about WebSockets and tried to look into them. I actually managed to build a basic Hello World chat application, but don't really know how to implement this in my project. There is no place for it in the database (because of the queries), so I don't really know where to save that timer on the server. I'm also doubting if WebSockets are the way to go.
So are WebSockets the way to go and if it is, can you guys point me in the right direction on how to implement this? If not, can you advise me what I should do?
Thanks in advance!

A: From your question:

I understand that the objects you print in the screen are modified by
  users in the application, and your aim is to live forward those
  modifications to other active client instances of your application.

In that case, as you mention, I would point you to websockets. They are a great way to feed information directly to the client, so the client receives the update signals and modify the interface, with no need of user action.
In order to implement the logic to notify the client, I recommend using a push approach, but this is really depending on what kind of clients you'd like to notify, since the push world is still a bit tricky.
Further readings for this websocket based push implementation:
Question about Push Flags:
Difference between push and urgent flags in TCP
If your client runs in browser or mobile this question is nice to read:
How to send push notification to web browser?
Also html5 websockets:
http://www.websocket.org/aboutwebsocket.html
As a sidenote:
A nice architecture for client-server live communication is based on node.js together with socket.io library offering good performance and not really complex implementation if you know what you do.


text:
Q: Equation of motion in 2D Whilst researching for a motion related software issue, I came across the following on Wikipedia
"using 2D vectors, the equation $v^2 = u^2 + 2as$ becomes $v^2 = u^2 + 2a \bullet (r - r_0)$" (Paraphrased)
In summary, $as$ becomes $a \bullet s$
I have searched google, etc and found no references to why this is the case and I can't make sense of it.  I can also find no reference to how a scalar can be added to a vector.
My questions...
Is this correct or an error in the wikipedia page?
If correct, then

*

*Why is this the case? - I can't see a reason why multiplication would not work for vectors as it does for scalars

*How do I add a vector ($u^2$) to a scalar ($a \bullet \Delta r$)?

Cheers
Rob

A: OK
I slightly misunderstood the concept of vector multiplication
The answer (as alluded to in the comments) is that the equation is correct.
$u^2$ is in fact a scalar, the entire equation returning a scalar value.
The whole equation makes sense but is actually of zero use to me in my context


text:
Q: Batch file to edit an .ini I have a program for which a setting in the .ini file seems to constantly revert.  I find myself constantly checking the file to see if it needs to be edited, so I would like to see if I can come up with a batch file that will do this job.  The idea is to create this batch file to scan the .ini file every 2 minutes to check the value of a particular line and change the value if necessary.  The line is:
UpdateSpeedCore=8
8 is the desired number for the check, but it sometimes reverts to 100.
The name of the file is prolasso.ini and the path is C:\Documents and Settings\Administrator\Application Data\ProcessLasso\config\prolasso.ini.
Thankyou to anyone who can help with this annoyance...
Edit:  More on the .ini file.  There are no empty lines.  However, there are some lines that are set "=" to no value like "Power=".  There are maybe half a dozen section delineators in the file like "[Debug]" or "[AdvancedRules]".  These are not set equal to a value.  It's a static length lines wise and about 100 lines long.  Other than the section delineators, all the lines use an "=" sign followed by a value.  These are preceded by the setting name as in "UpdateSpeedCore".

A: On Windows you can use IniFile to manipulate the contents of .ini files from batch scripts. IniFile operations are idempotent.
inifile.exe "C:\Documents and Settings\Administrator\Application Data\ProcessLasso\config\prolasso.ini" UpdateSpeedCore=8

A: This expects the UpdateSpeedCheck=8 to be on a line by itself with no spaces.
It uses a helper batch file called repl.bat from - http://www.dostips.com/forum/viewtopic.php?f=3&t=3855 which you can put in the same folder.
@echo off
set "file=C:\Documents and Settings\Administrator\Application Data\ProcessLasso\config\prolasso.ini"

:loop
findstr "^UpdateSpeedCheck=8$" "%file%" >nul || (
type "%file%"|repl "^UpdateSpeedCheck=.*" "UpdateSpeedCheck=8" >"%file%.tmp"
move "%file%.tmp" "%file%" >nul
)
ping -n 120 localhost >nul
goto :loop

A: @echo off
echo. >prolasso.new
FOR /F "delims=\= tokens=1,2" %%K IN (prolasso.ini) DO (
    IF "%%K" NEQ "UpdateSpeedCheck" (
        >>prolasso.new echo %%K=%%L
    ) else (
        >>prolasso.new echo %%K=8
    )
)
del prolasso.ini
ren prolasso.new prolasso.ini

note: this solution will delete empty lines.
edit: solved the problem with the additional space on every run (take care, that there is no space after echo %%K=%%L). This should also solve the problem with some-thousand-runs (probably because of the big line-length)

A: http://www.pixelbeat.org/programs/crudini should work on all platforms and can be used to read and update the ini file in a robust and simple way.
crudini --set prolasso.ini '' UpdateSpeedCore 8

Putting it in a loop:
:loop
crudini --set prolasso.ini '' UpdateSpeedCore 8
ping localhost -n 121 > nul
goto loop


text:
Q: Caching a closure in javascript After reading the answer for the question: JavaScript inner-functions and Performance
I wonder if it somehow possible to cache the inner function(doSomethingCool) in this case:
function newUser(user){
         function doSomethingCool(){
                 console.log(user);
         }
}

A: You cannot really cache a closure. If you do, then it still closes over the variables of the function it was first defined.
For example, you might consider doing this, which might look ok at a first glance:
var newUser = (function() {
    var doSomethingCool;

    function newUser(user){
         doSomethingCool = doSomethingCool || function(){console.log(user);};
         doSomethingCool();
    }

    return newUser;
}());

The first time we call newUser, the doSomethingCool function will be created. This is the output:
> newUser('foo')
  foo

When we call the function a second time, the closure is reused. This is the output:
> newUser('bar')
  foo

Why? Because the closure only closes of the variables of the function invocation it was defined in.
If you really want to "cache" the function, you have to parameterize it:
var newUser = (function() {
    var doSomethingCool;

    function newUser(user){
         doSomethingCool = doSomethingCool || function(user){console.log(user);};
         doSomethingCool(user);
    }

    return newUser;
}());

But I would not call this a closure. Technically it is a closure, but you don't make use of this property.
And actually, it is  much easier then to write it like this:
var newUser = (function() {
    var doSomethingCool = function(user){...};

    function newUser(user){
         doSomethingCool(user);
    }

    return newUser;
}());

A: The point of using a closure is to preserve the context in which it was created. If you "cache" your closure the reference to user will always be the same, defeating the purpose. What you probably want is something like:
function User(name) {
   this.name = name;
}

User.prototype.doSomethingCool = function() {
   console.log(this.name);
}

var userA = new User('a');
var userB = new User('b');

userA.doSomethingCool();
userB.doSomethingCool();

With that code, only one doSomethingCool function is created on the prototype of User, but it's behavior changes based on how it is called.
If you are just looking to make a utility function that's only used within newUser but doesn't take advantage of the properties of closures, you'd probably be better off moving the function and accepting the user as an argument. That said, I highly doubt leaving it there will impact your performance in any noticeable way.

A: Here is a dead simple cache using a basic closure and function. It's eviction strategy is one based on probability but you could easily modify it to be time based. Unlike some of the other solutions, this one doesn't require you to call new and delegates to the function passed in. It also uses an object for it's cache
const cache = (f, prob) =>{
    const c = {}

    return (args) => (Math.random() < prob && c.hasOwnProperty(args)
                      && c[args]) || (c[args] = f(args))
};

const doThing = (param1) = cache((param1) => {
    console.log(`called with param ${param1}`)
    return Math.random()
},.1)

console.log(doThing("christian"))
console.log(doThing("christian"))
console.log(doThing("bongiorno"))

execution 1:
called with param christian
0.7340898868131249
0.7340898868131249
called with param bongiorno
0.3708897404988516

execution n:
0.6886668809537186
called with param christian
0.5845787434396792
called with param bongiorno
0.2618603367580965


text:
Q: saga watcher not watching the dispatched actions On dispatching the action LOGIN_CALLED one of the reducer which is listening to this action is working fine. But the watcher saga isn't triggering watcherLogin()
I have set breakpoints in watcherLogin() but they are never getting called. Moreover here createStore(persistedReducer, applyMiddleware(Logger, sagaMiddleware))  the Logger is getting called each time any action is fired.
Store Creation
import { createStore, applyMiddleware, combineReducers } from 'redux';
import createSagaMiddleware from 'redux-saga';
import { persistStore, persistReducer } from 'redux-persist'
import storage from 'redux-persist/lib/storage';

import { Logger } from '../middlewares';
import rootSaga from '../sagas';

import { errorReducer } from './error.reducer';
import appReducer from './app';
import uiReducer from './ui'

const persistConfig = {
    key: 'root',
    storage: storage,
    whitelist: [ 'app' ]
}

const reducers = combineReducers ({
    app: appReducer,
    ui: uiReducer,
    error: errorReducer
})

const sagaMiddleware = createSagaMiddleware()

const persistedReducer = persistReducer(persistConfig, reducers)

export default config = () => {
    let store = createStore(persistedReducer, applyMiddleware(Logger, sagaMiddleware))
    let persistor = persistStore(store)
    sagaMiddleware.run(rootSaga);
    return {
      store,
      persistor
    }
}

auth saga
import { authAction } from '../actions';
import { postLogin } from '../http/auth.http.service';
import { formatHTTPResponse } from './util.saga';
import { takeLatest, call, put } from 'redux-saga/effects';

export function* watcherLogin() {
    return takeLatest(authAction.LOGIN_CALLED, workerLogin)
}

export function* workerLogin(action) {
    const authResponse = yield call(
        postLogin,
        action.payload
    );
    let formattedResponse = formatHTTPResponse(authResponse);

    if (authResponse.ok) {

        yield put({
            type: authAction.LOGIN_SUCCESS,
            payload: authPayload
        })
    } else {
        yield put({
            type: authAction.LOGIN_FAILURE,
            error: formattedResponse
        })
    }
}

Watcher saga
import { all, fork } from 'redux-saga/effects';
import { watcherLogin } from './auth.saga';

export default function* rootSaga() {
    yield all([
        watcherLogin()
    ]);
}

App.js
import React from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from "redux-persist/integration/react";
import config from './src/reducers';
import Authentication from './src/route/Authentication';

let { store, persistor } = config();

class App extends React.Component{
  render() {
    return (
      <Provider store={store} >
        <PersistGate loading={null} persistor={persistor}>
          <Authentication />
        </PersistGate>
      </Provider>
    );
  }
}

export default App;

Component
import React from 'react';
import { Text, View, TouchableOpacity } from 'react-native';
import { connect } from 'react-redux';

import { authAction } from '../actions/index.js';

class Login extends React.Component {
    constructor(props, context) {
        super(props);
    }

    Login(event) {
        this.props.postLogin({
            body: {
                email: 'xyz@gmail.com',
                password: 'password'
            }
        })
    }

    render() {
        return (
            <View>
                <TouchableOpacity onPress={this.Login.bind(this)} style={{ backgroundColor: '#75C35D' }}>
                    <Text style={{ color: '#fff' }}>SIGN IN</Text>
                </TouchableOpacity>
            </View>
        );
    }
}

const mapStateToProps = (state) => ({
    // some lines of code here
})

const mapDispatchToProps = (dispatch) => ({
    postLogin: payload => dispatch({type: authAction.LOGIN_CALLED, payload})
})

export default connect(mapStateToProps, mapDispatchToProps)(Login);

react: 16.2.0
react-native: 0.52.0
react-redux: 5.0.7
redux: 4.0.0
redux-persist: 5.10.0
redux-saga: 0.16.0

A: You need to provide sagas to Provider.
<Provider store={{...store, runSaga: sagaMiddleware.run(rootSaga)}}>

Edit: The above is not necessary at all, ignore it.  But I created a minimal example from your code, and it looks like if you change your rootSaga to the following, it works fine.
function* rootSaga() {
    yield [
        takeLatest(authAction.LOGIN_CALLED, workerLogin)
    ];
}

Not sure why, but I am looking into it's documentation.  Would update if found anything.


text:
Q: Xero API contact list using summaryOnly removes contacts Issue: When using the /Contacts?summaryOnly=true endpoint the payload list does not contain the full list of contacts.
I have a a call that performs a lookup to get all the contacts then use code to partial match the string used to search to the name. Kind if like a %string% in SQL.
I understand there is a 'where' options using the PHP SDK for Xero. I do not use this but may need to fall back.
Using Postman the difference in /Contacts vs /Contacts?summaryOnly=true is 1MB vs 53KB. Hence I would like to use the summary endpoint. BUT when using the summary the dataset returned does not have all contacts that are in the system.
Is there some undocumented feature that returns a subset of data if summaryOnly is sent as a query parameter?
I'm using the PHP SDK ( https://github.com/XeroAPI/xero-php-oauth2 )


text:
Q: 'Undefined' when returning object from JS module I have defined a global variable and then set it equal to a method made available through one of my modules which renders a chart. The module should return a chart, thus assigning the variable 'alChart' a chart object. It is also worth mentioning that the chart renders perfectly fine with this code.
Chart Render module:
var ChartRendererGateway = (function ($, Highcharts) {

"use strict";

//Private variables
var chart;
var result;

//Private methods
var success = function (data, textStatus, jqXHR) {

    var seriesObject = $.parseJSON(data);
    result = seriesObject;

};

var fail = function () {

    errorController.showError("Something went wrong when trying to load the chart data")

};

var drawChart = function (renderTo, options) {
    options.chart.renderTo = renderTo;
    options.series = result;
    chart = new Highcharts.Chart(options);
};

//Public methods
return {

    render: function (renderTo, promise, options) {

        promise.then(success, fail)
            .done(function () {
                drawChart(renderTo, options);
            })
            .fail(function () {
                errorController.showError("Something went wrong fetching chart data!");
            });

        return chart; //Chart object exists here, but is undefined when inspecting variable it is assigned to in the .ready function
    },

    destroy: function(chartName){
        chartName.destroy();
    }
};

})(jQuery, Highcharts);

.ready():
//Global Variables
var alChart;

//DOM Ready
$(function () {

var chartData = ChartDataGateway.getSeries("/Dashboard/GetAssetLiabilityChartData");

alChart = ChartRendererGateway.render("dashboard-AL-chart", chartData,
    {
        chart: {
            type: 'line',
            zoomType: 'xy'
        },
        title: {
            text: null
        },
        xAxis: {
            title: {
                text: 'Date'
            },
            categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
        },
        yAxis: {
            title: {
                text: 'Amount'
            }
        },
        credits: {
            enabled: false
        },
        plotOptions: {
            line: {
                allowPointSelect: true,
                cursor: 'pointer',
                marker: {
                    enabled: true,
                    radius: 1,
                    symbol: 'circle',
                    states: {
                        select: {
                            fillColor: '#fff',
                            radius: 4,
                            halo: {
                                size: 4,
                                attributes: {
                                    'stroke-width': 1,
                                    stroke: '#003f72'
                                }
                            }
                        }
                    }
                }
            }
        }
    });
console.log(alChart); //This is returning 'undefined' and NOT the chart object WHY?! :S

});

A: I've not done much with jQuery promises before, but I had a crack at this. To chain values, I think you need to create new promises at every step in jQuery (if you do .then().then() you get the same data back in each, not what was returned from the previous .then()). So, every time you need new data, and it's dealing with asynchronous things, if you're altering the data and want to then further alter that, you need to create a new promise to chain from each time.
This is an example of how you can achieve what you want in a basic form:
function doSomething() {
  var deferred = jQuery.Deferred();

  // Asynchronous action
  setTimeout(function() {
    deferred.resolve("some data");
  }, 1000);

  return deferred.promise();
}

function doSomethingElse() {
  var deferred = jQuery.Deferred();

  // Has to wait for asynchronous action
  doSomething()
    .then(function(data) {
      console.log(data); // Should be "some data"

      deferred.resolve(data + " that's been added to");
    })
  ;

  return deferred.promise();
}

// Waits for everything to be done that's above, then console.logs end result
doSomethingElse()
  .then(function(data) {
    console.log(data); // Should be "some data that's been added to"
  })
;

You can see this in action here: http://jsbin.com/getiludexe/2/edit?js,console


text:
Q: R Shiny - create internal link to another element of my app I have a very simple question. I'm trying to create internal links in my shiny app where by clicking on these links a user can go to either a specific (internal) tab, table, or plot located on any page of my app.
It's basically similar to what was asked here:
Create link to the other part of the Shiny app
but at least on my end the solution offered there doesn't work. I know I'm supposed to provide a code snippet but the code is basically the same as the one available on that page.
Another solution I found is the following:
Linking to a tab or panel of a shiny app
but it's dated 2015 and it doesn't link specifically to tables and plots.
I wonder if there's something more recent that I'm missing out.
My ultimate goal is the following: have a main page being like a glossary with links to all the different tabs, tables, and plots available in the app.
Many thanks.


text:
Q: Database for massive update and read on a single entity I'm currently implementing a distributed online machine learning framework. Basically this system process datastream of samples. The model (e.g. perceptron layer(s)) will be updated with each sample.
So, I'm looking for a database which can support massive update and read on a single entity. I think that mongodb and it's "update-in-place" is a good choice but maybe there's a database which fits better to my needs.

A: I'll venture an answer ...
I will give the disclaimer that I've become a pretty big fan of Mongo, so take that into account. =)
Mongo would be a good choice for reads, but only if you are willing to have data be slightly inconsistent. Mongo has a thing called a replica set, which is basically a cluster.
The replica set has only one machine that can receive writes/updates. It handles them well, but it's something to consider. It's not a master/master replication set up.
As writes/updates come in, they are replicated to other nodes in the replica set. This is where the eventual consistency comes in.
You can consider something like Couchbase/CouchDB, which also has a cluster concept and it's master/master. You can write to any node and it will eventually be available on other nodes.
Some things to think about.
EDIT:
I'd go with Mongo. =)


text:
Q: Use a common service variable for *ngif I am having a loader component and i want to show it when any button is clicked.
For this i called the loader component using ngif and trying to update the variable of ngif using the service variable. I am updating that service variable from other component.
Common Service:
export class DboperationService {
  private _componentVisible$: Subject<boolean>;
constructor(private _http: Http) {
    this._componentVisible$ = <Subject<boolean>>new Subject();
  }
get componentVisible$(){
    return this._componentVisible$.asObservable();
  }

  changeState(state:boolean){
    // alert('change service called');
    this._componentVisible$.next(state);
  }
}

Loader implementing Class :
export class TabsComponent implements OnInit {

  constructor(private dbservice:DboperationService) { }
  public showLoader = false;

  public setLoder() {
    // alert('form copoenent loader state called');
      if(this.dbservice.componentVisible$){
         this.showLoader=true;
      }else{
        this.showLoader=false;
      }
    }
}

Service Varibale Update Class :
export class LeadadmincontentComponent implements OnInit {
  constructor(private dbservice: DboperationService) { }
 saveLead(){
    this.dbservice.changeState(true);
    this.uploadleadscomponent.saveLead();
  }
}

Please help me out what is wrong in this.

A: loader.service.ts
export interface LoaderState {
    show: boolean;
}

@Injectable()
export class LoaderService {
    private loaderSubject = new Subject<LoaderState>();
    loaderState = this.loaderSubject.asObservable();
    constructor() { }
    show() {
        this.loaderSubject.next(<LoaderState>{ show: true });
    }
    hide() {
        this.loaderSubject.next(<LoaderState>{ show: false });
    }
}

loader.component.ts
@Component({
    selector: "loader",
    template: `<div [class.hidden]="!show"></div>`,
    // you can style this so that your component shows as an overlay for instance
    styles: [".hidden {visibility: hidden;}"]
})
export class LoaderComponent implements OnInit {
    show = false;
    public subscription: Subscription;
    constructor(
        private loaderService: LoaderService
    ) { }

    ngOnInit() {
        this.subscription = this.loaderService.loaderState
            .subscribe((state: LoaderState) => {
                this.show = state.show;
            });
    }

    ngOnDestroy() {
        if (this.subscription)
            this.subscription.unsubscribe();
    }
}

in your.component.ts
export class AppComponent implements OnInit {
      constructor(private loader: LoaderService) { }
     action(){
        this.loader.show();
      }
    }

A: Add ngx-loading in your template
<ngx-loading [show]="loading" [config]="{ backdropBorderRadius: '14px'}"></ngx-loading>

In component Initially set it false and change it accordingly
public loading = false;
   saveLead(){
    this.loading = true
    this.dbservice.changeState(true);
    this.loading = false
  }


text:
Q: How can I order the list in LuceneSearch according to number of hits I am using Lucene Search to get the articles that are matching the search text. Is there any way to get them in ascending order of number of hits in the Article.
Example: If my search text is stack and in first Article there are two occurrences of the word stack and in the second Article there are three occurrences of stack then the second one should come first and the first one should come second.
Any idea how can I get it done?
Below is the code that I am using
List<LuceneSearchResult> searchResult = new List<LuceneSearchResult>();
LuceneSearchResult result;
IndexReader reader = IndexReader.Open(INDEX_DIR);
Searcher searcher = new IndexSearcher(reader);
Analyzer analyzer = new StandardAnalyzer();

QueryParser parser = new QueryParser("Text", analyzer);
//Text and Type are column name

Query q = parser.Parse(string.Format("Text:{0} AND Type:{1}", finalText, type));
Hits hs = searcher.Search(q);
ArrayList idList = new ArrayList();
for (int i = 0; i < hs.Length(); i++)
{

    Document doc = hs.Doc(i);
    result = new LuceneSearchResult();
    result.ID = doc.Get("ID");
    result.Type = doc.Get("Type");

    if (!idList.Contains(result.ID))
    {
        searchResult.Add(result);
        idList.Add(result.ID);
    }

}
return searchResult.ToArray();

A: Lucene ranks documents by score.  There are several components to the score for a document for  a given query.  One of them is the frequency of the term in the field queried.  However, for a search on a single term, the calculation is pretty simple.  It's proportional to the square root of the number of occurrences of the term in the field normalized by field length.  This could be where you are running into trouble.
If you search for the word "stack" and doc A has 1 occurrences, and doc B has 2 occurrences, doc A could still rank higher in the results if the field length is significantly greater than that of doc B.
The good news is you can disable field normalization.  The bad news is that you need to do it before you index, unless you over the Similarity class to always factor it out, but I wouldn't recommend doing it this way.  To disable norms at index time, in your indexing code, call Field.setOmitNorms(true) on the Field object you add to the IndexWriter.  In your case this would be for the "text" field.

A: Lucene should do this automatically, but it depends in some part on how you formulate your query. By default if you do a query with more than one word then those are ORd together. For example, say your query was something like this (searching the contents field):
contents:apples oranges

This would return any pages with the term apples OR oranges in it. If a page contains the word "apples" 50 times but no reference to orange that page would still rank higher than a page that just contained the word "apples" once and "oranges" once.
What you probably want to do is AND your query like this:
contents:apples AND oranges

Note: uppercase AND
This will only return pages that have both the word "apples" AND "oranges" in it, which is probably nearer to what you want.
Have a read of Lucene - Query Parser Syntax for more info on how to forumulate queries

A: I agree with Dan that this should be Lucene's default behavior. If your implementation does not behave this way, please add details so we can help you diagnose why. Lucene's Similarity class documentation explains the details of Lucene scoring, which is responsible for the order of the hits.

A: On first sight, your code looks like it should function as expected.
Could you show us an example of a finalText, type and the results?
When I get unexpected results, I usually check what query was actually used (in debug mode check the value of q) and use that query in Luke to see what results it gives.
In my code, I usually use hits.Max instead of hits.Length. Don't know what the difference is, but it's something I noted.
Also, as a side note, unless the rest of your program dictates you otherwise, you might want to check out the HashTable instead of a ArrayList for your IdList, it's usually faster.

A: I have googled around and found that Lucene lists the search result in the order of score of the hits,which is not the phenomenon of number of occurence of the phrase but is calculated depending on various factors, and therefore I think it will not be possible to get it from Lucene straight, but if you find some way please let me know.


text:
Q: Locking a file to be inaccessible by users I am creating an application that stores passwords in different text files known as Password Banks. I want to make it so that the text files are locked away from the user and make it so that only the script can view and edit the files. The user should not be able to edit or view the file. This is a windows-only application if that makes things any different.
I've looked all over the internet and have not been able to find any way to do this. I mean, is it even possible to do so? Maybe it would be possible to use a lock function that locks the file and unlocks the file when something needs to be written to it? Here is the context in which I want to lock away the file and be editable through the script.
    try:
        if bankToSend_password == (banks[bankToSend]):
            open(create_bank_file, 'a').write(#whateverneeds to be written)
            #ideally this is where the file should be locked away but still
            #be accessible by the script.

I expect the file to somewhat be hidden on the user's computer and if the user manages to find it an error message should pop up to let the user know the file is inaccessible. That's my approach but other things might work.


text:
Q: DIV height based on width where many elements within container I have a set of 70 square div elements within a container box (and 10 containers). I want to have a breakpoint at every 7th div element so i end up with 10 rows of 7 divs. The squares should have a thin margin. I have set the element width to 13.68571428571429% reseving the rest for the margin.
How can i achieve that the height adjusts to the width so i always get 7 squares in a row equal in width and height based on percentage?
Have tried Javascript but it renders too long with 700 squares. Flexbox seems to be compatible only on newer browsers (we still have decent amount of users on older browses).
Here is my html:

                        {{square}}

A: If you have set breakpoints for the container (the width will not change). I suggest you calculate the px beforehand and set it using media queries. If that is not possible (you are using a fluid container) then you will need to use js. If you post the javascript code you have, there might be ways to optimize it.


text:
Q: Dependencies --> Could not create plugin of type 'AppPlugin' I'm trying to continue working on an older project of mine, it's about a year old, and was working fine back then, but now after that I've updated AndroidStudio, it can't even build anymore.
I'm getting an error saying that I've got the same dex file twice:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

To fix this, I could simply do 'gradle dependencies' to find the culprit, and exclude the faulty file(s), but this is where I run into my actual problem.
When I do 'gradle dependencies', I get the following error:
FAILURE: Build failed with an exception.

* Where:
Build file 'F:\Github\Coinbook\app\build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not create plugin of type 'AppPlugin'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

And here is my full build.gradle file:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.moonrain.coinbook"
        minSdkVersion 14
        targetSdkVersion 21
        versionCode 1
        versionName "0.7"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile project(':libs:AndroidBootstrap')

    compile files('libs/socialauth-4.4.jar')
    compile files('libs/socialauth-android-3.2.jar')

    compile 'com.doomonafireball.betterpickers:library:1.5.2'
    compile 'com.jakewharton:butterknife:6.0.0'
    compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
    compile 'com.github.castorflex.smoothprogressbar:library:1.0.0'
    compile 'com.squareup.picasso:picasso:2.3.4'
    compile 'com.readystatesoftware.systembartint:systembartint:1.0.4'
    compile 'com.google.code.gson:gson:2.3'
}

So this is were I'm basically stuck at the moment, I've tried the following to fix the issue:
- Updated AndroidStudio
- Updated all SDK related items
- Updated gradle
- Re-created the entire project in a new folder, then copied over my files to the new project
Each post I find regarding this issue, it says to use Gradle 0.7.3 Instead of 0.7.2 Because of a bug.. But that's like a year old, and no longer valid.

A: Try changing gradle version in gradle/wrapper/gradle-wrapper.properties
    distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip

to something like
    distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip


text:
Q: How to replace string with multiple semicolons and special characters using sed in Linux I have a string "config"
and want to replace with
"server"
using sed in Linux. I tried the below one. But It did not work.
sed -i "s#$"config"#$"server"#g" setup.xml-->

How can I do that? If not sed other options are fine too.
before "config"
after "server"

A: One example:
sed 's/"config"/"\s\e\r\v\e\r"/'  setup.xml

A: The replacement string has characters with special meaning in sed such as ; # and &. These will all need to be escaped and so:
sed -n 's/"config"/"\&\#115\;\&\#101\;\&\#114\;\&\#118\;\&\#101\;\&\#114\;"/p' <<< '"config"'