teleren/devto huggingface dataset:
Bug in Postman and Thunder Client Vs Code extensions
Tags: cookieheader, postman, thunderclient, vscodeextension
Published: 2023-07-16 15:04:24

This post is about a tiny bug (correct me if I am wrong) I found in **thunder client and postman vs code extensions**.

We all know about **API testing and cookies**. and today's post is about a small bug I found when testing my APIs.

_**A refresher about how cookies are used:**_
First, we send a request to a server at an URL. If that server wants to send us cookies, it uses the **Set-Cookie** header to send us some cookies.
Then every time we send a request to that same domain/server, our cookies are automatically sent to that server. Right?
We/our browsers/clients use the Cookie header in the request for sending their cookies to the server.

So what's the issue here?

**Problem in thunder client vs code extension:(v2.9.1)**
Now say I am using postman vs code extension to test some API.I sent a request and so I got some cookies from the server. Now every time I send a request to that same server, my cookies are going to be sent as well. Also, they are supposed to be sent using the request **Cookie** header. Right?

But It won't. You will not find any Cookie header in the request header in thunder client vs code extension.

**Problem in postman vs code extension:(v0.3.0)**
I have found the same problem in the postman vs code extension.
After getting cookies if you send requests you will not see those cookies in the Cookie header.

✅UPDATE:Postman has fixed this issue. If you are using >= 0.3.1 you won't find this issue.


Now this was very confusing. I was a newbie and couldn't figure out why wasn't I sending the cookies in the Cookie header. Cookies are supposed to be sent in the request Cookie header. 
Turns out, the cookies will be sent to the server. But, you won't find them in the header.😑

✨Also One thing I should mention you won't find this issue in the official postman desktop application.


Now I have made an example explaing the whole thing.If you have the patience follow along.
You can find code and some  usefull screenshots in this github repo(see the Readme file):

https://github.com/ss-joy/Cookie-header-problem-post

Or you can simply copy paste this code and hit these 2 urls to check the issues:

```
const express = require("express");
const cookieParser = require("cookie-parser");
const app = express();
app.use(cookieParser());

app.get("/get-some-cookies", (req, res) => {
  res.cookie("cartoon-name-one", "ben10");
  res.cookie("cartoon-name-two", "mega-xlr");
  res.cookie("cartoon-name-three", "powerpuff girls");
  res.send("Conrats you have some cookies in your response");
});

app.get("/see-some-cookies", (req, res) => {
  console.log(req.cookies);
  res.send("OK got it");
});

app.listen(3000, () => {
  console.log("server started @port 3000");
});

```
eDriving ayuda a las flotas a reducir el impacto medioambiental con EcoDrive powered by Greater Than
Published: 2023-07-16 14:57:00

[eDrivingSM](https://asturias24h.com/), una empresa de Solera y proveedor líder mundial de soluciones digitales de gestión de riesgos de los conductores, ha anunciado la disponibilidad mundial de su [función](https://bermer.es/) EcoDrive impulsada por Greater Than (GREAT:ST), un proveedor mundial de tecnología que convierte los datos de GPS en análisis y puntuaciones de gran impacto para los conductores. La integración de EcoDrive en la galardonada aplicación [digital](https://cadiz24h.com/) de seguridad del conductor MentorSM de eDriving permitirá a eDriving apoyar aún más a sus clientes globales en la consecución de sus objetivos de seguridad y [sostenibilidad](https://burgos24h.com/).
Salinas del Rey, la joya sudamericana que se consolida en el kitesurf mundial
Published: 2023-07-16 14:56:01

Del 1 al 5 de marzo, [Salinas ](https://asturias24h.com/)del Rey (Colombia) se convirtió, por segundo año consecutivo, en la capital mundial del [kitesurf](https://bermer.es/); los mejores 40 kitesurfistas del mundo en categorías masculina y femenina se tomaron las playas de [Salinas](https://cadiz24h.com/) del Rey durante la celebración de la segunda parada del GKA [Freestyle](https://burgos24h.com/) Kite World Cup 2023
Examples Of Big O Notation
Tags: big, o, notation, timecomplexity
Published: 2023-07-16 14:38:52

In order to choose which algorithms to use in specific situations, it is crucial to take time efficiency into account. Before studying algorithms, firstly take a closer look at how to quantify and characterise the efficiency of algorithms. In this article we are going to discuss Time vs Space Complexity, Average time vs Best time Complexity and Examples of Big O notation.


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

Full Article Available on https://hecodesit.com/examples-of-big-o-notation/
Computer repair and support
Published: 2023-07-16 14:30:36

WizardNetwork is a well-known brand in the IT Services industry in Sydney. We have offices all around Sydney, including the Lower North Shore, Inner Sydney, and the Eastern Suburbs. We hope to assist our clients in restoring the functionality of their gadgets and educating them on how to avoid such problems in the future.
We provide network support, hardware and software upgrades, new [router configuration services](https://wizardnetwork.com.au/), office and outlook services, computer repair & support services, and hardware & software upgrades in Sydney. You can even get some of the greatest computers right here.
TicTacToeFree.com Expands its Digital Presence to The Netherlands and Czech Republic, Plans to Reach Turkey and Bulgaria
Tags: onlinegam, webdev
Published: 2023-07-16 14:14:21

TicTacToeFree.com, the online platform known for offering the captivating classic game of Tic Tac Toe for free, is thrilled to announce its expansion into two new European markets - The Netherlands and the Czech Republic.

After the successful launch and acceptance in various global markets, this new venture underlines TicTacToeFree.com's commitment to spreading the joy of the timeless game to a broader audience. The website has been fully localized for both new markets, providing an effortless and enjoyable gaming experience for users in their native language.

"We are absolutely excited to bring our platform to the Dutch https://tictactoefree.com/nl/ and Czech https://tictactoefree.com/cz/ markets. We believe that games like Tic Tac Toe, that span generations and cultures, should be accessible to everyone, regardless of where they live," said Ion Tolstoy, a spokesperson for TicTacToeFree.com. "Our ultimate goal is to offer an engaging and enjoyable experience to our users while also fostering a sense of global community around a game we all know and love."

But the expansion doesn't stop there. TicTacToeFree.com is already preparing for its next phase of growth. The company is working on its strategic plans to introduce its gaming platform to Turkey and Bulgaria.

"Expansion into Turkey and Bulgaria is a natural progression for TicTacToeFree.com. We've been meticulously working on localizing our platform to ensure it's culturally relevant and user-friendly for these markets," added the spokesperson.

While staying true to the simplicity of the traditional game of Tic Tac Toe, TicTacToeFree.com delivers a digitally enhanced gaming experience, where users can challenge friends, family, or even an AI competitor. This global expansion underscores the platform's vision of creating an all-inclusive online community for Tic Tac Toe lovers worldwide.

For more information, visit https://www.tictactoefree.com.

-----

TicTacToeFree.com is a leading online gaming platform that provides users with a fun and engaging way to play the classic game of Tic Tac Toe, either against friends or AI. With a user-friendly interface and a commitment to fostering a global gaming community, TicTacToeFree.com is the go-to destination for fans of this timeless game.
A Guide to User Interface (UI) Design — Principles and Best Practices
Tags: ui, ux, uiux
Published: 2023-07-16 14:12:38

Every point at which a user interacts with a system is included in the user interface (UI) of a website or application. Positive user experiences and engagement are largely dependent on an effective UI design. An overview of important UI design principles and best practices will be given in this guide when developing intuitive and user-friendly interfaces.

## Core Principles of UI Design
When approaching a UI design, keep these fundamental principles in mind:

### Clarity
The purpose and function of each element should be immediately apparent to users. Use clear labels, icons, and intuitive visual hierarchies.

### Consistency
Maintain consistent design patterns, interfaces, terminology, and interactions across the system. This builds familiarity for users.

### Simplicity
Avoid unnecessary complexity. Simplify layouts, navigate flows, options, and language. Less is often more.

### Familiarity
Leverage interface patterns and interactions that users are accustomed to from common conventions and experiences.
Responsiveness
Ensure a fluid and flexible interface optimized for any device or screen size. Load times should also be fast.

### Accessibility
Accommodate diverse abilities through features like color contrast, screen reader compatibility, and keyboard shortcuts.

## Best Practices for UI Design
When designing a user interface, consider these best practices:
Follow Established Conventions
Use recognizable user interfaces for common components like buttons, menus, and search. The user's cognitive load is lessened by this.

### Promote Scannability
By using concise text, thoughtful whitespace, and obvious hierarchies (like headlines and subheads), you can encourage quick scanning of the content.

### Guide the User Journey
Use navigation, prompts, and visual cues to anticipate important tasks and lead users down logical paths to completion.

### Prioritize Key Information
Draw attention to crucial information while staying away from excessive clutter. Utilize design elements such as typography, positioning, contrast, and spacing.

### Provide Effective Feedback
By using messages, notifications, previews, transitions, and loading indicators, give users immediate feedback on their actions.

### Optimize Forms and Inputs
reduce the amount of data input needed. When possible, choose dropdowns, radio buttons, and checkboxes over free text. Make sensible defaults.

### Test Extensively with Users
To see how actual users interact with prototypes and designs, conduct usability studies. Take feedback frequently and early. Designers can create intuitive user interfaces that engage users and bring designs to life by adhering to these principles and best practices while keeping the end-user experience firmly in focus. Effective interface design requires extensive user testing. When done correctly, UI design is a challenging but incredibly rewarding discipline.
Jokeday Funday Part #2
Tags: jokes, programming
Published: 2023-07-16 14:12:02

<h2>Jokeday Funday: Part 2 - More Programming Jokes to Keep the Laughter Rolling</h2>

<p><strong>Joke 1: The Debugger's Dilemma</strong></p>
<p>Why do programmers prefer to work in the dark?</p>
<p>Because the light can sometimes make their bugs more difficult to spot!</p>

<p><strong>Joke 2: The Coffee Break</strong></p>
<p>Why do programmers prefer to drink coffee?</p>
<p>Because it helps them Java-nate their code!</p>

<p><strong>Joke 3: The Code Poet</strong></p>
<p>What did the developer say to their code when it refused to compile?</p>
<p>"Don't be so codependent!"</p>

<p><strong>Joke 4: The Conditional Comedy</strong></p>
<p>Why did the developer go broke?</p>
<p>Because they lost their conditional statement in a if-else loop!</p>

<p><strong>Joke 5: The Keyboard Conundrum</strong></p>
<p>Why was the keyboard not happy?</p>
<p>Because it had too many keys, but no one could find its escape!</p>

<p><strong>Joke 6: The Programming Pirate</strong></p>
<p>What's a pirate's favorite programming language?</p>
<p>R!</p>

<p><strong>Joke 7: The Tech Support Twist</strong></p>
<p>Why did the tech support person go fishing?</p>
<p>Because they wanted to catch some bytes!</p>

<p><strong>Joke 8: The Recursive Riddle</strong></p>
<p>Why do programmers always get Christmas and Halloween confused?</p>
<p>Because Oct 31 == Dec 25, but recursion knows no bounds!</p>

<p><strong>Joke 9: The CSS Partygoer</strong></p>
<p>Why did the style sheet never make it to the party?</p>
<p>Because it was stuck in a selector!</p>

<p><strong>Joke 10: The Algorithm's Crush</strong></p>
<p>Why did the algorithm go on a date with the database?</p>
<p>Because they had great chemistry and could always find common interests!</p>


<p><strong>Bonus Joke: The Author's Special</strong></p>
<p>Why did Soumyadeep become a programmer?</p>
<p>Because he wanted to turn his coding skills into a superpower and debug the world!</p>
Masonry Layout with CSS
Tags: css, webdev
Published: 2023-07-16 14:01:26

One time I was exploring different kinds of layouts for HTML content, I found out about the masonry grid. I first saw it on Pinterest, and it looked so cool and fluid, like a game of Tetris for images. I started researching how it could be done, it couldn't be that difficult, right? CSS was powerful enough to make this work, right? Well, not quite.

## What is masonry?

Masonry layout is a type of grid layout where the items are placed out in the inline direction. When they wrap to the next line, the items will automatically fill in any gaps left by the first row of items. This is in stark contrast to how CSS grids work today, where the second row of items does not bleed into the first.

Todays CSS grid solution doesn't have the ability to dynamically place items in the spaces left by the previous row, at least not without some amount of JavaScript involved in the process. Thus, I present to you the solution to all of the aforementioned problems; [CSS columns](https://developer.mozilla.org/en-US/docs/Web/CSS/columns).

## A solution

CSS columns have been around for a good while now. And while the property has mostly been used for typography and textual content, it can just as well be used for laying out images or cards in masonry-ish way.

```css
.masonry {
  columns: 3;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
```

There are some caveats to this method however. Using grid, the items are placed in the inline direction. With columns however, the items are placed in the block direction. It looks like a masonry layout, but it doesn't quite function like one. Remember, masonry layouts are still supposed to be laid out in the inline direction; from left to right.

## Conclusion

As you can see, we can already get quite close to masonry layouts with pure CSS, and if you just like the look of the Tetris-ish nature of the masonry layout, you can most likely just use CSS columns and be as happy as ever. But if you are dependant on the inline flow of a real masonry layout, you are just going to have to get some JavaScript involved for now.

There are, however, plans in motion to get [masonry layouts natively supported in CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Masonry_Layout). The spec is only supported in Firefox at the moment, but we can only hope the other browsers jump on the masonry-train soon enough.
Jokeday Funday Part #1
Tags: jokes, programming
Published: 2023-07-16 13:54:34

<h2>Jokeday Funday: Part 1 - Hilarious Programming Jokes to Brighten Your Day</h2>

<p><strong>Joke 1: The Infinite Loop</strong></p>
<p>Why do programmers always mix up Christmas and Halloween?</p>
<p>Because Oct 31 == Dec 25!</p>

<p><strong>Joke 2: The Time Travel Bug</strong></p>
<p>Why did the programmer go broke?</p>
<p>Because he lost his domain in a time travel loop!</p>

<p><strong>Joke 3: The Binary Bard</strong></p>
<p>There are only 10 types of people in the world:</p>
<p>Those who understand binary, those who don't, and those who didn't expect this joke to be in base 3!</p>

<p><strong>Joke 4: The Lazy Developer</strong></p>
<p>Why do programmers prefer dark mode?</p>
<p>Because light attracts bugs!</p>

<p><strong>Joke 5: The Late-Night Coder</strong></p>
<p>Why do programmers always mix up their left and right?</p>
<p>Because they are always working with pointers!</p>

<p><strong>Joke 6: The HTML Lover</strong></p>
<p>Why did the web developer always carry a pencil and paper?</p>
<p>In case they needed to draw a tag!</p>

<p><strong>Joke 7: The Variable Chameleon</strong></p>
<p>Why did the variable break up with the function?</p>
<p>It heard the function was returning null!</p>

<p><strong>Joke 8: The CSS Party</strong></p>
<p>Why did the stylesheet go to the party alone?</p>
<p>Because it had no class!</p>

<p><strong>Joke 9: The JavaScript Detective</strong></p>
<p>Why did the developer go broke hiring a detective?</p>
<p>To find a bug in their code!</p>

<p><strong>Joke 10: The Algorithm Stand-Up</strong></p>
<p>Why don't programmers like stand-up comedy?</p>
<p>Because their jokes always get stuck in an infinite loop of debugging!</p>


<p><strong>Bonus Joke: The Author's Special</strong></p>
<p>Why did Soumyadeep become a programmer?</p>
<p>Because he wanted to turn his ideas into byte-sized reality!</p>
My first ‘baby step’ in automating tasks in Python for my Watson Assistant Project
Published: 2023-07-16 13:50:26

I wrote my own Exel to JSON file converter!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3rw1733jhrgp6kmrek8i.png)
For my current project using [IBM Watson Assistant](https://www.ibm.com/products/watson-assistant?utm_content=SRCWW&p1=Search&p4=43700074895048257&p5=e&gclid=Cj0KCQjwqs6lBhCxARIsAG8YcDjayvuFhRcQaGD5QyxKKCotCTjDrGy5fruIwj6VSgiJfm_Ih_hA33saAhqzEALw_wcB&gclsrc=aw.ds), I needed to import a big number of JSON files containing dialogs/intents/keywords… into my WA instance.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7qzyrn788kdibikb62iu.png)
First I tried to find some free apps or websites to do this task for me, but suddenly I wanted to have some pleasure in doing it myself. I figured out that many examples are written in Python and decided to write my own Python code for this task (I’m not a Python developer, never 😆).

So I started copying/pasting/adapting code from different sites, and guess what; it worked 👍😅.

Hereafter is my basic code which works great for me. I passed 2 hours copying/pasting/adapting/debugging (including the installation of PyCharm community/free edition and doing pip installations) and voilà!

```
import os
import jpype

path = "/mypath"
fname = []
excelCounter = 0
arrayExtension = ['.xlsx','.xls','.xlsm']

jpype.startJVM()

def convert2json(arg1, arg2):
    from asposecells.api import Workbook
    arg1 = path + '/' + arg1
    workbook = Workbook(arg1+arg2)
    jsonfile = arg1 + '.json'
    workbook.save (jsonfile)
    print("JSON file created = %s" % jsonfile)



for root, d_names, f_names in os.walk(path):
    for f in f_names:
       fname.append(os.path.join(root, f))
       split_tup = os.path.splitext(f)
       file_name = split_tup[0]
       file_extension = split_tup[1]
       if file_extension in arrayExtension:
          excelCounter = excelCounter + 1
          print("File to be converted = %s" % f)
          print("excelCounter = %s" % excelCounter)
          convert2json(file_name, file_extension)

jpype.shutdownJVM()
```

```
/mypath/Dev/PycharmProjects/exportExcel2JSON/xxxprj/bin/python /mypath/PycharmProjects/exportExcel2JSON/main.py 

File to be converted = Current-Intent-Entity-Training3.xls
excelCounter = 1
JSON file created = /maypath/Current-Intent-Entity-Training3.json
File to be converted = Current-Intent-Entity-Training.xlsx
excelCounter = 2
JSON file created = /maypath/Current-Intent-Entity-Training.json
File to be converted = Current-Intent-Entity-Training2.xlsx
excelCounter = 3
JSON file created = /maypath/Current-Intent-Entity-Training2.json

Process finished with exit code 0
```
My takeaways;

This is so far from being perfect, I know, I’ll work on my work 😏
there are lots of great and useful libraries for Python
Python is great for string and file operations (and for sure other stuff, I’m talking about my very basic level)
I’ll do more of this in the future 👍👊😆💪
Writing a NES game day 4: Start code analysis
Published: 2023-07-16 13:41:47

Continuing from day three, let's continue looking at this [code](https://github.com/JamesSheppardd/Nerdy-Nights-ca65-Translation/blob/master/Nerdy%20Nights%20L3/background.asm).

After telling the emulator that this is a NES program we have to establish a couple of segments:

`.segment "ZEROPAGE" ; $0000 hasta $00FF 256bytes - the fastest ram
.segment "STARTUP"
`

The first segment is **Zeropage**, this is the fastest part of the memory that goes from $00 to $FF (256 bytes) and in the future we will put here whatever we need to run fast.

We are not using the **startup**segment and still don't know what it is used for but I feel that we will discover this later (remember that I am learning this as I am writing)

Next is the code segment:

`.segment "CODE"

RESET:
    SEI             ; disable IRQs
    CLD             ; disable decimal mode
    LDX #$40
    STX $4017       ; disable APU frame counter IRQ - disable sound
    LDX #$ff
    TXS             ; setup stack starting at FF as it decrements instead if increments
    INX             ; overflow X reg to $00
    STX $2000       ; disable NMI - PPUCTRL reg
    STX $2001       ; disable rendering - PPUMASK reg
    STX $4010       ; disable DMC IRQs`

And the first label we see here is **RESET** which is kind of starting point for when the game starts.
SEI, interrupts the IRQ. What is an IRQ? They are hardware interruptions (we can talk a little more about this but there is plenty of information with a simple google).
Then CLD (Clear Decimal) that disables decimal mode.
The rest of the lines are a way to put everything in kind of initial mode for the game.

`vblankwait1:        ; wait for vblank to make sure PPU is ready
    BIT $2002       ; returns bit 7 of ppustatus reg
    BPL vblankwait1
`

Now, we are waiting for vblank moment to make sure that the PPU is ready. vblank is the moment when nothing is sent to the video so we can do the changes we want to the graphics (the explanation is bigger, but for now this will do it).

BIT $2002 returns the 7th. bit of ppu status, this bit holds the vblank status (0 = no vblank, 1 = vblank). This affects N flag.
Then it will jump until N flag is 1 (BPL branches if N = 0)

`clearmem:
    LDA #$00   
    STA $0000, x
    STA $0100, x
    STA $0300, x
    STA $0400, x
    STA $0500, x
    STA $0600, x
    STA $0700, x
    LDA #$fe
    STA $0200, x    ; Set aside space in RAM for sprite data
    INX 
    BNE clearmem`


Next step is clearing the memory so, let's loop until all is clear!

`vblankwait2:      ; Second wait for vblank, PPU is ready after this
  BIT $2002
  BPL vblankwait2`


A second wait for vblank... I think is needed given the time passed but, still don't understand lots of things here

Well, tomorrow we will clear the screen put a background color and if possible finish week 3.

So far: I barely understand what is happening and I am writing to teach myself, but there are still a lot of things that I don't get.