We all work together. I always try to assume the other person is asking a serious question. Depending on how tired I am I may not answer in the best way. Here are some tips to stay on track.
How to answer questions in a helpful way
We all work together. I always try to assume the other person is asking a serious question. Depending on how tired I am I may not answer in the best way. Here are some tips to stay on track.
How to answer questions in a helpful way
How to think like a programmer — lessons in problem solving
by Richard Reis How to think like a programmer — lessons in problem solvingBy Richard Reis [https://twitter.com/richardreeze]If you’re interested inprogramming, you may well have seen this quote before: > “Everyone in this country should learn to program a computer, because it teachesyou to thi…
"This classic Zen Buddhist collection of 49 koans with commentary by Mumon was originally published in 1934, and later included in Paul Reps and Nyogen Senzaki's popular anthology Zen Flesh, Zen Bones. Due to non-renewal it is currently in the public domain in the US (although other parts of Zen Flesh, Zen Bones are not)." source link
I was playing with CSS and Html and made a nice little web app.
Check out my project and read all 49 koans
I love this and will need it sooner than I expect.
"Atkinson Hyperlegible font is named after Braille Institute founder, Robert J. Atkinson. What makes it different from traditional typography design is that it focuses on letterform distinction to increase character recognition, ultimately improving readability."
https://www.brailleinstitute.org/freefont
A Free Hyperlegible Typeface from the Braille Institute
Atkinson Hyperlegible is a free typeface developed by the Braille Institute and Applied Design Works that makes text more readab
Jason Kottkekottke.org
I'm terrible a playing music, this helps.
Hey Siri, Play Some Music: All the Music Commands (and more …)
Apple Music has a couple of not so obvious activities and moods, which you can use to specify what to play:
Here is a list of some *moods* we have tested, we’ve added the station they will trigger:
Here we go with some *activities*, which we’ve tested (musically =):
I just installed Nodemon in my development Docker container. Here are the details.
Game developers need a quick and easy server solution. Docker, nodejs, mysql, sqlite, socket.io are working great for me. This is part of my upcoming series on how to make it all work. Its way, WAY easier than you might think.
Configure Ghost and Prism to provide code syntax highlighting for all popular formats including javascript, php, html, css, markdown and more.
Ghost is a great CMS and it's easy to add a code syntax highlighter such as Prism.
Ghost version 3.3
Prism version 1.21
There are two ways to use Prism: 1) download and serve from your website or 2) serve from a Content Delivery network (CDN). The CDN option is actually easier and better for your viewers. There is a chance that many sites use Prism and once your browser has it in its local cache it won't need to download it again, which makes it faster and uses less bandwidth. So, that's what you will learn about today.
Step 1 - Go to the Prism website and learn a little about it. Look at the Theme bubbles down the right-side of the page. Find a theme that you like and want to use on your Ghost powered blog. I use the "Okaidia" theme on this website. Also, notice that there are many, many language features supported. If you will always just use a few languages then you can hard code them into your setting and only use them. However, if like me there is no telling which language you will post about next then you should use the autoloader feature.
Take note of the latest Prism version. As of this writting I'm using version 1.21.0. You will want to use the most current version.
Step 2 - Find a CDN that hosts Prism. I chose cdnjs.com to serve the Prism files. It's free, easy to use and fast. I recommend you go to cdnjs.com and search for Prism. You will see that there are a lot of options. You don't need all of those, just the ones you are interested in.
Step 3 - There are 3 main parts of Prism you need to make this work. The first part is the CSS. To load this from cdnjs.com looks like this.
Part 1: Choose your theme:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.21.0/themes/prism-okaidia.min.css">
Link to Prism okaidia theme
Notice this version contains the word okaidia
which means it has the color scheme for the Theme I like. You should search for the Theme that you chose in step 1.
Part 2: Find the core js file:
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.21.0/components/prism-core.min.js"></script>
Link to Prism core library
It contains the core
of the Prism library.
Part 3: Find the language modules you want to use, or find the autoloader
version.
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.21.0/plugins/autoloader/prism-autoloader.min.js"></script>
Link to Prism autoloader
These are the 3 minimum components needed to use Prism with Ghost.
Now that you have identified the 3 main components and their links to the CDN, it's time to put them into your Ghost blog.
Ghost makes this very easy to do with the Code injection
feature on their admin page.
Step 4 - Go to your ghost admin page, it is defaulted to site.tld/ghost, and login with your admin account.
Click on the Code injection
menu option on the left. You should see two main sections "Site Header" and "Site Footer".
Part 1 - Place the CSS link in the Site Header
section. It should look something like this:
Site Header portion of Code injection
That's all there is, just copy and paste the above CSS link into the Site Header
section.
Part 2 - The Site Footer
works the same, just copy and paste the core
link and the autoloader
link. If you decided to go with language specific options this is where you would load them instead of the autoloader link.
Remember these links are loaded on every page of your blog even if you don't use them on that page, so keep it simple, small and fast.
Site Footer portion of Code injection
That's all there is to configuring Ghost to use Prism. The next portion will show you how to use them on your blog.
Step 1 - Create a new post in Ghost and press the + icon to add a new section to your page, and then immediately type ```
This puts Ghost into the code entry mode. You can copy and paste your code in here.
Step 2 - Notice on the right hand side of the code entry box there is a place for language. This is where you type in the language for this code snippet. Ghost has done some of the work for you. You don't have to prepend the language type with language-
or lang-
as talked about in the Prism documentation, just put in what you are working with. Such as: js, javascript, html, php, json, css, etc..
Sample html script with language type shown in top-right corner
That's it! You code snippets will now be syntax highlighted with Prism.
For more examples and tips on how to add line numbers and a copy-to-clipboard button check out this Ghost tutorial.
Here are a few examples to look at.
function createBoard(team) {
let out = "";
out += "<div class='text-center'>";
for (col = 1; col <= 10; col++) {
for (row = 1; row <= 10; row++) {
let calcId = team + "-" + zeroPad(row, 2) + zeroPad(col, 2);
let link = ` '${team}', ${row}, ${col}, '${calcId}'`;
out += ` <a class='m-0 p-1 btn btn-dark' href="javascript:fire(${link});" role='button'>`
out += " <span class='title'>";
out += " <span id='" + calcId + "' class='badge badge-dark oi' data-glyph='target'>" + " " + "</span>";
out += " </span>";
out += " </a>";
}
out += " <br> ";
}
out += "</div>";
$('#board-' + team).html(out);
}
Sample Javascript code
@import "ios.css";
/* @import "darkMode.css"; */
@import "toggleSwitch.css";
@font-face {
font-family: Revamped;
src: url("../font/Revamped.ttf") format('truetype');
}
/* get screen width based on device */
:root {
/* desktop vars */
--screen-w1: 500px;
--screen-w2: 495px;
}
@media screen and (max-width: 500px) {
:root {
/* mobile vars */
--screen-w1: 97vw;
--screen-w2: 94vw;
}
}
Sample CSS code
public function getGame($userName, $roomName, $gameToken)
{
//load game
$this->game = $this->loadGame($gameToken);
return $this->game;
}
Sample PHP code
<!-- Main Nav Bar -->
<div class="w3-top hide main">
<div class="w3-bar w3-round-large z-nav-background z-width" xstyle="max-width:500px">
<span class="">
<a onclick="showPanel('lobby')" class="w3-bar-item w3-round-large z-nav-text">Lobby</a>
</span>
<button onclick="showPanel('E-Space')" class="w3-button z-nav-text w3-border w3-border-blue w3-hover-black w3-small">E-Space</button>
<button onclick="showPanel('F-Space')" class="w3-button z-nav-text w3-border w3-border-blue w3-hover-black w3-small">F-Space</button>
</div>
</div>
Sample HTML code
ALTER TABLE `activeUserTable`
ADD PRIMARY KEY (`id`),
ADD KEY `time_index` (`time`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `activeUserTable`
--
ALTER TABLE `activeUserTable`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
COMMIT;
Sample SQL code
Studio Ghibli just announced they’ll be uploading 50 free stills from each of their movies: “feel free to use them as you wish, within the bounds of common sense”
@photonstorm Thanks to @thomaspalef for this excellent resource. . Worth every penny.
I’m a big Apple fan and I have lots of Apple products and the real problem is that iOS is boring. Tim Cook is known for efficiency and Jonathan Ive loves his basic looks, however, when combined they are boring! iOS used to have lots of little details that were exciting to find, but now they are hard to find, hard to discover, and boring when found. They need to let their developers have a little fun, stay in their human guidelines of course, but still have a little fun. Hardware optimization makes sense, but don’t over optimize the software. It can provide a path to fun.
The Anatomy of the Underwater Fiber Optic Cables That Connect the Internet
An Explanation for Why People Don’t Often See ‘B’ Batteries
Everything starts somewhere...
The Internet of Things - Nuts & Volts Magazine - For The Electronics Hobbyist
NUTS & VOLTS MAGAZINE (NOVEMBER2014)
THE INTERNET OF THINGS By Bryan Bergeron View Digital Edition
» Skip to the Extras Since the birth of the Internet, there has been talk of total connectivity — between people, people and their possessions, and things to things. Up until recently, the reality has been that such ecosystems existed only in academic and corporate research centers. Today, the Internet of Things (IoT) is a practical reality in many settings.
Read the original artical at: The Internet of Things - Nuts & Volts Magazine - For The Electronics Hobbyist
AI, Apple and Google — Benedict Evans
There are really two things going on here - you’re using voice to fill in a dialogue box for a query, and that dialogue box can run queries that might not have been possible before. Both of these are enabled by machine learning, but they’re built quite separately, and indeed the most interesting part is not the voice but the query. In fact, the important structural change behind being able to ask for ‘Pictures with dogs at the beach’ is not that the computer can find it but that the computer has worked out, itself, how to find it. You give it a million pictures labelled ‘this has a dog in it’ and a million labelled ‘this doesn’t have a dog’ and it works out how to work out what a dog looks like. Now, try that with ‘customers in this data set who were about to churn’, or ‘this network had a security breach’, or ‘stories that people read and shared a lot’. Then try it without labels ('unsupervised' rather than 'supervised' learning).
Today you would spend hours or weeks in data analysis tools looking for the right criteria to find these, and you’d need people doing that work - sorting and resorting that Excel table and eyeballing for the weird result, metaphorically speaking, but with a million rows and a thousand columns. Machine learning offers the promise that a lot of very large and very boring analyses of data can be automated - not just running the search, but working out what the search should be to find the result you want.
More info at: AI, Apple and Google — Benedict Evans
‘We Hardly Understand Anything’: Rodney Brooks On Artificial Intelligence | Radio Boston
If you’re going to talk about robots, there’s no better person to talk with than Rodney Brooks. He’s the former director of MIT’s Computer Science and Artificial Intelligence Laboratory. He’s also co-founder of two companies: iRobot, maker of the Roomba, and now Rethink Robotics.
He’s spent his entire life thinking about robots and artificial intelligence. He sat down with us to talk how he built his first machine, what technology we have yet to tackle and why Stephen Hawking and Elon Musk are wrong to fear the future of robots.
More info at: ‘We Hardly Understand Anything’: Rodney Brooks On Artificial Intelligence | Radio Boston
Robot Surgeons Are Taking Over the Operating Room - IEEE Spectrum
Advanced surgical robots are already helping doctors perform operations with previously unimaginable precision. But fairly soon, doctors may be able to hand the scalpel over entirely—at least for simple, repetitive procedures—freeing up human surgeons’ valuable time for more complex work.
Some of the latest surgical robots can already plan and execute simple surgical tasks entirely on their own, select optimal approaches and tools, and even use deep learning to observe and replicate new procedures. So we’ve rounded up a few of the coolest robo-surgeons just for you.
More info at: Robot Surgeons Are Taking Over the Operating Room - IEEE Spectrum
Researchers want robots to feel pain | The Verge
Researchers in Germany are developing a way for robots to feel pain, in the hopes that doing so will enable them to better protect humans. The researchers, from Leibniz University of Hannover, are working on an "artificial robot nervous system to teach robots how to feel pain," IEEE Spectrum reports, and presented their project at a robotics and automation conference in Sweden last week. Under the system, robots would identify pain and quickly respond to avoid further damage to their parts.
More info at: Researchers want robots to feel pain | The Verge
Rethinking Knowledge in the Internet Age - Los Angeles Review of Books
The internet started out as the Information Highway, the Great Emancipator of knowledge, and as an assured tool for generating a well-informed citizenry. But, over the past 15 years, that optimism has given way to cynicism and fear — we have taught our children that the net is a swamp of lies spun by idiots and true believers, and, worse still, polluted by commercial entities whose sole aim is to have us click to the next ad-riddled page.
More info at: Rethinking Knowledge in the Internet Age - Los Angeles Review of Books
Robots are doing more and more human jobs. We need a plan on how the majority of humans will survive when there is no work for them to do. How do we need to change our economy so that everyone benefits from the work robots are doing, not just the few that control all the robots. Should taxes be collected and the benefits shared with everyone? Think about the control the few companies that manage the robots will have.
How worthless will we all feel, what will keep us entertained?
http://mentalfloss.com/article/58332/7-new-robots-designed-do-human-jobs
Robots are faster than we are. How long before we just race robots?
http://www.slashgear.com/puma-made-a-robotic-shoebox-to-help-runners-train-30438359/
Guns won’t protect us from the robots.
http://boingboing.net/2016/04/26/riot-control-robot-unveiled-in.html
How should I parse user input in a text adventure game? - Game Development Stack Exchange