fabiochiu/medium-articles huggingface dataset:
When You Face Writers Block This Is What You Do
By: Rasheed Hooda
Tags: Inspiration, Writing, Top 3, Life, Writing Tips

What is writer’s block? Is there really such an animal?

Elizabeth Gilbert says, her dad never had a chemist’s block.

Yet, every writer faces one, sometime in his or her life.

There are as many solutions to overcoming writer’s block as there are writers, probably more because everyone has found more than one way to deal with it. Yet, it continues to haunt every writer.

I recently came across three wonderful antidotes to writer’s block, here on Medium. Each writer approaches it from a unique angle.

I have known Remington Write since I started writing on Medium. She is a fellow weirdo, and I love her style of writing, which reflects her outlook on life. Her solution to the ever-nagging problem? I don’t know how to describe it; you figure it out.

Ryan Douglas Martin is someone I discovered recently. He approaches the writer’s block the same way I approached my walk, form Chicago to L. A.

How does an ant eat an elephant? One bite at a time.

One of the biggest obstacles people face when sitting down to write is they don’t know know what to write about. And truthfully, there is no shortage of recommendations on what you can write about. Medium is filled with “How To” articles, and every writer has at least thought about, if not done so, writing one of those clickbait stories.

conny manero says she is tired of it and wishes that someone would write about…

I have my own ideas about how to tackle it, but I don’t want to litter the landscape more than it has been. However, if I can come up with a creative way to communicate the message, I will not hesitate to share. Who knows, it might inspire someone else to write something. Hopefully, not another how to trope.

Please take some time to read these stories. They are interesting, entertaining, and enlightening. I am sure you will find some value in them, and when you do, be kind and engage with the author. There is nothing more rewarding for us than to know that someone is reading what we write, and it is making a difference in people’s life.

As always, thank you for reading and responding.

More about me:
Sometimes you write because it’s work
By: Beth Van Der Pol
Tags: Work From Home, Writing, Productivity, Motivation, Procrastination

Writer’s Blog

Sometimes you write because it’s work

It isn’t always glamorous, but it doesn’t always have to be.

As you are reading this, I am writing the last article of my day. I’m sure you can figure out where I drew my inspiration from. I am tired, a little bit stressed and very much in need of a nap. All I want to do is shut off my computer and read a good book in bed until I fall asleep.

I don’t feel like writing, and that’s okay. I don’t always have to feel like writing to get the job done. Because that’s what writing has to be sometimes, sometimes it is a job.

I’m not saying that you can never be inspired, I’m not saying that writing is never fun, interesting or exciting.

Quite the opposite.

I’m blessed that I get to make stuff up for the rest of my life. It’s literally my dream job, and I’m thrilled to be here. That being said, it is still a job, that means I have to type out one more article before I can go on my merry way.

If you’re like me and you’re your own boss, here are some ways that you can push through and get what you need to get done done.

Think about the big picture — Visualise your goals and make sure that everything you have to do for that day is building towards them. This will help give you the push you need to power through what you need to. Leave and return — The return part is the most important here. Sometimes if I’m unmotivated, it’s better for me to get away from my screen for a while. Sometimes that’s going on a walk, watching something, playing a game or reading a good book. Getting away from the screen can give you enough strength to make that final push back. Reschedule — Do you need to get that thing done today? Can you push something back or pull something else forward instead? I might not want to write any more words, but maybe I can edit or work on one of my other projects. What can you do that is still work but is more interesting or easier to accomplish? Decide — One of the most draining things about procrastinating from your work is convincing yourself that you are going to finish what you need to. Then as you’re scrolling through twitter taking that never-ending break, you can’t even enjoy it. You feel guilty. Do yourself a favour and make a choice. Either choose to finish the work you had scheduled or choose to take time off. Deciding to take time off will allow you to get a real guilt-free break and come back to work in a few hours or even the next day.

I hope that one of these get back to work hacks works for you as well as they work for me. I just finished number four and chose to get to work; now I get to reward myself with some guilt-free relaxation!

As always, I cannot wait to see you on the bookshelf!
Creating a masonry layout with CSS Grid
By: Adam Collier
Tags: Masonry, JavaScript, Css Grid, HTML, CSS

In a recent project I came across a nifty way to create a masonry grid layout using CSS grid and a smidge of javascript . Initially I thought about using something like Masonry.js or Isotope but it kinda felt a little bit overkill. Whats cool about this approach its super flexible and it’s not relying on any frameworks! I’m going to try and keep this post short and sweet so you can get up and running and enjoy this trick yourselves.

Lets get started by adding some HTML to an index.html file

Here we have created a simple grid with some grid items. Note: the padding-top and lazyloaded are to prevent the jumping of content when your images load in.

Now lets create some css

Essentially what we are doing here is telling .grid that we want to display a responsive grid of items. minmax(300px, var( — template-columns, 1fr)) does a lot of the heavy lifting for us here by creating repeating columns with a minimum width of 300px and a max width of 1fr (fr is a fractional unit), when a column width falls below the minimum value the layout reshuffles and the number of columns reduces.

Some things to note here is grid-auto-rows: 5px which is what is going to allow us to create our masonry layout. Some stylistic preferences I have is to use grid-gap-columns and padding-bottom to create the spacing between elements. The reason for this is I found the spacing to become noticeably inconsistent if grid-gap-rows is also used.

Now here is where all of the magic happens. Firstly we get the grid and grid item DOM elements, we set the rowSize value (which is equivalent to the grid-auto-rows value in our css file). We create a setColumns function which changes the grid-template-columns variable if there are less than three items (a full row) to keep the grid item sizes consistent.

In our positionGridItems function we are looping through our gridItems , if the browser is less than 711px inline styles are removed. Anything above 711px we are getting the height of each item and dividing it by our rowSize value. Then we are setting our --row-span variable which is the value of our grid-row-ends css property. And that is pretty much all of the hard work done! We then go onto create a debounce function (taken from a David Walsh post) and then call our positionGridItems function on the DOMContendLoaded event. We call it on the DomContentLoaded event to prevent a flickering of content. Then to top it all off we add a debounced event listener to call the function again when the browser is resized

I hope you have enjoyed this post and don’t hesitate to HMU if you have any questions or just want to say hi 👋 @collieradam
OpenBazaar Developer Call — October 10, 2019
Tags: Blockchain, Software Development, Ecommerce Solution, Bitcoin, Decentralization

This is a video recording of the OpenBazaar Developer call on October 10, 2019.

Want to join the call in real time? Sign up at openbazaar.org/developers

Join our ongoing conversations on Slack

Browse OpenBazaar now at openbazaar.com

Chat log:

[09:55] fcl1892: hello

[09:55] mg (OB1): Hi FCL :)

[10:00] anon: Yep

[10:01] fcl1892: yep

[10:06] mg (OB1): “go for it” :D

[10:06] mg (OB1): https://github.com/OpenBazaar/openbazaar-go/labels/help%20wanted

[10:07] mg (OB1): ^^ Find issues to help with there. More general info about Hacktoberfest can be found at https://hacktoberfest.digitalocean.com
If It Doesn’t Make You Crazy, It Will Make You Strong
By: Alex Lane
Tags: Bruce Springsteen, Music, Advice, Life Lessons, Philosophy

There’s an old teaching called “Two Pockets” that an old friend told me about a long time ago. The idea is that everyone in the world has two pockets. In one are the words “For my sake the world was created,” and in the other are the words “I am but dust and ashes.” The first is meant to remind us that anything is possible; we are capable of greatness. The latter keeps us humble, understanding that we are just one piece of a vast universe.

Two contradictory ideas. A tale as old as time.

It takes a long time for things to come full circle. When I first heard the Two Pockets story, it really stuck with me. The idea that you have to allow for good and bad, greatness and failure, light and dark — balance — to be centered seemed logical enough, but I hadn’t put it to practice yet.

It was a couple years later when I heard Bruce’s speech for the first time. Two contradictory ideas in your head and heart sounded like madness. But again, I kind of understood. Heart stuff, and brain stuff are never the same. Getting those two to agree is a rare thing. Wisdom is being able to hear them both, really listen, and move your feet anyway.

Bruce at SXSW, 2012

I am by no means “wise,” but the older I get, the more I understand that you have to have two pockets, two contradictory ideas, and believe them both. You need boundaries to achieve freedom. You can give love, and give space. You can be an adult, with childish tendencies. You can question what you’re doing, and know you’re exactly where you’re meant to be. You can try your best, and not be your best.

It’s a complicated thing to recognize, and a gut-churning practice to hold. But this is the hard stuff that makes us grow. Figuring out how to be comfortable in this in-between space of uncertainty, this liminality, is where we become more of ourselves. This is how we level up. And wouldn’t it be nice to be able to say, each year, that we slowly became more of who we are? And that the hard stuff helped with that?

“You are the baddest ass in town, and, you suck!” Bruce said. I am but dust and ashes, and the world was made for me.

It’s not one or the other, it’s both. All the time.
How to Upgrade Your PostgreSQL Version Using Docker
By: José Postiga
Tags: Programming, Database, Software Engineering, Docker, Containers

How to Upgrade Your PostgreSQL Version Using Docker

Upgrade your PostgreSQL version and migrate your data using Docker

Photo by Campaign Creators on Unsplash.

Recently, I had to upgrade my local PostgreSQL version from 10.10 to 11.8 to mirror the same version that exists in the production environment. I originally thought the upgrade would be simple: Turn off the container, update the docker-compose service to reference the new version, and then spin the container.

However, as soon as the container went up, an error started showing up in the logs:‌

The error is very explicit: Because it was created by an earlier version, my data was incompatible with the new version. When I searched for possible solutions to this problem, all I could find was related to macOS and relied on using Brew to execute some shell commands that would take care of upgrading the data and making it compatible with the new version.

The problem is that I use Docker for this (well, for everything web-related, really), and since I use Linux Ubuntu, I can’t use Brew (it’s only for macOS). So I needed a solution that was quick, reliable, and that leveraged Docker (preferably) so that I didn’t need to install things on my local machine.

After a lot of searching and some discovery of my own, I came up with the following simple three-step solution.
I’ve Always Had a Thing For Lamp Posts
By: Tommy Paley
Tags: Funny, Humor, Fiction, Random, Satire

I’ve Always Had a Thing For Lamp Posts

And other random thoughts

Photo by Online Marketing on Unsplash

My new doctor appears to be two dimensional. Correction, cocky and two dimensional.

I guess plotting revenge on my enemies by first buying all of the soap isn’t a productive way to spend one’s afternoon after all.

Not sure why my wife keeps announcing she is beside herself when quite clearly I’m the one who is beside her.

If I could do it all again I would spend my days jumping more as well as dedicating my evenings to calf stretches.

“You’ve gone to the well a little too often,” my parents told me making me wonder why they built me that stupid well in the first place especially considering we had totally functional running water.

When our gerbil nibbles me everyone is all “that’s cute” and “how adorable” and “it thinks you’re food” and yet when I take a big bite of that gerbil it’s call “inhumane” and “despicable” and “yet another reason no one invites us to parties”.

Many years ago I spent my free time filling drawing book after drawing book with nothing but large, red Xs so that I was ready for the day they came asking for me to mark a spot for them.

“Stop Obsessively Washing Your Belly Button Hole and Other Cautionary Tales” is the title of my as-yet-unfinished picture book for preschoolers.

I’ve always had a thing for lamp posts.

The more people tell me that a deviated septum isn’t sexy, the more I want to prove them wrong.

I always feel a tad hypocritical when weeding the garden as well as a tad defensive about my high school education when asked to explain.

“Yes, the walls are surrounding you, but they are also providing much needed structure and stability, not to mention the security and soundproofing as well as insulating you from the cold,” said my father who, while ignoring my concerns, has all of a sudden has become some sort of wall expert.

Sometimes I sit on my front steps wearing my sunglasses and holding my trusty salt shaker and when a person walks by, I stand, clutching the salt shaker, slowly lick my lips and loudly proclaim “SALTY!”
Ursula K. LeGuin, 1929–2018
By: A.C. Flory
Tags: Science Fiction, Author, Earthsea, The Dispossessed, 2018

To say that Ursula K. LeGuin has been an influence in my writing life would be a woeful understatement. Her Hugo award winning novel ‘The Left Hand of Darkness’ opened my eyes to what could be done. By women. With courage.

The world has changed a great deal since LeGuin finally found a publisher for Left Hand of Darkness, but the book still stands as a beacon to all writers: stay true to yourself, be brave, sometimes merit is recognized.

This is a screenshot of LeGuin’s author page on Amazon:

Such wonderful books, and now there’ll never be another.

Never being forgotten,

Meeks
Code Smarter, Debug Less!
By: Mochamad Iqbal Dwi Cahyo
Tags: Peer Review, Open Mind, Optimization, Clean Code

Great articles from Kudzu, preventative programming is all about writing your code more robust and clean so we can debug easily later on!

The articles consist of following rules to apply:

Code style (indentation) Alphabetizes USES (if you import package or dependency, try to alphebetize them) One statement per line (wheter you encounter one statement inside if clause, just use one statment) Avoid pointer :D Mindset (it is the human errors that we must pay attention to)

Open mind

Kill your ego (the most dangerous problems :D, fact there is at least some other developer as good as you, if not better)

Peer review, Optimizations and etc :D. There’s so much to explained, you can check Kudzu’s articles for more detail on the practical information :)

Happy Coding!!!
Performance of WebAssembly: a thread on threading
By: Google Earth
Tags: Webassembly, Google, Chrome, JavaScript, Google Earth

By Jordon Mears, Tech Lead Manager, Google Earth on Web

It’s been a while since we’ve discussed moving Earth towards WebAssembly (WASM) and away from Native Client (NaCl). In my last article, I talked about how WebAssembly is the new W3C standard way of compiling native applications for the web. This technology is in the process of being standardized and adopted by browsers across the industry. Recent advancements in WASM’s threading support is paving the way for Earth to provide a smooth experience across browsers.

Take a look at this side-by-side comparison of how Earth performs with and without threads.

At the 2018 Chrome Dev Summit we presented some performance metrics of the gains Earth gets when using threads. Let me give you a better breakdown of this with more detail.

Better Performance with Threads

One way to think about Google Earth is as a really big video game of the whole world. We’re constantly streaming 3D data and imagery across the network, decompressing it and then showing it on the globe. Fetching and decompressing data on background threads allows the main rendering loop to execute much faster, resulting in higher average framerate:

Also, there is a lot less frame dropping in a threaded experience:

Details of the test:

Ran on a stripped down version of Earth that would fly the camera from location to location in a prescribed order.

Used Google Chrome Version 72.0.3602.2 (Official Build) dev (64-bit) on a device with the following hardware: Linux Kernel 4.17.0; Processor Intel Core i7–6600U CPU @ 2.600GHz x 2; Memory 15.6 GiB; Graphics Card Intel Corporation HD Graphics 520.

Repeated multiple times with the first few runs for each type thrown out to help support caching of network fetches and the remaining results averaged.

Earth on WASM coming soon

The advantage of threading support in the case of Earth is a pretty clear improvement for the user experience. We’re excited to see major browsers working towards supporting threading by default. Chrome has recently added support starting with version 74. We are also looking forward to default support of LLVM which will provide faster builds, better debugging, and SIMD support.

We look forward to sharing preview access in the coming weeks.
Error Handling in Rails — The Modular Way
By: Sudharsanan Muralidharan
Tags: Modular, Error Handling, Programming, Ruby, Ruby on Rails

Murphy’s Law:

As Murphy’s Law states anything that can go wrong will go wrong, which is why it is important to be prepared for it. It applies everywhere, even in Software Development. The application that we develop must be robust enough to handle it. In other words it must be Resilient. This is exactly what this blog post is about.

Anything that can go wrong, will go wrong. — Murphy’s Law

In Rails a typical workflow we handle errors in the Controller level. Let say you are writing an API using Rails. Consider the following controller method to render user JSON.

users_controller.rb

When the user object is found it renders it as json, otherwise renders the error json. This is the typical way of writing a show method is Rails. But here is the catch. When user record is not found it doesn’t go into the else block it renders the fallback 500.html content. Well that was unexpected. This is because if record is not found it raises a RecordNotFound error. The same happens with find_by! or any finder methods with a bang.
Vertical Light
By: Nivedita Shori
Tags: Light, Poetry, Self-awareness, Reflections, Thesceneandheard

Vertical Light -SAN MIGUEL DE ALLENDE, MEXICO By Thomas Schaller

Flitting here and there

Across the space

Within the confines

Of the dark room

I hopped around

Bouncing

From one source

To the next

Darting hopelessly

In search of light

To illuminate

To awaken

To enlighten

’Twas only when

I stopped flitting

Stopped bouncing

Stopped darting

And became still

Becoming one with silence

Listening

To the murmurs of the falling water

To the whispers of the tousled leaves

To the wisdom of the stoic walls —

Standing in the ripples

Of the presence

Of my own being

That a door creaked open

And flooded me

In my very spot

With a glorious surge

Of vertical light

Illuminating

Awakening

Enlightening
What we Learned in Latvia
Tags: Tourism, Travel, History, Freedom, Latvia

La briet, Latvija! Good morning, Latvia!

Continuing on our journey through the Baltic States, we arrived in the capital city of Latvia… Riga!

Latvia currently has ~2 million people. Riga with a population of 640,000 people. Latvia’s flag represents a famous Latvian leader who died on the sheets. The red represents his blood, and the white is where his body laid.

The Latvian flag is depicted inside the country’s borders.

We visited Riga in early June so every day was filled with bright sun, crisp air, and plenty of movement.
10 Lessons in Entrepreneurship From a Business Owner of 20+ Years
By: Brooke Harrison
Tags: Entrepreneurship, Inspiration, Freelance, Life Lessons, Career Advice

10 Lessons in Entrepreneurship From a Business Owner of 20+ Years

Truth bombs from a Hawaiian-shirt-wearing father about working for yourself.

Photo by Yasin Gündogdu from Pexels

Every day, my dad goes to “work” in our guesthouse (his office). He wears Hawaiian shirts and takes a long bike ride every Thursday morning.

He’s a small business owner, a web developer, and he’s worked for himself for the 24 years I’ve been alive. He gave me the entrepreneurial bug. I’ve always been impressed with his flexibility and control over his schedule.

I’ve dabbled with the entrepreneurial lifestyle, but it wasn’t until 6 months ago (when I was laid off due to COVID) that I decided to go all-in on my dream of working for myself.

Well, it hasn’t been the straightforward path I thought it’d be. (Is it ever?)

For the first time, I’m beginning to understand the lessons my dad has taught me for years. In these past few months, he’s been an invaluable resource and mentor as I’ve worked to get my copywriting business off the ground.

Here are 10 truths he’s taught me about entrepreneurship:
Kündigung durch Mitarbeitende
By: Niels Brabandt
Tags: Exit, Mitarbeiter, Leadership, Kündigung, Mitarbeiterbindung

Niels Brabandt is in business since 1998. Helping managers to become better leaders by mastering the concept of Sustainable Leadership. Based in Spain & London.

Follow
The Two Minutes It Takes To Read This Will Improve Your Writing Forever
By: Josh Spector
Tags: Writing, Life, Life Lessons, Writing Tips, Communication

You’re busy, so I’ll keep this quick.

Following are the simplest tips I can give you to easily — and forever — improve the quality of your writing.

Delete the word “that.”

At least 90% of the times you use the word “that” can be removed from your writing and it will instantly make your sentence stronger.

Example: “You believe that I’m lying, but I’m not.” becomes “You believe I’m lying, but I’m not.”

Delete the words “I think.”

It adds nothing. Remove it to strengthen your point.

Example: “I think this is a good sentence.” becomes “This is a good sentence.”

Avoid words that end in “-ing.”

In most cases, the “-ing” softens your word and adds no value. Your writing will read better if you avoid it.

Example: “The experiences we’re seeking end up being underwhelming and even disappointing.” becomes “The experiences we seek often underwhelm and disappoint.”

Short sentences. Short paragraphs.

Most sentences can be cut in half. Don’t be afraid to have a two or three word sentence.

Keep paragraphs to less than three sentences.

White space is your reader’s friend.

Shrink your opening sentence.

Make it compelling, but keep it short and conversational.

Example: “This is a post that’s going to help you become a better writer.” becomes “I can help you.”

Want more tips to produce, promote, and profit from your creations?

Join the 25,000+ creators who get my For The Interested newsletter.
Should you claim XMV?
By: Alex Balingit
Tags: Monero, Investment, Xmv, Bitcoin, Cryptocurrency

I WILL NOT BE CLAIMING XMV, AND YOU SHOULDN’T EITHER.

Monero is our “Coin of the Week” and we are still watching for killer upside trade opportunities, but we do not recommend claiming the XMV fork when it launches.

The only way to claim XMV is by exposing your private key, which is bad on any chain, but particularly bad on a chain whose sole purpose is anonymity.

Here’s why: exposing a large amount of private keys allows the recipient of those keys to deconstruct large portions of the XMR chain, which can allow them to piece together patterns of user’s behavior and potentially expose the entire chain — which exposes millions of users to government oppression. Remember, Monero is used in all of the third world countries to conduct business agains their violent governments, and its used to also keep people’s coins from other chains safe from hackers and government monitoring in the George Orwell novel we live in here in the industrialized world.

Many are convinced XMV is an attempt by the US government to take crack the Monero code by gaining a bunch of knowledge of the chain with users’ private keys, and that their goal is to use “FREE COOOOINZZ” as a way to bust Monero users for “illegal” activities.

Monero V Red Flags:

– CLOSED Source

– 100% Anonymous Devs

– Begging for Private Keys

– Marketing to New Users (and hiding from oldschool Monero users)

Give this a read on why the most popular Monero wallet won’t support the fork, and why you shouldn’t either.

https://medium.com/…/beware-of-non-native-forks-of-monero-6…

If this is an attempt at a malicious crackdown of Monero, I won’t be sucked into it by valueless XMV coins. What are your thoughts on the fork? Can we be too careful with the most important tool in the crypto privacy space?
‘Breaking’ Presents: Juliana ‘Jewels’ Smith, Educator-Turned-Comic Writer
Tags: Comics, Racial Justice, Arts And Culture, Race, Education

The Bay Area resident, inspired by how comics connected with her community college students, developed “(H)afrocentric” to address structural and economic racism in a funny and accessible way.

Juliana “Jewels” Smith

Photo: Courtesy of Juliana “Jewels” Smith

By Sameer Rao

April 13, 2018

This “Breaking” installment features Juliana “Jewels” Smith, the creator of the comic “(H)afrocentric.” She keeps an Instagram account frequently updated with new comics. She also released a paperback compilation of the comic books, “(H)afrocentric Vol. 1–4,” last November.

Hometown: Bay Area, California

Project: “(H)afrocentric,” a comic book series and strip based on the exploits of Naima and Miles Pepper, two Black siblings, and their friends of color at the fictional Ronald Reagan University. The comics tackle racism, gentrification, activist culture and more with levity and humor.

SHARE

This “Breaking” installment features Juliana “Jewels” Smith, the creator of the comic “(H)afrocentric.” She keeps an Instagram account frequently updated with new comics. She also released a paperback compilation of the comic books, “(H)afrocentric Vol. 1–4,” last November.

Hometown: Bay Area, California

Project: “(H)afrocentric,” a comic book series and strip based on the exploits of Naima and Miles Pepper, two Black siblings, and their friends of color at the fictional Ronald Reagan University. The comics tackle racism, gentrification, activist culture and more with levity and humor.

Why You Should Care: After spending several years teaching community college students about social injustice and activism, Smith is using “(H)afrocentric,” to go beyond classrooms.

Smith, who grew up in the San Francisco Bay Area, first caught the academia bug as a student and college basketball player at the University of California (U.C.), Riverside. She took a class with ethnic studies scholar Dylan Rodriguez that she says influenced her understanding on social justice and education.

“[His class] gave me a language to understand the world around me,” she says. “It’s not that I didn’t know that these things existed, it’s just that I really couldn’t articulate my feelings. Learning about the prison industrial complex and Black radical tradition inspired me to read more. As an educator, that’s the greatest hope — that you leave your students with the desire to pursue knowledge on their own.”

Read more about Juliana “Jewels” Smith, the creator of the comic “(H)”afrocentric”: http://bit.ly/2queUSr.

© 2018 Colorlines. All right reserved.
5 Reasons Why Giving Up Your Dreams Will Help You Get the Life You REALLY Want
By: Sarah Cy
Tags: Inspiration, Writing, Dreams, Creativity, Life Lessons

Have you been wondering whether to give up on that dream of yours?

A nagging voice inside has been telling you that maybe this is NOT the right thing for you, but you hesitate.

After all, Winston Churchill himself once said:

Never, never, never give up!

Should you listen to him in this case?

Do you just need to grit your teeth, bite the bullet, and keep pushing forward?

Maybe.

Maybe not.

After all, most of the people who tell you to “keep going and you will make it” actually achieved their dreams.

But that doesn’t mean you will.

Or that it will be GOOD for you if you do.
Flutter. GestureDetector in-depth
By: Artem Diashkin
Tags: Scroll, Swipe, Gesturedetector, Flutter, Drag

6. Restrictions

6.1 Gesture update handler

And how GestureDetector will handle “detection” on wrapped / not wrapped widget containers? Let’s find out.

At first, we will wrap out GestureDetector using Stack

And we will update our main Container’s width and color :

return Container(

width: MediaQuery.of(context).size.width / 1.2,

color: Colors.green,

Let’s see what we will get as a result:

If the gesture started in our wrapped container — it will continue updating DX and DY data even on a white area, even if it is not wrapped by GestureDetector. But it will not work otherwise.

6.2 Button click

And what if we have a RaisedButton with onPressed handler in our Container that is wrapped with GestureDetector?

RaisedButton(

onPressed: () {

print('Button pressed');

},

child: Text("CLICK ME"),

),

What will trigger, onTap of GestureDetector or onPressed handler of a RaisedButton? Let’s find out.

If you will define a new onTap or onPressed method inside a GestureDetector it will override your GestureDetector’s onTap method.

As you know, RaisedButton has a onLongPress handler too, but as we did not override it — our GestureDetector’s onLongPress triggered instead.

RaisedButton(

onLongPress: () {},

...

),

6.3 Pinch/Scale

For preventing errors you cannot have simultaneously vertical , horizontal and scale handlers in one GestureDetector.

// ==== Error! ====

onHorizontalDragStart: (DragStartDetails details) {},

onVerticalDragStart: (DragStartDetails details) {},

onHorizontalDragUpdate: (DragUpdateDetails details) {},

onVerticalDragUpdate: (DragUpdateDetails details) {},

onHorizontalDragEnd: (DragEndDetails details) {},

onVerticalDragEnd: (DragEndDetails details) {},

onScaleStart: (ScaleStartDetails details) {},

onScaleUpdate: (ScaleUpdateDetails details) {},

onScaleEnd: (ScaleEndDetails details) {},

You can leave only two at the same time

Vertical and Scale :

// ==== OK! ====

onVerticalDragStart: (DragStartDetails details) {},

onVerticalDragUpdate: (DragUpdateDetails details) {},

onVerticalDragEnd: (DragEndDetails details) {},

onScaleStart: (ScaleStartDetails details) {},

onScaleUpdate: (ScaleUpdateDetails details) {},

onScaleEnd: (ScaleEndDetails details) {},

Horizontal and Scale :
Blockchain and Solving Society’s Problems
By: Axiom Zen
Tags: Blockchain, Insights, Social Good, Technology, Bitcoin

Applying blockchain to social issues

In Finland, the MONI Card is being used to give refugees the resources they need to start their new life. Blockchain offers exceptional, immutable record keeping which makes it possible to financially include refugees who are starting their new lives without credit or banking history. This ability to have a financial identity makes it possible for these people to find jobs, pay bills, and establish themselves much more quickly.

In Jordan, blockchain is helping distribute aid to Syrian Refugees. The World Food Program project uses retina scanners to monitor food distribution, which is recorded on a blockchain. This prevents aid from being dispersed to the wrong people, and better manages their data.

But, refugees aren’t the only ones without access to financial systems. Financial inclusion is a problem affecting at least two billion people worldwide, and it is arguably a cause of impoverished circumstances.

Estonia is proposing to use blockchain for identity, giving people all around the world the opportunity to be e-residents and access the services and infrastructure available to Estonian residents. Additionally, the ‘estcoins’ could allow investors around the world to invest in the development in Estonia. It would also give them a vested interest in the country’s growth. A secure digital identity gives access to resources for starting a business abroad which should prove to be very economically empowering.

Other government efforts aim to improve access to financial services in developing countries through blockchain. By facilitating secure registration of personal data these efforts significantly lower the barrier to entry for getting services to citizens that can economically empower them.

Blockchain is more than just currency

Blockchain is being applied in Kenya to root out dilapidated cars and stolen vehicles. It’s being used in Ghana to secure land ownership. And, yes, it’s even used to enable a gold-backed currency.

By tracking assets and identities, individuals are economically empowered through blockchain — and that’s something we should all be excited about.

LAYNE LAFRANCE is a blockchain focused Project Manager at AxiomZen. With a keen eye, and inquisitive nature, Lafrance has asserted herself as a fresh authority.
101 SQL with Python Code Tutorial
By: James Briggs
Tags: Sql, Python, Programming, Software Development, Data Science

The hierarchy of objects in SQL includes our server at the very top. Inside the server are the databases, and inside the databases are the SQL tables themselves.

Our data is stored within these tables. So, let’s go ahead and create our first database and table.

The Database

Back in Python, we can execute SQL statements using the execute method, like so:

Of course, we don’t have any databases to show yet. To create a database in SQL, we write CREATE DATABASE dbname — using Python, we write:

mycursor.execute("CREATE DATABASE dbname")

We can then connect to our new database using another connection string that specifies our database database="dbname" :

Creating a Table

Next up, we create our table, which will contain all of our data. We can do this in two ways.

1.After connecting to our new database, we can execute a CREATE TABLE query:

Our newly created dbtable in MySQL Workbench (we installed this earlier).

Now we have a table called dbtable ! It contains just three columns:

user_id — an eight-character string

— an eight-character string location — an up to 32 character string

— an up to 32 character string number_of — an integer

We can then populate the table like we usually would in SQL:

The final line mydb.commit() is an extra step required when using Python. Typically, SQL commands auto-commit to a database. But, this is not the case when using a Python connection.

So, after every modification — we must commit it for the change to persist. We can check our changes like so:

SELECT * FROM dbtable returns a results generator to mycursor — which we can view by iteratively printing.

2.We can take some data from a Pandas DataFrame to create our new data table.

I will use the Titanic dataset (train.csv) in this example — but feel free to use any dataset you like.

When adding data from a Pandas Dataframe, we actually need to switch to another framework and create a ‘SQLAlchemy’ connection. First, install sqlalchemy :

pip install sqlalchemy

Once installed, we can import this module and create our new connection like so:

And now we’re ready to create our new SQL table using a Pandas DataFrame. All we need is the to_sql method:

Now we’re done, we’ve uploaded the Titanic dataset to MySQL. We can head over to MySQL Workbench to see our new table too:
La guerra hegemónica y los peligros de repetir la historia
By: Lautaro N. Rubbi
Tags: China, Foreign Policy, War, International Relations, Foreign Affairs

Ph.D. and MG. in International Relations. Expert in International Security and War. Special interests in new technologies, productivity, and philosophy.

Follow
I’m With Dickhead
By: Danna Reich Colman
Tags: Relationships, Dating, Love

(Written in response to “My Aversion to Dating.”)

Wow. No, I don’t think you “sound like a dickhead.” I understand everything you’ve said so clearly. In fact, while reading, I was thinking how does she know exactly how I feel? And she expresses herself so well. Are you sure you’re only twenty? You sound very mature to me, and maybe self centered isn’t the right word. Try self caring. I’m over sixty, and I’ve always felt the way you’re feeling now. I’ve always enjoyed the first few months of a relationship more than any other time. It’s fun and exciting during that period until it gets “real.” I’m on my best behavior and so is he, and it seems that the majority of issues arise later.

I’ve been married three times and had plenty of long-term relationships which lasted from one to three years. I have always been the one to walk away. And each time I did so, I was relieved because, like you, I was already “done” before I left. Then after about six or seven months, I’d be excited about finding someone new. I liked my time alone so much that I needed time to recuperate from the last relationship. Once I went two years by myself with only a date here and there, and then I couldn’t wait until he took me home so I could be by myself again. Once I even jumped up and down and screamed with relief as soon as I walked in the door!

Five years ago, I left my third husband and knew it was time to call it quits on trying to find “the one.” Well, actually I was feeling that I had found “the one” in myself… ha! I haven’t dated at all, and I’ve been telling everyone that I am done, done. Forever done. Done forever. I absolutely love being by myself. I am never lonely. Actually, I can be really lonely (and have been) in the company of the wrong person — all three husbands. And did I tell you how great it feels to not be obligated to anyone? To not have to share a bed with someone for years that I never want to make love with? To sleep as long as I want? To never have to hear the sound of a goddamned ball game on the television? To not have to listen to a gaslighter or to one more passive aggressive word?

And besides all that, what woman in her right mind at almost seventy (shudder) would want to go out with an old man? I mean, if I had grown old with one of the three from when they were young and handsome, sure, but to start all over again with someone ancient and wrinkly with a beer belly? No thank you. I have to look at myself all the time. I don’t want to look at someone else this age, too.

So I was so excited to live out the rest of my life with myself and my adorable dog until a month ago. I met someone. I didn’t want to meet anyone. I still don’t want to know him. I was so, so happy. But now when I talk to him on the phone and when I think of him, I’m happy. I don’t want to be happy with someone. I don’t want to try it again. I don’t want to fall in love again — or in my case, for the first time. God damn it! I want to be alone!
On-Policy v/s Off-Policy Learning
By: Abhishek Suran
Tags: Machine Learning, Technology, Algorithms, Reinforcement Learning, Data Science

Using Important Sampling for Off-Policy

As of now, we know the difference b/w off-policy and on-policy. So the question that arises is how can we get the expectation of state values under a policy while following another policy. This is where Important Sampling comes handy. Let us understand with the monte Carlo update rule.

image via Reinforcement Learning: An Introduction

Richard S. Sutton and Andrew G. Barto

As you can see, the update rule consists of an average of all the sampled rewards from a state. These rewards are sampled by following behavior policy b(a|s), But we want to estimate values for target policy pi(a|s) and need rewards sampled from target policy pi(a|s). We can do this by simply multiplying ‘ρ’ with every reward that is sampled from behavior policy. The value of ‘ρ’ is equal to the probability of trajectory under target policy pi(a|s) divided by probability of trajectory under behavior policy b(a|s). These probabilities of trajectory are defined as the probability of taking action ‘At’ by an agent in the state St’ and moves into state ‘St+1' then taking action ‘At+1’ and so on until time T. This probability can be split into two parts i.e probability of taking action ‘At’ in some state ‘St’ and the probability of ending up in some state ‘St+1’ by taking action ‘At’ in the state ‘S’. In short stochastic policy and stochastic environment.

Derivation of Important Sampling:

Consider a random variable ‘x’ is being sampled from probability distribution ‘b’ and we want to estimate the expected value of ‘x’ with respect to target distribution ‘pi’. Expectation can be written as

Now, we can multiply with the probability of sampling x via ‘b’. By shifting b(x) below pi(x) we got our important sampling ratio ‘ρ’.

Now, if we treat xρ(x) as a new variable then we can write it as expectation under ‘b’.

Now the expectation from data can we write as a weighted sample average where ‘ρ’ are used as weights.

Now we can sample ‘x’ from ‘b’ and can estimate its expected value under ‘pi’ using the above formula.

So, this concludes this article. Thank you for reading, hope you enjoy and was able to understand what I wanted to explain. Hope you read my upcoming articles. Hari Om…🙏

References:
What have I learned from other people?
By: Tony Jiang
Tags: Attitude, Responsibility, Steve Jobs

Photo from Hundred5

One internship in my senior of college changed my thinking and let me know you’re braver than you believe, and stronger than you seem, and smarter than you think.

I worked at a textile factory for one year in Xinwu Taoyuan. I have been a Special Assistant of CEO of Assistant by Vice President delegation. Before I worked for him, someone had told me that one inter from NTUST had got told off by Special Assistant and them he had cried. Even though I have learned two main points from him.

Photo from AVIAnation

If A stands for 1, B stands for 2, C stands for 3, and so on. What does vocabulary add up to be 100? The answer is an attitude. When he chaired a meeting with the General Manager or Subordinate, he was managing to persuade them to follow his management model. If your position is higher, you will be in a pickle. However, he insisted on doing the right things. so, I have learned from him that attitude decides your altitude.

Photo from PsychologyToday

Responsibility. It is a word made up of two words: the word response and the word ability. Responsibility is not what someone puts on you. Responsibility is not your job description. Responsibility is not a paper you sign. We all find ourselves with abilities what will be your response to those abilities? So, he responded to his abilities while he was doing his work. It’s not who you are underneath, it’s what you do that defines you.

Photo from Stevehsu6578

To sum up, Just like Steve Jobs said stay hungry stay foolish. Personally, I think that learning is not only focused on skills but also on core values. Therefore, you can begin to explore your possibilities.
Winter Lights
By: Charlene Marron
Tags: Poetry, Holiday Season, Tree Lighting, Winter, Tradition

Winter Lights

An extended haiku about small town holiday traditions

Photo by Ivan Akimenko on Unsplash

Around the bonfire

the kindred spirits gather,

ignoring the cold;

Winter pep rally,

tree lighting ceremony,

snow globe atmosphere;

Onlookers enjoy

festive holiday displays,

twinkle lights shining;

Hot cocoa delights

adults and children alike,

drinking in the warmth;

Spirits are buoyant,

wishes whispered to Santa;

we smile to ourselves;

Quintessential charm;

Traditions in the making,

cherished memories.
I Was Gay Bashed in Greenwich Village
By: James Finn
Tags: This Happened To Me, Equality, LGBTQ, Gender Equality, Sexism

I Was Gay Bashed in Greenwich Village

On why homophobia is misogyny

Where we were when we were attacked.

“Hey, youse! Yo!”

My ears twitch. Is he talking to me? Surely not.

My head rests on Lenny’s chest as we stand near the end of Christopher Street, just enjoying the night air as we gaze out over the purple Hudson.

My eyes dart back and forth in a rapid but tardy scan.

Damn! There’s nobody down here! We’re isolated. We’ve walked right out of the Friday night festivities and into danger without noticing.

Where we should have been

I feel Lenny’s muscles tense.

I pick my head up, square my shoulders, and plant my feet.

Now I can see them.

Four or five young guys. Not too young. Dangerous in their ball caps and straight-kid drag. They probably just want directions, I tell myself. Don’t be paranoid.

“Hey, look at the girly men! Come ’ere, girly boy!”

That’s what he says, the New Jersey street tough come to Greenwich Village for an evening of fun and gay bashing, right before his fist smashes into my nose.

I hear the crack, but I don’t feel it yet. I’m numb from shock and outrage.

I feel rather than hear Lenny’s growl.

I draw in a sharp breath as adrenaline races and spikes every hair on my body.
Laravel: Fail, Retry, or Delay a Queued Job From Itself
By: Italo Baeza Cabrera
Tags: PHP, Laravel, Programming, Web Development, Software Development

Laravel: Fail, Retry, or Delay a Queued Job From Itself

You probably didn’t know you can use these tricks

Photo by Emile Guillemot on Unsplash

When creating jobs, listeners, or subscribers to push into the queue, you may start thinking that, once dispatched, you’re all on your own with what the queue worker decides to do with your logic.

Well… it’s not that you can’t interact with the queue worker from inside the job, but you usually don’t need to… until you do.

The magic happens because of the InteractsWithQueue trait. When the queued job is being pulled out from the queue, the CallQueuedListener will check if it’s using the InteractsWithQueue trait, and if it is, the framework will inject the underlying “job” instance inside.
Music Beats Netflix; Streamstock Set For Friday
By: Platform
Tags: Spotify, Streamstock, Streaming Music, Groupm, Music

Music streaming finally has more paying subscribers than Netflix — www.musicbusinessworldwide.com

One of the more deflating facts about the size of the global music streaming business has, for the time being, been banished to history. Across the past half-decade, the total number of people paying to subscribe to audio music services has trailed behind those shelling out for just one TV and movie service — Netflix.

How Spotify Created a Profitable New Way for Consumers to Obtain the Music They Listen to — www.entrepreneur.com

Its popular service, which grew virally, is free to the majority of users but still turns a profit.

Garth Brooks’ Ghost Tunes Folding Into Amazon Music — www.billboard.com

The so-called alternative to iTunes appears to be no more.

GroupM/Spotify reveal $220m mobile music streaming ad opportunity — www.bizreport.com

Group M and Spotify plan to tap into streaming media consumption, in particular music, to generate new ad revenue.

Streamstock 2017 Online Music & Arts Festival Set For Friday — www.jambase.com

On Friday, Streamstock 2017 will provide an alternative to the Inauguration festivities.

Guvera music streaming service escapes insolvency bid — www.smh.com.au

Troubled Australian music streaming service Guvera has escaped an attempt to have its business sent to the liquidators.

Spotify is the top-grossing iOS app, Line takes first spot on Google Play — betanews.com

There are lots of really successful paid apps, but which one generates the most net revenue? According to a Sensor Tower report, Spotify comes out on top overall in 2016.

VIZIO Crave 360, Crave Pro speakers get some Spotify love — www.slashgear.com

VIZIO is a brand better known for its TVs, both traditional and smart, but of late it has been making huge strides to leave a mark in the connect speaker market