teleren/devto huggingface dataset:
Cambridge Community Hackathon
Tags: streaminganalytics, apama
Published: 2022-03-14 12:29:59

---
title: Cambridge Community Hackathon
published: true
date: 2022-03-14 09:04:47 UTC
tags: StreamingAnalytics, Apama
canonical_url: https://tech.forums.softwareag.com/t/cambridge-community-hackathon/255203
---

 
Early in December, the Cambridge UK office held a late afternoon and evening Hackathon around the Apama Community Edition. With an office full of Raspberry Pi enthusiasts, it was perhaps no surprise that most of the projects revolved around the ARM build of Apama! Oh, and the pizza was good too.

Callum, Ian and Ben investigated upgrading our old GPIOPlugin to use the new (and much fancier) EPL Plugins API, which happily was a great success with all our old tests passing. Our next goal is a set of automated tests leveraging WiringPi’s ‘gpio’ tool to simulate signals, rather than constructing small boards and testing literally by hand. There are plenty more features yet to be added, so [please visit the GitHub repo](https://github.com/CallumAttryde/apama_GPIO) if you would like to contribute!

Scott also worked on porting his existing [plugin](https://github.com/rsm31/BlinktPlugin) for the [Blinkt](https://shop.pimoroni.com/products/blinkt)! LED bar to the new EPL plugin API. This turned out to be far easier than anticipated thanks to the excellent documentation for migrating plugins from the old API and the new version worked first time with all tests passing. The Blinkt! plugin effectively contains an implementation of the SPI protocol built directly on the [WiringPi](http://wiringpi.com/) library, so a future project is likely to involve making this code more generally available through the generic Apama GPIO plugin.

Chris had a Banana Pi (a variant of a Raspberry Pi) connected to a USB-DMX interface to an RGBW LED PARcan. Using a connectivity transport interfacing with an OLA daemon that bridges to the USB-DMX interface, events could be used to set the intensity of RGBW LEDs. Unfortunately, the OLA daemon seemed to limit this to only 1-2 changes per second, so smooth fades were not possible; next step would be to talk to the USB-DMX adapter directly.

Kev and his 13yr old son Josh had built a [PiHut LED Christmas tree](https://thepihut.com/products/3d-xmas-tree-for-raspberry-pi), and got it running under Python, and then were looking at doing the same with the GPIO Plugin. Not that we’re starting the long-term future recruiting process early or anything…

All in all, the event was a lot of fun and something quite different from our normal work. We hope you enjoyed this window into the team, and perhaps feel inspired to join us in the Community!

The Apama Community Team


[Visit original post](https://tech.forums.softwareag.com/t/cambridge-community-hackathon/255203)
Headless and non-interactive Apama Installations
Tags: iot, streaminganalytics, apama
Published: 2022-03-14 12:27:59

---
title: Headless and non-interactive Apama Installations
published: true
date: 2022-03-14 09:00:25 UTC
tags: IoT, StreamingAnalytics, Apama
canonical_url: https://tech.forums.softwareag.com/t/headless-and-non-interactive-apama-installations/255171
---

A common request from our customers is for a headless, non-interactive installation of Apama and I’m pleased to say this is possible for the Community Edition of Apama too.

We’ve created a [script](https://softwareag-usa.s3.amazonaws.com/Content/Apama/headlessinstall.props) that does this for the current version of Apama Community Edition (9.10.0.3). This script is for Linux installations, but you can easily create one for Windows by following the instructions further in the 
[original article](https://tech.forums.softwareag.com/t/headless-and-non-interactive-apama-installations/255171) in the Software AG Tech Community.
How to check a checkbox is checked or not using jQuery
Published: 2022-03-14 08:44:16

## Answer: Use the jQuery prop() method
To check whether checkboxes are checked or not using the jQuery prop() method as well as the :checked selector.

Example

The jQuery prop() method provides an effective way to track down the current status of a checkbox.

```javascript
<script>
    $(document).ready(function(){
        $('input[type="checkbox"]').click(function(){
            if($(this).prop("checked") == true){
                console.log("Checkbox is checked.");
            }
            else if($(this).prop("checked") == false){
                console.log("Checkbox is unchecked.");
            }
        });
    });
</script>
```


## Using the jQuery :checked Selector

```javascript
<script>
    $(document).ready(function(){
        $('input[type="checkbox"]').click(function(){
            if($(this).is(":checked")){
                console.log("Checkbox is checked.");
            }
            else if($(this).is(":not(:checked)")){
                console.log("Checkbox is unchecked.");
            }
        });
    });
</script>

```

## Using the jQuery is() Method :

```javascript

<script>
  $(document).ready(function () {
	$("#but").click(function () {
	  if ($("input[type=checkbox]").is(":checked")) {
		alert("Check box in Checked");
	  } else {
		alert("Check box is Unchecked");
	  }
	});
  });
</script>
```

Read More: [How to check a checkbox is checked or not using jQuery](https://askavy.com/how-to-check-a-checkbox-is-checked-or-not-using-jquery/)
HTML text input allows only numeric input
Tags: javascript
Published: 2022-03-14 08:36:11

```javascript
<h2>JavaScript input filter showcase</h2>
<table>
  <tr>
    <td>Integer</td>
    <td><input id="intTextBox" /></td>
  </tr>
</table>

<script>
  function setInputFilter(textbox, inputFilter) {
    [
      "input",
      "keydown",
      "keyup",
      "mousedown",
      "mouseup",
      "select",
      "contextmenu",
      "drop",
    ].forEach(function (event) {
      textbox.addEventListener(event, function () {
        if (inputFilter(this.value)) {
          this.oldValue = this.value;
          this.oldSelectionStart = this.selectionStart;
          this.oldSelectionEnd = this.selectionEnd;
        } else if (this.hasOwnProperty("oldValue")) {
          this.value = this.oldValue;
          this.setSelectionRange(this.oldSelectionStart, this.oldSelectionEnd);
        } else {
          this.value = "";
        }
      });
    });
  }

  setInputFilter(document.getElementById("intTextBox"), function (value) {
    return /^-?\d*$/.test(value);
  });
</script>
```

Read More: [HTML text input allows only numeric input](https://askavy.com/html-text-input-allow-only-numeric-input/)
CR2032 VS DL2032 VS CR2025: Are they interchangeable?
Tags: battery, electronics, product
Published: 2022-03-14 08:29:08

DL2032 vs CR2032 Interchangeability
When it comes to unusual batteries like the coin type batteries, it is a bit more important to get the exact type that you are looking for to ensure that it is the correct fit and voltage and avoid having to buy the battery again. This is the case when it comes to CR batteries like the CR2032 and DL2032. The main difference between CR and DL batteries is just the maker. CR is basically a generic designation just like AA and AAA. It is used by almost all battery makers. On the other hand, the DL designation is used by the battery maker Duracell. The fact that the battery CR2032 is made by a different manufacturer can lead to some subtle differences, such as the capacity of Energizer CR2032 is 235 mAh, but the capacity of Panasonic CR2032 is 225mAh.

CR2032 vs CR2025 Interchangeability
The CR2025 and CR2032 are both 3-volt lithium coin or button cells that measure 20mm in diameter. The obvious difference between the two battery types would be thickness. The CR2032 is 3.2mm thick while the CR2025 is 2.5mm thick. Because the CR2032 is 0.7mm thicker than the CR2025, it has a higher capacity (mAh) to deliver current to the load. A standard CR2032 can nominally deliver 225mAh while the average CR2025 can nominally only deliver 160mAh. Due to the smaller capacity, the thinner battery may not last as long and may need to be replaced sooner.

DL2032 vs CR2025 Interchangeability
DL2032 and CR2025 has different Manufacturer. The manufacturer of DL2032 is Duracell, while the CR2025 is FDK America. The DL2032 and CR2025 are both 3-volt lithium coin or button cells. The difference of them are their diameter, capacity, and operating temperature. The capacity of DL2032 is 225 mAh, while the capacity of CR2025 is 170mAh. The minimum Operating Temperature of DL2032 is - 20°C,  while the CR2025 is  0°C. So, they are not interchangeable.
If you want to learn more, try to follow the below link to see the article about them.
https://www.utmel.com/components/cr2032-vs-dl2032-vs-cr2025-are-they-interchangeable?id=1399

If you are interested in these products, try to follow the below link to see them.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vmdo49eh40t9fn0ktzy5.png)
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bemj8nt7ktubadbgkfgz.jpg)
NRF5340 VS NRF52840
Tags: wifi, electronics, beginners
Published: 2022-03-14 08:25:53

NRF5340 and NRF52840 are all Bluetooth LE and a wireless system on chip (SoC).
Conclusion of NRF5340 VS NRF52840
When compared to the nRF52840 SoC, the 0 dBm TX current of NRF5340  is 3.4 mA, while the RX current is only 2.7 mA, resulting in a reduction of 29% and 41%, respectively. The RX sensitivity of the nRF5340 is -98 dBm, which is 3 dB better than the nRF52840. This means that the nRF5340 has 3 dB better sensitivity while utilizing 41% less current.
If you want to learn more, try to follow the below link to see the [article about NRF5340 VS NRF52840](https://www.utmel.com/components/nrf5340-vs-nrf52840-bluetooth-le-nfc-faq?id=1570).


If you are interested in these products, try to follow the below link to see [NRF5340](![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/an31ljlrsdl09580lfkh.png)
 ).
My Custom Snippets in VScode
Tags: vscode, productivity, tooling, tutorial
Published: 2022-03-14 08:22:34

Hi Everyone!

This one is short but sweet 🙂

To create your own snippets you'll need to select `Code` > `Preferences` (`User Snippets` under `File` > `Preferences` on Windows), and then select the language for which the snippets should appear, or the New Global Snippets file option.

And here are my three favorite ones, and I'll explain why:

1. For scss files where `$spacer = 1rem`
```json
  "Add spacer": {
    "prefix": "s",
    "body": ["* $$spacer"],
    "description": "Adds a spacer to the current line"
  }
```
I use this one a lot with the key binding I made, (to see how, you'll need to see my other post about [key bindings](https://dev.to/danielbellmas/vs-code-keyboard-shortcuts-or-how-to-become-even-more-productive-46ik)).

And here is the code for that:

```json
  // Calculate the current selection
  {
    "key": "ctrl+m",
    "command": "editor.emmet.action.evaluateMathExpression",
    "when": "editorHasSelection"
  }
```
This shortcut will make you stay in vscode and use its inner calculator rather than touching your mouse and slowing you down...
And you know how much they don't like us touching our mice.
(I couldn't find a good meme, is that even possible?!)


2. For the global scope: to add todo comments quickly

```json
  "TODO comment": {
    "prefix": "to",
    "body": "// TODO $1",
    "description": "Add a TODO comment"
  }
```

And the last one that I use almost all the time is the `console.log()` snippet, and again if you want to create your own keyboard shortcut that uses a snippet too 🤯 you can find it [here](https://dev.to/danielbellmas/vs-code-keyboard-shortcuts-or-how-to-become-even-more-productive-46ik).

This is a special case where we use a snippet and the keyboard shortcut, which is honestly the best of both worlds.

![Best of both worlds](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/34hnjbhjkxo7puf2vqmb.gif)

Here is the code for it: 

```json
// Add an empty log statement
  {
    "key": "shift+cmd+l",
    "command": "editor.action.insertSnippet",
    "when": "editorTextFocus && !editorHasSelection",
    "args": {
      "snippet": "console.log($1);"
    }
  }
```

 

For more information on snippets in general visit:
[Snippets in Visual Studio Code](https://code.visualstudio.com/docs/editor/userdefinedsnippets)
Big O notation explained: DSA-01
Tags: programming, computerscience, dsa, algorithms
Published: 2022-03-14 08:20:40

## What is Big O notation?  

**Big O notation** is used to measure how the running time or space requirements for our program grows as input grows.

- Measuring running time growth is time complexity. (In this post we focus on time complexity)
- Measuring space growth is space complexity.  

## Rules to determine time complexity

1. Keep fastest growing term.
2. Drop constants.  

Big O refers to very large value of 'n' (n = size) where time, **t = an^2 + bn + c**.  
For example, if we have a function like,
> t = 5n^2 + 3n + 20  

When value of 'n' is very large, bn+c becomes irrelevant.   
ie; an^2 is very larger than bn+c.  
For example; if n = 1000 then,  
t = 5 * 1000^2 + 3*1000+20 = 5000000 + 3020; where 3020, a small value becomes irrelevant.  

## Different time complexities  
Here we discuss about a few of them.

### 1. O(n)  
> def foo(arr): size(arr) -> 100 -> 0.22ms  
> def foo(arr): size(arr) -> 1000 -> 2.30ms  

Here time increases as array size increases; time proportional to size(arr).  
n = size(arr), b= constant  
t = a*n + b  
1. Keep fastest growing term => t = a * n (b is constant)  
2. Drop constants => t = n ( a is constant)  
Therefore; **t = O(n)**  

*Example program for t = O(n): To get square numbers*
```
def get_squared_numbers(numbers):
    squared_numbers = []
    for n in numbers:
        square_numbers.append(n * n)
    return squared_numbers

numbers = [2, 5, 8, 9]
get_squared_numbers(numbers)
# returns [4, 25, 64, 81]
```

### 2. O(1)  
> def foo(arr): size(arr) -> 100 -> 0.22ms  
> def foo(arr): size(arr) -> 1000 -> 0.23ms    

time, t = a * n + b -> t = a * n ( b constant) -> t = n (dropping constants(a))  
n = 1 => t = 1  
Therefore, **t = O(1)**  

*Example program for t = O(1)*  
```
def find_first_pe(prices, eps, index):
    pe = prices[index]/eps[index]
    return pe
```
### 3. O(n^2)  
*Example Program for O(n^2): To find duplicates from the list*
```
numbers = [3, 6, 2, 4, 3, 6, 8, 9]

for i in range(len(numbers)):
    for j in range(i + 1, len(numbers)):
        if numbers[i] == numbers[j]:
            print(numbers[i] + " is a duplicate.")
            break
```

***Also there is O(log n), O(2^n) time complexities.***
aiowmi - A Python WMI library
Tags: python, wmi, windows, opensource
Published: 2022-03-14 08:05:38

In need of a solution for WMI queries from a non-Microsoft operating system? Make use of [aiowmi](https://pypi.org/project/aiowmi/)! A Python library for WMI, which we have made freely available as an [open source project](https://github.com/cesbit/aiowmi).

Read the announcement below for more information or start using **aiowmi** in all your projects right away!

[https://cesbit.com/aiowmi](https://cesbit.com/aiowmi)
Quickly remove Clutter from vRO Logs
Tags: tutorial, log, notepad, vro
Published: 2022-04-13 13:19:08

---
title: Quickly remove Clutter from vRO Logs
published: true
date: 2022-03-14 08:04:24 UTC
tags: Tutorial,log,notepad,vro
canonical_url: 
---

## **Scenario**

vRO provides great bit of logs out-of-the-box, but the problem is, it’s not aesthetically pleasing. Frankly, these long trials of data and time `[2022-03-14 02:33:03.144 -04:00INFO]` annoys me a lot. So, just like me, If you don’t want that annoyance or you want to show these logs to someone in most tidiest way, or maybe you want to preserve an action/execution, then probably you are at the right place. Let’s see how I do it.

I think the simplest way would be to find a Regex that removes it all in one go.

* * *

## **Solution**

- After execution of a workflow or action, copy the logs and open **Notepad++**.
- Press **CTRL + H**. It will open **_Replace_** Tab.

![](https://cloudblogger2021.files.wordpress.com/2022/03/image-44.png?w=1024)

- In **Find what** field copy the below mentioned RegEx and In **Search Mode** , enable **_Regular Expression_** and tick **Wrap around**. 

![](https://cloudblogger2021.files.wordpress.com/2022/03/image-45.png?w=246)

### **for workflows**

```
.+?(?=:)+.+?(?=:)+.+?(?=:)+:(00|30)+(INFO|WARNING|DEBUG|ERROR)
```

## OR

### **for actions**

```
.+?(?=:)+.+?(?=:)+.+?(?=:)+:(00|30)+(INFO|WARNING|DEBUG|ERROR)+([^)]+)\)+( +?|\t)(?=(([^"]*"){2})*[^"]*$)
```

- Click **Replace All**.

That’s it.

<iframe title="Quickly remove Clutter from vRO Logs" src="https://player.vimeo.com/video/687831109?h=ac2af5e15f&amp;dnt=1&amp;app_id=122963" width="640" height="322" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>

* * *

## **Try yourself at Regexr.com**

for Workflows: [regexr.com/6haum](http://regexr.com/6haum)

for Actions: [regexr.com/6hauv](http://regexr.com/6hauv)
A Quick 10-Second Programming Joke For Today
Tags: jokes, dailydeveloperjokes
Published: 2022-03-14 08:00:15

---
title: "A Quick 10-Second Programming Joke For Today"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258f50f7c0.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ Why did the developer go broke?

___A:___ Because they used up all their cache
 -->
The Weekly Dev - 202211
Published: 2022-03-14 07:57:06

---
title: The Weekly Dev - 202211
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
canonical_url: 'https://kevwe.com/weekly/202211'
---
Cutting through the noise

A lot has been going on during the week, and still it is difficult to discern the real infos out of the noise.

Apparently, there's a full science behind this titanic effort, it's called Machine Learning, and it has many ramifications worth exploring...

https://kevwe.com/weekly/202211
Announcing RepliByte - an app to synchronize your cloud databases and obfuscate sensitive data
Tags: opensource, rust
Published: 2022-03-14 07:47:32

After months of experimenting with different ways of synchronizing databases, I am super excited to announce [RepliByte](https://github.com/Qovery/replibyte) - a simple way to synchronize cloud databases and obfuscate sensitive data - written in Rust.

As explained in the README, my primary motivation is to respond to a widespread need that most developers have - cloning the production database into a development database while cleaning the sensitive data. It is precisely the purpose of RepliByte.

I am still in the early days of development, but you can look at the code and the README. It should be clear enough to help me out in that journey, and why not contribute?!

At the moment, I focus on supporting Postgres, but I plan to support MySQL and MongoDB. RepliByte can support any database since I created an abstraction layer.

Thanks for your feedback.

GitHub: https://github.com/Qovery/replibyte
Svelte GraphQL Resources
Published: 2022-03-14 07:42:37

Not sure which GraphQL library or approach makes sense for your Svelte/SvelteKit project? These resources are intended to help you decide based on your needs as no one size fits all. Please contribute your knowledge, resources and experiences in the comments section below. If you know if an awesome list with resources, please link it. Thank you! :pray:

## Libraries

**Houdini**
- [Repository](https://github.com/AlecAivazis/houdini)
- [Written Tutorial](https://dev.to/alecaivazis/building-an-application-with-graphql-and-sveltekit-3heb)
- Examples in the wild: [Void App](https://codeberg.org/vhs/void-app)

**KitQL**
- [Repository](https://github.com/jycouet/kitql)
- [Video Tutorial](https://www.youtube.com/watch?v=6pH4fnFN70w)

**URQL**
- [Repository](https://github.com/FormidableLabs/urql)
- [Docs](https://formidable.com/open-source/urql/docs/api/svelte/)
- [Tutorial](https://scottspence.com/posts/use-urql-with-svelte)
Loading the total Sendy subscribers
Tags: javascript
Published: 2022-03-14 07:41:08

You might have spotted the little status figure on the new design. It shows the number of articles written and the current total subscribed people to the newsletter.

![Total subscribers from Sendy](https://cdn.hashnode.com/res/hashnode/image/upload/v1646481263913/yj2AonL2n.png)

For those not familiar with Sendy, it's a self-hosted email platform.
Much like Mailchimp, but self-hosted and behind the scenes powered by Amazon SES.

You can find more information in this [article I wrote about Sendy](https://daily-dev-tips.com/posts/moving-from-mailchimp-to-sendy/).

## Retrieving an API token

The first thing we must do is visit our Sendy instance and retrieve an API token so we can start communicating with it.

Login to your Sendy environment and visit the Settings panel.

![Sendy API Token](https://cdn.hashnode.com/res/hashnode/image/upload/v1646481655228/-CrLdhrhH.png)

From there, we directly need to access the `API token`.

Once you retrieve it, we can start working on our API call to retrieve the active subscriber count.

## Retrieving the Subscriber count from Sendy

First, we'll need to define a couple of variables.

- API Endpoint
- API_KEY
- LIST_ID

The API endpoint is your Sendy domain instance, followed by the API call.

In the case of retrieving the total subscribers, we will end up with an API endpoint like this:

```text
https://sendy.daily-dev-tips.com/api/subscribers/active-subscriber-count.php
```

The API_KEY is the token we just fetched from Sendy, and for the LIST_ID, we need to go back into Sendy and click `View all list` inside that screen, you'll find the `ID`.

![Finding the list ID in Sendy](https://cdn.hashnode.com/res/hashnode/image/upload/v1646482002169/Ok7pIk1Ko.png)

Once you have these three pieces of information, we can start trying out the API call.

I'll be using Insomnia to demo this out, but you can even use any API client or code.

Set the URL to be the API endpoint, and make the request a `POST`, then pass two fields as the form data:

- `api_key`
- `list_id`

Then try and run the request and see what happens. You should get a number that represents your current active subscribers.

![Trying out the Sendy API](https://cdn.hashnode.com/res/hashnode/image/upload/v1646482162621/-jEbtTDw8.png)

And there you go, we get the latest subscriber count!

You can now mimic this call in your favorite programming language and show the number of people subscribed to your system.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)