Join Codeheat Contest 2021/22 in Memory of Areeb Jamal

Join the Codeheat Coding Contest 2021/22 in memory of Areeb Jamal and become a codehero. The contest runs until May 2022.

Contributors in the community know Areeb since he started as a FOSSASIA intern. Areeb had become the chief technologist in the organization where he has mentored hundreds of young developers in coding programs. Areeb passed away during the pandemic in India because of a lack of oxygen. He was a wonderful person. All he wanted was to share his knowledge and support others. He will be forever in our hearts and we will always remember him as a genius, kind and generous person. Please watch this video here to learn more about Areeb’s life.

During the contest mentors support contributors on gitter channels and in our monthly “Ask Me Anything” events you can talk to team members.

Codeheat Contest Details

In the contest we will announce winners every two months. All participants with a minimum of five merged PRs in the entire contest time can receive a digital certifcate of participation. Winners will also receive a prize of appreciation.

All issues with the label “codeheat” in any project of FOSSASIA can be taken up in the contest. There are many participating projects, but we have two lead projects. The Open Event Project and the Pocket Science Lab are our focus.

Codeheat Focus Projects

1. The first focus project this year is the Open Event project running the eventyay website. It enables users to run onsite and virtual events entirely with Open Source. Technologies used are Python and Javascript. Please check out the frontend and backend repositories.

2. The second focus project is the Pocket Science Lab project that is now coming with support for Circuitpython and a new hardware version. We are looking for developers who are interested in contributing to the desktop app using web technologies and Electron as well as Android and firmware developers.

Upcoming Codeheat Events

Codeheat “Ask Me Anything” on Wednesday, 24 November, 2021 8:00 PM (IST)

Codeheat “Ask Me Anything” on Wednesday 15 December 2021 8:00 PM (IST)

Codeheat “Ask Me Anything” on Wednesday 19 January 2022 8:00 PM (IST)

Codeheat “Ask Me Anything” on Wednesday 16 February 2022 8:00 PM (IST)

Codeheat “Ask Me Anything” on Wednesday 16 March 2022 8:00 PM (IST)

Codeheat “Ask Me Anything” on Wednesday 20 April 2022 8:00 PM (IST)

Codeheat “Ask Me Anything” on Wednesday 18 May 2022 8:00 PM (IST)

Links

Website: codeheat.org

Codeheat Twitter: twitter.com/codeheat_

FOSSASIA Twitter: twitter.com/fossasia

Codeheat Facebook: facebook.com/codeheat.org

Continue ReadingJoin Codeheat Contest 2021/22 in Memory of Areeb Jamal

FOSSASIA Summit 2021 covering Blockchain, Open Hardware, CAD, Design, Electronics and Music, Learn How to Solder on Day 3

It is been a great second day at the FOSSASIA Summit with a focus on open hardware and open science. Thank you very much to all speakers and participants. You find the video of the live stream of day 2 here.

The virtual summit will continue today on Monday 15th March from 13:00 to 23:00 (SGT). We start after lunch with:

  • A panel of industry experts on “How open source has helped proliferate blockchain”
  • Followed by a keynote about “The State of Hyperledger and Enterprise Blockchain” by Brian Behlendorf, General Manager for Blockchain, Healthcare, and Identity initiatives at the Linux Foundation.

Apart from Blockchain, topics of the third day include open hardware, the LambdaChip, and FreeCAD, Linux desktop apps and building an Open Source webcam.

We will have a session about “Physical Interfaces for Live Coding Music”, and in an online workshop of Mitch Altman we will be practicing soldering with the ArduTouch music synthesizer kit and make music, sound, and noise.

In the Lifelong Learning Institute we are running onsite workshops about Python, Git and data science. You can participate remotely in the dedicated virtual video room.

How can you access the video rooms? Please login to the eventyay summit page and click on the right-side “Join Live Event” button. On the left a side-panel opens. You will see the different video channels of the event listed here as well as the event chat that is open for participants around the clock.

Please also visit our online exhibition where you find information from community partners from across Asia and our sponsors Microsoft, Oracle, MySQL, OpenTAP Keysight, Linux Professional Institute, Elasticsearch, OpnTec, Cloud Native Computing Foundation, and many others. We have prepared a video guide to get you started.

FOSSASIA Summit Sessions on Monday, 15 March

Below are the sessions taking place on Monday, March 15 all listed in Singapore timezone (SGT). You can access the online schedule of the day here.

13:00 How open source has helped proliferate blockchain, Gaurang Torvekar, Brian Behlendorf, Eddy Travia, Anson Zeall (Panel 55min)

13:00 Introduction to Python, Ng Jia Xiang; Evangeline Ho Xin Ying; Eric Wang  (Workshop 2h)

14:00 Keynote: The State of Hyperledger and Enterprise Blockchain, Brian Behlendorf (Talk 40min)

16:00 Introduction to Git/ Github, Lam Jun Rong  (Workshop 2h)

16:00 Diem (prev Libra): Open Source Financial Network, Thorsten Neumann (Talk 25min)

16:45 My experience of developing Linux desktop app for scanning QR code, Nguyen Hong Quan (Talk 15min)

17:00 FreeCAD on Steroids, Zheng Lei (郑雷) (Talk 25min)

17:30 Physical/Tangible Interfaces for Live Coding Music, Daniel Wessolek (Talk 25min)

18:00 LambdaChip – A Gate Between Functional Programming and Embedded Devices, Rafael Lee (Talk 25min)

18:30 Building an open-source webcam with a Raspberry Pi for Work, Play, and Education, Huan Truong (Talk 25min)

19:00 Introduction to Data Science, Javier Lim (Workshop 2h)

19:00 Raspberry Pi latest Updates, use cases/trial and more, Masafumi Ohta (Talk 40min)

20:00 Learn to Solder with ArduTouch music synthesizer kit and make music, sound, and noise! Mitch Altman (Workshop 3h)

Continue ReadingFOSSASIA Summit 2021 covering Blockchain, Open Hardware, CAD, Design, Electronics and Music, Learn How to Solder on Day 3

FOSSASIA Summit 2021 with Sessions on Open Hardware, Open Science, Lightning Talks, and Python Web Development on Day 2

The virtual summit continues on Sunday 14th March from 10:30 to 23:00 (SGT). It starts in the morning with an introductory workshop about the Robot Operating System by Marco A. Gutierrez.

Each day has a different focus. The main topics of the second day are open hardware, open science, lightning talks, Python and web development.

Highlights of the day are:

  • At 2:00 PM the panel “What’s Next in Open Source Firmware and Open Hardware” with Ron Minnich (Coreboot), Bunnie Huang (Founder Precursor), Jean-Marie Verdun (HPE), Daniel Maslowski (Hardware Hacker), and Mario Behling (CEO OpnTec).
  • Followed by the keynote: Precursor – Trustable Open Hardware For Everyday Use by Bunnie Huang
  • At 3:00 PM Going Open (Source) in Test & Measurement with OpenTAP, by Brennen DiRenzo and Jeff Dralla from Keysight Technologies.
  • And at 3:30 PM a talk on open ecosystem empowerment by Eric Pan (CEO Seeed Studio).
  • In the afternoon you will have the chance to learn more about the Pocket Science Lab with Padmal M, Alexander Bessman, and Alessandro Volpato.

At 12:00 PM we will also have an online exhibition tour with interviews of exhibitors. Please visit the virtual exhibition and meet our sponsors Microsoft, Oracle, MySQL, OpenTAP Keysight, Linux Professional Institute, Elasticsearch, OpnTec, Cloud Native Computing Foundation, and many others. We have prepared a video guide to get you started.

FOSSASIA Summit Sessions on Sunday, 14 March

Below are the sessions taking place on Sunday, March 14 all listed in Singapore timezone (SGT). You can access the online schedule of the day here.

10:30 Introduction to ROS and Gazebo, Marco A. Gutierrez  (Workshop 90min)

12:00 Connect to Exhibitors, Mario Behling; FOSSASIA Team Connect!

13:00 What’s Next in Open Source Firmware and Open Hardware, Ron Minnich, Bunnie Huang, Jean-Marie Verdun, Daniel Maslowski, Mario Behling (Panel 55min)

14:00 Keynote: Precursor – Trustable Open Hardware For Everyday Use, Bunnie Huang (Talk 40min)

15:00 Going Open (Source) in Test & Measurement: the Future of T&M Automation with OpenTAP, Brennen DiRenzo, Jeff Dralla (Talk 25min)

15:30 How Open Ecosystem Empowers Developers to Digitalize Industries, Eric Pan, CEO Seeed Studio (Talk 40min)

16:15 Open Next: Changing the future of product creation, Robert Mies (Talk 15min)

16:30 Tutorial: Creating a T&M Solution built on OpenTAPKaushik Santhanam; Darwin Subramaniam; Alex Kostin; Ashton Reed Humphrey; Ivan Diep (Tutorial 55min)

17:30 The INSPIRE Ventilator – Open Hardware Challenges and Opportunities during the Covid-19 Pandemic, Ulrich Norbisrath, Marcelo Knörich Zuffo, Laisa Caroline Costa De Biase (Talk 25min)

18:00 The Role of PSLab in Designing Open Source Scientific Equipment, Alessandro Volpato (Talk 25min)

18:30 pslab-python 2.0 Showcase, Alexander Bessman (Talk 40min)

19:00 Pocket Science Lab: What’s Next, M Padmal (Talk 40min)

19:45 Growth from the Open Source Community Africa, Samson Goddy (Talk 15min)

20:00 Lightning Talks

21:00 Web Development with Python, Flask and Javascript: Getting started with Open Event (eventyay) Areeb Jamal, (Workshop 2h)

Continue ReadingFOSSASIA Summit 2021 with Sessions on Open Hardware, Open Science, Lightning Talks, and Python Web Development on Day 2

FOSSASIA Summit 2021 with the topics Robotics, Open Hardware, Pocket Science Lab, Python and Web development, Digital Sovereignty on Day 1

The FOSSASIA Virtual Summit 2021 starts on Saturday 13th March at 2:00PM (SGT) with an opening keynote by Hong Phuc Dang and Mario Behling.

We are very happy you are joining the event! Each day has a different focus. The main topics of the first day are robotics, open hardware, Pocket Science Lab, Python, web development, and digital sovereignty.

How can you access the video rooms? Please login to the eventyay summit page and click on the right-side “Join Live Event” button. On the left a side-panel opens. You will see the different video channels of the event listed here as well as the event chat room that is open for participants already.

  • We have a final list of 190 speakers and panelists from 42 countries and 6 continents confirmed.
  • You can now use lots of new interactive features on our open source event solution and integrations with Jitsi, BigBlueButton, and Rocket Chat.
  • 180+ sessions, talks, panels and workshops are taking place at the event.

Please also visit the virtual exhibition and the exhibitor’s video rooms. Here you can meet our sponsors including Microsoft, Oracle, MySQL, OpenTAP Keysight, Linux Professional Institute, Elasticsearch, OpnTec, Cloud Native Computing Foundation, FreeBSD Foundation, UI-licious, Lifelong Learning Institute Singapore, the UNESCO and many community projects, makerspaces, and university IT groups. We have prepared a video guide to get you started.

FOSSASIA Summit Sessions on Saturday, 13 March

Below are the sessions taking place on Saturday, 13th March all listed in Singapore timezone (SGT). You can access the online schedule of the day here.

14:00  Opening Keynote, Hong Phuc Dang, Mario Behling (Talk 25 min)

15:00  Software in the Public Interest: Building blocks of SecureDrop project, Kushal Das  (Talk 25 min)

15:30  Open Source at Open Robotics: ROS, Gazebo and more, Marco A. Gutierrez (Talk 25 min)

16:00  Next gen robotics simulation with Ignition Gazebo, Luca Della Vedova (Talk 25 min)

16:30  Low-cost autonomous mobile robot powered by ROS 2 and Navigation 2, Yadunund Vijay (Talk 25 min)

17:00  Free Fleet: An Open Source Robot Fleet Management System, Aaron Chong (Talk 25 min)

17:30  Robotic Platform for exploring and evaluating search and reinforcement learning algorithms, Kelvin Tan (Talk 15 min)

17:45  Introduction to Emulation Development, Sreeram Venkitesh (Talk 15 min)

18:00  Choosing the right programming language for GUI implementation for Linux Embedded, Fábio Sobral (Talk 25 min)

18:30  LikeToHear – Self-Adjustment of Open Source Mobile Hearing Aid Prototype, Peggy Sylopp (Talk 25 min)

19:00  Bringing Collabora Online to your web app, Michael Meeks (Talk 25 min)

19:30  An I2P-based, fully distributed Bank and Exchange, Konrad Baechler (Talk 25 min)

20:00  Simple DataViz with PSLab: Universal Pocket Knife Workshop, Daniel Wessolek, Sara Reichert (Workshop 3h)

21:00  Web Development with Python, Flask and Javascript: Getting started with Open Event (eventyay), Areeb Jamal (Workshop 2h)

Continue ReadingFOSSASIA Summit 2021 with the topics Robotics, Open Hardware, Pocket Science Lab, Python and Web development, Digital Sovereignty on Day 1

FOSSASIA Virtual Summit 2021 Schedule and Highlights

We are very happy to share with you the schedule of the FOSSASIA Virtual Summit 2021!

  • 190+ speakers from 42 countries and 6 continents are joining us.
  • We are covering a diverse range of topics at the event such as Quantum computing, machine learning, open robotics, CAD and hardware development, search, databases, Covid-19 and open health, Blockchain, digital privacy, microservices, cloud, Kubernetes, kernel development, licensing and many more.
  • More than 180 sessions, talks, panels and workshops are taking place online. 
  • Plus, trainers conduct 28 hours of hands-on onsite sessions at the Lifelong Learning Institute in Singapore.

Get your free ticket here!

The summit will spread out over the week of March 13-21 and will run on our open source virtual event platform eventyay.

In the virtual exhibition you can meet our sponsors and partners like Microsoft, Oracle, MySQL, OpenTAP Keysight, Linux Professional Institute, Elasticsearch, OpnTec, Cloud Native Computing Foundation, FreeBSD, UI-licious, Lifelong Learning Institute Singapore and the UNESCO.

And you can get together with developers and contributors from Free and Open Source projects, makerspaces, developer clubs and university IT groups. At summit hubs across Asia we are connecting to participants online and locally.

FOSSASIA Summit Highlights

  • 5 keynotes from Hong Phuc Dang (Founder, FOSSASIA) and Mario Behling (Co-Founder FOSSASIA, CEO OpnTec), Frank Karlitschek (CEO, Nextcloud), Greg Kroah-Hartman (Linux Kernel Maintainer), Brian Behlendorf (Executive Director, Hyperledger) and Bunnie Huang (CEO, Precursor)
  • 150+ sessions covering tech areas of Quantum computing, PyTorch, Scikit-learn, pocket science, open robotics, FreeCAD, hardware development, search, databases, Debian packaging, Covid-19, Hyperledger, Open Source event solutions, digital privacy, microservices, cloud, Kubernetes, and Linux Kernel development.
  • 30+ hands-on workshops focusing on getting started with Python, creating MySQL shell utilities and custom plugins, setting up PostgreSQL databases, creating test automation, machine learning, and science measurements.
  • Panel discussions about Open Source licensing vs. available source licenses, firmware development, digital sovereignty, Blockchain and diversity in tech.
  • Virtual exhibition with video rooms and exhibitor tours where participants can connect with companies and active tech communities from across Asia.

FOSSASIA Summit Exhibition and Hubs

Apart from company partners you can meet communities, students and developers from Asia and around the world in our virtual exhibition. Groups include OpenFIESTA Tsinghua University, Shenzhen DIY Community, Open Source Hong Kong, OpenStack Indonesia, Mozilla Philippines, Ubuntu Korea, FOSS Myanmar, KDE, BuildingBloCS Singapore, SUTD, Python Software Foundation, LibreOffice, KiwiTCMS, Nextcloud Sourcefabric, LambdaChip, and more.

Hubs bring attendees together locally or online. Participating hubs include the International Organisation of Software Developers, Open Source Club at Saintgits Engineering College Kerala, Biohacking Space Peshawar Pakistan, Society for Data Science at BIT Mesra India, Mar Athanasius College of Engineering India, Developer Student Community in BHILAI Institute of Technology Durg and Team Aveon Racing of BIT Mesra India.

FOSSASIA Summit Daily Focus Topics

Each day has different focus topics and tracks.

Sat, 13 Mar: Robotics, Open Hardware, Pocket Science Lab, Python/Web development, Digital Sovereignty

Sun, 14 Mar: Open Hardware, open science, lightning talks, Python/Web development

Mon, 15 Mar: Blockchain, hardware, design, learn how to solder

Tue, 16 Mar: DevOps, cloud, containers, Kernel & Platform, Quantum computers, Kubernetes

Wed, 17 Mar: Databases, MySQL, PostgreSQL, Monitoring

Thu, 18 Mar: Security, Privacy,  Digital Sovereignty, IoT, cloud, Blockchain, Open Source voice assistants

Fri, 19 Mar: Artificial Intelligence, PyTorch, Visdom, search, scikit, NLP

Sat, 20 Mar: DevOps, Python bot programming, Container Regisitries, OSS Licenses vs. available source, FOSS Community in Asia, OpenStreetMap, Python/Web development

Sun, 21 Mar: Lightning talks, Open Health, Covid-19 apps around the world, Fdroid, platform, smart devices

Continue ReadingFOSSASIA Virtual Summit 2021 Schedule and Highlights

FOSSASIA Summit 2021 Call for Speakers and Projects

The FOSSASIA Summit 2021 will take place ONLINE this year. The event will spread out over the week of March 13 – 21 and will run on our own open source virtual event platform ‘eventyay’. 

Speakers interested to submit a talk, panel or workshop please propose your session before 4th February (soft deadline). We want to learn from you how to solve the challenges of our time with Open Technologies! 

At the event we are connecting local hubs, makerspaces, clubs and university IT groups across Asia. Please fill in this form to become a community hub partner and get listed on the event site.


Topics

The current situation around the world shows us that open global collaboration is the way to solve our problems. Now we would like you to share your hands-on examples at the event of topics such as how to:

  • Take on the fight against COVID-19 with open health technologies
  • Solve everyday problems with AI
  • Tackle climate change with an open source approach
  • Create open hardware solutions for science and Biohacking
  • Run DevOps in a distributed team in home office
  • Implement continuous delivery and sovereign cloud stacks with diverse tools
  • Establish a friendly, welcoming and collaborative project culture
  • Ensure digital sovereignty and independent data governance
  • Get privacy and security right
  • Customize Linux for lightweight hardware and special use cases
  • And what are best practices for open access education

.. and many more topics about Databases, Web and Mobile Technologies, Robotics, Blockchain, Design and Compliance. Please find the complete list of tracks on the event site and submit your proposal.

Important Dates

  • CfS soft deadline: 4 February 2021 (submissions receive priority)
  • Late submission cut off date: 11 February 2021
  • Event dates: 13 – 21 March 2021
  • Notification of acceptance: On an ongoing basis

Sessions and Slots

Talks

Talk slots are 15 minutes, 25 minutes or 40 minutes long these include time for questions and answers. We recommend to reserve at least a third of the time for questions. Shorter sessions are preferred to avoid online fatigue of the audience.

Panels

Panels are sessions with at least two panelists who discuss a topic and provide insights. Available slots are 55 minutes.

Workshops

Workshop options are 90 minutes, 2 hours or 3 hours. We are looking for interactive workshops where participants can actively engage in.

Lightning talks

You have some interesting ideas but do not want to submit a full talk? We suggest you go for a lightning talk which is a 5 minutes slot to present your idea or project.

Virtual exhibition

We offer virtual exhibition rooms for companies, projects, online installations, team gatherings and other fun activities. We are curious to know what you would like to show. Please add details in the submission form.

To Know

  • This year summit will take place online.
  • Speakers will conduct their sessions live to provide an interactive environment
  • Speakers can deliver sessions in English or a language of their choice.
  • Q&As and interaction among participants are highly encouraged.
  • Submissions for hands-on workshops and panel discussions are preferable as they provide more interactive opportunities.

Publication

Audio and video recordings of the lectures will be published in various formats under the Creative Commons Attribution 4.0 International (CC BY 4.0) license. This license allows commercial use by media institutions as part of their reporting. If you do not wish for material from your lecture to be published or streamed, please let us know in your submission.

Links

FOSSASIA Summit: summit.fossasia.org

FOSSASIA Videos: Youtube FOSSASIA

FOSSASIA on Twitter: twitter.com/fossasia

Continue ReadingFOSSASIA Summit 2021 Call for Speakers and Projects

Internships for Python / EmberJS Developers for eventyay.com

As a FOSSASIA intern working on eventyay.com, you’ll collaborate together with our team to develop the Open Event project that runs the eventyay website. We use Flask as a backend and  Ember.js as a frontend technology. The team follows our best practices and uses scrum emails for the daily standup and Gitter for chat communication.

Before you apply please set up the Open Event project first on a Linux system and make some pull requests to show your ability of contributing code to the backend and frontend.

About the team

  • We are a team working with a community of FOSS developers
  • We work remotely in different timezones
  • Our system is built using Ember (frontend) and Flask/Python (backend)
  • We have an informal and collaborative environment
  • We embrace Continuous Integration

Responsibilities

  • Provide daily code commits
  • Write unit tests for all portions of our application
  • Support community developers and review PRs
  • Work according to FOSSASIA Best Practices
  • Provide daily scrums and communicate on chat

Requirements

  • Willingness working independently in a remote setting
  • Understanding and ability to code in HTML, CSS, and Javascript
  • Understanding of Flask/Python
  • Eagerness to learn and code Ember.js
  • Enjoy writing tested and modular code
  • Self-motivated and independent

Code

Please check out the project on GitHub before applying.
Open Event Server: https://github.com/fossasia/open-event-server
Open Event Frontend: https://github.com/fossasia/open-event-frontend/

Salary

Attractive Salary – Negotiable 

Other Benefits

  • Visit Singapore and participate in annual FOSSASIA Summit
  • Participate in Open Source meetups and conferences
  • Work with a community of enthusiastic software developers

Location

Remote India

Contact

Please apply through our form here.

Links

FOSSASIA Best Practices: https://blog.fossasia.org/open-source-developer-guide-and-best-practices-at-fossasia/

Continue ReadingInternships for Python / EmberJS Developers for eventyay.com

How to ask questions to solve a setup or development problem as a Newcomer in Open Source

We see a lot of new users coming up and asking questions, which is great. But a lot of people ask “Can I ask a question?” which leads to an unnecessary indirection that “Yes, you can”. Or they say “Can anyone help me?”, “I’m having a problem” without mentioning their problem or even if they mention the problem “I cannot setup the project. It throws an error”, then they don’t mention the error. This leads to a loop of repeated question answers.

  • Please ask the question in the message itself
  • Mention what is the problem
  • Mention what you tried
  • Mention what failed
  • Mention the error with the exact error message/screenshot of the failure

To save both your and maintainer’s time in solving your issue.
Please read this: https://jvns.ca/blog/good-questions/

Also, respect time zones, people’s personal space, and time and realize that most people help others voluntarily. They are in different timezone than you and may take hours before replying. Use public channels so that even others may answer your questions, don’t spam and be patient, they may reply in their own time when they feel comfortable.

And also answer other’s questions if you know the solution.

“Now that you’ve read all the issues and pull requests, start to watch for questions that you can answer. It won’t take too long before you notice that someone is asking a question that’s been answered before, or that’s answered in the docs that you just read. Answer the questions you know how to answer.”

Andre Arko.net

Please join us to ask your question or answer a question of contributor on our channel at https://gitter.im/fossasia/fossasia

Continue ReadingHow to ask questions to solve a setup or development problem as a Newcomer in Open Source

FOSSASIA Summit 2020 Takes Places as Online and Offline Event

Due to the Corona crisis it is clear that events like the FOSSASIA Summit cannot be run in the usual way with large crowds. Therefore this year the FOSSASIA Summit will only be possible as a smaller gathering with social distancing in Singapore and online interactions from Thursday, March 19 – Saturday, March 21. 

Even with travel restrictions in place a number of speakers are in Singapore and expressed their wish sharing their knowledge and the FOSSASIA team is working hard to facilitate this in a safe space offline and online. Due to ongoing changes we will conduct the event with both unscheduled and scheduled sessions. The program will be updated continuously here.

The Lifelong Learning Institute, our host and co-organizer, adjusted the venue to ensure the safety and health of all. To participate on-premise you need to pass a screening test and follow directions for hygiene measures. The sign up is here

Singapore has an outstanding record seen internationally as a gold standard when it comes to cleanliness, hygiene and health. Additional measures in the LLI include providing entrance screening tests, social distancing, using open spaces, reducing the use of mics and mic disinfection, avoiding close group photos. Please find a list of measures here.

The events of our time show more than ever that we need to collaborate to solve the world’s problems such as climate change, global health issues, poverty and economic challenges. The FOSS/Open Source community has proven that we are able to overcome differences and work together across countries and cultures. It is important that we stay connected and continue our work be it offline or online. To connect virtually during the FOSSASIA Summit you can join us on these channels:

We will share more details about sessions in the upcoming days. Furthermore, we are planning additional online events at a later time this year. Let’s continue and build a better world through learning and sharing where-ever and however we can!

We would like to thank everyone who supported us throughout these challenges around the event – our speakers, friends, supporters, and partners like Google, Facebook, Arm, and Elastic.

We hope to stay connected. All the best and stay healthy!

FOSSASIA Presentations
FOSSASIA Videographers
Continue ReadingFOSSASIA Summit 2020 Takes Places as Online and Offline Event

How to implement JSONP to download XML resource

According to the same-origin security policy, web page can freely share images, stylesheets, scripts… but web fonts and AJAX requests are only accessible from the same domain.

Sometimes this is not desired behaviour, such as when getting a json / xml file from a different domain, using AJAX. In such cases, it all comes down to two solutions :

1- The source sets its header to allow specific domain cross-origin resource sharing (CORS). In PHP, this is done with header function :

<?php
header('Access-Control-Allow-Origin: *');

2- Use JSONP.

JSONP is short for JSON padding, a well-known “workaround” to solve CORS. It only works with GET.

To send AJAX requests using JSONP, the server must first knows how to respond to JSONP requests. It usually detects JSONP requests using callback parameter.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
// compute result
[...]

// output result
JsonpHelper::outputXML($result);

// json helper class - credits : @andibraeu
class JsonpHelper {
	private static function is_valid_callback($subject)
	{
	    $identifier_syntax
	      = '/^[$_\p{L}][$_\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*+$/u';
	    $reserved_words = array('break', 'do', 'instanceof', 'typeof', 'case',
	      'else', 'new', 'var', 'catch', 'finally', 'return', 'void', 'continue', 
	      'for', 'switch', 'while', 'debugger', 'function', 'this', 'with', 
	      'default', 'if', 'throw', 'delete', 'in', 'try', 'class', 'enum', 
	      'extends', 'super', 'const', 'export', 'import', 'implements', 'let', 
	      'private', 'public', 'yield', 'interface', 'package', 'protected', 
	      'static', 'null', 'true', 'false');
	    return preg_match($identifier_syntax, $subject)
	        && ! in_array(mb_strtolower($subject, 'UTF-8'), $reserved_words);
	}

	public static function outputXML($string) {
		# JSON if no callback
		if( ! isset($_GET['callback']) )
		    exit($string);
		$string = str_replace("\n", " ", str_replace("'", '"', $string));
		# JSONP if valid callback
		if(JsonpHelper::is_valid_callback($_GET['callback']))
		    exit("{$_GET['callback']}('$string')");
		# Otherwise, bad request
		header('status: 400 Bad Request', true, 400);
	}
}

Line 29 is dedicated to replace all single-quote characters to double-quote, and new lines to simple space. This is to be able to pass xml document as valid javasript string parameter.

Then, the client can use jQuery to get the document from a different domain (it works on same domain as well, which is convenient for testing & development) :

1
2
3
4
5
6
7
8
9
$.ajax({
	url : source_url,
	dataType : 'jsonp',  // if dataType is set to 'jsonp' 
			    // a 'callback' parameter will be appended to the request url
	success: function(data) {
		$data = $($.parseXML(data));
		items = $data.find('item');
	}
});

Something worth noticing on the client side is on line 5 : the data needs to be converted to xml first, with $.parseXMLbefore converting to jQuery object. Converting the result string directly to jQuery won’t work : $data = $(data);.

That’s about it ! To know more about JSONP, please refer to its wiki https://en.wikipedia.org/wiki/JSONP.

References :

Continue ReadingHow to implement JSONP to download XML resource