teleren/devto huggingface dataset:
Titanium News #3
Tags: news, titanium, mobile, appcelerator
Published: 2021-05-05 17:23:18

Another short Titanium news post! 
This time we are looking at the big 10.0 release, the "last" official major release by Axway. But the PR stack is still full with nice features for 10.1+ and it is still some time before the community can merge things 😉 

## Titanium 10 RC

The first release candidate of Titanium 10 is available! Make sure to head over to https://devblog.axway.com/mobile-apps/rc-releases-of-titanium-sdk-10-0-0-and-appcelerator-cli-9-0-0/ and give it a test run so the last bugs can be squashed.

Btw: Titanium 10.1.0 finally has a build-in `scalingMode`! For more infos and examples you can <a href="https://github.com/appcelerator/titanium_mobile/pull/12753">look at the PR</a>. No need for av.imageview if you just used it for fill-modes! Still useful for caching and more of course!

## TiDev Inc.

An announcement was made inside the Slack #tidev channel that TiDev Inc. has been chosen by Axway to officially "receive" ownership of Titanium SDK and other related tools on March 1st 2022.
Of course it is still an open source project and the SDK, tools and modules are already available at github. You can create your custom SDK now and in the future but the _main_ SDK will be driven by non profit TiDev Inc., formed by long term Titanium users/developers.

## Apple M1

If you thinking about buying a new Mac you can continue to work on your Titanium project! Some people in the community already upgraded their machines and have Titanium up and running and build apps without issues.

## Open Source tooling

Many people use Atom or VSCode to create their apps already. Up till now you have to use the `appc` CLI to compile your apps. The <a href="https://github.com/appcelerator/atom-appcelerator-titanium">Atom package</a> has been updated to use the open source `ti` CLI already and VSCode will follow soon, a PR is already available (https://github.com/appcelerator/vscode-appcelerator-titanium/pull/670)

To transfer your app from `appc` to `ti` you can follow these steps: https://github.com/m1ga/from_zero_to_app/blob/master/appc_to_ti.md


## Modules

Apple’s App Tracking Transparency Request for iOS 14.5+ by <a href="https://github.com/hansemannn">@hansemannn</a>:
* https://github.com/hansemannn/titanium-app-tracking-transparency


An etracker (`the Google Analytics alternative 'Made in Germany'`) module for Android by <a href="https://github.com/m1ga">me</a>:
* https://github.com/m1ga/ti.etracker
Announcing Demo Day! 🎉
Tags: womenintech, codenewbie, rails
Published: 2021-05-05 17:18:02

For almost 12 weeks, as part of our CodeCollab track, early-career developers Timi (@timilehin08), Gabrielle (@gabrielleeaston), Sara (@saradotlog) and Cam (@dordsichord) have been building The Shiftwork App from scratch.

The process has been exciting. 🥳

It has also been challenging. 😭

Above all, this project has expanded the team's technical, communication and collaborations skills like never before. 

On March 27th, the team shall present The Shiftwork App at Our Time For Tech's first-ever Demo Day!

**And YOU are invited!**

[**Grab a free ticket here**](https://www.tickettailor.com/events/ourtimefortech/519355) and please show up to support our hard-working fellows! 🙏🏾

At the virtual event, the team will summarize the app's features, share on what they learned and how they grew, and entertain questions from the audience.

We hope you will join us! 🧡
How to create Activiti Event Listener with Spring Boot Example
Tags: springboot, activiti, event, listener
Published: 2021-05-05 17:11:36

https://grokonez.com/java-integration/activiti-event-listener-spring-boot-example

How to create Activiti Event Listener with Spring Boot Example

Activiti provides event mechanism that allows us to get notified when various events occur within the engine. In this tutorial, we're gonna look at an example that uses Activiti Event Listener with Spring Boot.

Related Posts:
- <a href="https://grokonez.com/java/introduction-activity-java-bpm-engine">Introduction to Activiti – a Java BPM Engine</a>
- <a href="https://grokonez.com/spring-framework/spring-boot/activiti-message-event-spring-boot-example">Activiti Message Event with Spring Boot Example</a>

<!--more-->
<div id="tuttoc" class="jsa-toc"></div>

<div id="tutcontents">
<h2>I. Activiti Event Listener Overview</h2>
<h3>1. Implementation</h3>
The first thing we have to do is implementing <code>org.activiti.engine.delegate.event.ActivitiEventListener</code> interface. You can find all supported event types at <a href="https://www.activiti.org/userguide/#eventDispatcherEventTypes" rel="nofollow">Activiti User Guide</a>.
<pre><code class="language-java">
public class MyEventListener implements ActivitiEventListener {

	@Override
	public void onEvent(ActivitiEvent event) {
		switch (event.getType()) {

		case PROCESS_STARTED:
			// ...
			break;

		case PROCESS_COMPLETED:
			// ...
			break;

		// other EVENT_TYPE...

		default:
			break;
		}
	}

	@Override
	public boolean isFailOnException() {
		
		return false;
	}
}</code></pre>
<code>isFailOnException()</code> method will be called when <code>onEvent()</code> method throws an exception. Returning <strong>false</strong> means the exception is ignored.

All events dispatched are a subtype of <code>org.activiti.engine.delegate.event.ActivitiEvent</code>.
From the <strong>event</strong>, we can get (if available) <strong>type</strong>, <strong>executionId</strong>, <strong>processInstanceId</strong> and <strong>processDefinitionId</strong>.
<h3>2. Registering</h3>
The second thing we do is to register the <strong>ActivitiEventListener</strong> implementation above.

https://grokonez.com/java-integration/activiti-event-listener-spring-boot-example

How to create Activiti Event Listener with Spring Boot Example
Display multiple child records in one email template
Tags: salesforce, emailtemplate, visualforce, multiplerecords
Published: 2021-05-05 16:57:52

###### Save hours by using a visual email template# that has been provided by Salesforce instead of creating an apex class. 

**Let's do it!**

**Here are the steps.**
- Go to Set up > Navigate to "Classic Email Templates"
- Select "New Template", then select "Visualforce"

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

- Input email properties.
   - <b>Folder:</b> Unfiled folder
   - <b>Available For Use:</b> TRUE **Can check it later when it's finished.
   - <b>Email Template Name:</b> Request for Multiple Line Items Discount.
   - <b>Template Unique Name:</b> Request_for_Multiple_Line_Items_Discount
   - <b>Encoding:</b> Unicode (UTF-8)
   - <b>Description:</b> I leave it blank, but if you have any information to inform other developers internally, you can type it over here. It will not display in the email body or in the subject.
   - <b>Subject:</b> Discount Request

- Input the code in the email content.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2utdp989fo0vd3uqc9hm.png)

<b>Hoorey!! It's done.</b>
Don't forget to test the template by following the steps below.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gk0onkasrtx23pcrtt0b.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqs03bhzq3vk84kzm5ks.png)

<b>Note:</b> If you want to highlight only the discount that is greater than 40%. Put something like this in style.

`style="{!if(oppline.discount> 40,'color:red;font-weight: bold', 'color:black')}"/>`

_HTML Color Code: https://htmlcolorcodes.com/_

####The interesting article about colors that may help you decide which color could be applied on your email template:D
https://www.scienceofpeople.com/color-psychology/#what-color-you-should-make-your-desktop
 ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fum8pjnvxdry7rl0nuf1.png)
Welcome Thread - v123
Tags: welcome
Published: 2021-05-05 16:50:34

---
title: Welcome Thread - v123
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![Potato Hello](https://media.giphy.com/media/xUPGcigl4eOfc6hA5y/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
Get soft IntelliSense when using env vars
Tags: typescript, intellisense, node, javascript
Published: 2021-05-05 16:31:46

Here's a neat function to have some IntelliSense when getting environment variables: it helps, but doesn't prevent you from doing anything it doesn't expect. Go ahead and play with it in the [TS playground](https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBAYwDYEMDOa4FEB2A3ASyghwFtgcYA1FKLKYqOUGCgE03sbgG8AoAJAISaGFACuCGNAAUAa2ABPAFxxRUAjgDmASl6CBacWGBQZAAwAqAC2DN8cPLQIoARkjsByACQ8FigF9POH84AkxScLRNLQA6cx0AbkEAvlS+AHoMuAB1AiQkOC0CPDsASUpgAoIAZQo0OwAzaDhLABo4V3F4FAQEYDB4AFU+UEhYOBhFEzgAGQJWKBQkIZwCEgAeS2YQVhwOOCGOobgAXjUxGIA+M9a4AB84GROAMjgAJWBhKDYNnGBSlAOv9AVcknxMtkAJoQcRMCiEYhkCgwTwRFBgPhTGa4PC3fhwQlwACyAHkAHIAcVJAH0AIJDSwACVU6hiySJHywABEyjUaQAFHLc1mXbQcokAKRylhpNSwAGF3lhLKKNOK+JzZqTKdzyXSaQBpLBQtXszVEpmkmqWfXErBmjWc8mk7lYGlYclUVQAIjYAKqEDA5EoPoecB9YGIbEkMHWOB9EsJNSG3NpQpFF3VWmSAWS2Lsn2WuNuJbePDgAG1-I6tABdWtwPMQjIAKlbmtbcAAAv60AgNIN461psAALRoFCNOwAdxQikmECKwHgCMctDQnZ7YFoKFIISUrVscDYKBgKDCmCQEAQZ+AbDgZ7g5ijN+AGFiCOrSjr5i33Z3JZ90aZYkFcXo5BJcRRDgHAIHgVw7HMcR9mARpNHvcw4BnWwcDgaD71iVolxQPAIAIB8YGsYgZxiR88NMRgOjAbpnx9H0-zgVsMlGcBoHgRoUKkYcEQ2Q0dj2A5-AgRpsHwDoADEJPYTB5kWZZVnjDZcUrQ06yuK4ZAtQkazmBZTA0tZNkNK42mMuAQIKcCEDkAB+VQlMeGQZD0U4bgUnQ+B0VQ1IslYrJwDY2W0ZT9k4fBdLrOBXLgJTVCLJAdL08MFJuAkiWEHAYNPc9blffoPy-fwkvQD5gGLBLsseFD-XQ-42CTMJZJkEqUD0fLOUJKAVzhPDes6gJmCQBp9EGokCG6xywIgs5TnOFq0Iwtg9ComjYOAGc5MREgQ2oWguFkfxwTmwkFqeAsZIc0DnMgtbzh9QScGEkgfT0JaXtuf6IJ8zrOWGmBRqepyIImtIW2yAVhowOAFTEJAAGoah3fowjw9iOhQfY1GAOwqLsUgUGKBAAEJRnwGQfRdN0PS9H0Og+56IN+1b3p9IA)!
```ts
// Will give IntelliSense for T, but accept U
export type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);

// Your environment's map
type Env = {
	MONGO_AUTH: string;
	REDIS_PWD: string;
	JWT_SECRET: string;
	LOGDNA_KEY: string;
	HOSTNAME: string;
	NODE_ENV: "development" | "production";
	SUDO_PWD: string;
};
type RealEnv = Env & { [key: string]: string };

/**
 * @description Type-safe way to get env vars
 * @param key The data is located at `process.env[key]`
 * @param fallback Must not be `undefined` when used. To avoid throwing an error, put `""`
 */
export function env<K extends keyof Env, F extends LiteralUnion<Env[K]>>(
	key: LiteralUnion<K>,
	fallback?: F | (() => F)
): LiteralUnion<string extends Env[K] ? F : RealEnv[K] | F> {
	const data = process.env[key] as RealEnv[K] | undefined;
	if (data) {
		return data;
	} else {
		if (fallback === undefined) throw new EnvironmentVarError(key);
		if (typeof fallback === "function") fallback = fallback();
		return fallback;
	}
}
```
Is Easytypingjob Website Fake? | Complete Review
Tags: easytypingjob
Published: 2021-05-05 16:17:21

Easytypingjob Website Review- I will share few points about easytypingjob website and determine whether it's real or fake. We are sure that you simply have many questions on easytyping job website, like what's easytypingjob? Who is the owner of this website? Is easytypingjob fake or real? and lots more others.

What is Easytypingjob.com?
You may heard or see an commercial advertisement about a data entry website named Easytypingjob. That site claims, yes just claims to be a online platform for internet users to make some money by completing data typing works (Here we aren't promoting their services). We are just examine Easytypingjob is a fake or real. Are they really paying or not.

Let's clear this first, yes Easytypingjob website is scam. Yes, it is and below are the 5 factors which prove that it's fake. 
1. Contact Details  
2. Prices Of Tasks    
3. Website Design 
4. Owner Details
5. Official Email 

Read More on <p><a title="webJob" href="https://www.thewebjob.in/2021/05/is-easytypingjob-website-fake-complete.html">webJob</a></p>
10 Important Functions Of JavaScript
Published: 2021-05-05 15:56:04

JavaScript is one kind of programming language as well as web developing language. I am trying to discuss some topic of JavaScript String & Array below:

#### String
Includes: If we want to find a word or string in another string, we use the includes function. It uses an if-else function to search the specific word or string is there or not.
indexOf: It helps us to know the index number of a string in another string. The index number of a string always starts at 0 and ends at [string.length - 1].
replace: It is used to replace one string with another in one string. In another word, it returns a new string.
slice: This method helps to extract a section from a string & returns it as a new string. the format of this method is [start, end]
split: It uses to divide a string from the main string, then the divided string puts in an array, & then this method returns that array to the user.

#### Array
filter: It works using a condition that applies to the main array, as a result, it returns a new array according to the condition.
forEach: It helps to return all strings or elements individually of an array.
join: It creates and returns a new array from the main array using a separator. The separator can be a comma, hyphen or space.
map: It is used to pass a function in every string or element of an array. 
push: It helps to add a new object in the main string & increase it's length.
Sentence Similarity With Transformers and PyTorch
Tags: python, datascience, machinelearning, deeplearning
Published: 2021-05-05 15:46:44

{% youtube jVPd7lEvjtg %}

All we ever seem to talk about nowadays are BERT this, BERT that. I want to talk about something else, but BERT is just too good - so this video will be about BERT for sentence similarity.

A big part of NLP relies on similarity in highly-dimensional spaces. Typically an NLP solution will take some text, process it to create a big vector/array representing said text - then perform several transformations.

It's highly-dimensional magic.

Sentence similarity is one of the clearest examples of how powerful highly-dimensional magic can be.

The logic is this:
* Take a sentence, convert it into a vector.
* Take many other sentences, and convert them into vectors.
* Find sentences that have the smallest distance (Euclidean) or smallest angle (cosine similarity) between them - more on that here.
* We now have a measure of semantic similarity between sentences - easy!

At a high level, there's not much else to it. But of course, we want to understand what is happening in a little more detail and implement this in Python too.

[Medium article](https://towardsdatascience.com/bert-for-measuring-text-similarity-eec91c6bf9e1)

[Easy mode](https://youtu.be/Ey81KfQ3PQU)
Basic Unity3D Interface
Tags: unity3d, csharp, 100daysofcode, gamedev
Published: 2021-05-05 15:42:20

WHAT IS UNITY
Unity3D is a powerful cross-platform 3D game engine and has a user-friendly development environment. Unity is a flexible engine for beginners and expert game developers. Unity is used to create 3D games and applications for mobile, desktop, the web, and consoles. You can download and launch unity by visiting https://unity3d.com/get-unity/download.


UNITY USER INTERFACE 

1. THE SCENE VIEW: Imagine yourself that you are a director of a movie, so basically a scene view is everything including the stage. You have the cameras, the lights, maybe some actors off stage that are about to come in i.e., your game objects, in just a moment. So basically, you see everything that will make up your game and this is also where you're going to be designing your game. (See page 2 for image).

Contd:
Download the free e-book here (3 -paged Manual)

https://bit.ly/3uqvIta

Subscribe to Newsletters on How to Create 3D Games Easily here:
https://bit.ly/2PQzZXU
What is a closure in Javascript?
Tags: javascript
Published: 2021-05-05 15:33:59

Let’s say you declare a variable in javascript.

What is the scope of this variable?

It is the entire function in which it is declared.

What if it is declared within a particular block ?

Still it’s scope is the entire function in which it is declared.

For example:
```
function test(value){
 
     if(value==1){
             var temp = "Hello the value entered is 1";
 
          }
        alert(temp);       //you can access temp here!
}
```
In the above code even though the variable temp is declared inside the if block , the scope of the variable is the entire function test() , hence the alert statement will alert the value “Hello the value entered is 1” .

But , this will work only if the value is 1 , if the value does not match , javascript will skip the initialization of the variable and you will get undefined for the variable ‘temp’.

Let’s play a little more with scope of a variable.

Now , lets say the above function returns another function which accesses the variable “value”:
```
function test(value){
 
 
 
    return function(){
 
        console.log(value);
 
        value++;
 
        return value;
    }
}
```
Now , does the returned function has access to the variable “value” once is it is returned.

Like when you assign the returned function like this:


var returnedfunction = test(5);
and then you call the returned function:


returnedfunction();
Does the returnedfunction() now has access to the variable “value”?

It does!

The value of the variable “value” is incremented every time you call returnedfunction().

I called it thrice in my code and it returned 5,6 and 7:
```
<script>
 
function test(value){
 
 
 
    return function(){
 
        console.log(value);
 
        value++;
 
        return value;
    }
}
 
 
var returnedfunction = test(5);
 
returnedfunction();
 
returnedfunction();
 
returnedfunction();
 
 
</script>
```

The output was
5
6
7
This connection to the variable in its surrounding scope for the returned function + the returned function are together called a closure.

Repeating it again :

Closure = a function + its connection to variables in its surrounding scopes even after it leaves the scope where it was created

That’s it!
Leetcode 665. Non-decreasing Array
Tags: algorithms, programming
Published: 2021-05-05 15:32:59

At first glance, this problem seems to be easy but I was getting the wrong answer again and again. then I figure out the solution to this problem. 
you can modification only one element to make an array non decreasing order. 
let's consider three test case 
1. 5,9,4
2. 4,9,5
3. 5,4

for test case 1:  5,9 is increasing order but 4 is in downfall so we will compare this index(let's consider it i) with i-2. if i-2 is greater than I then we will modify I with i-1 so the final array will be 5,9,9 that in non-decreasing order. 

for test case 2:  4,9  is increasing order but 5 is in downfall so we will compare this index(let's consider it i) with i-2. if i-2 is less than I then we will modify i-1 with I so the final array will be 4,5,5, which is non decreasing order. 

for test case 3: when elements are less than three then if the value of the ith index is less than the value i-1th index then we can modify the i-1th index with I so the array will be 4, 4 that is non decreasing order. 
here is  my c++ code
```cpp
class Solution {
public:
    bool checkPossibility(vector<int>& nums) {
        int count = 0;
        for(int i=1;i<nums.size();i++){
            if(nums[i-1]>nums[i]){
                count++;
                if(i>=2&&nums[i-2]>nums[i]){
                    nums[i]=nums[i-1];
                }
                else{
                    nums[i-1]=nums[i];
                }
            }
        }
        return count<=1;
    }
};
```
time complexity: O(n)
space complexity: O(1)
Functional programming with Angular. 1. Error Handling
Tags: functional, angular
Published: 2021-05-05 15:26:29


Unhandled exception might lead to failed subscription and user's frustration when button click leads to nothing.

*You can read about possible error handling strategies with Rxjs* [here](https://blog.angular-university.io/rxjs-error-handling/)

From functional point of view there are two kind of failures - **expected** (network call) and **unexpected** (divide by zero). First one should never crash your application.


> Expected error is an operation which either fail or return data.

Usually data model is represented this way
```typescript
interface Datum<T> {
  data?: T;
  error?: any
}
```

With this presentation you should always check yourself before accessing data is there any error or not, eg

![naive data and error presentation](https://i.ibb.co/b3K69tH/carbon.png)


Also your data become optional, which might lead to new errors in future. There are other approaches with handling data and error, greatly covered in Russian-speaking presentation (I highly recommend turn subtitles if you dont speak Russian, its really worth it)
{% youtube S0cCjbWuvzk %}


I will show another approach in sample weather app, here is how it will look like
{% vimeo 552634925 %}

First naive implementation - separate properties and ngIfElse for handling different views ([stackblitz](https://stackblitz.com/github/Lonli-Lokli/functional_angular/tree/part01_02?file=src%2Fweather%2Fweather-display.component.html))

![first implementation with error data - html](https://i.ibb.co/F5nF2qb/first-implementation-for-error-and-state-html.png)
![first implementation with error and data - ts](https://i.ibb.co/92h0rVS/first-implementation-for-error-and-state-ts.png)

Now we will use Either type from [@sweet-monads\either](https://github.com/JSMonk/sweet-monads/tree/master/either) as it gives a lot of additional methods for Either type, which is actually simple
```typescript
type Either<Error, Data> = Error | Data;
```
So in our case we will have abstraction over data and error - container which can contain any of them. To make our life easier, we will use one of the greatest features in angular - directives! Look into new directive, IfRight and IfLeft.

![either implementation with error and data - html](https://i.ibb.co/2cyB5my/either-initial-html.png)
![either implementation with error and data - ts](https://i.ibb.co/pv7QQLf/either-initial-ts.png)
([stackblitz](https://stackblitz.com/github/Lonli-Lokli/functional_angular/tree/part01_03?file=src%2Fweather%2Fweather-display.component.html))


We were able to get rid of additional properties from typescript but out template is heavier then before. We will adopt it with next steps later, lets focus in next chapter on some details with this Either way.

{% github https://github.com/Lonli-Lokli/functional_angular %}
CompileSwift - Now With Live Streaming
Tags: streaming
Published: 2021-05-06 14:30:22

---
title: CompileSwift - Now With Live Streaming
published: true
date: 2021-05-05 15:04:19 UTC
tags: Streaming
canonical_url: https://peterwitham.com/podcasts/cs/s02-19
---

<iframe src="https://open.spotify.com/embed-podcast/episode/2jpxyjdVWTiV6oxpMQTcoc" width="100%" height="232" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>

Yep, I'm following up on my own suggestion to put development out there in the public space and have successfully completed my first test stream on [Twitch.tv/compileswift](https://grfxmedia.com/compileswift)

Exciting things ahead now that I've put the pressure on myself to make this happen on a regular basis.

Subscribe for free to the Twitch channel and you to can drop by, say hello and ask questions or maybe laugh at my code :)
Auth0 Profile Logins  and MongoDB
Tags: mongodb, react, help, database
Published: 2021-05-05 15:00:56

I have a React + Airtable project, that I want to create “user profiles” for bidding and keeping track of products they use. 

How do you use “profiles”? Do I need to have a profile.Button for when someone adds a product to their profile, it locates it? Or.... is it more like:
profile.Button[profile]???