teleren/devto huggingface dataset:
talking in code: state
Tags: gamedev, gamedesign, writing, writingtips
Published: 2023-12-19 13:22:38

---
title: talking in code: state
published: true
date: 2023-11-14 00:00:00 UTC
tags: [ 'gamedev', 'gamedesign', 'writing', 'writingtips' ]
canonical_url: https://onwriting.games/daily/20231114-1127-talking-in-code-state/
---

yesterday we talked about the concept of [variables and their use in narrative](https://dev.to/onwritinggames/talking-in-code-variables-17ig-temp-slug-1277684).

today I want to focus on the concept of **state**.

programmers, or at least the older ones like me, tend to think a lot about this.

both a game and any other computer program have states.

if I am writing in a word processor, all the text I wrote is part of the current state of the program.

if I selected an option, for example an italic style in the text, it is also part of the state.

but not only what I wrote, the position of the mouse, which menu is open, whether the file is saved or not, the marks of the spell checker, all this is state.

as a simplification when creating stories:

```
all the variables that we have at our disposal and their value at a given point in the game are the state of our story.

```

as in the example of the word processor, this may not be limited to the variables that we create to guide the narrative.

if our game has gameplay elements or resources (for example 'Pieces o' Eight'), we can use the current state of that gameplay variable to define available options in our game:

```
SHOPKEEPER: The Sword is 100 Pieces o' Eight. The Shovel is 75 Pieces o' Eight.
  * I'll take the Sword
    req pieces_o_eight >99
    -> buy/sword
  * I'll take the Shovel
    req pieces_o_eight >74
    -> buy/shovel
  * I don't have that kind of money.
    req pieces_o_eight <75

```

in this example, you can see how I limit (using the `req` command, for _require_), **which options I show** : if the user has the money, I show the option to acquire the object, if they don't, I don't show it.

you can (and honestly **should** ) use this to bring your game to life.

an example would be adding alternative options when the conditions are not met:

```
* I don't have money for the Sword, but... could I wash the dishes?
  req pieces_o_eight <99

```

this is what I usually call **reacting to the state**.

it's vital that at every moment in the game we consider the possible states in which a player can arrive at a line.

think about if there's something interesting that can be done at the narrative level by reacting to the current state.

is there any game that you think is very good at reacting to the state? Hit reply and tell me!
Choosing Between pfSense and Firewalla for Enhanced Network Security
Tags: network, security, firewall, cybersecurity
Published: 2023-10-09 03:05:39

---
title: Choosing Between pfSense and Firewalla for Enhanced Network Security
published: true
date: 2023-11-14 00:00:00 UTC
tags: Network,Security,Firewall,Cybersecurity
canonical_url: https://simeononsecurity.ch/articles/pfsense-vs-firewalla-network-security-comparison/
---

Discover the best firewall solution for your network security needs: a comprehensive comparison of pfSense and Firewalla.

[https://simeononsecurity.ch/articles/pfsense-vs-firewalla-network-security-comparison/](https://simeononsecurity.ch/articles/pfsense-vs-firewalla-network-security-comparison/)
Cambiar o Crear contraseña para SSH
Tags: spanish, git
Published: 2023-11-13 23:50:28

- Abrir la aplicación terminal

- Para cambiar la frase de contraseña de la clave privada SSH por defecto:
`ssh-keygen -p`

- Puede especificar el nombre del archivo de claves:
`ssh-keygen -p -f ~/.ssh/pacmankabh`
Cursores
Published: 2023-11-13 23:33:11

Os cursores são uma estrutura de controle com o intuito de permissionar a manipulação dos registros resultantes de uma consulta PL/SQL, uma das analogias mais comuns é imaginar o cursor como um ponteiro que ao ser realizada uma ação PL/SQL irá apontar para cada  registro ou conjunto de registros e realizar uma manipulação desses conjuntos de dados.
Os cursores tendem a ser divididos em dois ramos distintos Implícitos e Explícitos, onde os cursores Implícitos como o nome já descreve está implícito e declarado pela Oracle e não tem necessidade de serem declarados e tem os nomes já reservados.
Exemplos de cursores implícitos são: SQL%Found, SQL%NOTFOUND, SQL%ROWCOUNT. Cada um desses cursores retorna um tipo de informação distinta SQL%Found e SQL%NOTFOUND retornam TRUE se a última instrução afetou um registro ou não respectivamente, já SQL%ROWCOUNT retorna o número de registros afetados na última instrução.Um outro exemplo de cursor implicito e uma caracteristica do mesmo é o SQL%ISOPEN pois sempre irá retornar FALSE pois na estrutura desses cursores sempre são fechados ao término da execução.
Os usos mais comuns e até recomendados para cursores implícitos são a verificação se a ação afetou algum registro e o acesso a essas informações.
Os cursores explícitos tem uma atuação um pouco maior pois em diferente do cursor implícito não está tão  restrito e definido previamente, em sua utilização ela é declarada de forma explícita ou seja ela precisa ser definida e pode ser utilizada com parâmetros o que deixa quase que com uma infinidades de possibilidades em sua utilização, além disso um cursor explícito possibilita a utilização de FOR e LOOP.
Cursores Explícitos tem uma estrutura que deve ser seguida declaração  do cursor (DECLARE), abertura do cursor(OPEN), busca dos dados(FETCH) e fechamento (CLOSE).
Como recomendação na utilização dos tipos de cursores a utilização do Implícito é realizada em ações mais simples e diretas onde não é necessária uma estruturação mais elaborada e o cursor Explícito remete a utilização de um gerenciamento mais elaborado na manipulação da consulta realizada com PL/SQL.
Um exemplo de utilização de um cursor Implícito seria na contagem de registros que foram afetados em uma alteração de funcionários de uma filial para outra, no caso seria utilizado o cursor implícito SQL%ROWCOUNT pois ele retorna o número de registros afetados na última instrução. E um exemplo de  cursor explícito seria a mesma consulta com um parâmetro onde seria contado somente um cargo específico e seria impresso a filial destinatária. Aqui fica claro que um cursor explícito tem uma atuação mais abrangente por possibilitar alterações, condicionais e parâmetros.
Os cursores tanto implícitos e explícitos são inegavelmente uma ferramenta poderosa no desenvolvimento de um banco de dados funcional e bem estruturado.
How to get Ctrl + S, Ctrl + C in my rust app
Tags: programming, rust, tutorial, development
Published: 2023-11-13 22:59:01

If you are on a **GNU/Linux** operating system, regardless of its distribution, and you are also developing a Rust-based application that requires handling user keyboard input in raw mode (without the need to press Enter), then this article can help you address that:

We add [k_board](https://crates.io/crates/k_board) to the project.

`cargo add k_board`

We implement the logic:

```rust
use k_board::{Keyboard, Keys};

fn main() {
    for key in Keyboard::new() {
        match key {
            Keys::Ctrl('s') => //paste,
            Keys::Ctrl('c') => //copy,
            Keys::Enter => break,
            _ => {}
        }
    }
}
```
JS Date: The Timezone Tantrum
Tags: date, time, javascript, githubactions
Published: 2023-11-13 22:44:44

---
title: JS Date: The Timezone Tantrum
published: true
description: Why were we forced to set a timezone to our CI job runner & how to do it
tags: date, time, javascript, githubActions
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3xmu39kyov1r79r85rhg.jpeg
# Use a ratio of 100:42 for best results.
# published_at: 2023-11-13 21:59 +0000
---

Cover photo by <a href="https://unsplash.com/@lucian_alexe?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Lucian Alexe</a> on <a href="https://unsplash.com/photos/brown-wooden-framed-analog-clock-f2xfTOv0p9Y?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Unsplash</a>

## Why

We had a subtle bug in our UI code which involved the wrong time offset being applied when date & time were input around the DST change.

Without going into the ghastly details, the underlying cause was we used the dreaded [JS Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date).

In our defence, we *had* to use it as it was the output type from a 3rd party widget.

At [Software Sauna](https://softwaresauna.com/), we like to test stuff. Much more than that, we like to test stuff *in isolation*. We believed we tested our component in isolation, until we learned that [JS Date is coupled to the OS](https://stackoverflow.com/a/15171030/1093343).

![Isolated component test & test with Date breaking the isolation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5waiwh0sk0esaykjs84.png)

We could control the DST flip by setting the test's input time to the appropriate time of year (summer/winter). However we couldn't control the timezone. We had to adjust the expected data *in the test* 🤢 using the same library which the production code used ([momentjs](https://momentjs.com/)).

How would it work on CI? - we asked ourselves. Well, even better, CI is always on UTC so it wouldn't be bothered with it.

After some thought we concluded this was a **bad thing**. If users' *browsers* were in a timezone, so should the UI tests!

We needed to set the timezone to our UI test CI job!

## How

Thankfully, since we use [Github actions](https://github.com/features/actions) for CI this was just a matter of finding an action that suited us.

We set up Sze Ying's action [set-timezone](https://github.com/szenius/set-timezone) and that's it!

{% embed https://gist.github.com/mbjelac/1d31c89578e48fbaa8d7e4abe08ce6c1 %}

*Note:* Only the UI/frontend tests job should have this. Your server should be in UTC and so should the backend tests job.
Your Gateway to Exceptional Research Peptides
Published: 2023-11-13 22:34:41

In the dynamic field of scientific exploration, there's a singular destination that stands out as the ultimate resource for top-tier research peptides. This hub provides meticulously crafted peptides for sale, tailored to meet the rigorous standards of scientists and researchers.

However, [P21 Peptides For Sale Online](https://buypeptidesonlineusa.com/buy-p21-peptide-for-sale-online/) is not merely a transactional space. It thrives as a vibrant community where researchers converge to share insights, discoveries, and the latest advancements in the field. This collaborative spirit adds an extra layer of value, transforming  into a hub of knowledge and innovation.

Whether you're a seasoned researcher plumbing the depths of peptide synthesis or a newcomer eager to explore biochemistry breakthroughs,  caters to all. The dedication to staying at the forefront of scientific progress is palpable in the carefully curated selection of peptides, each contributing to the collective advancement of knowledge.

Navigate the intricacies of peptide research effortlessly with a user-friendly interface that ensures easy access to detailed product information. More than just a marketplace, this platform fosters collaboration, creating a community where researchers unite to share insights, discoveries, and advancements in the scientific landscape.

Whether you're immersed in peptide synthesis or on the forefront of biochemistry breakthroughs, this hub accommodates every level of expertise. Join us in pushing the boundaries of scientific discovery – the ultimate destination where excellence takes center stage.
Belay Board App Part 3: View, Accept, and Reject requests
Published: 2023-11-13 21:58:20

# Add a page where the current user can view all the requests made to their events (availabilities)

## Nest the requests under availabilities
```rb
# config/routes.rb

resources :availabilities do
  resources :requests, only: [:index]
  # Create a URL structure like /availabilities/:availability_id/requests.
end
```

## Modify the RequestsController to load the requests associated with the availabilities created by the current user
```rb
# app/controllers/requests_controller.rb

class RequestsController < ApplicationController
  def index
    @user = current_user
    @requests = Request.joins(:availability).where(availabilities: { user_id: @user.id })
  end
end
```

## Allow user to accept or reject request
```rb
resources :availabilities do
    resources :requests, only: [:index] do
      member do
        post 'accept'
        post 'reject'
      end
    end
  end
```

```rb
# app/controllers/requests_controller.rb
class RequestsController < ApplicationController
  # ...

  def accept
    @request = Request.find(params[:id])
    @request.accepted!
    redirect_to availability_requests_path(@request.availability), notice: 'Request accepted.'
  end

  def reject
    @request = Request.find(params[:id])
    @request.rejected!
    redirect_to availability_requests_path(@request.availability), notice: 'Request rejected.'
  end

  # ...
end
```

## Show Requests with availability information and action button
```rb
<!-- app/views/requests/index.html.erb -->
<h1>Requests on Availabilities</h1>
<table>
  <thead>
    <tr>
      <th>Availability ID</th>
      <th>Status</th>
      <th>Requester</th>
      <th>Location</th>
      <th>Description</th>
      <th>Action</th>
    </tr>
  </thead>
  <tbody>
    <% @requests.each do |request| %>
      <tr>
        <td><%= request.availability.id %></td>
        <td><%= request.status %></td>
        <td><%= request.sender.username %></td>
        <td><%= request.availability.location %></td>
        <td><%= request.availability.description %></td>
        <td>
          <%= form_with(model: request, url: accept_availability_request_path(request.availability, request), method: :post, local: true) do |form| %>
            <%= form.submit 'Accept' %>
          <% end %>
          <%= form_with(model: request, url: reject_availability_request_path(request.availability, request), method: :post, local: true) do |form| %>
            <%= form.submit 'Reject' %>
          <% end %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>
```

## Next Steps
Now a user can view and act on requests made on their availabilities. Next, I will display the availabilities index as a calendar.
Selenium Page Object Model POM advice
Tags: selenium, java
Published: 2023-11-13 21:10:17

I am rewriting a Selenium project I have previously written in Java. I am really a beginner, but I am upgrading it and am using Maven as well as using the Page Object Model for my project.

I have created two packages as src/main/java/tests and src/main/java/pages. Is it standard practice to initialise the WebDriver within the src/main/java/tests package or should you place it src/main/java or even entirely separately? The code for Initialising the WebDriver and passing the users data to login uses a series of arrays and is therefore rather large so it would probably not have an associated Page with the Pages package. Are there any naming conventions for this initialising/base Java file or where it should be stored?

Thanks
🇺🇳 Discover a country UN SDGs concerns w/ Open Metadata on Neo4J
Tags: datascience, dataviz, opendata, ai
Published: 2023-11-13 21:02:42

## 🤔 About

Did you already ask yourself how a country handles the [The United Nations 17 Sustainable Goals](https://sdgs.un.org/goals) (UN SDGs)

{% twitter 1716620523571180010 %}

and discover how a country acts:

- 🪞 For **Itself**
- 🌏 For  **the region** it belongs to
- 🌐 (more globally) **for the world** 

Well...**this is all what this post is about**, as part of [`#NODES23`](https://neo4j.com/event/nodes-2023/) event.

## 🪝 Teaser

With this first `30'` content, you'll discover how to:

1. **💡 Brainstorm with many creative AIs** and build a project roadmap thanks to Self-Critique LLM Chain Using [LangChain](https://www.langchain.com/) & [`SmartLLMChain`](https://api.python.langchain.com/en/latest/smart_llm/langchain_experimental.smart_llm.base.SmartLLMChain.html)
2. **🔗 Organize and link** heterogeneous data together ([Kaggle](https://www.kaggle.com/), [DuckDb](https://duckdb.org/))
3. **⚙️ Build & RUN** an efficient pipeline
4. **📦 Deliver** a global well designed knowledge graph
5. **🗣️ Chat/Q&A with data in natural language**: interact with the knowledge Graph ([Langchain](https://www.langchain.com/) & [Llama_Index](https://www.llamaindex.ai/))
6. **🔬 Interactively explore** the graph (ie. see how the open data is linked to more global concerns from UNs)
7. **🌌 Dive into dataviz** experience, with [Kineviz GraphXR](https://www.kineviz.com/graphxr)
8. **🧑‍🎨 Enjoy some movie data art** experience with [Gephi](https://gephi.org/) and [Runway](https://runwayml.com/)

## 📽️ Storytelling

Enough chat, here is the live session replay:

{% youtube aVzsrGGk4K0 %}

## 🧑‍🎨 Data art contemplation 🎶

The creation pipeline is as follows:

1. **Export** data from [`Neo4J Bloom`](https://neo4j.com/product/bloom/)
2. **Import** data into [`Gephi`](https://twitter.com/gephi)
3. **Tune** a dataviz with Gephi (Force Atlas based)
4. **Inject** dataviz into [`Runway` Gen2](https://runwayml.com/ai-magic-tools/gen-2/)
5. **Play** with Slow motion
6. Add **soundtrack**

Below the output:

{% youtube Acp_TcGW-9g %}

### 🎹 More about "Clair de Lune de Claude Debussy - Myung Whun Chung (2013)" ☺️

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tvdoha1591de1a5udgq6.png)](https://ecmrecords.com/product/myung-whun-chung-piano-myung-whun-chung/)
Turning On Thumbnail Support for Custom Post Types
Tags: wordpress
Published: 2023-11-13 20:42:17

If you read through the **functions.php** file in any theme, you'll see a few lines of code that look like this:

`add_theme_support('post-thumbnails');`

These features are for WordPress's 2 default types: Posts and Pages. If you are working with custom post types, you'll have to add this line of code to your (for example) my-custom-post-types.php file located in your **mu-plugins** folder. You'll add thumbnail support inside the `register_post_type()` function, as shown below:

```php
function my_custom_post_types() {
  register_post_type('event', array(
    'supports' => array('title', 'editor', 'thumbnail'),
  ));
}
```

Now, when your content editors are looking at the custom post, for example, "Event", they will see the "Featured image" option in the WP Editor (lower-right hand side).
🚀 안전보증놀이터 - FLASH BET, 특별한 혜택과 다채로운 게임으로 여러분을 초대합니다! 🎰
Published: 2023-11-13 20:30:00


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1y5rtytzbah930hn8df6.jpg)

🎁 입플 이벤트 진행 중!

💳 신규가입 쿠폰이벤트 및 매충전 20% 무한지급 이벤트로 여러분을 환영합니다!
🌈 다양한 이벤트로 더 즐거운 게임을 즐기세요!

🔄 매충전 20% 무한지급: 매 충전 시 20%의 무한지급으로 게임을 더욱 풍성하게 즐겨보세요!
🤝 지인추천 이벤트: 지인을 초대하고 특별한 혜택을 누리세요!
📅 프리미엄 출석이벤트: 매일 출석으로 특별한 상품을 획득하세요!
🃏 에볼루션, 플레이텍 카지노 및 카지노슬롯머신 이용 가능!

🎲 미니게임 다수: MGM바카라, 파워볼, bet365 가상게임 등 다양한 미니게임으로 즐거운 시간을 보내세요.
🏀 스포츠 및 라이브배팅: 다양한 스포츠 종목에서 실시간으로 베팅하여 즐거움을 더하세요!

🌐 찾아가기: fla-k1.com
🆔 가입코드: A T

🌟 FLASH BET으로 안전하고 즐거운 게임을 경험하세요! 여러분의 행운이 가득할 것입니다. 지금 바로 참여하세요! 🚀

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wjgiflbkiwezkr2rbq1j.jpg)
Challange me in CSS Battle
Tags: html, css, programming
Published: 2023-11-13 20:28:59

Hi, it's my first post on the **DEV Community**. I'd like to share my experience with an incredible website I've been using for almost a month to enhance my HTML and CSS skills. I thoroughly enjoy it because it presents a new challenge every day, and I wake up excited to tackle the daily target.

The website also hosts interesting battles that provide a great opportunity to test and improve my coding abilities. It's truly amazing. However, it can be perplexing to see some of the best and top players effortlessly create CSS codes in just 100 characters, while I sometimes find myself reaching up to 700 characters.

And this motivates me to exert more effort in learning all aspects of CSS and exploring its new features
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sreyzkqndiy59ljt5h0m.png)

"I reached a 33-day streak today, and I hope to help me for Improve my CSS skills.
🌟 Elevate Your Intelligence Gathering with Our Exceptional OSINT Investigation Service 🌟
Tags: investigation, cybersecurity, osint, privateinvestigation
Published: 2023-11-13 20:16:37

Greetings! 🚀 I trust this message finds you thriving in your endeavors. I am delighted to introduce myself as Rakib Hasan, representing the dynamic team at Fiverr. We find ourselves on a quest to empower our intelligence gathering capabilities, and it is with great anticipation that we have discovered your renowned OSINT investigation service.

Intriguingly, we are drawn to your offering's potential in several key areas:

Holistic Online Footprint Analysis: 🌐 Unveiling the digital trails of our targets comprehensively.
Social Media Mastery: 👥 Masterfully deciphering the intricate nuances of social media for deeper insights.
Uncharted Web Exploits: 🔦 Fearlessly delving into the deep and dark web, extracting hidden gems of information.
Guardians of Reputation: 🛡️ Safeguarding our brand's integrity through vigilant monitoring and proactive management.
Competitive Edge: 🏆 Equipping us with the intelligence required to outshine our rivals.
We would be immensely grateful if you could extend your expertise to provide us with further insights into your OSINT investigation services. Specifically, we are eager to understand your pricing structures, the swiftness of your turnaround times, and any compelling case studies or testimonials that underline your excellence.

Moreover, should it align with your schedule, we enthusiastically propose a rendezvous, either in the form of a brief call or a meeting, to dive deeper into our unique requirements. Your insights will undoubtedly illuminate the path toward achieving our aspirations. 🤝

Feel free to connect with me at rakib@cipherhaven.com or reach out via phone at +8801306181102. Your prompt response will be highly appreciated.

Thank you for your time and consideration. We are thrilled at the prospect of partnering with your distinguished team to elevate our OSINT capabilities to unprecedented heights. 🚀

Contact Me: 
Fiverr: [https://www.fiverr.com/s/6Ld42X](https://www.fiverr.com/s/6Ld42X) 
E-mail: rakib@cipherhaven.com 
Phone: +8801306181102