do

Why Using WordPress Addons Will Benefit Your Business Website

Using WordPress for a business website is one of the best choices you can make as a business. It’s easy to get a site online and configured with a theme in under an hour. This is why WordPress now powers 35 percent of the websites on the internet. If you’re new to WordPress and don’t know why using WordPress plugins is helpful, this post will help. Below are seven benefits your business website will see when using plugins from the WordPress ecosystem. 1. Communicate With Customers It’s hard to run a business if your customers have no way to get

The post Why Using WordPress Addons Will Benefit Your Business Website appeared first on Photoshop Lady.




do

Search Engine Optimization – How to Double Your Client’s Organic Traffic

The business world has changed over the years and you’ll need to rely on digital methods of marketing your brand to succeed. One of the best ways to do that is through search engine optimization (SEO) to get better traffic for your business. When you use the right techniques and strategies, you can double your organic traffic.  If you’re in the business of helping people with their search engine optimization needs, here are some of the best ways to double your client’s organic traffic. Help Clients Work On Their Content You need to teach and advise your clients on how

The post Search Engine Optimization – How to Double Your Client’s Organic Traffic appeared first on Photoshop Lady.




do

Cara Menang Terus Main Domino QQ Terpercaya

Cara Menang Terus Main Domino Terpercaya Domino QQ Terpercaya – Inilah tingkatan kartu terbagus di dalam permainan live poker, contohnya 10, J, Q, K, AS yang berlambang keriting seluruhnya. Kamu bisa melakukan raise pada saat mempunyai kartu bagus agar mendapatkan keuntungan besar di dalam permainan tersebut. Setelah anda mendapatkan tiga kartu domino tersebut. Anda diharuskan […]

The post Cara Menang Terus Main Domino QQ Terpercaya appeared first on Themegalaxy.




do

Florida Man Arrested Trying To Quarantine On Abandoned Disney Treasure Island, And That’s What This Island Looks Like From The Inside

The 42-year-old said he didn’t hear numerous deputies searching the private island for him on foot, by boat and by...




do

Strange Things Behind Belgian Windows

160 photos of the strange and intriguing objects people display behind their windows, for passers-by to look at. These things...




do

Masks For Dog Walking: This Girl Makes Unusual Face Masks To Keep Walking With Her Dog

According to an artist: “During this quarantine period, I needed something to cover my face to walk my dogs and...




do

This Family Uses Chalk Art To Go On Adventures During The Lockdown

Quarantine might have trapped us inside the shells of our houses; however, some people are finding ways to escape the...




do

The Lockdown Illustrated By Mariano Pascual

This unprecedented period of lockdown has inspired many artists, including the illustrator Mariano Pascual. The Argentinian visual artist based in...




do

Fran McCaffery’s new challenge: Recruiting preps you don’t know quite so well

Film on Class of 2021 high school basketball players dried up in mid-March when the high school season ended, with most state tournaments (Iowa’s excluded) canceled. If you’re a college...



  • Iowa Men's Basketball

do

Tony Paoli steps down as Cedar Rapids RoughRiders high school hockey coach

CEDAR RAPIDS — Tony Paoli announced Thursday that he is stepping down after four years as head coach of the Cedar Rapids RoughRiders high school hockey team. Paoli did amazing work, taking...



  • Minor League Sports

do

Best sports movies: College football managed to survive ‘Horse Feathers’ takedown

Editor’s note: The Gazette sports staff has compiled lists of its top 15 favorite sports movies. Each day, a different staffer will share some insight into one of their favorites. Some of them...




do

Iowa should give cash to undocumented immigrants

Immigrants have been disproportionately affected by COVID-19 pandemic. They’re more likely than native-born Americans to be laboring to keep our essential services running, especially in the...




do

Dubuque woman pleads to helping buy heroin that led to fatal overdose of another person

CEDAR RAPIDS — A Dubuque woman who helped her boyfriend and another person buy heroin that later led to a fatal overdose was convicted Thursday in federal court. Jacqueline M. Birch, 23,...




do

Douglas Robison

DOUGLAS CAREY ROBISON
Cedar Rapids

Douglas Carey Robison, 53, died April 30, 2020. A Celebration of Life will be held later this month in Cedar Rapids.
Survivors include his children: daughter, Kerrie Ann Robison (36), daughter, Jamie Lee Robison (32), and son, Bradley Douglas Robison (31); brothers, Joseph, Steven, Robert and Michael; a sister, Tina Robison; his mother, Rose Gates; and 10 grandkids. Brandon Hugh Robison (22), was the eldest among them, Doug loved to show him off. Doug also had two great-grandkids who he adored.
He was preceded in death by his daughter, Stephanie Lynn Robison; and his father, Robert Hugh Robison.
Doug liked to play pool and cards. He loved to see his grandkids grow and play. He was hardworking, and his last permanent job was doing construction. Doug recently volenteered at Olivet to help pass time. He was loved by many. He was so proud of all of his children and grandkids.
One thing everyone knew about our dad is that he always had a beer in his hand. Rest in paradise, Dad. You are missed and loved by many.We love you!!




do

Adrienne Eugina Doolin Howard

ADRIENNE EUGINA DOOLIN HOWARD
Cedar Rapids


Adrienne Eugina Doolin Howard, 75, daughter of Pearl A. Doolin and Emmitt Eugene Doolin, was born June 16, 1944. She departed this life Thursday, April 30, 2020, of complications from COVID-19, after a lengthy stay at Living Centers Nursing Home Facility in Cedar Rapids, Iowa.
She was born in St. Louis, Mo., and had a passion for soul food, cooking, music
and her church. She reared four children in East St. Louis, Ill.
She was preceded in death by children, Howard E. Doolin, Sr. and Viola E. Howard; and siblings, Burdell M., Madeline and Regina Doolin.
Adrienne E. Howard is survived by two sons, Emmitt J. Doolin of Marion, Iowa, and David C. Washington of Carbondale, Ill.; siblings, Dedric, Aaron and Emmitt E. (Michelle) Doolin; Steven Bacon; Derek, Kyle and Lori Doolin; Louisia (Eric) Harrison, Donna Jackson and Stephanie Doolin Bacon; many grandchildren and great-grandchildren and many other relatives, family members and friends.
The family expresses a special thank you to her brother, Burdell's widow, Christine Arenas Doolin, who met our mother 18 years ago and touched her life in many ways.
A family memorial will be planned at a later date.
Service by Officer. www.officerfh.com.




do

Bernadine "Bern" Caroline McDonald Roushar

BERNADINE "BERN" CAROLINE MCDONALD ROUSHAR
Cedar Rapids

Bernadine "Bern" Caroline McDonald Roushar, 86, of Cedar Rapids, Iowa, passed away on Saturday, May 2, 2020. A private graveside service will be held at 11 a.m. on Saturday, May 9, at Mount Calvary Catholic Cemetery in Cedar Rapids. A Funeral Mass will be held at a later date.
Bern was the second oldest of six daughters born to John and Mary McDonald in Victor, Iowa, where she grew up. She married John E. "Jack" Roushar on Aug. 12, 1953.
She was preceded in death by her husband, parents, two sisters and several in-laws.
Jack and Bern founded Roushar Pharmacy in Cedar Rapids in 1970. She volunteered and was a gift shop buyer at Mercy Hospital in Cedar Rapids for 30 years.
She is survived by her daughter, Brenda Roushar (John) Cooney and five grandchildren, Jacklyn Caroline Cooney, Julie and Darryn Records, and John and Candace Cooney; three sisters and spouse's; and many nieces and nephews.
In lieu of flowers, memorials may be directed to the Mercy Hospital Volunteer Auxiliary. Condolences may be directed to the family at www.cedarmemorial.com under obituaries.




do

Dorothy Perry

CASTALIA
Dorothy Perry, 77, died Thursday, May 7, 2020. Schutte-Grau Funeral Home and Cremation Service, Postville.




do

What does a decentralized WordPress environment look like?

Watch my video and see what a decentralized WordPress environment might look like. Almost everything we rely on to operate online is a centralized platform. WordPress, Twitter, Facebook, YouTube, you name it—they’re all gigantic, centralized platforms. Ok, sure, but why does that matter? It matters because the bigger centralized platforms get, the less freedom users […]



  • Centralization vs. Decentralization
  • Videos

do

I hate recurring payments…so why do I sell my software with ’em?

It’s simple—I don’t like recurring payments. And I don’t know about you, but with most recurring payments, I feel anxiety around this need to “get my money’s worth.” In other words, I often feel like I under-utilize the product and thus overpay to some extent. So why do I sell my software under a recurring […]




do

Do your duty, wear a mask

When I wear a mask to go into the grocery store or the post office, it’s not because I think it protects me from coming down with the coronavirus. I wear it to protect the people around me.

I am lucky to be in a position where I can follow the CDC guidelines to maintain social distancing, practice vigilant hygiene and stay at home for the most part. When I am in the grocery store I am grateful for the measures taken to protect customers and employees as much as possible from exposure to the virus. I wear a mask so I do not defeat the safeguards in place to protect public health. I have no symptoms. But I have not been tested. I cannot guarantee that I am not an asymptomatic carrier. By wearing a mask when I shop, making sure I wash and sanitize my hands before I go to the store, handling as few items on the shelves as possible, and maintaining a six foot distance from my fellow shoppers, I can guarantee I have done my part to protect them and the dedicated store employees serving us. But even more important, I am protecting the people at home where these customers and workers return when they leave the store. It is a very small thing to do but it is my duty to do it.

Joe Mischka

Cedar Rapids



  • Letters to the Editor

do

Green-Douglass: County is served well by five at-large supervisors

The Johnson County Board of Supervisors consists of five at-large members. Recently some people in the rural community have advocated for a board elected from districts within the county. A House Study Bill a few years ago would have required counties with a population greater than 150,000 to elect supervisors from districts, though a similar bill had failed earlier.

While districting a board of supervisors may appear to provide more representation to rural residents, the opposite would result. Currently, any resident anywhere in the county has five supervisors to whom they can communicate their needs. With districts, residents would have only one supervisor representing them.

There are many reasons electing supervisors from districts is not a good idea for Johnson County. But here is why, in fact, it’s a bad idea.

In Johnson County, our current practice for funding projects is determined using a needs assessment approach. This can be seen in our Five-Year Road Plan and works quite well. It is a triage of sorts, with the greatest need addressed first. With districts, it would become necessary to rotate projects based on the district in which it is located rather than the greatest need.

Imagine what might have happened in the 2016 emergency situation on the Highway 965 bridge over the Iowa River! During routine bridge inspections, county engineers determined repairs to that bridge to be our county’s greatest road need. It was an issue of public safety. Our at-large Board of Supervisors approved that project for immediate repairs.

Had we had districts, that project would land within my district and might have been put on hold, waiting for my district to have its turn at a big roads project. Just a couple years later, Swan Lake Road bridge over I-380, also in “my district” was deemed in need of immediate repair. While there is not a lot of traffic on that bridge, it is an essential route for farmers in the area. The closure was inconvenient during one farming season, but is now open and in good repair.

With districts, that bridge, in particular, would still be closed because it would be unfair for one district to have two big bridge repair jobs done before other districts had one done.

There are many other reasons why Johnson County’s Board of Supervisors should continue as an at-large body. Each county should be allowed to determine its own board of supervisors structure.

Lisa Green-Douglass is a candidate in the Democratic primary for Johnson County Board of Supervisors.




do

Iowa should give cash to undocumented immigrants

Immigrants have been disproportionately affected by COVID-19 pandemic. They’re more likely than native-born Americans to be laboring to keep our essential services running, especially in the food processing sector that has been ravaged by the pandemic.

And yet immigrants living here illegally — including many food industry workers, their family members and people who have been living here since they were children — do not get the same coronavirus relief that legal citizens do, such as the $1,200 federal payment millions of Americans are receiving.

To remedy the situation, Iowa could coordinate direct cash payments to undocumented immigrants who were left out of the federal program. California announced such a program last month, offering $500 payments to thousands of undocumented Californians.

The public health crisis is tightly bound to the immigration crisis. It has exposed disparities in the workforce and also given rise to protectionists who want to restrict migration.

Iowa’s meat processing industry has been slammed by the virus, with at least one plant in Iowa reporting more than half of its workers have tested positive. Those production lines are heavily populated by immigrants. Well over 1,000 combined cases have been reported at four major packing facilities.

Nationally, 28 percent of agriculture workers and 29 percent of food processing workers are foreign-born, according to the pro-immigration New American Economy Research Fund.

Most immigrant workers have legal status, but many don’t. Some of those who are legal have family members who are undocumented. An influx of cash would help bring some stability to struggling families so they can weather the crisis.

At the same time we are asking essential workers to risk their health to sustain us, the anti-immigration lobby has used the pandemic as an opportunity to ramp up their campaign to cut off the flow of workers across borders. As one recent example, four GOP senators — including Iowa’s Sen. Chuck Grassley — sent a letter this week to the Trump administration, asking for guest worker visas to be suspended until next year.

In the pandemic, the idea of giving people money quickly gained political support. Direct payments are not mucked up by the corporate cronyism that plagues traditional economic development, a la checks to companies and targeted tax breaks. When politicians and bureaucrats pick certain businesses to stimulate, they do a bad job.

As long as the government is doing stimulus, the best avenue is writing checks to individuals. People need to buy stuff and as long as the economy limps on, they can buy stuff with money. Immigrants are people, even if they came here illegally. They are also workers, caretakers and taxpayers.

Direct payments would not be a special kickback or a reward for people living in the country illegally. It would be just like the $1,200 direct deposit I got from the government. It comes with a recognition that they are the same as us, important contributors of our culture and economy who are victims of an unworkable legal system.

If the federal government won’t do it, Iowa should.

adam.sullivan@thegazette.com; (319) 339-3156




do

How to Use apply_filters() and do_action() to Create Extensible WordPress Plugins

How does a single plugin become the basis of a thriving technology ecosystem? Partly by leveraging the extensibilitythat WordPress’s event-driven Hooks system makes possible.




do

9 Obvious Things You Probably Don’t Know About WordPress SEO

f there is one thing you should include in your WordPress website’s strategy, it’s search engine optimization. Because when you do it right, you’ll be rewarded. Hugely rewarded. With tons of high quality visitors.




do

The Lockdown Illustrated by Mariano Pascual

Cette période inédite de confinement a inspiré de nombreux artistes, dont fait partie l’illustrateur Mariano Pascual. L’artiste argentin établi à Barcelone a traduit en images les sentiments flous, désordonnés et un brin anxiogènes induits par la pandémie. Stocks de papier toilette, télétravail et laisser-aller derrière les portes closes de son domicile… À travers une série de visuels […]





do

WPZoom: WordPress related Firefox Addons

Firefox is regarded as the best Web browser in terms of extensions. It has hundreds of add-ons, which can be downloaded from here. Pavel Ciorici collected the most useful WordPress related Firefox extensions (addons) and compiled them on this post. photo by: Pavel Ciorici

The post WPZoom: WordPress related Firefox Addons appeared first on WPCult.




do

Dubuque woman pleads to helping buy heroin that led to fatal overdose of another person

CEDAR RAPIDS — A Dubuque woman who helped her boyfriend and another person buy heroin that later led to a fatal overdose was convicted Thursday in federal court.

Jacqueline M. Birch, 23, pleaded guilty in U.S. District Court to one count of aiding and abetting the distribution of a controlled substance.

During the plea hearing, Birch admitted she knew that another person was going to illegally distribute a drug last May, and she aided in that distribution.

Evidence at a previous hearing showed that Birch drove her boyfriend, Mateusz Syryjczyk, 29, of Rockford, Ill., and another person, not identified in court documents, to a residence in Dubuque on May 27. Birch and the other person went into the residence and bought heroin from a dealer. The three drove to a hotel in Dubuque and all used the heroin.

The other person began to overdose in the room, but Birch and Syryjczyk didn’t immediately call 911, according to evidence. Over many hours, Birch occasionally would perform CPR on the person to restore some breathing function, though the person never regained consciousness.

Eventually, Birch and Syryjczyk decided to call 911, and Syryjczyk took the remaining drug paraphernalia from the room to prevent law enforcement from finding it, according to court documents. Birch and Syryjczyk also made false statements to police about the cause of the person’s condition.

Court documents showed the overdose victim died at the scene. An autopsy later determined the cause of death was use of heroin, fentanyl and valeryl fentanyl.

Syryjczyk previously pleaded to misprision of a felony and remains free on bond pending sentencing.

Birch faces up to 20 years in federal prison, a $1 million fine and supervised release for life following her prison term.

Sentencing will be set after a presentencing report is prepared.

The case was investigated by the Dubuque Drug Task Force and is being prosecuted by Assistant U.S. Attorney Dan Chatham.

Comments: (319) 398-8318; trish.mehaffey@thegazette.com




do

Injured Cedar Lake pelican bound for Henry Doorly Zoo in Omaha

CEDAR RAPIDS — An injured pelican rescued at Cedar Lake on Wednesday will have a permanent home at one of the top zoos in the Midwest.

“We downloaded all of the paperwork (on Friday), and we want to get it transported (to Henry Doorly Zoo and Aquarium in Omaha) within a week,” said Tracy Belle, founder and director of Wildthunder Wildlife and Animal Rehabilitation and Sanctuary in Independence.

“It’s doing well — we’re going to get it outside today to decompress a little.”

Belle, who also serves as primary animal rehabilitator at Wildthunder, believes the pelican is young — the average life span is 20 to 25 years — and she is not sure of its gender.

It suffered broken carpal bones and, according to Belle, surgical repair is unlikely.

“The veterinarian told me that the injury appears to be five to six weeks old,” she said. “I can only speculate, but I think when it flew into the lake, it may have clipped a power line.”

Belle said the pelican will need one more veterinary exam before transport to Omaha. In the meantime, “its appetite is good,” she said. “It’s eating five to 10 pounds of fish per day.”

Henry Doorly is closed due to the COVID-19 pandemic. In a typical year, the complex attracts about 2 million visitors.

Comments: (319) 368-8857; jeff.linder@thegazette.com




do

This might as well be a Herschel ad. ???? (at London, United...



This might as well be a Herschel ad. ???? (at London, United Kingdom)




do

Auphonic Add-ons for Adobe Audition and Adobe Premiere

The new Auphonic Audio Post Production Add-ons for Adobe allows you to use the Auphonic Web Service directly within Adobe Audition and Adobe Premiere (Mac and Windows):

Audition Multitrack Editor with the Auphonic Audio Post Production Add-on.
The Auphonic Add-on can be embedded directly inside the Adobe user interface.


It is possible to export tracks/projects from Audition/Premiere and process them with the Auphonic audio post production algorithms (loudness, leveling, noise reduction - see Audio Examples), use our Encoding/Tagging, Chapter Marks, Speech Recognition and trigger Publishing with one click.
Furthermore, you can import the result file of an Auphonic Production into Audition/Premiere.


Download the Auphonic Audio Post Production Add-ons for Adobe:

Auphonic Add-on for Adobe Audition

Audition Waveform Editor with the Auphonic Audio Post Production Add-on.
Metadata, Marker times and titles will be exported to Auphonic as well.

Export from Audition to Auphonic

You can upload the audio of your current active document (a Multitrack Session or a Single Audio File) to our Web Service.
In case of a Multitrack Session, a mixdown will be computed automatically to create a Singletrack Production in our Web Service.
Unfortunately, it is not possible to export the individual tracks in Audition, which could be used to create Multitrack Productions.

Metadata and Markers
All metadata (see tab Metadata in Audition) and markers (see tab Marker in Audition and the Waveform Editor Screenshot) will be exported to Auphonic as well.
Marker times and titles are used to create Chapter Marks (Enhanced Podcasts) in your Auphonic output files.
Auphonic Presets
You can optionally choose an Auphonic Preset to use previously stored settings for your production.
Start Production and Upload & Edit Buttons
Click Upload & Edit to upload your audio and create a new Production for further editing. After the upload, a web browser will be started to edit/adjust the production and start it manually.
Click Start Production to upload your audio, create a new Production and start it directly without further editing. A web browser will be started to see the results of your production.
Audio Compression
Uncompressed Multitrack Sessions or audio files in Audition (WAV, AIFF, RAW, etc.) will be compressed automatically with lossless codecs to speed up the upload time without a loss in audio quality.
FLAC is used as lossless codec on Windows and Mac OS (>= 10.13), older Mac OS systems (< 10.13) do not support FLAC and use ALAC instead.

Import Auphonic Productions in Audition

To import the result of an Auphonic Production into Audition, choose the corresponding production and click Import.
The result file will be downloaded from the Auphonic servers and can be used within Audition. If the production contains multiple Output File Formats, the output file with the highest bitrate (or uncompressed/lossless if available) will be chosen.

Auphonic Add-on for Adobe Premiere

Premiere Video Editor with the Auphonic Audio Post Production Add-on.
The Auphonic Add-on can be embedded directly inside the Adobe Premiere user interface.

Export from Premiere to Auphonic

You can upload the audio of your current Active Sequence in Premiere to our Web Service.

We will automatically create an audio-only mixdown of all enabled audio tracks in your current Active Sequence.
Video/Image tracks are ignored: no video will be rendered or uploaded to Auphonic!
If you want to export a specific audio track, please just mute the other tracks.

Start Production and Upload & Edit Buttons
Click Upload & Edit to upload your audio and create a new Production for further editing. After the upload, a web browser will be started to edit/adjust the production and start it manually.
Click Start Production to upload your audio, create a new Production and start it directly without further editing. A web browser will be started to see the results of your production.
Auphonic Presets
You can optionally choose an Auphonic Preset to use previously stored settings for your production.
Chapter Markers
Chapter Markers in Premiere (not all the other marker types!) will be exported to Auphonic as well and are used to create Chapter Marks (Enhanced Podcasts) in your Auphonic output files.
Audio Compression
The mixdown of your Active Sequence in Premiere will be compressed automatically with lossless codecs to speed up the upload time without a loss in audio quality.
FLAC is used as lossless codec on Windows and Mac OS (>= 10.13), older Mac OS systems (< 10.13) do not support FLAC and use ALAC instead.

Import Auphonic Productions in Premiere

To import the result of an Auphonic Production into Premiere, choose the corresponding production and click Import.
The result file will be downloaded from the Auphonic servers and can be used within Premiere. If the production contains multiple Output File Formats, the output file with the highest bitrate (or uncompressed/lossless if available) will be chosen.

Installation

Install our Add-ons for Audition and Premiere directly on the Adobe Add-ons website:

Auphonic Audio Post Production for Adobe Audition:
https://exchange.adobe.com/addons/products/20433

Auphonic Audio Post Production for Adobe Premiere:
https://exchange.adobe.com/addons/products/20429

The installation requires the Adobe Creative Cloud desktop application and might take a few minutes. Please also also try to restart Audition/Premiere if the installation does not work (on Windows it was once even necessary to restart the computer to trigger the installation).


After the installation, you can start our Add-ons directly in Audition/Premiere:
navigate to Window -> Extensions and click Auphonic Post Production.

Enjoy

Thanks a lot to Durin Gleaves and Charles Van Winkle from Adobe for their great support!

Please let us know if you have any questions or feedback!







do

Markdown Comes Alive! Part 1, Basic Editor

In my last post, I covered what LiveView is at a high level. In this series, we’re going to dive deeper and implement a LiveView powered Markdown editor called Frampton. This series assumes you have some familiarity with Phoenix and Elixir, including having them set up locally. Check out Elizabeth’s three-part series on getting started with Phoenix for a refresher.

This series has a companion repository published on GitHub. Get started by cloning it down and switching to the starter branch. You can see the completed application on master. Our goal today is to make a Markdown editor, which allows a user to enter Markdown text on a page and see it rendered as HTML next to it in real-time. We’ll make use of LiveView for the interaction and the Earmark package for rendering Markdown. The starter branch provides some styles and installs LiveView.

Rendering Markdown

Let’s set aside the LiveView portion and start with our data structures and the functions that operate on them. To begin, a Post will have a body, which holds the rendered HTML string, and title. A string of markdown can be turned into HTML by calling Post.render(post, markdown). I think that just about covers it!

First, let’s define our struct in lib/frampton/post.ex:

defmodule Frampton.Post do
  defstruct body: "", title: ""

  def render(%__MODULE{} = post, markdown) do
    # Fill me in!
  end
end

Now the failing test (in test/frampton/post_test.exs):

describe "render/2" do
  test "returns our post with the body set" do
    markdown = "# Hello world!"                                                                                                                 
    assert Post.render(%Post{}, markdown) == {:ok, %Post{body: "<h1>Hello World</h1>
"}}
  end
end

Our render method will just be a wrapper around Earmark.as_html!/2 that puts the result into the body of the post. Add {:earmark, "~> 1.4.3"} to your deps in mix.exs, run mix deps.get and fill out render function:

def render(%__MODULE{} = post, markdown) do
  html = Earmark.as_html!(markdown)
  {:ok, Map.put(post, :body, html)}
end

Our test should now pass, and we can render posts! [Note: we’re using the as_html! method, which prints error messages instead of passing them back to the user. A smarter version of this would handle any errors and show them to the user. I leave that as an exercise for the reader…] Time to play around with this in an IEx prompt (run iex -S mix in your terminal):

iex(1)> alias Frampton.Post
Frampton.Post
iex(2)> post = %Post{}
%Frampton.Post{body: "", title: ""}
iex(3)> {:ok, updated_post} = Post.render(post, "# Hello world!")
{:ok, %Frampton.Post{body: "<h1>Hello world!</h1>
", title: ""}}
iex(4)> updated_post
%Frampton.Post{body: "<h1>Hello world!</h1>
", title: ""}

Great! That’s exactly what we’d expect. You can find the final code for this in the render_post branch.

LiveView Editor

Now for the fun part: Editing this live!

First, we’ll need a route for the editor to live at: /editor sounds good to me. LiveViews can be rendered from a controller, or directly in the router. We don’t have any initial state, so let's go straight from a router.

First, let's put up a minimal test. In test/frampton_web/live/editor_live_test.exs:

defmodule FramptonWeb.EditorLiveTest do
  use FramptonWeb.ConnCase
  import Phoenix.LiveViewTest

  test "the editor renders" do
    conn = get(build_conn(), "/editor")
    assert html_response(conn, 200) =~ "data-test="editor""
  end
end

This test doesn’t do much yet, but notice that it isn’t live view specific. Our first render is just the same as any other controller test we’d write. The page’s content is there right from the beginning, without the need to parse JavaScript or make API calls back to the server. Nice.

To make that test pass, add a route to lib/frampton_web/router.ex. First, we import the LiveView code, then we render our Editor:

import Phoenix.LiveView.Router
# … Code skipped ...
# Inside of `scope "/"`:
live "/editor", EditorLive

Now place a minimal EditorLive module, in lib/frampton_web/live/editor_live.ex:

defmodule FramptonWeb.EditorLive do
  use Phoenix.LiveView

  def render(assigns) do
    ~L"""
      <div data-test=”editor”>
        <h1>Hello world!</h1>
      </div>
      """
  end

  def mount(_params, _session, socket) do
    {:ok, socket}
  end
end

And we have a passing test suite! The ~L sigil designates that LiveView should track changes to the content inside. We could keep all of our markup in this render/1 method, but let’s break it out into its own template for demonstration purposes.

Move the contents of render into lib/frampton_web/templates/editor/show.html.leex, and replace EditorLive.render/1 with this one liner: def render(assigns), do: FramptonWeb.EditorView.render("show.html", assigns). And finally, make an EditorView module in lib/frampton_web/views/editor_view.ex:

defmodule FramptonWeb.EditorView do
  use FramptonWeb, :view
  import Phoenix.LiveView
end

Our test should now be passing, and we’ve got a nicely separated out template, view and “live” server. We can keep markup in the template, helper functions in the view, and reactive code on the server. Now let’s move forward to actually render some posts!

Handling User Input

We’ve got four tasks to accomplish before we are done:

  1. Take markdown input from the textarea
  2. Send that input to the LiveServer
  3. Turn that raw markdown into HTML
  4. Return the rendered HTML to the page.

Event binding

To start with, we need to annotate our textarea with an event binding. This tells the liveview.js framework to forward DOM events to the server, using our liveview channel. Open up lib/frampton_web/templates/editor/show.html.leex and annotate our textarea:

<textarea phx-keyup="render_post"></textarea>

This names the event (render_post) and sends it on each keyup. Let’s crack open our web inspector and look at the web socket traffic. Using Chrome, open the developer tools, navigate to the network tab and click WS. In development you’ll see two socket connections: one is Phoenix LiveReload, which polls your filesystem and reloads pages appropriately. The second one is our LiveView connection. If you let it sit for a while, you’ll see that it's emitting a “heartbeat” call. If your server is running, you’ll see that it responds with an “ok” message. This lets LiveView clients know when they've lost connection to the server and respond appropriately.

Now, type some text and watch as it sends down each keystroke. However, you’ll also notice that the server responds with a “phx_error” message and wipes out our entered text. That's because our server doesn’t know how to handle the event yet and is throwing an error. Let's fix that next.

Event handling

We’ll catch the event in our EditorLive module. The LiveView behavior defines a handle_event/3 callback that we need to implement. Open up lib/frampton_web/live/editor_live.ex and key in a basic implementation that lets us catch events:

def handle_event("render_post", params, socket) do
  IO.inspect(params)

  {:noreply, socket}
end

The first argument is the name we gave to our event in the template, the second is the data from that event, and finally the socket we’re currently talking through. Give it a try, typing in a few characters. Look at your running server and you should see a stream of events that look something like this:

There’s our keystrokes! Next, let’s pull out that value and use it to render HTML.

Rendering Markdown

Lets adjust our handle_event to pattern match out the value of the textarea:

def handle_event("render_post", %{"value" => raw}, socket) do

Now that we’ve got the raw markdown string, turning it into HTML is easy thanks to the work we did earlier in our Post module. Fill out the body of the function like this:

{:ok, post} = Post.render(%Post{}, raw)
IO.inspect(post)

If you type into the textarea you should see output that looks something like this:

Perfect! Lastly, it’s time to send that rendered html back to the page.

Returning HTML to the page

In a LiveView template, we can identify bits of dynamic data that will change over time. When they change, LiveView will compare what has changed and send over a diff. In our case, the dynamic content is the post body.

Open up show.html.leex again and modify it like so:

<div class="rendered-output">
  <%= @post.body %>
</div>

Refresh the page and see:

Whoops!

The @post variable will only be available after we put it into the socket’s assigns. Let’s initialize it with a blank post. Open editor_live.ex and modify our mount/3 function:

def mount(_params, _session, socket) do
  post = %Post{}
  {:ok, assign(socket, post: post)}
end

In the future, we could retrieve this from some kind of storage, but for now, let's just create a new one each time the page refreshes. Finally, we need to update the Post struct with user input. Update our event handler like this:

def handle_event("render_post", %{"value" => raw}, %{assigns: %{post: post}} = socket) do
  {:ok, post} = Post.render(post, raw)
  {:noreply, assign(socket, post: post)
end

Let's load up http://localhost:4000/editor and see it in action.

Nope, that's not quite right! Phoenix won’t render this as HTML because it’s unsafe user input. We can get around this (very good and useful) security feature by wrapping our content in a raw/1 call. We don’t have a database and user processes are isolated from each other by Elixir. The worst thing a malicious user could do would be crash their own session, which doesn’t bother me one bit.

Check the edit_posts branch for the final version.

Conclusion

That’s a good place to stop for today. We’ve accomplished a lot! We’ve got a dynamically rendering editor that takes user input, processes it and updates the page. And we haven’t written any JavaScript, which means we don’t have to maintain or update any JavaScript. Our server code is built on the rock-solid foundation of the BEAM virtual machine, giving us a great deal of confidence in its reliability and resilience.

In the next post, we’ll tackle making a shared editor, allowing multiple users to edit the same post. This project will highlight Elixir’s concurrency capabilities and demonstrate how LiveView builds on them to enable some incredible user experiences.



  • Code
  • Back-end Engineering

do

What can I do if I am on a working holiday or seasonal worker visa in the Coronavirus (COVID-19) crisis?

Seasonal Worker Programme and Pacific Labour Scheme workers can extend their stay for up to 12 months to work for approved employers as long as pastoral care and accommodation needs of workers are met to minimise health risks to visa holders and the community. Approved employers under the Seasonal Worker Programme and Pacific Labour Scheme […]

The post What can I do if I am on a working holiday or seasonal worker visa in the Coronavirus (COVID-19) crisis? appeared first on Visa Australia - Immigration Lawyers & Registered Migration Agents.




do

9 Things You Can Do To Your WordPress Website During Quarantine

If you’d have told us at WPZOOM about the current situation we find ourselves in six months ago, we wouldn’t have believed you. It’s all we can see if we turn on the TV and it’s clear right now, humanity has taken a break. Worrying about loved ones, ensuring we stay safe, and for heaven’s sake, stay inside. Staying inside […]




do

If You’re Using Beaver Builder Lite, You Need This Addon

Hey there, I’m Ben, and I’m a guest author here at WPZOOM. Today I thought I’d share with you my experience of one of their rather awesome plugins, an addon for Beaver Builder. I know the team at WPZOOM are big fans of Beaver Builder, why not? It’s a great page builder with an excellent feature set; chances are if […]




do

Markdown Comes Alive! Part 1, Basic Editor

In my last post, I covered what LiveView is at a high level. In this series, we’re going to dive deeper and implement a LiveView powered Markdown editor called Frampton. This series assumes you have some familiarity with Phoenix and Elixir, including having them set up locally. Check out Elizabeth’s three-part series on getting started with Phoenix for a refresher.

This series has a companion repository published on GitHub. Get started by cloning it down and switching to the starter branch. You can see the completed application on master. Our goal today is to make a Markdown editor, which allows a user to enter Markdown text on a page and see it rendered as HTML next to it in real-time. We’ll make use of LiveView for the interaction and the Earmark package for rendering Markdown. The starter branch provides some styles and installs LiveView.

Rendering Markdown

Let’s set aside the LiveView portion and start with our data structures and the functions that operate on them. To begin, a Post will have a body, which holds the rendered HTML string, and title. A string of markdown can be turned into HTML by calling Post.render(post, markdown). I think that just about covers it!

First, let’s define our struct in lib/frampton/post.ex:

defmodule Frampton.Post do
  defstruct body: "", title: ""

  def render(%__MODULE{} = post, markdown) do
    # Fill me in!
  end
end

Now the failing test (in test/frampton/post_test.exs):

describe "render/2" do
  test "returns our post with the body set" do
    markdown = "# Hello world!"                                                                                                                 
    assert Post.render(%Post{}, markdown) == {:ok, %Post{body: "<h1>Hello World</h1>
"}}
  end
end

Our render method will just be a wrapper around Earmark.as_html!/2 that puts the result into the body of the post. Add {:earmark, "~> 1.4.3"} to your deps in mix.exs, run mix deps.get and fill out render function:

def render(%__MODULE{} = post, markdown) do
  html = Earmark.as_html!(markdown)
  {:ok, Map.put(post, :body, html)}
end

Our test should now pass, and we can render posts! [Note: we’re using the as_html! method, which prints error messages instead of passing them back to the user. A smarter version of this would handle any errors and show them to the user. I leave that as an exercise for the reader…] Time to play around with this in an IEx prompt (run iex -S mix in your terminal):

iex(1)> alias Frampton.Post
Frampton.Post
iex(2)> post = %Post{}
%Frampton.Post{body: "", title: ""}
iex(3)> {:ok, updated_post} = Post.render(post, "# Hello world!")
{:ok, %Frampton.Post{body: "<h1>Hello world!</h1>
", title: ""}}
iex(4)> updated_post
%Frampton.Post{body: "<h1>Hello world!</h1>
", title: ""}

Great! That’s exactly what we’d expect. You can find the final code for this in the render_post branch.

LiveView Editor

Now for the fun part: Editing this live!

First, we’ll need a route for the editor to live at: /editor sounds good to me. LiveViews can be rendered from a controller, or directly in the router. We don’t have any initial state, so let's go straight from a router.

First, let's put up a minimal test. In test/frampton_web/live/editor_live_test.exs:

defmodule FramptonWeb.EditorLiveTest do
  use FramptonWeb.ConnCase
  import Phoenix.LiveViewTest

  test "the editor renders" do
    conn = get(build_conn(), "/editor")
    assert html_response(conn, 200) =~ "data-test="editor""
  end
end

This test doesn’t do much yet, but notice that it isn’t live view specific. Our first render is just the same as any other controller test we’d write. The page’s content is there right from the beginning, without the need to parse JavaScript or make API calls back to the server. Nice.

To make that test pass, add a route to lib/frampton_web/router.ex. First, we import the LiveView code, then we render our Editor:

import Phoenix.LiveView.Router
# … Code skipped ...
# Inside of `scope "/"`:
live "/editor", EditorLive

Now place a minimal EditorLive module, in lib/frampton_web/live/editor_live.ex:

defmodule FramptonWeb.EditorLive do
  use Phoenix.LiveView

  def render(assigns) do
    ~L"""
      <div data-test=”editor”>
        <h1>Hello world!</h1>
      </div>
      """
  end

  def mount(_params, _session, socket) do
    {:ok, socket}
  end
end

And we have a passing test suite! The ~L sigil designates that LiveView should track changes to the content inside. We could keep all of our markup in this render/1 method, but let’s break it out into its own template for demonstration purposes.

Move the contents of render into lib/frampton_web/templates/editor/show.html.leex, and replace EditorLive.render/1 with this one liner: def render(assigns), do: FramptonWeb.EditorView.render("show.html", assigns). And finally, make an EditorView module in lib/frampton_web/views/editor_view.ex:

defmodule FramptonWeb.EditorView do
  use FramptonWeb, :view
  import Phoenix.LiveView
end

Our test should now be passing, and we’ve got a nicely separated out template, view and “live” server. We can keep markup in the template, helper functions in the view, and reactive code on the server. Now let’s move forward to actually render some posts!

Handling User Input

We’ve got four tasks to accomplish before we are done:

  1. Take markdown input from the textarea
  2. Send that input to the LiveServer
  3. Turn that raw markdown into HTML
  4. Return the rendered HTML to the page.

Event binding

To start with, we need to annotate our textarea with an event binding. This tells the liveview.js framework to forward DOM events to the server, using our liveview channel. Open up lib/frampton_web/templates/editor/show.html.leex and annotate our textarea:

<textarea phx-keyup="render_post"></textarea>

This names the event (render_post) and sends it on each keyup. Let’s crack open our web inspector and look at the web socket traffic. Using Chrome, open the developer tools, navigate to the network tab and click WS. In development you’ll see two socket connections: one is Phoenix LiveReload, which polls your filesystem and reloads pages appropriately. The second one is our LiveView connection. If you let it sit for a while, you’ll see that it's emitting a “heartbeat” call. If your server is running, you’ll see that it responds with an “ok” message. This lets LiveView clients know when they've lost connection to the server and respond appropriately.

Now, type some text and watch as it sends down each keystroke. However, you’ll also notice that the server responds with a “phx_error” message and wipes out our entered text. That's because our server doesn’t know how to handle the event yet and is throwing an error. Let's fix that next.

Event handling

We’ll catch the event in our EditorLive module. The LiveView behavior defines a handle_event/3 callback that we need to implement. Open up lib/frampton_web/live/editor_live.ex and key in a basic implementation that lets us catch events:

def handle_event("render_post", params, socket) do
  IO.inspect(params)

  {:noreply, socket}
end

The first argument is the name we gave to our event in the template, the second is the data from that event, and finally the socket we’re currently talking through. Give it a try, typing in a few characters. Look at your running server and you should see a stream of events that look something like this:

There’s our keystrokes! Next, let’s pull out that value and use it to render HTML.

Rendering Markdown

Lets adjust our handle_event to pattern match out the value of the textarea:

def handle_event("render_post", %{"value" => raw}, socket) do

Now that we’ve got the raw markdown string, turning it into HTML is easy thanks to the work we did earlier in our Post module. Fill out the body of the function like this:

{:ok, post} = Post.render(%Post{}, raw)
IO.inspect(post)

If you type into the textarea you should see output that looks something like this:

Perfect! Lastly, it’s time to send that rendered html back to the page.

Returning HTML to the page

In a LiveView template, we can identify bits of dynamic data that will change over time. When they change, LiveView will compare what has changed and send over a diff. In our case, the dynamic content is the post body.

Open up show.html.leex again and modify it like so:

<div class="rendered-output">
  <%= @post.body %>
</div>

Refresh the page and see:

Whoops!

The @post variable will only be available after we put it into the socket’s assigns. Let’s initialize it with a blank post. Open editor_live.ex and modify our mount/3 function:

def mount(_params, _session, socket) do
  post = %Post{}
  {:ok, assign(socket, post: post)}
end

In the future, we could retrieve this from some kind of storage, but for now, let's just create a new one each time the page refreshes. Finally, we need to update the Post struct with user input. Update our event handler like this:

def handle_event("render_post", %{"value" => raw}, %{assigns: %{post: post}} = socket) do
  {:ok, post} = Post.render(post, raw)
  {:noreply, assign(socket, post: post)
end

Let's load up http://localhost:4000/editor and see it in action.

Nope, that's not quite right! Phoenix won’t render this as HTML because it’s unsafe user input. We can get around this (very good and useful) security feature by wrapping our content in a raw/1 call. We don’t have a database and user processes are isolated from each other by Elixir. The worst thing a malicious user could do would be crash their own session, which doesn’t bother me one bit.

Check the edit_posts branch for the final version.

Conclusion

That’s a good place to stop for today. We’ve accomplished a lot! We’ve got a dynamically rendering editor that takes user input, processes it and updates the page. And we haven’t written any JavaScript, which means we don’t have to maintain or update any JavaScript. Our server code is built on the rock-solid foundation of the BEAM virtual machine, giving us a great deal of confidence in its reliability and resilience.

In the next post, we’ll tackle making a shared editor, allowing multiple users to edit the same post. This project will highlight Elixir’s concurrency capabilities and demonstrate how LiveView builds on them to enable some incredible user experiences.



  • Code
  • Back-end Engineering


do

What every business must do (and designers even more so)

What should all businesses do at least once, and do properly, and (like the title of this blog post suggests) designers need to do repeatedly? The answer is: Understanding the target market they’re catering to. Sure, that makes sense—but why are graphic designers any different? Why do this repeatedly? When you’re in business, you’re in the […]




do

What does Stack Overflow want to be when it grows up?

I sometimes get asked by regular people in the actual real world what it is that I do for a living, and here's my 15 second answer:

We built a sort of Wikipedia website for computer programmers to post questions and answers. It's called Stack Overflow.

As of last month,




do

Building a PC, Part IX: Downsizing

Hard to believe that I've had the same PC case since 2011, and my last serious upgrade was in 2015. I guess that's yet another sign that the PC is over, because PC upgrades have gotten really boring. It took 5 years for me to muster up the initiative to




do

Caricatures by Ricardo Gimenes

We’re working on redesigning the Pagebreak Podcast website and decided to get some caricatures of us made by Ricardo Gimenes.Check ’em out! We’re SO CUTE!



  • Just For Fun

do

Good Cop & Bad Cop: Laying Down the Law and Keeping People Happy As an Independent Business Owner

Earlier this week I met up for coffee with a client of mine. The two of us originally met when his employeer was my client and after leaving that job he hired me to customize his personal blog and we formed our own client/designer relationship. I was excited when he emailed me last week with the […]




do

Check Out These Famous Logos Practicing Social Distancing – McDonald’s, Mercedes, and More

We all know about the new coronavirus that has been affecting hundreds of thousands of people worldwide. And while scientists, researchers, and doctors are all working tirelessly to find a cure for this terrible disease, one thing is for sure: staying home is saving lives. The greatest tool that we have right now to help […]

Read More at Check Out These Famous Logos Practicing Social Distancing – McDonald’s, Mercedes, and More




do

Invisible Disabilities: Break Down The Barriers

Many people think the word “disability” means people who require a wheelchair or walker. In reality, however, there is much more to disability than meets the eye. 




do

Emilia Clarke to Host Virtual Dinner With Donors Who Pledge Money for Coronavirus Relief

Today, the Game of Thrones star announced that 12 random people will get to win a virtual dinner with her. She’s asking people to donate money to her charity SameYou, which helps people heal from brain injuries and strokes. Pledges will be used to assist brain injury survivors in recuperating at home, who have been asked to leave hospitals to make room for coronavirus patients.




do

Spoon Graphics Turns 13 Years Old — Traffic Down, Subscribers Up!

It’s that time of year when Spoon Graphics gets a little older, with 2020 marking 13 years of tutorial creating, freebie sharing and article writing on what started as a blog that was attached to my portfolio website in 2007. Every April I take some time to reflect on the past 12 months and talk […]

The post Spoon Graphics Turns 13 Years Old — Traffic Down, Subscribers Up! appeared first on Spoon Graphics.




do

Override window.alert

For years the only bit of feedback web developers could get was via alert("{str}") calls. These days we have the web console but, in rare cases, we don’t have a console and alert calls are our only window into a value at a given time. One problem: if an alert sneaks into production code, your […]

The post Override window.alert appeared first on David Walsh Blog.




do

How to Play Retro Game ROMs on Windows

Video games are always a fun time, something we desperately need during our COVID lockdown. A few years back I shared how to play retro games on Mac, as well as how to patch games to play popular ROM hacks like Grand Poo World and Invictus. One disadvantage that Macs have, however, is performance — […]

The post How to Play Retro Game ROMs on Windows appeared first on David Walsh Blog.




do

10 Step Tutorial: How to Design Flat Skateboards Using Adobe Illustrator

Summer is in full swing here in the states! It’s a perfect time to grab your skateboard and go cruising. Today we’re going to learn how to design flat skateboards and colorful vector longboards in Adobe Illustrator! We’ll be working with Clipping Masks, Stroke, and Pathfinder panel. Let’s get started! Tutorial Details Program: Adobe Illustrator CC Difficulty: […]

The post 10 Step Tutorial: How to Design Flat Skateboards Using Adobe Illustrator appeared first on Vectips.




do

Create a NAS Icon in Just 30 Minutes Using Adobe Illustrator

Welcome back to another Illustrator tutorial from our retro hardware series! In this how-to, we’re going to learn to create a NAS Icon (or a Network-Attached Storage icon) using some simple geometric shapes and tools. So, get your software up and running let’s jump straight into it! Tutorial Details: How to Create a NAS Icon Program: Adobe […]

The post Create a NAS Icon in Just 30 Minutes Using Adobe Illustrator appeared first on Vectips.