teleren/devto huggingface dataset:
Code challenges & puzzles by Codr
Tags: javascript, challenge, webdev, cpp
Published: 2020-04-28 21:49:04

Do you enjoy winning and solving challenging problems? Whether you're an experienced programmer or a beginner, Codr is the app you need. Even if you've never seen programming code before, you can learn it easily.

As of today Codr is officially available on the Google Play Store. Apple and others can use Codr through our website. Codr is completely free and there are no ads.

![Codr on Google Play Store](https://dev-to-uploads.s3.amazonaws.com/i/vc29bymazb60mvdg4d07.png)

With many more challenges and puzzles than before, and fresh content on a daily basis, you won’t get bored anytime soon. Make sure to refresh regularly.

## What’s next

At Codr we are constantly building and experimenting with new learning experiences and challenges. Aside from new daily challenges, we are currently working on a competitive and economy based game mode. It will go into beta in the coming days, so stay tuned.

## Links

[Codr on Google Play Store](https://play.google.com/store/apps/details?id=nevolin.be.codr)
[Codr official website](https://nevolin.be/codr/)

We would love to hear your feedback, thoughts and ideas. The fastest way to reach us is [Discord](https://discord.gg/ZBmvXdf).

Have a nice day!
EchoをVercel（Zeit now）のServerless Function上で動かす
Tags: go, vercel, nowsh, serverlessfunction
Published: 2020-04-30 02:20:08

---
title: EchoをVercel（Zeit now）のServerless Function上で動かす
published: true
date: 2020-04-28 21:47:05 UTC
tags: Golang,Vercel,now.sh,Serverless function
canonical_url: https://kimihito.hatenablog.com/entry/2020/04/29/064705
---

### TL;DR

{% gist https://gist.github.com/kimihito/9c5ec449e119dd8fb98bf1e076d602b8 %}

Goやサーバレスアーキテクチャの初心者なので、もうちょっといいやり方ないかなーと持っています。

### やりたいこと

Vercel（Zeit now）を使っていて、Serverless functionで[Go](https://vercel.com/docs/v2/serverless-functions/supported-languages#go)が選択できたので利用してみたいと思ったので試してみた。

### やったこと

[ドキュメント](https://vercel.com/docs/runtimes#official-runtimes/go)にあるように プロジェクトルートに `api` ディレクトリを生成して `date.go` などつくる（このときhttp.HandleFuncのシグネチャである公開メソッドを用意すること）と `/api/date` というURLを提供できる（ `/api/` を指定したい場合は `/api/index.go` とする）。

が、今回はルーティングはEchoに任せたい（そもそもこれでいいのか？）と思ったので、 now.json の `routes` オプションを使い、 `/api` 配下に来たリクエストは `/api/index.go` で受け取って振り分けるようにした。

### わかっていないこと

go.mod で `module github.com/kimihito/hoge` みたいな指定をすると、 `now dev` などで開発するとGitHubにアクセスしにいってしまう。 これがGo modのお作法なのか、 利用しているプラットフォームの動作なのかわかっていない（ょゎぃ）

### 参考にしたリンク

{% github mini-eggs/go-now-example %}
SMS Powered Realtime COVID-19 Mask Donation Drive Tracker
Tags: twiliohackathon
Published: 2020-04-28 21:41:27

[Comment]: # (All of this is placeholder text. Use this format or any other format of your choosing to best describe your project.)

[Reminder]: # (Make sure you've submitted the Twilio CodeExchange agreement: https://ahoy.twilio.com/code-exchange-community)

[Important]: # (By making a submission, you agree to the competition's terms: https://www.twilio.com/legal/twilio-dev-hackathon-terms)


## What I built

SMS Powered Realtime COVID-19 Mask Donation Drive tracker application that provides the ability for users to run grassroots donation drives for coordinating home-made and donated face masks as part of the effort to curb the spread of COVID-19 virus. Users can control their donation drives by sending text messages to a designated auto-provisioned Twilio number and start receiving and distributing face masks.

#### Category Submission: 

- COVID-19 Communications

## Demo Link

https://github.com/tarikub/opFaceMask#demo

## Link to Code
https://github.com/tarikub/opFaceMask

## How I built it

Running real-time application from server-less cloud resources was a bit of a challenge. Testing new number provisioning Twilio API was also limited as I can only do it from a non-trail Twilio Project. Mostly stayed in .NET core stack with Angular & TypeScript front-end.

## Additional Resources/Info

More resources on the GitHub page.
Day 126 : The Season
Tags: hiphop, code, coding, lifelongdev
Published: 2020-04-28 21:25:00

_liner notes_:
- Professional : Pretty good day. Got another Pull Request merged. Created another version of a tutorial to use a different option and did a Pull Request. When we do that on this repository, it deploys a demo site. We'll be using that to do some internal of the tutorial in the next couple of days. Reworked some logic on a demo for another team so that a user can either input or say a number to select an option. Just need to reformat the the front end to fit the new story of the demo.

- Personal : Last night, I relaxed a little. Did some light coding and watched the season finale of "Dispatches from Elsewhere". Really satisfying episode. Not sure if there will be another season, but this was a great ending to a wonderful show. Hope there will be more.

![Aerial view of mountains and a river in Whistler, British Columbia, Canada](https://dev-to-uploads.s3.amazonaws.com/i/bc16k1b1mfalijh3blet.png)

Since I really only need to finish up the front end, I'm going to spend a couple of hours getting this demo to a point I can send it to the team to play with it. Probably end the night watching some anime.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube y_Ka5wiQBEw %}
Algorand: Developer Ambassador
Tags: blockchain, devops, javascript, java
Published: 2020-04-28 21:11:12

Are you a developer? Do you have a passion for blockchain technology? The Algorand Developer Ambassador Program might be for you.

The Algorand Foundation is looking for individuals to build solutions, spread the word and contribute to a global ecosystem. 

Also, a 43 million dollar grant fund has been established to help developers with funding. That being said, there are other ways to be compensated for your work. By creating tutorials and solutions you can take home ($1000-$2000+) per month. 

Algorand's Blockchain supports Javascript, Java, Golang, and Python. All skill levels are welcome, positions are limited.

If you are interested please contact the ecosystem coordinator at ecosystem@algorand.com

Program summary:

i) Dev Grants:Right to apply for $43 Million Algorand Dev Grants

ii) DevAms Rewards: ($1000-$2000+) per mo for creating Tutorials and Coding Solutions

iii) Exclusive Algorand Developer Portal: with JavaScript, Python, Java, Golang Tutorials, Full scale blockchain tools & Templates

iv) Network: directly with Algorand's Engineering team and developers from across 50+ countries

v) Take part in free coding webinars, training sessions and community hackathons
Why it’s time to switch to web app development (Hint: It’s cheaper, faster, and has a wider reach)
Tags: javascript, html, webdev
Published: 2020-04-28 20:49:12

Title is from this article by KaiOS: https://www.kaiostech.com/why-its-time-to-switch-to-web-app-development/

The article is worth a read if you're curious about web app development.

Here are some key points:

"KaiOS app developer Eli Shulga “went from zero to submitted in four days” when developing a game for the KaiStore. His first game for a native platform took him nearly six months from start to finish."


"Web apps have an SEO advantage because they are discoverable through an internet search. Once discovered, the apps can be installed on the device’s home screen in just one click, likely contributing to the average 52% increase in conversion rates."


"KaiOS developer account fees are $0 The Apple App Store bills developers $99 per year for an account, and Google Play charges a one-time $25 fee."

"Web app development not only allows you to enter a less competitive space but also helps you reach new markets" (You can make apps for people who can't afford smartphones)


Has anyone developed an app for KaiOS?
Looking for Collaborators on Bambi - A Flask Social Network
Tags: flask, socialnetwork, python
Published: 2020-04-28 20:47:01

<img src="https://www.bambi.app/static/profile_pics/logo.svg" alt="Logo" width="80" height="80">

I have been working on Bambi for a while now. What is Bambi you may ask? Bambi is a social network I built for my school - Near East University in Cyprus. Here is the site's URL - https://bambi.app

It was recently featured by @eleftheriabatsou in her review series here
[<img src="https://imgur.com/SHaGgiV.png">](https://dev.to/eleftheriabatsou/review-16-social-network-for-students-developer-harunn-elefdoescode-2p00)
It helps us make new friends based on common interests, chat, buy & sell each other stuff & even date (opt-in only feature). I am currently working on a feature like subreddits where users could create communities and bond on common interests. 

I am looking for collaborators on this feature. It is a chance to learn and ship changes that affect real users. The project's GitHub is blazing hot at the moment
 
<img src="https://i.imgur.com/J6kluwT.png">
 
Moreover, the project is open source so what not to like! Wanna help? Reach out to me on [twitter](https://twitter.com/harunnmohamed)

Happy Coding!
Hi guys. Who can help me out?
Tags: html, javascript, css
Published: 2020-04-28 20:44:11

Hi guys, My name is Nijan, a Senior Developer from Australia.
Now I am looking for a person who can help me on my work.
If you are based in Europe and America, please contact me.
nijanphuyal@gmail.com
You will be paid $200 everymonth.
Thanks.
Nijan,
Casually removing root files
Tags: linux
Published: 2020-04-28 20:36:37

You're walking at `$HOME`, minding your own business.

```shell
$ whoami
> user

$ pwd
> /home/user
```

But something is bothering your feet. It's like if a little rock has fallen into your shoe. You take it off, to see what's going on.

```shell
$ ls -lah ./left-shoe
---------- 1 root root 4 May 30 13:20 little-rock
```

That's odd. It's there, but it doesn't seem to be yours. It's left there by `root`, the Rock Tamer, and only he can decide its fate.


```shell
# bash -c "echo 'You stay here' > /home/user/left-shoe/little-rock"
# chmod 0000 /home/user/left-shoe/little-rock
```

You reach into your pocket for your phone, to speed dial him with `sudo`. Suddenly, you feel powerful (from watching Gladiator last night), and decide to put back the phone, and try your luck.

```shell
$ rm -f ./left-shoe/little-rock
$ ls -lah ./left-shoe/little-rock
ls: cannot access little-rock: No such file or directory
```

You look down at your shaking hands, trying to figure out if this is the real world. It is. You did it. Without the Rock Tamer. But how?

The little rock in your shoe had absolutely no idea what's coming. As seen from it's incarnation, nobody had [any permissions](http://linuxcommand.org lc3_lts0090.php) on it (`--- --- ---`). No reads, no writes, no throwing by anyone (owner, group, others).

## The catch

What happened is, the Rock Tamer forgot that you are even more powerful
than him, when you're at `$HOME`. Let's see why.

To be able to do anything with a file, the first step is to look it up in its
directory. Listing a directory's contents is controlled by the execute flag. If
a user has execute permissions on a directory, he can see what's inside it. Also,
the execute flag on the directory gives access to its files' `inode`s, which is
crucial in this context, as the removal process [unlinks](https://linux.die.net/man/2/unlinkat) the file.

Next, the removing part. Renaming or removing a file doesn't involve the `write()` system call. Practically, we don't need any permissions to remove the file, nor do we care about its owner. The only requirement is to have write permissions on the parent directory (and the execute flag on the parent directory).

The `$HOME` directory naturally fulfills both of these requirements from the user's perspective.

## The contra-catch

If the Rock Tamer, really didn't want anyone to mess around with his rocks, he would've done:

```shell
# chattr +i /home/user/left-shoe/little-rock
```

This operation makes the file immutable, which among other things, prevents its removal. Excerpt from the [man page](https://linux.die.net/man/1/chattr):

```shell
A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
```

*Moonwalks away.*
Twilio Office Hours with Phil & Dom
Tags: twilio, twiliohackathon
Published: 2020-04-28 20:27:10

---
title: Twilio Office Hours with Phil & Dom
published: true
description: Tune in on Thursday April 30 for Twilio Hackathon office hours with Phil and Dom
tags: twilio, twiliohackathon
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/asrfa94ug0fcujpo72as.png
---

The #twiliohackathon with DEV is over in a few days and we hope your projects are going well. We can't wait to see all the awesome things you built this month.

To wrap up the hackathon we'll host another edition of our weekly office hours on Twitch! Over there [Phil](https://dev.to/philnash) and [I](https://dev.to/dkundel) will be looking at some of the already submitted apps (no we won't judge them), answer any last questions and additionally we'll have a special guest with [Thor](https://dev.to/thorwebdev) from Stripe showing us how he combined Twilio and Stripe to create a mobile payment experience.

*The Hackathon office hours will be hosted on the [Twilio Twitch channel](https://twitch.tv/twilio)* at:

19:00 EDT Thursday 30th April
16:00 PDT Thursday 30th April
09:00 AEST Friday 1st May

(They're all the same time, Phil is just a day ahead in Australia!)

We'll see you on Twitch right here: https://www.twitch.tv/twilio
MediXall Group: Focused on the Bigger Picture
Tags: startup, discuss, motivation, technology
Published: 2020-04-28 20:12:21

---
title: MediXall Group: Focused on the Bigger Picture
published: true
description:
tags: startup, discuss, motivation, technology
---

I am the VP of Software Development at __[MediXall Group](https://www.linkedin.com/company/medixall-app/)__, a healthcare technology startup in South Florida. Recently, we pivoted our business model and have been diligently working on a new __[new product](https://vip.medixall.com/)__ for the past few months.

Just like most companies, COVID-19 has required us to make some changes in order to insure the best possible future for our __[product](https://vip.medixall.com/)__. Now, this might sound like the cliche business response, but in no way is our Company in any financial trouble. Our leadership team decided to be proactive and plan for more troubled times if there were any.

Our President, __[Michael Swartz](https://www.linkedin.com/in/mr-fix-healthcare/)__, was the first one to step up and take a pay cut to make sure no one else had to. A few weeks later he requested that the leadership team join in on the pay cut as well. Without hesitation, everyone agreed to take a pay cut. Again, our main focus was to prevent the rest of the team from having to take a pay cut.

Unfortunately, this was not preventable in order to insure the future of our __[new product](https://vip.medixall.com/)__. We had several meetings to explore the options available to us. We met with the whole team and explained the plan. We asked team members to take a small pay cut. In all honesty, we were expecting an all out revolt, but to our surprise, everyone was more than willing to take a pay cut. What was even more amazing to see was that they weren't just willing to do it just to keep a job, but rather because the entire team is fully committed and invested in the growth and success of the new product. The passion behind everyone’s desire to release the best possible product was palpable. To this day, productivity has not gone down but has significantly improved. 

Even with the pay cut implemented, the team remained dedicated to continue the hiring process of in-house designers to further optimize our new product.

As a Company, we have had to make several adjustments such as transitioning to remote work. It's truly incredible to see how everyone has adjusted to these changes and believe in the future of this __[product](https://vip.medixall.com/)__ now more than ever. 

I would love to know how your team is handling the various challenges and hurdles that come from this unprecedented time.
My laptop is 8 years old
Tags: watercooler, hardware
Published: 2020-04-28 20:00:21

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/q6hlc0wa3mu9mhc7nt8v.png)

I bought this laptop in Paris in 2012: it has the French keyboard layout (`AZERTY` instead of `QWERTY`) even though I use it with the Italian layout by memory (👀).

It's probably one of the last models Apple made that you could open up and upgrade yourself. I did, a long time ago, with 16 GB of RAM and a 512GB SSD.

It's starting to worry me: the fan makes weird noises sometimes.

I can say that [daily programming with Rails](https://github.com/thepracticaldev/dev.to) activates the fan quite often (damn you Rails system tests 😂), it didn't when [a couple of years ago I was writing a web app with Go](https://dev.to/rhymes/what-ive-learned-in-7-days-of-go-5e3) (not a fair comparison, I know).

Having held on to a "slow" computer (well, it wasn't the first few years 😝) also had the side effect of me becoming really interested in performance optimization in programming 🔥

It's also the only computer I own.

Eight years with a portable computer is pretty amazing in my opinion. It was great hardware or I got super lucky or both!

Here's to another 8 years. Just kidding 🤣
Day-16 Reverse words in a string III
Tags: python, challenge
Published: 2020-04-28 19:43:44

##### Background
This problem statement is a part of LeetCode's learn card titled Arrays and Strings. Under the sub-heading conclusion.

##### Problem Statement
Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.
##### Example 1
```
Input: "Let's take LeetCode contest"
Output: "s'teL ekat edoCteeL tsetnoc"
```
Note: In the string, each word is separated by single space and there will not be any extra space in the string.

##### Solution Approach 1
1. Convert the entire string into a list. Split the string based on whitespaces.
2. Iterate over the list. Reverse each word. For reverse using slicing.
3. Reconstruct the entire string. This time every word would be reversed.

```
class Solution:
    def reverseWords(self, s: str) -> str:
        s = s.split()
        s1 = ''
        for x in range(0, len(s)):
            if x == len(s) - 1:
                s1 += s[x][::-1]
            else:
                s1 += s[x][::-1] + ' '
        return s1    
```
##### Things to notice
1. We are already using a for loop to iterate over list. Time complexity - O(n).
2. We are reversing the string using slicing.
3. Extra space is used here as well. As a new string is being constructed instead of making changes in-place.

##### Solution approach 2
This is probably the longer route to reach the solution.
1. Split the string into words. Split using whitespaces.
2. Iterate over the list. Convert each word into letters. 
3. Then do a reverse based on two-pointer approach. Once, the reverse is done to join those letters to form string again.
4. Then again convert the list of reversed words to form the output string.

```
class Solution:
    def reverseWords(self, s: str) -> str:
        L = []
        string = s.split()
        for word in string:
            y = list(word)
            start = 0
            end = len(y) - 1
            while start < end:
                temp = y[start]
                y[start] = y[end]
                y[end] = temp
                start += 1
                end -= 1
            new_string = ''.join(y)
            L.append(new_string)
        return ' '.join(L)
```
##### Things to notice
1. We are using extra space. As we are creating a new list in the process.
2. There is a while loop inside of a for loop. This adds on to the time complexity. 
3. That whole reverse logic was written to avoid using list.reverse().

##### Some follow up questions
1. What is the time complexity of reversing a string using slicing s[::-1]? (see solution 1)
2. As we are using slicing inside a for loop. Will the overall time-complexity of code be O(nk)? (refer to solution 1)
3. In solution approach 2. We are using a while loop inside of a for loop. This would lead to time complexity O(nk) or O(n^2)?
Google sheets: get currency rate exchange for a specific date
Tags: googlespreadsheets, googlefinance, currencyexchangerate
Published: 2020-04-28 19:42:49

---
title: Google sheets: get currency rate exchange for a specific date
published: true
description: This post explains how to display a currency exchange rate for a specific date in Google sheets
tags: google spreadsheets, google finance, currency exchange rate
---

Hi there, here's a quick post on how to get and display a currency rate exchange for a specific date in Google Spreadsheets. This is useful in some situations.

The formula to use is [GOOGLEFINANCE](https://support.google.com/docs/answer/3093281?hl=en) and combine it with the [INDEX](https://support.google.com/docs/answer/3098242?hl=en) formula to get only the relevant data.

Here's an example: `=index(GoogleFinance("CURRENCY:USDEUR", "price", DATE(2020, 04, 10)), 2, 2)` would get the USD to EUR rate as for 2020/04/10.

![Example](https://dev-to-uploads.s3.amazonaws.com/i/x17lp142qc17ryc1j18c.png)

Enjoy!
How to fix Office sign-in error
Tags: microsoft, office, productivity, troubleshooting
Published: 2020-04-28 19:38:19

When you sign in Office and you keep getting an error after "Use this account everywhere on your device" dialog, it means your office sign-in account may be corrupt.
![use this account everywhere](https://i.stack.imgur.com/gmp00.png)

![something went wrong](https://i0.wp.com/www.itproiowa.com/wp-content/uploads/2019/05/Something-went-wrong.png?resize=600%2C581&ssl=1)

###Some Common factor that causes Office sign-in error
Office build 16.0.7967 or later on Windows 10 employs Windows 10's account management capability, Web Account Manager (WAM). This new account integration may cause various types of Office sign-in errors.


###Steps to fix Office sign-in error
First, I would like you to follow this Microsoft article.

[Connection issues in sign-in after update to Office 2016 build 16.0.7967 on Windows 10](https://docs.microsoft.com/en-us/office365/troubleshoot/authentication/connection-issue-when-sign-in-office-2016)

If the article does not resolve the issue, follow these steps.

#### Steps
1.Open Office and sign out all accounts of Office.

![Signout](https://support.content.office.net/en-us/media/745c9327-3a56-4039-a885-f2c0c5e14096.png)
[Sign out of Office](https://support.office.com/en-us/article/5a20dc11-47e9-4b6f-945d-478cb6d92071)

2.Go to "Windows Setting" - "Accounts" - "Access work or school". If you see any accounts here, disconnect all.

![workorschool](https://docs.microsoft.com/ja-jp/mem/intune/user-help/media/w10-enroll-rs1-connect-to-work-or-school.png)

3.Go to "Windows Setting" - "Accounts" - "Email & accounts". If you see any accounts here, click "Manage" - "Delete account from this device".

4.Open Office and see if you can sign in.


#####If you still see a sign-in error.
Follow these steps: 
1.Delete all files from the Accounts folder at the following:

%LOCALAPPDATA%\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\AC\TokenBroker\Accounts 

2.Restart OS.

3.Open Office and see if you can sign in.

- Reference
[Unable to create an Outlook profile after a migration with Event 1098 in AAD log](https://support.microsoft.com/en-us/help/4499299/outlook-profile-creation-fails-after-domain-migration)


Hope this article helps you out!