teleren/devto huggingface dataset:
interact with the Soroban smart contract and start betting on the outcome of events using Ethereum
Published: 2023-03-17 18:45:30

Soroban-CLI is a command-line interface (CLI) tool for interacting with the Soroban smart contract. The Soroban smart contract is a decentralized application (dApp) built on the Ethereum blockchain that allows users to bet on the outcome of events using cryptocurrency.

Here is a beginner's tutorial on how to interact with the Soroban smart contract using the Soroban-CLI tool:

Install Soroban-CLI: You can install Soroban-CLI using npm (Node Package Manager) by running the following command in your terminal:
Copy code

```
npm install -g soroban-cli
```
Set up your Ethereum wallet: Before you can interact with the Soroban smart contract, you need to set up your Ethereum wallet. You can use any Ethereum wallet that supports the ERC-20 token standard, such as MetaMask or MyEtherWallet.

Connect to the Ethereum network: Once you have set up your Ethereum wallet, you need to connect to the Ethereum network. You can do this by running the following command in your terminal:

perl
Copy code

```
soroban-cli network connect
```
This will prompt you to select your Ethereum wallet and connect it to the Ethereum network.

Check your balance: You can check your Ethereum balance by running the following command in your terminal:
Copy code
soroban-cli balance
This will display your current Ethereum balance.

Place a bet: You can place a bet on the outcome of an event using the Soroban smart contract by running the following command in your terminal:

```
soroban-cli bet <event> <outcome> <amount>
```
Replace <event> with the name of the event, <outcome> with the outcome you want to bet on, and <amount> with the amount of Ethereum you want to bet. For example, if you want to bet 1 Ethereum on the outcome "heads" for the event "coin flip", you would run the following command:

Copy code

```
soroban-cli bet coinflip heads 1
```
View your bets: You can view your current bets by running the following command in your terminal:
Copy code

```
soroban-cli bets
```
This will display a list of all your current bets, including the event name, the outcome you bet on, the amount of Ethereum you bet, and the current status of the bet.

Withdraw your winnings: If your bet is successful, you can withdraw your winnings by running the following command in your terminal:
php

```
soroban-cli withdraw <betId>
Replace <betId>
```
 with the ID of the bet you want to withdraw your winnings from. You can find the bet ID by running the soroban-cli bets command. For example, if the bet ID is 1234, you would run the following command to withdraw your winnings:

yaml
Copy code

```
soroban-cli withdraw 1234
```
That's it! With these simple steps, you can interact with the Soroban smart contract and start betting on the outcome of events using Ethereum.
Steem Blockchain Account Level (Reputation) Reaching 80 ^_^
Tags: steem, blockchain, blog, reputation
Published: 2023-03-17 18:37:35

https://justyy.com/png/whale.png

My account recently reached **80**. You can verify this using the API:


```bash
$ curl -s -X POST https://steemyy.com/api/steemit/account/reputation/ -d "id=justyy"
80.0345
```

![image.png](https://cdn.steemitimages.com/DQmb2nETbmDHMC4Duu8V2ChgU5F3oLp9jML3o6d6NxZBD35/image.png)

My [steem account](https://steemyy.com/account/justyy) was created at 2016-08-20 18:36:21 (now age 6.6 years).

And I became a [Steem Witness](https://steemyy.com/witness-data/justyy) at 2018-02-25 22:17:18 (now age 5.1 years).

<h3>Support - Keep this service running!</h3>
To support @justyy for this service, you can do one (or more) of the following:
<ul>
<li>Delegate SP <a target=_blank href='https://steemyy.com/sp-delegate-form/?delegatee=justyy'>here!</a> This allows to claim more account tickets. Also, delegators get daily complementary upvotes.</li>
<li>Witness Vote <a target=_blank href='https://steemyy.com/witness-voting/?witness=justyy&action=approve'>here!</a></li>
<li>Witness Proxy <a target=_blank href='https://steemyy.com/witness-voting/?witness=justyy&action=proxy'>here!</a></li>
<li>Buy Me a <a target=_blank rel=nofollow href="https://steemyy.com/out/buymecoffee">Coffee</a></li>
</ul>

Alternatively, you can vote me here: 

Navigate to: https://steemitwallet.com/~witnesses

and do one of these, thanks!

![image.png](https://cdn.steemitimages.com/DQmNN7BzYtPCy6pb7ytsoehWfyEMPcLQVw2bTmLSLRUk7uc/image.png)

![image.png](https://cdn.steemitimages.com/DQmY8RWutF6UpkMRyVpjrwuWv953pR9vECBEaW1FcUBQLJL/image.png)


<hr/>

### [Steem](https://steemyy.com) to the Moon!
1. You can swap the STEEM/SBD to USDT (TRC-20) via [Steem2USDT](https://steemyy.com/steem2usdt.php)
2. Register a free STEEM account at [here](https://steemyy.com/reg.php)
VSCode - Wrap HTML elements
Tags: vscode, productivity, webdev, html
Published: 2023-03-17 18:20:50

One of the best hidden 💎 that I found on VSCode is the HTML wrapper combined with Emmet and together are pure gold. 

I can believe all the time I've lost doing the same manually when forgot/need to include a parent tag.

## The hard way 👎

Creating a new element and then move the content inside with `cut/paste` or moving the lines with `alt+verticalArrows`.

![Hard Way](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jw91muu06l8f28poq72n.gif)

## The good way 👍

Using the "Emmet Wrapper" option through the "Command Palette" using `ctrl+shift+p`.

![Easy Way](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/372c0tnrzrf3457mpwy8.gif)

## The best way 🌟

Adding a shortcut `alt+shift+w` for the "Emmet Wrapper" option.

![Easiest](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ykhmyui7ysup385iqqif.gif)

You also can define the shortcut manually.

```json
# 📄 File: keybindings.json
-----------------------------------

// Place your key bindings in this file to override the defaults
[
    // Emmet
    {
        "key": "alt+shift+w", //wrap emmet
        "command": "editor.emmet.action.wrapWithAbbreviation",
        "when": "editorHasSelection"
    },
]
```

## The Geek Way 🤓

What if I tell you, that the whole process can be faster without using the mouse adding more useful shortcuts.

```json
# 📄 File: keybindings.json
-----------------------------------

// Place your key bindings in this file to override the defaults
[
  {
    "key": "alt+shift+j", //expand selection
    "command": "editor.emmet.action.balanceOut"
  },
  {
    "key": "alt+shift+k", //contact selection
    "command": "editor.emmet.action.balanceIn"
  },
]
```

![Balance Shortcut](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/clv3rsggj8jm3unka75l.gif)

---

## Multicursor 😎

But the magic does not end, this wrapper is also available for multicursor.


![Multicursor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7rp71oqequwq1zjxjry0.gif)

---

## You don't need that extension 🚫

By the way, you don't need an extension like [html-tag-wrapper](https://marketplace.visualstudio.com/items?itemName=hwencc.html-tag-wrapper) to achieve it.

---

**That’s All Folks!
Happy Coding** 🖖

[![beer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mkgsx4aw6qn9i9ax6as9.png)](https://github.com/sponsors/deinsoftware?frequency=one-time&sponsor=equiman)
My experience building Bull's Eye App (from the UIKIt Apprentice book) Part 1
Tags: ios, programming, beginners, swift
Published: 2023-03-17 18:14:33



Hey Community,

I'm here with another blog sharing my experience of reading the UIKIt Apprentice book from Kodeco (THE NEW RAYWENDERLICH.COM). The reason why I decided to dive deep into this book is to learn more about UIKit.


The book takes you through a series of learning the fundamentals of UIKit through building projects. The first project is building a Bull's Eye application through interface builder.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/imf3mv0j3pfmau9a6kjy.png)


The goal of the project is to teach Xcode, Interface Builder, and Swift in an easy-to-understand manner for beginners like myself.

So far I have learned how to create a very basic single button application which shows an alert message


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i6k10wi6wf9uspfj6zxe.png)




I have also learned about implementing sliders and labels on interface builder.

Some things I have learned were:

* Switching the apps to landscape mode
* Basics of object-orientated Programming
* Added controls to start building the user interface of the app
* setting the inital slider value
* learned how to generate a random number
* added rounds to the game
* display the target value

I'll be doing part 2 where i will talk about adding scores to the application




Follow my journey of learning iOS Development on Twitter by giving me a follow @abeck617
Reference vs Value - Javascript
Tags: javascript, beginners, tutorial, programming
Published: 2023-03-17 18:01:18

Throughout my programming journey I have struggled to understand the difference between value and reference, and because of that, I have came across quite a huge number of bugs regarding this. 

I have also found out that many people do not understand this, especially beginners. Okay,Enough of the BS, let's get into it!.

In Javscript we have the following primitive types

*boolean
*bigint
*null
*number
*string
*symbol
*undefined

All these are easily compared by their value, let's take a look at an example, let's take a look at the snippet below:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s1yw8mbtr441txzali7s.JPG)

What is the value of _b_ here?
2, you guessed right, as I said before, primitive types are compared directly by their values.
Now, let's take a look at non-primitive types, objects, arrays,...

Let's take a look at the following snippet again,


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6yug7wxefbzzi6kv1f0s.JPG)

As you can see on the console we are printing _a_, but the content in a has changed, why?🤔
This is because the non-primitive types don't store their values directly in memory, like the primitive types, the non-primitive types actually reference a certain address in memory.

In this example, _[10, 20]_ is stored at some memory address, let's say _00x001_, so when we say _b = a_, we are telling _b_ to reference the same memory address as _a_, when we _b.push(30)_, _b_ changes the value at the memory address that the two variables, _a_ and _b_, are referencing, hence the value of _a_ also changes.

Now, take a look at this,

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7puu4o4apif75xdgp036.JPG)

Here, _a_ and _b _have the same values, but when we print _a === b_, we get false, why is that? Because now, we initialized _a_, and we initialize _b_, so a and b have different memory address, hence 
_a === b_ gives us false.

In conclusion, primitive types are compared by value, but non-primitive types are compared by reference, in memory.

Thank you for reading.
Happy Coding!🤓🤓
🌳tree command
Published: 2023-03-17 17:51:40


## What is the tree command?
The tree command is a utility tool in Linux that displays the directory structure in a tree-like format. It displays all the subdirectories and files in a hierarchical manner, making it easier to understand the organization of your files and directories.

## Installing the tree command
```css
sudo apt-get install tree
```



## How to use the tree command?
```css
tree [options] [directory]
```
Here, `[options]` refers to the various options you can use with the command. `[directory]` refers to the path of the directory whose structure you want to display.

For example, to display the directory structure of the current directory, you can simply type:
```css
tree
```
## Some useful options

Here are some useful options you can use with the tree command:
- `-a`: This option will display hidden files and directories as well.
- `-L level`: This option allows you to specify the depth to which the directory structure should be displayed. For example, `tree -L 2` will display the structure of the current directory and its immediate subdirectories only.
- `-d`: This option will display only directories and not files.
- `-I pattern`: This option allows you to specify a pattern to exclude files and directories from the tree structure. For example, `tree -I '*.txt'` will exclude all files with the extension `.txt`.

## Examples:
**Example 1**: Displaying the directory structure of a specific directory
```css
tree /home/user/Documents
```
This will display the `directory` structure of the Documents directory in a

**Example 2**: Displaying the directory structure of a specific Level 2
```css
tree -L 2
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c7onhattl3p2r11j573q.png)
Making of Among Us in Discord - DEVBLOG 0
Tags: python, discord, gamedev, 100daysofcode
Published: 2023-03-17 17:50:56

{% embed https://twitter.com/MrStiK101/status/1636424736417644547?s=20 %}

Heya, this is Mr.StiK

So recently I learnt python (which was a good decision to be honest) and I made some small programs that help me with my maths homework XD. So this time I decided to make something worth to call a GOOD project... so I decided to make an Among Us in Discord...as a bot...in python.


The project looks too ambitious for a beginner project, but I decided not to lose my focus and got ready with 5 jar of coffee powder to get start ;).

I so far made the bot online with a program thanks to the awesome tutorial made by [Idently](https://www.youtube.com/watch?v=1yLfjMtsV9s). And we got the bot running as shown here...

So, that's for this devblog I might return soon (maybe not but im active at twitter, you know :) ) so, yeah

Toodles!
Python Mean Program!!! - My first Python code!!! :)
Published: 2023-03-17 17:43:02


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ayyeen5za23f0x6eplo3.png)

So I was doing my maths homework on mean average, and it's so boring and tiring I hate it very much, until recently I tried to learn python... which was a good choice, because I made a program that finds the mean of numbers in the list (or arrays, for non-python guys)

Seems good for a first project! :)
What have you learned through #WeCoded?
Tags: wecoded, discuss
Published: 2023-03-17 17:29:27

As our #WeCoded celebration comes to a close, I wanted to take some time to reflect on the stories, experiences, and learnings that our community has shared over the past week.

Here's mine: even though I don't read or speak Brazilian Portuguese (PT-BR), with the help of Google Translate, I enjoyed reading this article from @vanessatelles:

{% embed https://dev.to/vanessatelles/neopets-meu-inicio-nao-tao-convencional-na-area-da-tecnologia-1560 %}

It made me think about my own career trajectory and opportunities, which I shared in Google-Translated PT-BR:

{% embed https://dev.to/erinposting/comment/25dgo %}

Ok, your turn! **What's something you learned through #WeCoded on DEV?**
Auto-add missing imports on file save in VS Code ✨
Tags: vscode, productivity, javascript, typescript
Published: 2023-03-17 17:04:00

**Do you spend precious time manually organizing imports and fixing missing ones while coding in VS Code? There's a faster and more efficient way. By enabling a simple but powerful feature in the settings, you can automate these tasks upon file save and significantly boost your coding productivity. Let's explore how this feature works and how you can start using it today.**

## Auto-add missing imports on file save

Using the Command Palette (`CMD + SHIFT + P`), open the option `Preferences: Open User Settings (JSON)`:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aw7n4khtb0s5qnkm32sy.png)

Then add the following settings to your opened _User_ `settings.json`:


```json
  "editor.codeActionsOnSave": {
    "source.organizeImports": true,
    "source.addMissingImports": true
  },
```

Note: When there is more than one possible suggested import path for a token, [such a missing import won’t be auto-added](https://github.com/microsoft/vscode/issues/139131#issuecomment-995354561).

## Keyboard Shortcut to add missing imports

However, you can configure a keyboard shortcut to auto-add missing imports (and it can handle a situation when many import paths are suggested; e.g. choose the first one by default). 


Using the Command Palette (`CMD + SHIFT + P`), open the option `Preferences: Open Keyboard Shortcuts (JSON)`:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mstzkq3ukdbe7btzkbd8.png)

And add the following setting to your opened `keybindings.json`:

```
  {
    "key": "ctrl+s",
    "command": "editor.action.sourceAction",
    "args": {
      "kind": "source.addMissingImports",
      "apply": "first"
    }
  }
```
and then press `[CTRL + S]`

## Save the file!

### Before 🙄


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4qxq1ix5t2cdhs7nkfrb.png)


### After 🤩


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/elzb6d4ui4m20de8vslx.png)


## Disclaimer

Please expect that sometimes VS Code might suggest using a not your preferred path (e.g. not from the proper relative file or from a proper sub entry point `@package/xxx/yyy`, but from an index.ts barrel or from absolute directory - which depending on your setup might cause compilation errors later on). So please be vigilant with VS Code resolving import paths for you. 😉
2023 starts well for Common Lisp: new Jetbrains Lisp plugin
Tags: lisp, jetbrains, ide
Published: 2023-03-17 16:39:36

I had just published my [review of 2022 for Common Lisp](https://lisp-journey.gitlab.io/blog/these-years-in-common-lisp-2022-in-review/) ([HN, 73 comments](https://news.ycombinator.com/item?id=34321090)) when awesome new projects popped-up. One of them should have never been released because it has the potential to make Common Lisp popular (did we try to "avoid success at all costs" so far ?). 

[SLT is a new Jetbrains IDE for Common Lisp](https://github.com/Enerccio/SLT/) and it has a good [user manual](https://github.com/Enerccio/SLT/wiki/User-Guide).

![The SLT Common Lisp plugin for the Jebrains suite](https://camo.githubusercontent.com/d59fd48abeeda2557c27f231ed7f46e9dedddc35de07e0efa2df1305e2525c9f/68747470733a2f2f692e696d6775722e636f6d2f395264394c44732e706e67 "Running Common Lisp inside a Jebrains IDE")

It is very capable:

- it helps you to install a Lisp implementation
- it does the basics: syntax highlighting, automatic indentation, documentation lookup, show the function's arguments, go to definition (source of a symbol)…
- it connects to a Lisp REPL: you can **evaluate** an expression at point, eval the whole file, the selected region. It can also eval the next s-expression, at the right of the cursor. I never used this in Emacs and Slime.
- and, it is good because it provides the Lisp **interactive debugger**, with advanced features: 
  - a stacktrace you can inspect, for example to see the local variables and their values in that frame, 
  - "restarts", actions you can click on to do something with the current error, such as "retry", "exit", or custom ones that library developers can provide,
  - and you can eval some code inside the context of those frames,
  - you can set breakpoints to enter the debugger,
- it has a UI window to show the Lisp image's threads, and buttons to act on them (stop/kill).
- and more, and probably more soon as it is actively developed.

So, good work.

I mean, of course Jetbrains IDEs are so heavy compared to Emacs, but it's good SLT exists ;)

### Addendum: What does SLT even mean?

> SLT - Speech Language Therapy. Only cure for LISP!

> Also, backronym for Superior Lisp Tooling!

Lol, and good work.

For more IDEs plugins for Atom/Pulsar, VSCode, Sublime, Vim, Jupyter notebooks and more, see: https://lispcookbook.github.io/cl-cookbook/editor-support.html
Use Cases of Graph Database (Part 1)
Published: 2023-03-13 14:32:59

**Gaining all round information from Customer Data:**

Interactions between companies and their customers or sales prospects tend to be complex, with many touchpoints. Ideally, these should yield sales strategies that continuously adapt to customer needs. Such 360-degree scenarios quickly incur many-to-many relationships that, using a relational database, would require laborious modeling and cumbersome table joins to yield actionable insights.

This is the sort of situation where a graph database shines. UnitedHealth Group (UHG), for example, has adopted a graph database to help improve the quality of care for over 26 million members while reducing costs. The largest healthcare company in the world by revenue, UHG uses a massive graph database to track more than 120 billion relationships among members, providers, claims, visits, prescriptions, procedures and more.

**Producing great impact in the Finance Industry:**

The exponential growth of data has been the biggest enabler of AI/ML, which requires large quantities of data to surface meaningful patterns and improve the accuracy of decision-making. Few industries are more data-intensive than financial services, but as with other industries, data originates from many different sources and typically ends up in relational database silos.

In bridging those silos, graph databases can help AI/ML deliver superior predictive analytics, risk management, fraud detection, anti-money laundering, insider-trading monitoring, automated recommendations for customers and more. Also, a graph database coupled with AI/ML can help ensure data is clean in the first place, reconciling anomalous differences in customer records and financial product attributes that could lead to inaccurate results.

**Improving E-Commerce operations:**

Retail ecommerce firms face growing competitive pressure to deliver better customer experiences built on accurate customer details and purchase histories. That foundation enables everything from dynamic pricing to product recommendations to personalized special offers, all of which draw on data accrued along the customer journey.

Graph databases can help in a number of ways. Consider the possible relationships — between customers and payment methods, customers and brands, products and return rates, promotions and sell-through rates, and a whole lot more. Say you wanted to run a query to determine which promotions were most effective for a certain product when pitched to a subset of customers defined as loyal. With a relational database that would take a long time, but a graph database can return the results with very little latency.



Want to extract all the benefits of PostgreSQL along with Graph Database features look at:
[Apache AGE](https://age.apache.org/)
[Apache AGE Github](https://github.com/apache/age)
Week 11 - March 17th 2023
Published: 2023-03-17 16:20:59

Sometimes you just have to write it down, to make you feel like you've achieved things.... 

## Released: 
- [new checkout processes on our site] (https://jumoo.co.uk/uSync/buy/). So, we can do subscriptions properly 🎉 _(buy our things, it makes us happy)_
- [uSync v11.0.3] (https://github.com/KevinJump/uSync/releases/tag/v11.0.3) (patch release) 
- [uSync v10.3.4] (https://github.com/KevinJump/uSync/releases/tag/v10.3.4) (patch release)
- [uSync Migrations Beta14] (https://github.com/Jumoo/uSyncMigrations/releases/tag/4.0.0-beta14)
- Globallink Translation Connector ([v8.0.6] (https://www.nuget.org/packages/Jumoo.TranslationManager.Connectors.GlobalLink)) - Multisource fixes

## Wrote: 
- New Gist for [UmbNav Value mapper for translation manager] (https://gist.github.com/KevinJump/2684b0d40cef1bd5c727ca818c6e27ca)
- Started some new code for Translation Manager that might let us do individual page syncing with certain providers 🤞


## Watched:
- [Lego Masters Australia Season 4] (https://en.wikipedia.org/wiki/Lego_Masters_(Australian_season_4)). 
- [An inspector calls at the Theater] (https://www.whatsonstage.com/wimbledon-theatre/news/cast-30th-annivesary-tour-an-inspector-calls_57006.html)! 

## Forgotten 
- What I did on Monday and Tuesday 🤔