on: # run automatically every 24 hours schedule: -cron:"0 */24 * * *" # allows to manually run the job at any time workflow_dispatch: # run on every push on the master branch push: branches: -main
jobs: generate: runs-on:ubuntu-latest timeout-minutes:10 steps: # generates a snake game from a github user (<github_user_name>) contributions graph, output a svg animation at <svg_out_path> -name:generategithub-contribution-grid-snake.svg uses:Platane/snk/svg-only@v3 with: github_user_name:${{github.repository_owner}} outputs:| dist/github-contribution-grid-snake.svg dist/github-contribution-grid-snake-dark.svg?palette=github-dark env: GITHUB_TOKEN:${{secrets.GITHUB_TOKEN}} # push the content of <build_dir> to a branch # the content will be available at https://raw.githubusercontent.com/<github_user>/<repository>/<target_branch>/<file> , or as github page -name:pushgithub-contribution-grid-snake.svgtotheoutputbranch uses:crazy-max/ghaction-github-pages@v3.1.0 with: target_branch:output build_dir:dist env: GITHUB_TOKEN:${{secrets.GITHUB_TOKEN}}
classPerson { public: //Person(int a,int b,int c) //{ //m_A=a;m_B=b;m_C=c; //} Person(int a,int b,int c):m_A(a),m_B(b),m_C(c) { } int m_A; int m_B; int m_C; } void test { Person p; }
Person p3=p1.operator+(p2); 简化为 Person p3=p1+p2; classPerson { public: // Person operator+(Person &p) // { // Person temp; // temp.m_A=this->m_A+p.m_A; // temp.m_B=this->m_B+p.m_B; // return temp; // } //本质上的调用是 Person p3=p1.operator+(p2); int m_A; int m_B; };
Person operator+(Person &p1,Person &p2)//本质上调用是Person p3=operator+(p2,p1); { Person temp; temp.m_A=p1.m_A+p2.m_A; temp.m_B=p1.m_B+p2.m_B; return temp; }
#include<dirent.h> DIR * opendir(constchar * dirpath); Returns directory stream handlc,or NULL on error
readdir
readdir()函数从一个目录流中读取连续的条目.
1 2 3
#include<dirent.h> struct dirent *readdir(DIR * dirp); Returns pointer to a statically allocated structure describing next directory entry,or NULL on end-of-directory or error
KDE got accepted as a mentoring organization for Google Summer of Code 2024! Are you thinking about getting involved into KDE development? Check out the cool ideas KDE devs came up, they showcase what can be achieved by taking part as a student in GSoC. How to start? How to get involved? How to make an impression that will help your application?
Prerequisites
You like KDE, you like us as a community, you can follow our philosophy, you like our product (a desktop or at least an specific application), and you resonate with our tech stack (C++, Qt, CMake).
Grab some code from our GitLab, clone a repository and build it locally. This sounds easy. For first-timers it is not easy. Reach out for help in case you struggle.
Run your self-built software. Now you can explore the joy of developing KDE.
You do not need an idea, at least not yet. Give it some time.
Get involved
Try getting involved. Usually it is not easy to fix bugs of implement a feature request from KDE bugtracking system. Some are hard to fix. Others need debates of future directions or best ways to get things done.
I propose you start looking for other opportunities:
Fix compiler warnings. Compilers analyze the code and as a result they might warn you. This can have various reasons like bad coding practice, code that is difficult to read and might easily be misread by humans, code with bad performance, bug-prone constructs.
Fix deprecation warnings. KDE, Qt, and every software evolves. Old interfaces are replaced by newer ones. The old ones are not directly thrown away, but deprecated. The deprecation warning reminds the developer to migrate from the old to the new interface. Some deprecations are trivial to fix, others require ample code changes.
Fix findings of static analyzers and linters. These are tools that analyze code more thorough compared to a compiler for the price of a longer runtime. They offer great hints for but are prone to false-positives (wrong warnings). Good tools for KDE are Cppcheck, Clazy and qmllint.
Fix crash bugs. Crashes often occur when the code contains memory issues. Examples are using objects that were deleted, accessing arrays out of bounds, de-referencing null pointers. Tools like a good debugger, Valgrind, and AddressSanitizer (and its cousins MemorySanitizer and UndefinedBehaviorSanitizer) help to localize the problem. Crashes are more difficult to understand and fix compared to warnings for tools.
Try to work for fixes of one to ten cases. More makes reviewing harder. Create a pull request and wait for feedback.
Rationale
Why do I think these areas are good to start working? The maintainer might reject your pull request. This can always happen. Compared to implementing a whole new feature, the amount of work you invested is limited.
Once you have an idea for GSoC and write your application, you can point to your pull requests as proof of work. Maintainers see your involvement, they see how you interact, and you get an early sense whether you like the contributing experience or not.
Even in the case that you do not want to become an GSoC student, you improved KDE a tiny little bit. Great feeling, isn't it?
Word of warning
Not everybody deem warnings worth to be fixed -- in general or in specific cases. You will learn what kind of warnings getting fixed are welcome. I already wrote a blog post about my experiences with fixing some Cppcheck in Kile.
It’s February already, and as expected I didn’t have too much time on my hands this month. I have some exciting related news though:
KDE Megarelease 6
If you somehow haven’t heard, a bunch of KDE 6-related stuff released yesterday! I highly recommend looking at the very nice announcement Carl and the rest of the KDE Promo team put together, it looks so good. Some of my changes in KCMs, Kiten, UnifiedPush support in Tokodon & NeoChat, PlasmaTube, and Tokodon are showcased there 🤩 One of my favorite changes is probably in KWin and the Wayland session, it’s near-perfect on my machine now.
NLnet Grant
For a while now, people have been asking about funding work on important Wayland features for artists and people who depend on accessibility features. We have been turning down offers from individual fundraisers, because behind the scenes my employer arranged a grant us to work on this task from NLnet! “Us” here means me and Nicolas Fella. I hope to begin in early April.
Tokodon
[Feature]
I changed the thread visuals to improve the readability of replies. Note that it’s only one level deep, but even with that limitation I find it to be way better than it was before!
[24.05]
[Feature]
Tokodon now warns if replies may be hidden from your server and suggests to open the original post in your web browser. This isn’t the greatest solution yet, eventually I want a way to load the post on the original server within Tokodon. This is a good start though, instead of showing nothing.
[24.05]
Today, we bring you a report on the brand-new release of the Maui Project.
We are excited to announce the latest release of MauiKit version 3.1.0, our comprehensive user interface toolkit specifically designed for convergent interfaces, the complying frameworks, an in-house developed set of convergent applications, and the upcoming convergent shell environment for desktop and mobile devices.
Built on the foundations of Qt Quick Controls, QML, and the power and stability of C++, MauiKit empowers developers to create adaptable and seamless user interfaces across a range of devices, and with this release, we are a step closer to finalizing the migration to a new major version – the upcoming MauiKit4 release.
Join us on this journey as we unveil the potential of MauiKit3 for building convergent interfaces, the roadmap towards MauiKit4 and its new additions, and finally discover the possibilities offered by the enhanced Maui App stack.
Community
To follow the Maui Project’s development or to just say hi, you can join us on Telegram @mauiproject
All of the Maui repositories have the newly released branches and tags. You can get the sources right from the Maui group: https://invent.kde.org/maui
MauiKit4 & Documentation
MauiKit Calendar, Accounts, and Image Tools have now been ported to Qt6, joining MauiMan, MauiKit, and File Browsing frameworks. Alongside with the porting efforts, the frameworks are now documented, and available on the KDE API documentation site [HERE]. The remaining frameworks to be ported to Qt6 are MauiKit Terminal, Documents, and Text Editor, which should be fully ported and documented by the upcoming release in May.
The porting also involved updating the framework CMake code to the latest ECM changes introduced for creating QML plugins.
For the upcoming porting of MauiKit Text Editor, there are plans to move to a different backend for rendering the text more efficiently, and for Documents, the comics and ebooks backends will be reviewed and refactored to address crashing issues under Android.
A quick overview of the issues addressed and updates are covered in the following list:
Updated translations and support for more languages
Rebase MauiKit ApplicationWindow to QQC2 ApplicationWindow to resolve focus-stealing issues in Android
Update all the applications’ source code syntax in QML for the upcoming Qt6 port
Pick up the system light/dark preference for Android in MauiKit3, and move the handling of the Android status bar color from each app to MauiKit’s ApplicationWindow control. For MauiKit4 relay in the QStyleHints new properties
Split the MauiApp code from the CSDControls. Thus register CSDControls as a new attached property: Maui.CSD [link to docs]
Expose the MauiKit Application root element via the attached property MauiApp, as Maui.App.rootComponent [link to docs]
Station fixes for handling the “terminate-session” shortcut and fixes to crashing issues when closing tabs, coming from MauiKit Terminal
The MauiKit’s PageLayout control has been backported from MauiKit4 to MauiKit3, and its implementation has gained new features, such as moving the collapsable elements to the footer. [link to docs]
Index app is now using MauiKit’s PageLayout control for splitting the toolbar actions for constrained spaces, the same as Pix
Pix fix the tags hot-reloading on new tags created
Fixes to nota syncing the terminal working directory
Vvave has gained a new option to quickly start a playlist in shuffle mode and a sleep timer: to stop playback and/or close the app after a certain time or end of the playlist
MauiKit’s AboutDialog has been revised and organized
MauiKit FileBrowsing control for creating a new file now picks the icon from the name extension
MauiKit Terminal and Text Editor now have a custom control exposing configurations for selecting custom color schemes
Index now has options to tweak the embedded terminal in Linux, such as custom color schemes, and reorganized setting entries for the terminal configurations
Nota now reuses the new Text Editor control for picking the color scheme and new options for tweaking the embedded terminal
All of the apps now use an exported definition or the copyright notice
Fixes for all of the apps where the names of developers and other non-translatable strings were being marked as such
Fixed keyboard shortcuts for Station, Vvave, and other apps
Added style for the ComboBox component
MauiKit corrects the usage of singleton instances across threads for all the frameworks, which avoids the double instantiation from the CPP and QML side
Fixes to MauiKit TextEditor long press actions on touch screens
Fixes to style hints for the scrollbar policy coming from MauiMan
Fixes to Nota’s recent view selection mode
On mobile devices do not cache image or icon previews for the thumbnail delegates
[Known Bugs]
Nota crashes when opening a new file from the recent view under Android.
MauiKit Documents fails to open large comic books on Android, causing the app to crash due to the current design of using multiple threads for different pages. This is planned to be solved at MauiKitDocuments4 porting
MauiKit Text Editor TextArea has a flickering issue, which makes content jumpy on Android only. This is from upstream and should be solved on MauiKitTextEditor4 porting when moving to a different backend.
MauiKit FileBrowsing support for browsing SD cards on Android is currently disabled due to missing bindings to the “new” Android storage API
[What’s Next?]
For the next release, we plan to work on stabilizing the Maui Shell experience, by adding XWayland support, and a few more things:
Finalize the porting of the MauiKit Frameworks to Qt6
Finalize and review the MauiKit documentation
Start the porting process of the Maui Apps to MauiKit4 AKA Qt6
Review MauiKit4 on Android
Review the migration of TextEditor to a new backend
Fixes to bugs on the Maui Apps stack
Update the Maui Apps features that are still pending
Maui Shell
For this release, Maui Shell and its components have received minimal updates coming from:
MauiCore and Maui Settings new modules for Audio and Network
Updated Maui Settings for MauiKit4 changes
Review shell aka Cask elements to be up to date with the MauiKit4 changes
That’s it for now. Until the next blog post, that will be a bit closer to the 3.1.1 stable release.
To follow the Maui Project’s development or say hi, you can join us on Telegram: https://t.me/mauiproject.
You may have already read about it on Volkers blog: we together with people from other public transport related projects are building a public transport routing service called Transitous.
While of course our main motivation is to use it in KDE Itinerary, KDE’s travel planning app, it will be open for use in other apps.
We also have a little web interface running at transitous.org.
We are building this service based on great existing software, in particularly MOTIS.
Now, to make this really useful, we need data on more regions.
Luckily, for most regions and countries that is fairly easy. Most transport agencies and countries make GTFS feeds available, that we can just use.
Adding an additional feed doesn’t take long and doesn’t need programming experience.
It’s pretty much just creating a small text file that explains how and where to download the data from.
Those links don’t necessarily stay the same forever, so we would be happy if lots of people take care of their region, and update the link every few years. It is really little work if split up, but can’t all be handled by a small team.
To make it even easier, we can already use the Transitland Atlas feed collection, for which you just need to choose the feed to use. The url will then automatically be looked up.
You can find out how to add a feed here.
Please let us know if the documentation is unclear anywhere.
If you are interested in using this service in your own application, it is probably a bit too early for production, but it makes sense to already implement support for the MOTIS API that we use.
You can find an early version of our API documentation here.
If there is anything else you are interested in helping with, for example improving our ansible playbook, creating a website, improving MOTIS or working on integrating OpenStreetMap routing, you can find our open tasks here. We appreciate any help on those issues, and it of course speeds up the development of the project.
Plasma Pass is a Plasma applet for the Pass password manager
This release includes build fixes for Plasma 6, due to be released later this week.
URL: https://download.kde.org/stable/plasma-pass/ Sha256: 2a726455084d7806fe78bc8aa6222a44f328b6063479f8b7afc3692e18c397ce Signed by E0A3EB202F8E57528E13E72FD7574483BB57B18D Jonathan Esk-Riddell <jr@jriddell.org> https://jriddell.org/esk-riddell.gpg