Why have all my d3 bl.ocks disappeared from bl.ocks.org? - d3.js

I've just added a new d3 block, to discover all the graphics have disappeared from my existing blocks: https://bl.ocks.org/emmasaunders. The text is still there, and the code, but not the graphics. They were working fine last week.
This is not a normal SO question but I don't know who else to ask.
Given that the only block of mine left standing is the block "How to make a block", and that this does not include any links to my personal or professional site, I assume such links are a no-go on bl.ocks (not that I can see this rule anywhere). And I assume my blocks have been taken down for this transgression.
I've removed the links in the hope that this is the problem. Can someone reinstate them? If this isn't the problem, can anyone advise what is? Thanks...

It looks like bl.ocks.org is now permanently redirecting to Gist. Here are a few tweets about it starting from 15 Dec 2022.
However there are at least two clones of it up and running as of Feb 2023: https://blocks.roadtolarissa.com/ and https://bl.ockss.org/.
blocks.roadtolarissa.com seems to be more fully featured at the moment.
For example this block:
https://bl.ockss.org/micahstubbs/842e41b2ac0ff702a0a04dc6e48dca92/
Now redirects to this Gist:
https://gist.github.com/micahstubbs/842e41b2ac0ff702a0a04dc6e48dca92/
But the full block can still be seen here:
https://blocks.roadtolarissa.com/micahstubbs/842e41b2ac0ff702a0a04dc6e48dca92/
And just the result of the code (note the /raw/) can be seen here:
https://bl.ockss.org/micahstubbs/raw/842e41b2ac0ff702a0a04dc6e48dca92/
If there are any better alternatives or if these links die, please let me know and I will update the answer. :)

Related

Performance Tab in Chrome Development Tools shows offset recordings

I apologize if a question like this already exists somewhere, but I've really searched carefully and haven't found a question like this one.
I have a question regarding Performance Tab in the Chrome Development Tools.
I have a difficulty understanding how exactly to interpret it.
In particular, considering a scenario shown in the screenshot, it seems to me like these operations underscored by the blue lines ("recalculate styles", "composite") have been offset to the right, because when I scrub through the FPS chart bar that shows the animation, the timing of the animation starts and ends exactly where the green region does, instead of where the operations themselves start and end.
Is this indeed due to some offset (perhaps a bug in devtools?) or is there some deeper explanation to it that I'm unaware of?
I would appreciate any help as this has been bugging me for quite a while.
EDIT:
I could paraphrase my question in this way as well:
How did all these frames render if no operations took place like "recalculate styles" and "compositing"?
RESOLVED:
I apologize for not returning to this immediately after I solved the mystery for myself. I was very busy in the meantime.
Hereby, I confirm that yes, indeed, the confusion was due to the cursor being recorded (as suspected in the comments) but at the time I wasn't aware of it.
I want to thank everybody in the comments for their suggestions and their will to help.

How do I change the looks of the structure guide lines in VS2017?

The new structure guide lines in VS2017 are extremely confusing, as they are positioned in the middle of a character, instead of to the left. The biggest problem is that I don't know when my cursor is ALL the way to the left, as it seems to be when it is standing on the grid line, but it may off by one.
How can I change them to look more like Visual Code? I know how to enable and disable them but can't find any way to alter their looks.
No guide lines in VS2017: This does not help me much.
With guide lines in VS2017: This is awful, it looks like there is just 1 space between two guide lines, when in fact there are two!
Guide lines in Visual Code: Very helpful.
Finally found this plugin, which fixes the main off-by-one problem and works for VS2017. See below for a screenshot of the indent guides added by the plugin.
The plugin is customizable, such that you can get a solid line if preferred.

Changing <head> ection with Volt

I've just started playing with Volt, and looked this up on the docs, couldn't find the answer:
I want to add a viewport meta tag on my project's section, but I can't find out how to alter it.
Could anyone shed some light on this issue?
Yea, you can change config/base/index.html This renders at an earlier stage right now, so you can't do bindings. (It's rendered as erb right now) We have the ability to render templates to strings, so the plan is to make it so all of the initial rendering process is done with volt templates. We just haven't gotten around to it yet :-)
Okay, I found the file on "config/base/index.html" (Volt 0.9.3)
Gonna leave this here, in case someone else needs it in the future =]

Pygal Displays Box plot wrong

When displaying a box graph, pygal displays values outside of the normal zones. You can see the example on their site as well:
You'll notice that no values are above 16,000 or below -4000 (in fact none are below 0). It just doesn't display properly.
This is posted for anyone who doesn't look on the website for answers (which I don't usually).
There is a solution to this problem, and it is not resolved completely yet - but there is a quick fix.
In the meantime, to make it work (as expected) instantiate the object like this:
box_plot = pygal.Box(mode='extremes')
You'll notice that the above example will be solved, and in fact to my knowledge this is the only way to make box plots work.
To follow the issue: Link to the issue request

Using Mathematica to build presentations and documents

I use Mma mainly to solve relatively small problems.
I want to start using it also to prepare my presentations and documents, but I am having troubles to learn how to do it from the embedded help, and I guess some good resources may be available elsewhere.
Do you know any useful pointers (books, papers, videos ...)?
Do you have a "bag of tricks" to post here?
Edit
This question received two answers so far (#mzabsky's and Mr.Wizard's) and although both are useful, perhaps my concerns are much more basic. So I am posting an example of the kind of things I am unable to do (or understand how to discern how others did them).
I took the following example from The Mathematica Journal (the notebook at the left on the following image - click on the image to see full size):
So, some issues, just to get the idea of my troubles:
1) I copied the text to my .nb on the right, formatted it with the same style (text), but the appearance is different, so I guess the style definition is different. How can I copy the style definitions from one .nb to the other?
2) The table below the text block doesn't have an attached style. How was it formatted? Where is the background color defined?
I would like pointers to read (or videos to look, or whatever) about these issues. I don't want you to write down here a book on Mathematica formatting!
Summary of the links posted in answers
A Mathgroup thread (John Browne) and here (David Park and
Selwyn Hollis)
Advice from Bob Ueland
The Writing Assistant Palette
David Park's notes
Simon's documents
Tips for Mathematica SlideShow presenters
Notebook formatting
Presentations with Mathematica
Videos
Tips for Mathematica Slide Show Presenters
How to - Automatic Slide Show
Create a Lecture Notebook
I use Mathematica to take lecture notes in real time without any major issues (while the proud TeX guys struggle hard to keep up :) ). I have also used it for most math-related homework/assignments I wrote during past two and half years on university.
Before you start, you may want to look at some of these video tutorials.
Also, a few recommendations from me:
Keyboard shortcuts are the key to type fast. Ctrl+9 for inline math cell, Ctrl+6 for superscript, etc.
Learn symbol identifiers for the "esc - symbol - esc" notation. "sum" for Sum, "es" for empty set...you can find list of these in the Mathematica documentation. I have encountered only very few symbols I wanted to type that don't have the esc notation name (for example, leftwards double arrow or double right tee).
Type all math-related stuff into inline math cells. The math cell will do some of the math related formatting for you - put spaces where they belong, render all variables and symbols in italics, etc.
Use the preformatted templates found in "New"->"Styled Notebook".
Do not use ENTER for breaklines, individual paragraph should go into separate text cells (Ctrl+Shift+D) so Mathematica can break the content into individual pages/slides correctly.
In-built Mathematica PDF export sucks big-time; I use CutePDF printer for this.
Also, save often and back up often (Dropbox/Syncplicity are the ideal solution), one misplaced keyboard shortcut can turn hundred hours of work worth document into a goulash (trust me, been there) :)
Example of lecture notes I took in real-time during lecture (it is in Czech, but that doesn't matter much).
I agree with all that mzabsky said in his answer.
Here's a few of extra things:
I find it useful to make statements using a Text or DisplayFormula cell then manually group a Mathematica check/proof to the statement which is then collapsed and can be displayed when you want.
The Writing Assistant Palette has quite a few useful constructions in it that you can learn from.
Finally, I found it really useful to make my own style sheet for a couple reasons:
1) the built-in ones are a bit ugly; 2) it really helps you to understand how the notebooks work.
To see examples of the stylesheet I made (which I don't claim to be perfect - I didn't bother making it work in all screen environments) look at some of the files in ftp://ftp.physics.uwa.edu.au/pub/MATH2200/2010/. I use a similar stylesheet in all of my notes - I have many research projects primarily contained in Mma notebooks, eg http://arxiv.org/abs/1102.3043.
Like Mr Wizard, I also recommend David Park's notes as a starting point. Also, you should study stylesheets that you like by going to the Format menu and clicking "Edit Stylesheet". Don't forget to follow the links through the cascade of stylesheets (version 6 onwards).
To answer the questions in your edit: Once you are viewing a notebook's stylesheet, you can save it, edit it, and use it in your own documents. Stylesheets in
$UserBaseDirectory/SystemFiles/FrontEnd/StyleSheets are automatically available in the menu. You can then use that stylesheet in any notebook by simply selecting it from the menu.
The formating in the screenshot that you posted is all contained in the stylesheet. This includes the grey background in the table.
Addendum:
When distributing notebooks to others, if the stylesheet is external from the notebook, then other people will not see it as you do. To include the stylesheet into the current notebook, you need code like
ss = StyleDefinitions /. Options[EvaluationNotebook[]]
fn = ToFileName[{$UserBaseDirectory, "SystemFiles", "FrontEnd", "StyleSheets"}, ss]
If[FileExistsQ[fn],
style=Get[fn];SetOptions[EvaluationNotebook[],StyleDefinitions->style];,
Print["Can not find file"]]
(Assuming the file is in stored in the conventional place)
Here's an EmbedStylesheet.m that is an improved version of the above.
A Mathgroup thread on embedded stylesheets, particularly here (John Browne) and here (David Park and Selwyn Hollis) might be of interest.
I find stylesheets problematical. In particular I don't like having to remember to embed a stylesheet before I give the notebook to someone else, or before I try to print from an unfamiliar computer. However, along with David Park's tutorial (referenced above by Mr Wizard), I find this advice from Bob Ueland very useful.
If you browse the back-issues of The Mathematica Journal you will see that articles are available in Notebook format. These may be a useful reference.
Edit
I cannot recall a good formatting tutorial at the moment. You can use Show Expression (Win: Shift+Ctrl+E) to view the code expression for a block, such as the table in your example. While one may not enter code by hand in the same form, it can give indications of the options or methods that are used. Code can also be procedurally produced as needed.
I will add links as I find or recall them.
David Park's StyleSheet creation notes
Tips for Mathematica SlideShow presenters
These are brief, but may still be useful:
Notebook formatting
Presentations with Mathematica

Resources