teleren/devto huggingface dataset:
Prevent browser caching of your stylesheet in WP. 
Published: 2021-01-12 08:08:35

My workflow for Wordpress sites is to run a child theme and make all CSS changes in to the child style.css so it's neat. 

Typically there will be server-side cache (Varnish) and frontend cache (W3TC plugin) where we run in to the problem that any changes to your style.css will never be seen by your customers. Browser cache is gobbling it up and often setting a 365 day lifetime on that file. How do we bust it? 

```
$rand = rand( 1, 999999999 );
wp_enqueue_style( 'brisbane-css-bust', get_stylesheet_uri(), '', $rand );
```

Throw the above in to your functions.php.

What we're doing here is re-enqueing the /child-theme/style.css file on every page refresh so it's not being cached.

`get_stylesheet_uri()` is referencing the child theme CSS file, not the main theme as we have the child theme activated (WP does this automatically). 

`$rand = rand( 1, 999999999 );` is adding a query string to the file so it appears new to the browser. A random number between 1 and 9,999,999 is selected which means it will always be unique. 

Check your W3TC setup isn't cacheing this query string but it shouldn't straight out of the box. 

Developed this tweak for these sites:
[Presety Lightroom](https://presetylightroom.pl)
[Lightroom Presets](https://lightroompresets.pl)
[Brisbane Agency](https://brisbaneagency.com/light-and-airy-presets/)
Helping a Fast-Growing E-commerce Platform Reach New Markets
Tags: ecommerce, sitecore, platform, howto
Published: 2021-01-12 07:59:34

[Learn about](https://www.brimit.com/blog/helping-a-fast-growing-e-commerce-platform-reach-new-markets) business expansion through localization of an e-commerce platform and attracting new audiences and merchants from multiple countries.
Signal Five: Monetization
Published: 2021-01-12 07:45:52

In my last post, I mentioned ideas to monetize a social platform. Today I'm going to highlight some of those, and ask for feedback, but first an update on whats been happening.


Since my last post, a lot has happened. More planning, more work. My partner in crime Michael finally got out of the hospital (yay!) and he's started working on a landing page. I've been working on the back end of things for the last 2ish weeks. Writing tests, building backend stuff out. In case anyone is wondering we are using Ruby on Rails for backend and (most likely) some sort of framework for the front end, but we aren't quite there yet.
 

I've wanted to talk about some ideas for business structure/ monetization and get some feedback on them, so here goes.
 
<b>Structure</b>

I've thought long and hard about this, and I've come to the conclusion that we will most likely set up a non-profit(501C). Any money after salaries/operating costs that we make(assuming we make any of course) we will donate to various charities. I can't think of any other social platform that does this (at least none I've heard of).

<b>Monetization</b>

So how will we make any money at all? My initial thoughts in no particular order, and remember these are just ideas, not set in stone. 

-1. Patreon. We could have several different tiers that includes various rewards, both physical and digital. 
-2.Micro-transactions. A store for things such as digital items, stickers/emotes, backgrounds, and physical items such as mugs/shirts/etc.
-3. Charging a small subscription.(something like a couple bucks.) When I first started brainstorming ideas, this was one of the first things I thought of, although I'm not sure I'd do it now. I like the "subscribe if you want to support us" option, or if you don't want to sub you can buy backgrounds/stickers/etc.

I really tend to think a micro transaction economy would work here, as long as it doesn't detract ANYTHING from the main user experience, i.e. making customers pay for features that should already be in the service.

Nothing is set in stone yet, feel free to give me any thoughts or comments of your own. Anything would be helpful at this point. 

If you'd like to follow our progress, we are social:
twitter @andevrs, @sig_five, @mikemaitoza
we also have a facebook page: https://www.facebook.com/signalv

Thanks!
Feels like I am slow at programming. What do you suggested to improve that?
Tags: discuss, webdev, productivity, improvement
Published: 2021-01-12 07:07:55

After career transition from engineering to webdev(bootcamp a year ego) , I feel that I am the slowest developer ever! I volunteer at an open source and working on personal projects and Everything takes me alot of time, adding a widget or a small feature can consume me 5-7hours, its very frustrating. 
How can i improve it?
How to evaluate myself for timelines?
what do you suggest for me?
React Native iOS Keyboard with a Custom Button
Tags: reactnative, ios, keyboard, custom
Published: 2021-01-12 06:43:05

Imagine you are making an app that needs some extra keys on a virtual keyboard that does not exist (not yet 😀). For example, it could be nice to have a `Next` button. Or a button that will allow a user to do something special and improve the user experience. 

![Example app](https://dev-to-uploads.s3.amazonaws.com/i/w3fi3gz7zo8anp26ijed.gif)

### What if I told you that it's not so difficult❓

![Matrix Cat](https://dev-to-uploads.s3.amazonaws.com/i/5np0fbo4hwr2qibpspel.jpeg)

### Let's welcome [InputAccessoryView](https://reactnative.dev/docs/inputaccessoryview) component! 👏

The `InputAccessoryView` is a component that enables customization of the keyboard input accessory view on iOS. The input accessory view is displayed above the keyboard whenever a `TextInput` has focus. This component can be used to create custom toolbars. 

### Awesome! How we can do it? 🔧

To use this component we should wrap our custom toolbar view with the `InputAccessoryView` component, and set a `nativeID` identifier. Then, pass that `nativeID` as the `inputAccessoryViewID` to the TextInput component. Like that:

![InputAccessoryView simple example](https://dev-to-uploads.s3.amazonaws.com/i/00d0cwx5nyj0si8oz99p.png)

And that is what we will get (we have a pink background here to highlight the toolbar area).

![Input accessory view result](https://dev-to-uploads.s3.amazonaws.com/i/khh70gad5py1ri5ccj2n.png)

### Great! Let's do something useful! 🏗 

Imaging we have a form with input fields. And we want to allow a user to move to the next field easily. Let's create an input accessory view with the `Next` button for that. So when a user presses the `Next` button we could focus next input field.

{% gist https://gist.github.com/vladimir-vovk/042aa5b3b3762ad7c641887b5c9ed2f4 %}

![Next button result](https://dev-to-uploads.s3.amazonaws.com/i/72mh859bce6b5tfkjhqp.png)

Easy right! 

And what if we want to have different buttons for different input fields? Not a problem! You could have several input accessory views with different IDs in that case. And use them for different input fields (see line 13 in the example above 👀).

That's all folks! 🎉

You could find the complete example with [Expo](https://expo.io/) in this [repo](https://github.com/vladimir-vovk/ios-numpad-keyboard-with-custom-button). Please give it a star 🌟 if you like it. 🥳

### Credits

<span>Photo by <a href="https://unsplash.com/@christinnoelle?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Christin Noelle</a> on <a href="https://unsplash.com/s/photos/keyboard-key?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
Mengenal Jenis-jenis Kulit Wajah
Published: 2021-01-12 06:35:56

Mengenal Jenis-jenis Kulit Wajah
Setiap orang pasti menginginkan kulit wajah yang bersih dan sehat. Untuk mewujudkannya, perlu untuk mengetahui terlebih dahulu jenis kulit wajah anda. Karena setiap orang memiliki tipe atau jenis kulit yang berbeda-beda dan juga bisa berubah mengikuti pertambahan usia. Selain itu, jenis kulit wajah juga dapat dipengaruhi faktor lain, seperti genetik, penyakit tertentu, dan lingkungan, contohnya iklim, debu, dan lainnya. Kebiasaan tertentu pun juga dapat mengakibatkan berubahnya kondisi kulit, seperti merokok dan minum alkohol.
Memiliki kulit sehat dan bersih pasti keinginan setiap orang terkhusus wanita. Namun untuk mewujudkan itu, penting untuk Anda mengetahui jenis kulit wajah Anda terlebih dahulu.
Pada dasarnya struktur dan jenis kulit wajah ditentukan oleh beberapa faktor berikut ini:
-	kandungan air kulit yang memengaruhi elastisitas 
-	kandungan minyak, yang memengaruhi kelembutan dan nutrisi
-	tingkat kepekaan kulit terhadap zat atau bahan tertentu
Dari ketiga faktor tersebut, jenis kulit diklasifikasikan sebagai berikut:
1.	Kulit Normal
Kulit jenis ini memiliki kadar air dan minyak yang seimbang, kulit jenis ini biasanya tidak sensitif, bercahaya, pori-pori tidak terlihat. Sehingga kulit jenis ini lebih muda dirawat.
2.	Kulit kering
Kulit jenis ini biasanya diakibatkan rendahnya tingkat kelembapan pada lapisan kulit terluar.  Pori-pori pada jenis kulit ini hampir tidak terlihat. Namun permukaan terlihat kasar dan kusam, dan kurang elastis. Sehingga kulit ini lebih mudah memerah, gatal, bersisik, dan meradang.
3.	Kulit Berminyak
Kulit jenis ini cenderung licin atau terlihat glowing mengkilap, dikarenakan produksi minyak atau sebum berlebih. Sebum ini secara alami keluar dari kelenjar sabeceous di bawah permukaan kulit. Meskipun sebum berfungsi untuk melindungi dan melembapkan kulit namun juga menyebabkan kulit jadi berminyak, pori pori tersumbat, komedo, noda hitam dan membuat kulit rentan jerawatan.
4.	Kulit Sensitif
Kulit jenis ini biasanya memiliki ciri-ciri kemerahan, gatal, kering, dan panas seperti terbakar. Kulit ini pada umumnya sangat peka dan mudah sekali mengalami alergi atau iritasi. Penyebabnya kulit sensitif seperti ini adalah salah memilih produk perawatan, lingkungan, makanan dan lainnya.
5.	Kulit Kombinasi
Kulit jenis ini merupakan kombinasi dari kulit berminyak dan kulit kering. Biasanya kulit jenis ini akan berminyak dibagian zona T pada wajah, yaitu area dagu, hidung, dan dahi. Namun kulit dibagian pipi terlihat kering. 
Kulit ini dipengaruhi oleh faktor genetis, pubertas, atau kondoso kelenjar minyak memproduksi sebum berlebih.
Dari uraian jenis-jenis kulit diatas, anda bisa memahami sendiri kulit anda termasuk kategori jenis kulit yang bagaimana. Setelah itu tentukan perawatan kulit jenis apa yanga akan anda pilih. Anda bisa ikuti kursus estetika untuk mengetahui lebih mendalam terkait treatment dalam merawat kulit. Konsultasi kursus estetika 


source : https://course.espro.co.id/jenis-jenis-kulit-wajah/
Hello Devs!
Tags: beginners, javascript, webdev
Published: 2021-01-12 06:21:40

##Developers, Developers, Developers ! 
This is my first post ever :smile:

Hey there fellow Devs! I am 0neilwe .The laziest developer yet, sadly. :frowning:

I would categorise myself as someone who wasted a lot of time in trying to becoming a developer. I'm still on the way :thumbsup: , I haven't even mastered a language let alone touched any framework for the programming language. 

I have been interested in Web development , Data Science and Machine Learning since I first learned about the Dev-world at the age of 17 on 2018. 

Learnt HTML at 17 with a bit of CSS. Learnt nothing at 2019.

Started my first year of studying Graphic Design on Feb 2020 ,I hated my course so much that I stopped paying attention and started doing freeCodeCamp tutorials in class. 
 
Completed Responsive Web Design in March (not the projects!), 
Then , I burnt out.

###*Enters* **COVID-19!**

3 months had passed of me doing nothing and around mid-June , I started learning Python up until July and burnt out. 

Tried to learn Javascript in 3 days with no space-repetition learning. Gave up :disappointed:

However , 

It is a Happy New Year and I have been practicing Javascript almost every day .Now I am totally looking forward to making my Developer dream a priority and would love to be part of a community that can help me reach my goal with open arms. :yellow_heart:

If you read this far , I am grateful that there are people like you who care for the growth of the DEV community.
:purple_heart:
A Simple Approach To Using Console.log For Debugging
Tags: javascript, debugging
Published: 2021-01-12 06:12:48

*Some people scoff at the console.log, some people - present company included - cherish the simple method. Here's an easy way to use it to your advantage on your front-end*

##A Global Constant
Key to this working well is to place a constant in the global namespace. You can pick where you want it. 
```
window.debugCLs = true
```

Now as you go about in your code you can make a decision on if there are sections where you want specific and quick console logs available to you. You may have some troublesome blocks that you just want to switch on and off as you debug, or any number of other scenarios. 

```
try {
    ...to do this thing
} catch(e) {
    window.debugCLs && console.log(e);
}
```

If you want to run a file with these logs activated, simply switch your constant to the value of `true`, save, and run.

## Organizing Your Logs
You can organize your logs by color (or other styles) to help you quickly sort through things in the console, or to make sure your eye immediately is drawn to specific priority logs. 

```
const modelObj = {
    value: 10,
}

try {
    const notAConst = (modelObj.value.props[0]);
} catch(e) {
    window.debugCLs && console.log('%c PRIORITY ','color:white;background-color:#044c94', e);
}
```
![Color-coded label for a debugging console.log](https://dev-to-uploads.s3.amazonaws.com/i/t11kprcygayoemdhg1uv.png)

##Less Is More
Obviously there is always too much of a good thing. You don't want to be sorting through a console with 500 lines of logging that are color-coded with 255 colors. That being said, four to five different categories could just help you out a bit.

And if you want to make it even more slick to handle, make your global variable an object that allows you to turn large categories on and off:

```
window.debugCLs = {
    apiCalls = true;
    socketNegotiations = false;
}
```

##Happy Coding
...and remember to always code for good :)
Portfoliocon 2021 prize list (so far)
Tags: education, beginners, portfoliocon, jobs
Published: 2021-01-12 06:06:24

---
title: Portfoliocon 2021 prize list (so far)
published: true
description: Portfoliocon 2021 is popping off this Wednesday, here is the prize list.
tags: education, beginner, portfoliocon, jobs
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/pak4b5jbbmwcf324jc3v.jpg
---

Hi everyone!

## **Portfoliocon 2021 is popping off this Wednesday at 12 pm CST.** 

Woot woot! It's 3 days of portfolio madness, featuring over 60 reviews of real-life aspiring & junior software developer portfolios.

To add to the fun, a few of my education friends have generously provided some sweet prizes. 

Throughout the livestream (Wed-Thurs-Fri) I'll be giving away: 

- A 3-month subscription to Educative.io
- A year subscription to Andrei Neagoie's ZeroToMastery.io
- Caleb Curry's upcoming Intro to Machine Learning course on [CodeBreakthrough.com](https://www.codebreakthrough.com/)
- Caleb Curry's Flask course on CodeBreakthrough.com
- A one-month subscription to RealToughCandy.io
- A year subscription to RealToughCandy.io
- 3 [Portfolio Surgery](https://realtoughcandy.io/p/portfolio-surgery) courses on RealToughCandy.io

### **Lucky winners will be picked mostly randomly (with a trivia question or two mixed in) & you'll need to be present to win.** 

Be sure to [subscribe to my YouTube channel](https://www.youtube.com/realtoughcandy?sub_confirmation=1) so you don't miss the festivities. 

I'm super stoked to review some portfolios! See you soon.
Codewars 6 kyu I Multiples of 3 or 5
Tags: javascript
Published: 2021-01-12 06:05:20

```
function solution(number) {
  let sum = 0;
  if (number < 0) {
    return sum;
  } else {
    for (let i = 1; i < number; i++) {
      if (i % 3 === 0 || i % 5 == 0) {
        sum += i;
      }
    }
    return sum;
  }
}
```

```
function solution(number) {
  let sum = 0;
  for (let i = 1; i < number; i++) {
    i % 3 === 0 || i % 5 == 0 ? (sum += i) : sum;
  }
  return sum;
}
```
Kick Start your Personal Write up Site using Gridsome
Tags: vue, gridsome, markdown, pwa
Published: 2021-01-12 06:03:48

If you want to create a Blog only for Personal Write up's then start with Gridsome (A Jamstack framework for Vue.js)  

**ZERO** - Cost, plugins, Database,

~~server-side~~ - Full Static Site

> Publish Content via Markdown

Let's Kick start your Personal Write up site Today at Zero Cost

- Clone this Gridsome theme from Github or download it

{% github mskian/hello-world %}

```bash
git clone https://github.com/mskian/hello-world.git
```

- Install packages

```bash
cd hello-world
yarn install
```

- Test the site

```bash
yarn develop
```

- publish new content

```bash
yarn newpost
```

- Production Build

```sh
yarn build
```

- Production Build store the Static Files on `dist` Folder

you can host it Freely on Netlify and Vercel

## Theme features

- Markdown
- PWA
- Post tags
- Post author
- Social Meta Tags
- Create a new post file via Command
- Custom 404 Error Page
- Optimized Meta Tags
- Canonical URL  

Spread your Write up's around the World with a Lightning-fast Site with PWA
Tableau Certification Online Training Course
Tags: tableauonlinetraining
Published: 2021-01-12 05:56:44

The [Tableau online training](https://www.igmguru.com/data-science-bi/tableau-training/) course by IgmGuru is planned to assist users in dynamic learning about Data visualization using Tableau. The foremost goal of the learn Tableau online course is to help users gain a working knowledge of Tableau and visualize data into the dashboard using the tools provided by Tableau platform. The Tableau online training provides a basic understanding of Data types, extraction of Data, data blending, adding filters, highlighting data, geocoding, map and image visualization, and many more technical details about Tableau. IgmGuru’s online tableau training course for Tableau course helps users to culminate an outstanding knowledge of Data visualization using Tableau and develop a technical aptitude to design interactive dashboards based on organizational requirements.
Fix "No Wifi Adapter" in Ubuntu 20.04
Tags: ubuntu, linux
Published: 2021-01-12 05:54:31

####
Was having a great day, everything was working as well as it could be. Suddenly. BANG! "No Wifi Adapter Found" on my Macbook running Ubuntu 20.04. After lots of googling, and trial & error. It worked. I'm writing this in hopes that it will help someone who was in my predicament.

Step 1 : Find an internet connection. I tethered my phone to macbook with a USB cord.

Step 2: Open your terminal and run the following :

```
sudo apt-get purge bcmwl-kernel-source
```

```
sudo apt-get install broadcom-sta-source broadcom-sta-dkms broadcom-sta-common
``` 

Then Reboot. Should work. It did for me. Good luck.
reduce function in Python3+
Tags: python, functools, math
Published: 2021-01-12 05:26:48

The [reduce](https://docs.python.org/3/library/functools.html?highlight=reduce#functools.reduce) function is part of [functools](https://docs.python.org/3/library/functools.html) module of Python, you need two arguments for used, one a function and two a iterable. The reduce function applies the first argument to each element of iterable cumulatively. This function is equivalent to:
```python
def reduce(function, iterable, initializer=None):
    it = iter(iterable)
    if initializer is None:
        value = next(it)
    else:
        value = initializer
    for element in it:
        value = function(value, element)
    return value
```
This is the Python documentation example:
```python
from functools import reduce

output = reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) 
print(output)

[1]: 15
```
That is useful in some cases like in a math series:
```python
from functools import reduce

elements = range(1, 36)
reduce(lambda x, y: x+(1/y**2), elements)

[1]: 1.616766914907197

elements = range(1, 360)
reduce(lambda x, y: x+(1/y**2), elements)

[2]: 1.642152427473518

elements = range(1, 3600)
reduce(lambda x, y: x+(1/y**2), elements)

[3]: 1.6446562504866367
```
It is not the best way to calculate [π**2 / 6](https://en.wikipedia.org/wiki/Series_(mathematics)#π), but it is an example of how to use the reduce function.
{% collapsible π**2 / 6 %}
```python
from math import pi

pi**2/6

[1]: 1.6449340668482264
```
;P
{% endcollapsible %}

Can be useful for other applications but I love math so enjoy it! Anyway if you have doubts, comments, or corrections about I would like to receive feedback :hearts:

Thanks for reading!
Crystal - Plugin Pattern
Tags: crystal
Published: 2021-01-12 05:32:31

## The Inspiration

I recently [added Lucky to TechEmpower benchmarks](https://github.com/TechEmpower/FrameworkBenchmarks/pull/6069) and was looking around for articles/videos about what other frameworks are doing to perform so well. I came across this really good talk by Jeremy Evans called [Optimization Techniques Used by the Benchmark Winners](https://rubykaigi.org/2019/presentations/jeremyevans0.html). Instead of carrying away a list of changes to make to Lucky, I came away with a fascination for how he designed his framework, [Roda](http://roda.jeremyevans.net/). Specifically, I loved the idea of entirely using plugins to extend and add behavior. If you ever get the chance to look at the source code for the framework you'll notice that the classes are almost empty. All the behavior is added in through plugins. I really wanted to see if this was possible in Crystal.

## The Challenge

In Roda, when you add a plugin, it includes and extends nested modules.

```ruby
plugin CustomRender

# becomes...

include(CustomRender::InstanceMethods) if defined?(CustomRender::InstanceMethods)
extend(CustomRender::ClassMethods) if defined?(CustomRender::ClassMethods)
# and more...
```

It also adds modules to the request and response objects but that is enough code to convey the challenges with converting it to Crystal:
- modules can't be included at runtime
- there is no `defined?` method

## The Solution

While Crystal can't include modules at runtime, we do have macros that can accomplish much of the same things. The original idea was to just have a macro like:

```crystal
macro plugin(type)
  include {{ type }}::InstanceMethods
  extend {{ type }}::ClassMethods
end
```

The only problem with that is the conditional aspect that Roda has. If the plugin doesn't need to add any class methods it shouldn't have to define that module and the framework should be able to handle it. The only solution I've found is to delegate to a second macro.

```crystal
macro extend_self(instance_methods, class_methods)
  {% if ims = instance_methods.resolve? %}
    include {{ ims }}
  {% end %}
  {% if cms = class_methods.resolve? %}
    extend {{ cms }}
  {% end %}
end

macro plugin(type)
  extend_self({{ "#{type}::InstanceMethods".id }}, {{ "#{type}::ClassMethods".id }})
end
```

The reason for the second macro is that I need the [`Path#resolve?` method](https://crystal-lang.org/api/0.35.1/Crystal/Macros/Path.html#resolve?:ASTNode%7CNilLiteral-instance-method) in order to check if the module is defined and this is the only way I know to dynamically create a `Path` object in a macro. Please let me know if you can think of a better way to do it!

```crystal
plugin CustomRender

# becomes...

extend_self(CustomerRender::InstanceMethods, CustomRender::ClassMethods)

# becomes...

include CustomerRender::InstanceMethods
extend CustomRender::ClassMethods
```

I haven't gotten to actually converting Roda over to Crystal yet but I hope to. I also hope to make more posts about it along the way.