Category: Blog

  • JavaScript-Fundamentals

    👨‍🎓For the course

    With “Programming Fundamentals”, students begin to study SoftUni’s in-house program for the comprehensive training of software engineers. The course examines fundamental concepts in programming, which are the basis for effective and quality training in the professional modules. Learners build on the knowledge gained in the Programming Basics course and begin to use more complex programming concepts and structures such as: arrays, sheets, objects and classes. Additional technologies needed by every software developer are studied, such as HTML and CSS, HTTP, bitwise operations, and more. The basics of web development are considered, as well as one of the most common technologies and tools, with which the course successfully builds an idea among students about the upcoming professional modules and knowledge, that they will acquire from them to become successful software developers.

    📑 Themes

    1. Basic Syntax, Conditional Statements and Loops
      • Introduction and IDE
      • JavaScript Syntax
      • Conditional Statements
      • Loops (while and for Loops)
      • Debugging and troubleshooting
    2. Git and GitHub
      • Software Configuration Management
      • Introduction to Git
      • Introduction to GitHub
    3. Data Types and Variables
      • What is Data Type?
      • let vs. var
      • Strings
      • Numbers
      • Booleans
      • typeofOperator
      • Undefined and Null
    4. HTTP Basics
      • HTTP Developer Tools
      • HTML Forms, Request, Response
      • URLs and ERL Structure
    5. Arrays
      • What are Arrays?
      • Array Operations
      • Array Iteration
      • for-of Loop
    6. HTML & CSS Basics
      • Introduction to HTML
      • HTML Common Elements
      • Introduction to CSS
      • Selectors
      • Block Elements
      • Dev Tools
      • Fonts
    7. Functions
      • What is a Function?
      • Declaring and Invoking Functions
      • Nested Functions
      • Value vs Reference Types
      • Arrow Functions
      • Naming and Best Practices
    8. Software Development Concepts – Part 1
      • The 4 Skills of Software Engineers
      • Fundamental Software Engineering Concepts
      • Software Architectures, Front-End and Back-End
    9. Arrays Advanced
      • Array Functionality
      • Array Operations (push, pop, shift, unshift, filtering and transforming elements)
      • Sorting Arrays
    10. Objects and Classes
      • Objects (definition, properties and methods)
      • Reference vs. ValueTypes
      • JSON
      • Classes
    11. Software Development Concepts – Part 2
      • Front-End Development Concepts
      • Back-End Development Concepts
      • Embedded Systems and IoT
      • Software Engineering Concepts
    12. Associative Arrays
      • Associative Arrays (definition, attributes, iteration)
      • Map (methods, iteration)
      • Set (methods, iteration)
    13. Bitwise Operations
      • What is a Bit, Byte, KB, MB?
      • Numeral Systems
      • Representation of Data in Computer Memory
    14. Text Processing
      • Strings
      • Manipulating Strings (Concatenating, Searching, Substring, Splitting, Replacing)
    15. Problem Solving
      • Fundamental Skills of Software Engineers
      • Problems: Definition and Problem Solving
      • Stages of Problem Solving
      • Solving Exam Problems
    16. Regular Expressions
      • Regular Expressions (Definition and Pattern, Predefined Character Classes)
      • Quantifiers and Grouping
      • Backreferences
    17. Database Basics
      • Introduction to Databases
      • SQL vs. NoSQL Databases
      • DBMS Systems
      • Relational Databases, SQL and MySQL Databases
      • NoSQL Databases and MongoDB
    18. QA Introduction
      • Software Quality Assurance
      • QA Engineers and Responsibilities
      • Bugs and Bug Trackers
      • Testing, Test Types and Test Levels
      • Test Automation, Frameworks and Tools
    19. Basic Web Project
      • Node Modules (HTTP, Creating simple HTTP Server)
      • Express.js Framework
      • MVC
      • MVC with Node, Express.js, Handlebars

    💡 Skills you will acquire

    • Handling the standard functionality of the programming language
    • Basics of web development
    • Understanding the interrelationship between different IT concepts
    • Analysis of complex problems and reduction to computer-executable steps
    • Basic HTML and CSS skills
    • Working with linear data structures

    🎓 Certificate:

    Visit original content creator repository https://github.com/ivaylokarafeizov/JavaScript-Fundamentals
  • dk-bongo

    DK Bongos

    © 2018-2025 Stephen Barrack

    I am not offering any license to this repository at this time. Please be patient while I figure out the ideal license for this repo.

    Supplies

    • Teensy 3.2
    • USB cable
    • Soldering/bread-boarding accoutrement
    • DK Bongos
    • 0-2 Wii Remote attachments
      • Solo or dual Nunchucks
      • Guitar

    Optional

    I strongly recommend these so that you don’t have to permanently affix your controllers to the Arduino. Cut them in half and solder/connect each end to the Teensy.

    • 1 GameCube controller extension cord
    • 0-2 Wii remote extension cords
      • You only need the female ends of these.

    Non-supplies

    • Pull-up/down resistors
      • All of the controllers already have these 😀
    • Digital logic-level converter(s)
      • Teensy 3.2 is 5V tolerant 😀

    Setup

    • Cut the trace between Vusb & Vin.

    sudo apt install teensy-loader-cli
    sudo curl -o /etc/udev/rules.d/00-teensy.rules https://www.pjrc.com/teensy/00-teensy.rules
    sudo cat 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[7-9]?", GOTO="nm_modem_probe_end"' >> /lib/udev/rules.d/77-nm-probe-modem-capabilities.rules
    • Wiring guide comming soon™

    Usage

    # Plug in your Teensy.
    cd bongos
    make
    # Press the Teensy's restart button when prompted.

    Visit original content creator repository
    https://github.com/sbarrack/dk-bongo

  • gojenkins

    Jenkins API Client for Go

    GoDoc Go Report Cart Build Status

    About

    Jenkins is the most popular Open Source Continuous Integration system. This Library will help you interact with Jenkins in a more developer-friendly way.

    These are some of the features that are currently implemented:

    • Get information on test-results of completed/failed build
    • Ability to query Nodes, and manipulate them. Start, Stop, set Offline.
    • Ability to query Jobs, and manipulate them.
    • Get Plugins, Builds, Artifacts, Fingerprints
    • Validate Fingerprints of Artifacts
    • Create and Delete Users
    • Get Current Queue, Cancel Tasks
    • Create and Revoke API Tokens
    • etc. For all methods go to GoDoc Reference.

    Installation

    go get github.com/bndr/gojenkins
    

    CLI

    For users that would like CLI based on gojenkins, follow the steps below:

    $ cd cli/jenkinsctl
    $ make
    

    Usage

    import (
      "github.com/bndr/gojenkins"
      "context"
      "time"
      "fmt"
    )
    
    ctx := context.Background()
    jenkins := gojenkins.CreateJenkins(nil, "http://localhost:8080/", "admin", "admin")
    // Provide CA certificate if server is using self-signed certificate
    // caCert, _ := ioutil.ReadFile("/tmp/ca.crt")
    // jenkins.Requester.CACert = caCert
    _, err := jenkins.Init(ctx)
    
    
    if err != nil {
      panic("Something Went Wrong")
    }
    
    job, err := jenkins.GetJob(ctx, "#jobname")
    if err != nil {
      panic(err)
    }
    queueid, err := job.InvokeSimple(ctx, params) // or  jenkins.BuildJob(ctx, "#jobname", params)
    if err != nil {
      panic(err)
    }
    build, err := jenkins.GetBuildFromQueueID(ctx, job, queueid)
    if err != nil {
      panic(err)
    }
    
    // Wait for build to finish
    for build.IsRunning(ctx) {
      time.Sleep(5000 * time.Millisecond)
      build.Poll(ctx)
    }
    
    fmt.Printf("build number %d with result: %v\n", build.GetBuildNumber(), build.GetResult())

    API Reference: https://godoc.org/github.com/bndr/gojenkins

    Examples

    For all of the examples below first create a jenkins object

    import "github.com/bndr/gojenkins"
    
    jenkins, _ := gojenkins.CreateJenkins(nil, "http://localhost:8080/", "admin", "admin").Init(ctx)

    or if you don’t need authentication:

    jenkins, _ := gojenkins.CreateJenkins(nil, "http://localhost:8080/").Init(ctx)

    you can also specify your own http.Client (for instance, providing your own SSL configurations):

    client := &http.Client{ ... }
    jenkins, := gojenkins.CreateJenkins(client, "http://localhost:8080/").Init(ctx)

    By default, gojenkins will use the http.DefaultClient if none is passed into the CreateJenkins() function.

    Check Status of all nodes

    nodes := jenkins.GetAllNodes(ctx)
    
    for _, node := range nodes {
    
      // Fetch Node Data
      node.Poll(ctx)
    	if node.IsOnline(ctx) {
    		fmt.Println("Node is Online")
    	}
    }

    Get all Builds for specific Job, and check their status

    jobName := "someJob"
    builds, err := jenkins.GetAllBuildIds(ctx, jobName)
    
    if err != nil {
      panic(err)
    }
    
    for _, build := range builds {
      buildId := build.Number
      data, err := jenkins.GetBuild(ctx, jobName, buildId)
    
      if err != nil {
        panic(err)
      }
    
    	if "SUCCESS" == data.GetResult(ctx) {
    		fmt.Println("This build succeeded")
    	}
    }
    
    // Get Last Successful/Failed/Stable Build for a Job
    job, err := jenkins.GetJob(ctx, "someJob")
    
    if err != nil {
      panic(err)
    }
    
    job.GetLastSuccessfulBuild(ctx)
    job.GetLastStableBuild(ctx)

    Get Current Tasks in Queue, and the reason why they’re in the queue

    tasks := jenkins.GetQueue(ctx)
    
    for _, task := range tasks {
    	fmt.Println(task.GetWhy(ctx))
    }

    Create View and add Jobs to it

    view, err := jenkins.CreateView(ctx, "test_view", gojenkins.LIST_VIEW)
    
    if err != nil {
      panic(err)
    }
    
    status, err := view.AddJob(ctx, "jobName")
    
    if status != nil {
      fmt.Println("Job has been added to view")
    }

    Create nested Folders and create Jobs in them

    // Create parent folder
    pFolder, err := jenkins.CreateFolder(ctx, "parentFolder")
    if err != nil {
      panic(err)
    }
    
    // Create child folder in parent folder
    cFolder, err := jenkins.CreateFolder(ctx, "childFolder", pFolder.GetName())
    if err != nil {
      panic(err)
    }
    
    // Create job in child folder
    configString := `<?xml version='1.0' encoding='UTF-8'?>
    <project>
      <actions/>
      <description></description>
      <keepDependencies>false</keepDependencies>
      <properties/>
      <scm class="hudson.scm.NullSCM"/>
      <canRoam>true</canRoam>
      <disabled>false</disabled>
      <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
      <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
      <triggers class="vector"/>
      <concurrentBuild>false</concurrentBuild>
      <builders/>
      <publishers/>
      <buildWrappers/>
    </project>`
    
    job, err := jenkins.CreateJobInFolder(ctx, configString, "jobInFolder", pFolder.GetName(), cFolder.GetName())
    if err != nil {
      panic(err)
    }
    
    if job != nil {
    	fmt.Println("Job has been created in child folder")
    }

    Get All Artifacts for a Build and Save them to a folder

    job, _ := jenkins.GetJob(ctx, "job")
    build, _ := job.GetBuild(ctx, 1)
    artifacts := build.GetArtifacts(ctx)
    
    for _, a := range artifacts {
    	a.SaveToDir("/tmp")
    }

    To always get fresh data use the .Poll() method

    job, _ := jenkins.GetJob(ctx, "job")
    job.Poll()
    
    build, _ := job.getBuild(ctx, 1)
    build.Poll()

    Create and Delete Users

    // Create user
    user, err := jenkins.CreateUser(ctx, "username", "password", "fullname", "user@email.com")
    if err != nil {
      log.Fatal(err)
    }
    // Delete User
    err = user.Delete()
    if err != nil {
      log.Fatal(err)
    }
    // Delete user not created by gojenkins
    err = jenkins.DeleteUser("username")

    Create and Revoke API Tokens

    // Create a token for admin user
    token, err := jenkins.GenerateAPIToken(ctx, "TestToken")
    if err != nil {
      log.Fatal(err)
    }
    
    // Set Jenkins client to use new API token
    jenkins.Requester.BasicAuth.Password = token.Value
    
    // Revoke token that was just created
    token.Revoke()
    
    // Revoke all tokens for admin user
    err = jenkins.RevokeAllAPITokens(ctx)
    if err != nil {
      log.Fatal(err)
    }

    Testing

    go test
    

    Contribute

    All Contributions are welcome. The todo list is on the bottom of this README. Feel free to send a pull request.

    TODO

    Although the basic features are implemented there are many optional features that are on the todo list.

    • Kerberos Authentication
    • Rewrite some (all?) iterators with channels

    LICENSE

    Apache License 2.0

    Visit original content creator repository https://github.com/bndr/gojenkins
  • FifoIPCBenchmark

    FifoIPCBenchmark

    A test to specifically benchmark the latency of interprocess communication using a shared-memory FIFO object.

    Installation

    To install the project, you can start by cloning the repo and running the cmake configuration bash script in tools.

    git clone git@github.com:AndreaBaretta/FifoIPCBenchmark.git
    cd FifoIPCBenchmark
    ./tools/configure_builds.sh

    You can now move into either builds/release or builds/debug and compile the benchmark in either release mode or test mode. Also, make sure that cmake is installed.

    cd ./builds/release
    cmake --build .

    You can now run the executables as sudo.

    sudo ./fifo-ipc-latency
    sudo ./fifo-ipc-throughput --intra-ccx

    Usage

    Latency measurements

    clang-13 is recommended for compilation, and it is the compiler used to obtain the sample data:

    sudo apt-get install clang-13

    The c++ standard used for compilation is c++20.

    Once you have compiled the benchmark as previously described and have the executable, it can take several command-line arguments:

    • -n, --numtries arg: Number of iterations of the test (default: 1000000)
    • -i, --individual-message: Save latency data on individual messages
    • -d, --data-dir arg: Directory for gathered data. If used with -i, it will save latency data on individual messages. If not specified, uses present working directory
    • --cores arg: If not specified, tests all cores communicating with each other. If one value is specified, then that is fixed as the reference core. If two values are specified, only those two cores are tested
    • -b, --buffer-size arg: Size of the buffer in the shared FIFO in number of messages (default: 8)
    • -m, --message-size arg: Size of the message sent to FIFO in number of cache lines (default: 1)
    • --no-save: If used, gathered data is not stored and does not override any previously gathered data. This is largely for development purposes so you don’t kill your SSD
    Note: All of this information is displayed when running the program with -h or --help.

    For example, you can measure the average latency of sending 100,000 messages, each one spanning 3 cache lines, across cores 1 and 18 through the following command:

    sudo ./fifo-ipc-latency -n 100000 -m 3 --cores 1,18

    Or, if you wish to test the benchmark by measuring the latency of individual messages sent between all cores but you do not wish to overwrite your current csv files, you can run:

    sudo ./fifo-ipc-latency -i --no-save

    Please note that to make full use of the benchmark, it is recommended to run the executable as sudo, set the CPU governor to ‘performance’, and disable CPU C-States in your BIOS.

    Lastly, to visualize the data, you can move into the python folder.

    cd ../../python

    Here, you will find a python script which generates a heatmap of the average latency. To see this, run:

    python3 heatmap_avg.py <file-path>

    If you specify a file path, it will use that particular file. Otherwise, by default, it will use the measurements in /builds/release/data.

    You can also visualize the distribution of the data gathered from saving the latency of individual measurements by using the following python script:

    python3 dist_individual.py <file-path>

    Once again, you can specify a file path. If you do not, it will look at builds/release/data/FifoIpcLatency_0_1.csv.

    Pyhton 3 is necessary to run these scripts. Also, please make sure you have the following packages installed:

    pip3 install numpy pandas matplotlib seaborn

    Throughput measurements

    clang-13 is once again recommended for compilation, and it is the compiler used to obtain the sample data. The c++ standard used for compilation is stil c++20.

    sudo apt-get install clang-13

    The executable fifo-ipc-throughput can take multiple command-line arguments:

    • --ccx arg: Number of CCXs per socket (default: 1)
    • --sockets arg: Number of sockets in the system
    • --intra-core: Tests the throughput of message across two threads in the same physical core
    • --intra-ccx: Tests the throughput of messages across pairs of cores in the same CCX
    • --intra-ccx-all: Tests the throughput of messages across all pairs of cores in one CCX on all CCXs at the same time
    • --inter-ccx: Tests communication across all pairs of CCXs in one socket
    • --inter-socket: Tests the throughput of messages across all pairs of cores between sockets
    • --mt: Perform this test with simultaneous multithreading
    • -b, --buffer-size arg: Size of the buffer in the shared FIFO in number of messages (default: 8)
    • -m, --message-size arg: Size of the message sent to FIFO in number of cache lines (default: 1)
    • -n, --numtries arg: Number of iterations of the test (default: 1000000)
    • -d, --data-dir arg: Directory for gathered data. If not specified, uses present working directory
    Note: All of this information is displayed when running the program with -h or --help.

    For example, you can measure the throughput of sending 1,0000,000 messages, with a buffer of 100 cache lines, across CCXs with the following command:

    sudo ./fifo-ipc-throughput -n 10000000 -b 100 --inter-ccx

    Or, if you wish to test the throughput of intra-CCX communication across all CCXs simultaneously with a custom data directory, you can run:

    sudo ./fifo-ipc-throughput -d /home/andrea/My/Data/Directory --intra-ccx-all 

    Once again, to make full use of the benchmark, it is recommended to run the executable as sudo, set the CPU governor to ‘performance’, and disable CPU C-States in your BIOS.

    Lastly, to visualize the data, you can move into the python folder.

    cd ../../python

    Here, you will find a python script which generates a box and whisker plot of the distribution of throughpuyt measurements for all tests. To see this, run:

    python3 throughput_plot.py <data-dir>

    If you specify a file path, it will use that particular file. Otherwise, by default, it will use the measurements in /builds/release/data.

    Contributions

    Contributions are appreciated, but please keep in mind that this benchmark specifically measures the latency and throughput of communication using shared memory FIFOs.

    Feel free to open an issue or send a pull request.

    License

    This project is released under the GNU General Public License. For more information, see the COPYING file.

    This file is part of FifoIPCBenchmark.
    
    FifoIPCBenchmark is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    FifoIPCBenchmark is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with FifoIPCBenchmark.  If not, see <https://www.gnu.org/licenses/>.
    

    Authors

    Andrea Baretta

    Copyright © 2021 Andrea Baretta

    Visit original content creator repository
    https://github.com/AndreaBaretta/FifoIPCBenchmark

  • NoteWizard

    Note Wizard Banner

    NoteWizard

    Welcome to NoteWizard! This web application is designed to help students stay organized and informed by providing features such as college notes, syllabus tracking, timetables, and important event notifications.

    Table of Contents

    Introduction Technologies Used Features Getting Started Usage Contributing Contact Introduction

    NoteWizard is a powerful tool for students to manage their academic life efficiently. It offers a range of features that assist in organizing and accessing important information such as class notes, syllabi, timetables, and event notifications. This web application aims to enhance productivity and provide a centralized platform for students to stay on top of their studies.

    Technologies Used

    The following technologies were used to develop NoteWizard:

    HTML5 CSS3 JavaScript Features

    NoteWizard offers the following features:

    College Notes: A section where students can upload and access their class notes, organized by subject or course. Syllabus Tracking: Students can input their course syllabi, track important deadlines, and receive reminders for assignments, exams, and projects. Timetable: A customizable timetable that allows students to schedule their classes, study sessions, and extracurricular activities. Event Notifications: Important event notifications, such as registration deadlines, seminars, or guest lectures, can be displayed to keep students informed. Feel free to customize and expand upon these features based on your specific requirements.

    Getting Started

    To set up NoteWizard locally, follow these steps:

    Clone the repository or download the source code. Open the project folder in your preferred code editor. Modify the HTML, CSS, and JavaScript files to customize the application’s content, styling, and functionality. Save your changes. Open the index.html file in your web browser to view the application locally. Usage

    Customize NoteWizard to meet the needs of your users. You can enhance existing features, add new functionality, or modify the design and layout. Ensure that the application remains user-friendly and intuitive for students to navigate and utilize effectively.

    Contributing

    We appreciate your interest in contributing to NoteWizard! If you have any bug reports, suggestions, or enhancements, please feel free to open an issue or submit a pull request. Your contributions will be invaluable in improving the application for the benefit of all users.

    Contact

    If you have any questions, feedback, or need support, please feel free to contact us via email or any other preferred method.

    Arjun Singh arjunsingh15102003@gmail.com https://www.linkedin.com/in/arjun-singh-62b7761b6

    Visit original content creator repository https://github.com/arjunsingh27/NoteWizard
  • exp-microfluidic-mfc-au

    Introduction

    Discipline Biotechnology and Biomedical Engineering
    Lab Biosensor Lab
    Experiment Microfluidic MFC

    About the Experiment

    This experiment depicts the design parameters and construction protocols for developing a microbial fuel cell in normal laboratory conditions. It helps to visualize how microorganisms can be used to produce electrical energy with minimum laboratory requirements.

    Name of Developer Dr. Shyam Diwakar
    Institute Amrita Vishwa Vidyapeetham
    Email id shyam@amrita.edu
    Department Amrita Mind Brain Center

    Contributors List

    SrNo Name Faculty or Student Department Institute Email id
    1 Dr. Ajith Madhavan Faculty Amrita School of Biotechnology Amrita Vishwa Vidyapeetham ajithm@am.amrita.edu
    2 Dr. Asha Vijayan Faculty Amrita School of Biotechnology Amrita Vishwa Vidyapeetham ashavijayan@am.amrita.edu
    3 Bhavya O Software Engineer Amrita Virtual Labs Amrita Vishwa Vidyapeetham bhavyao@am.amrita.edu
    4 Sreelekshmi S Research Associate Amrita Virtual Labs Amrita Vishwa Vidyapeetham sreelekshmis@am.amrita.edu
    5 Rakhi Radhamani Research Associate Amrita Virtual Labs Amrita Vishwa Vidyapeetham rakhir@am.amrita.edu
    6 Nijin Nizar Research Associate Amrita Virtual Labs Amrita Vishwa Vidyapeetham nijinn@am.amrita.edu
    7 Dhanush Kumar Development Engineer Amrita Virtual Labs Amrita Vishwa Vidyapeetham dhanushkumar@am.amrita.edu


    Visit original content creator repository
    https://github.com/virtual-labs/exp-microfluidic-mfc-au

  • apk_parse

    Visit original content creator repository
    https://github.com/ph4r05/apk_parse

  • 2024-30DayMapChallenge

    2024 #30DayMapChallenge

    https://30daymapchallenge.com/

    1. Points

    Dominance of Female Commuters in Urban Destinations Across Spain

    Dominance of Female Commuters in Urban Destinations Across Spain

    To recreate the plot, use the {spanishoddata} R package and the R/01-points.R script in this repository.

    See threads on LinkedIn, Mastodon, Bluesky, Twitter/X.

    2. Lines

    Gradual Recovery of Road Connectivity after the Passage of (storm) DANA in Spain

    In solidarity with the victims and their families.

    Affected road segments may be shorter. Check the exact kilometer intervals at https://www.dgt.es/.

    Credits to Virgilio Gómez-Rubio (@precariobecario) and Mireia Camacho (@mireiacamacho75) for pointing me to the data and capturing the affected roads as of October 31.

    Gradual Recovery of Road Connectivity after the Passage of DANA (storm) in Spain

    To recreate the plot, use the R/02-lines.R script in this repository.

    See threads on LinkedIn, Mastodon, Bluesky, Twitter/X.

    3. Polygons

    Up to 2% of typical daily mobility in Spain was affected by (storm) DANA

    The map shows the affected municipalities in Spain and emphasizes the most affected areas by exaggerating the size of the polygons by the number of trips.

    In solidarity with the victims and their families.

    Based on road incidents data by https://www.dgt.es/ and open mobility data by https://www.transportes.gob.es/.

    Up to 2% of typical daily mobility in Spain was affected by (storm) DANA

    See threads on LinkedIn, Mastodon, Bluesky, Twitter/X.

    4. Hexagons

    skipped for now

    5. A Journey

    All journeys in Spain in one day.

    05-journey.mp4

    See threads on LinkedIn, Mastodon, Bluesky, Twitter/X.

    9. AI Only

    ChatGPT/DALL-E was given a map of Spain (to memorise the locations of cities) and asked to generate a new map with human mobility flows.

    AI Only

    See threads on LinkedIn, Mastodon, Bluesky, Twitter/X.

    10. Pen and Paper

    Hand drawn logo of {spanishoddata} R package. Get it here: https://github.com/rOpenSpain/spanishoddata/

    Hand drawn logo of {spanishoddata} R package

    See threads on LinkedIn, Mastodon, Bluesky, Twitter/X.

    12. Time and Space

    Impact of DANA on mobility in a neighbourhood in Valencia

    See threads on LinkedIn, Mastodon, Bluesky, Twitter/X.

    13. A new tool

    13-a-new-tool.mp4

    See threads on LinkedIn, Mastodon, Bluesky, Twitter/X.

    14. A world map

    A map of tiger mosquitoes based on Mosquito Alert data.

    A world map

    See threads on LinkedIn, Mastodon, Bluesky, Twitter/X.

    15. My data

    No map today. Only reminding people about the changes in Google Location History (Timeline) changes regarding the data storage.

    See threads on LinkedIn, Mastodon, Bluesky, Twitter/X.

    16. Choropleth

    Impact of DANA on displacement from the usual residence in Spain. Comparing the business as usual (Oct 2023) with the latest open mobility data (2024-10-31) from Ministerio de Transportes y Movilidad Sostenible and Nommon

    Choropleth

    See threads on LinkedIn, Mastodon, Bluesky, Twitter/X.

    Visit original content creator repository https://github.com/e-kotov/2024-30DayMapChallenge
  • pic18f56q71-cnano-adccc-context-switching-mplab-mcc

    MCHP

    Analog-to-Digital Converter with Computation (ADCC) and Context Switching — Context Switching Using PIC18F56Q71 Microcontroller with MCC Melody

    This code example demonstrates how to perform two Analog-to-Digital Converter with Computation (ADCC) and Context Switching conversions from two input channels that have different peripheral configurations by using the Context Switching feature. The ADCC with Context Switching supports up to four configuration contexts and offers the option of switching between these contexts at runtime. By using this feature, a single ADCC with Context Switching peripheral is used to capture data from multiple analog input channels, each one of them having its own configuration. The conversion results are processed and displayed on a terminal software by using serial communication via an UART peripheral.

    Related Documentation

    More details and code examples on the PIC18F56Q71 can be found at the following links:

    Software Used

    Hardware Used

    • The PIC18F56Q71 Curiosity Nano Development board is used as a test platform:

    • Curiosity Nano Adapter:

    • POT 3 CLICK Board:


    Operation

    To program the Curiosity Nano board with this MPLAB® X project, follow the steps provided in the How to Program the Curiosity Nano Board chapter.

    Setup

    The following configurations must be made for this project:

    • The system clock is configured at 64 MHz – ADCRC Oscillator enabled
    • ADCC with Context Switching:
      • Input Configuration: Single-Ended mode
      • Result Format: Right justified
      • VDD: 3.3 V
      • Clock Selection: ADCRC
      • Enable Context 1:
        • Positive Channel Selection: ANA1
        • Positive Voltage Reference: VDD
        • Operating Mode Selection: Average mode
        • Error Calculation Mode: First derivative of single measurement
      • Enable Context 2:
        • Positive Channel Selection: ANA2
        • Positive Voltage Reference: VDD
        • Operating Mode Selection: Basic mode
        • Error Calculation Mode: First derivative of single measurement
    • UART2:
      • 115200 baud rate
      • 8 data bits
      • No parity bit
      • 1 Stop bit
    • UART2PLIB:
      • Redirect STDIO to UART: enabled
      • Enable Receive: enabled
      • Enable Transmit: enabled
    Pin Configuration
    RA1 Analog input
    RA2 Analog input
    RB4 Digital output
    RB5 Digital input

    Back to Top


    Demo

    In this example, the ADC reads data from the two potentiometers using context switching and displays the result on the serial terminal.



    Back to Top

    Summary

    This example shows how to configure the ADCC with Context Switching using the MPLAB® Code Configurator. Also, it demonstrates the use of context switching for acquiring data from multiple analog inputs.

    Back to Top

    How to Program the Curiosity Nano Board

    This chapter demonstrates how to use the MPLAB® X IDE to program an PIC® device with an Example_Project.X. This can be applied to any other project.

    1. Connect the board to the PC.

    2. Open the Example_Project.X project in MPLAB® X IDE.

    3. Set the Example_Project.X project as main project.
      Right click the project in the Projects tab and click Set as Main Project.

    4. Clean and build the Example_Project.X project.
      Right click the Example_Project.X project and select Clean and Build.

    5. Select PICxxxxx Curiosity Nano in the Connected Hardware Tool section of the project settings:
      Right click the project and click Properties.
      Click the arrow under the Connected Hardware Tool.
      Select PICxxxxx Curiosity Nano (click the SN), click Apply and then click OK.

    6. Program the project to the board.
      Right click the project and click Make and Program Device.


    Visit original content creator repository https://github.com/microchip-pic-avr-examples/pic18f56q71-cnano-adccc-context-switching-mplab-mcc
  • js-music-player

    Разработка музыкального плеера

    Разработка страницы музыкального плеера с возможностью поиска/выбора альбома для воспроизведения.
    Адаптивная верстка для устройств с шириной экрана от 320px.

    Проект работает в паре с api, который предоставляет данные об имеющихся альбомах и аудиофайлы.

    API проекта

    Проект api реализован посредством библиотеки expressjs, с простой маршрутизацией. Данные, предоставляемые api, хранятся в директории data: файл albumsData.json с описанием модели данных и директория music со вложенными директориями для альбомов. Каждая директория альбома должна хранить треки в формате mp3 и файл изображения для обложки cover.jpg.

    В общем виде модель данных представлена массивом, содержащим объектные представления информации об альбомах:

    [
        {
            "id": "some unique album id",
            "title": "album title",
            "artist": "artist name",
            "genre": "genre description",
            "tracklist": [
                {
                    "id": "some unique track id",
                    "title": "track title",
                    "duration": 123,
                    "waveformData": [12, 45, 100]
                }
            ]
        }
    ]

    Для простоты поиска и маршрутизации принято соглашение: наименование директории с файлами альбома совпадает с id альбома, а наименования аудиофайлов (не включая расширение .mp3) – с id треков. Длительность указывается в секундах. Массив waveformData содержит информацию, необходимую для уникальной визуализации прогресс-бара плеера и не является обязательным. Данную информацию можно получить, вытянув из аудиофайла набор значений амплитуд (например, с помощью этого приложения), отфильтровав и нормализовав его (в данном случае визуализация заточена под использование наборов из 100 усредненных значений в диапазоне 3 – 100).

    Клиентская часть проекта

    При запуске приложения через api запрашивается информация об имеющихся на сервере альбомах. После получения описаний и изображений, происходит рендеринг альбомов с предварительной сортировкой по указанным в описаниях жанрам.

    При клике на альбом открывается панель проигрывателя. Выбор трека для проигрывания выполняется кликом по нему в списке. Постановка на паузу производится повторным кликом на трек.

    Визуализация прогресса воспроизведения реализована с использованием элемента canvas. При наличии в модели данных трека массива waveformData визуализация происходит с использованием этих данных. Прогресс-бар является интерактивным, позволяет по клику выполнять навигацию по треку. Также осуществляется отрисовка различными цветами буфферизованной части трека, воспроизведенной части трека, на устройствах без тач-дисплея также отображается hover-эффект. Реализовано адаптивное изменение ширины canvas при изменении размеров окна.

    При окончании трека выполняется переход наследующий трек в альбоме. При окончании воспроизведения последнего трека альбома воспроизведение останавливается.

    В шапке страницы есть поле ввода для фильтрации имеющихся альбомов. Фильтрация осуществляется по назнанию и исполнителю и производится непосредственно после ввода текста (без подтверждения), debounce составляет 700мс. При наличии в поле ввода текста вместо иконки поиска отображается кнопка очистки поля.

    Уведомления об ошибках со стороны api реализованы в виде высплывающих сообщений (скрываются автоматически через 5 сек. или по клику на них).

    Реализовано упрощенное управление с клавиатуры: переход по альбомам возможен табуляцией, выбор альбома производится нажатием Enter или Spacebar. После выбора альбома появляющаяся панель плеера автоматически получает фокус. Навигация по плееру также осуществляется табуляцией, выбранный трек воспроизводится/останавливается нажатием Enter или Spacebar. Когда фокус находится внутри компонента плеера, дополнительно обрабатываются нажатия:

    • ArrowRight и ArrowLeft выполняют перемотку трека на +/- 10 сек.
    • Escape скрывает панель плеера

    Сборка проекта

    1. git clone https://github.com/Dimeliora/js-music-player
    2. cd js-music-player/client
    3. npm install
    4. cd ../api
    5. npm install

    Для сборки клиентской части проекта используется планировщик задач Gulp.
    Скрипты для сборки:

    • serve – сборка в development-режиме и запуск dev-server
    • build – сборка в development-режиме
    • prod – сборка в production-режиме

    В режиме production осуществляется минификация HTML, CSS и JS кода без записи source-map, создание и подключение favicon.

    ВНИМАНИЕ

    Для работы скрипта генерации favicon необходимо наличие файла favicon.png в директории src/favicon, там же расположен файл favicon-design.json для описания правил отображения иконок на разных устройствах.

    Запуск проекта api производится из директории api:

    npm start

    Visit original content creator repository
    https://github.com/Dimeliora/js-music-player