Information
This is a collection of short notes about personal projects or solutions to problems. (Not published on a regular basis.)
Surface Dial wheel’s direction can be mapped to any keyboard event. However, Train Sim World 2 requires the key A, D to be pressed for longer to register a change.
The solution is to use AutoHotkey to create a script which translates one key combination into a long press of A or D.
1. Create a Train Sim World 2 entry in Windows 10 Settings > Devices > Wheel (browse for the game executable located under [Steam Folder]\steamapps\common\Train Sim World 2\WindowsNoEditor\TS2Prototype\Binaries\Win64\TS2Prototype-Win64-Shipping.exe)
2. Add the mapping for an unused keyboard shortcut combination in the game (for example CTRL+ ALT + A )
3. Create an AutoHotkey Script which does the mapping from the key combination to a long press. (Install AutoHotkey and create a file train_sim_world_dial.ahk with a text editor)
^!a::
Send, {a Down}
Sleep, 300
Send, {a Up}
Return
^!d::
Send, {d Down}
Sleep, 300
Send, {d Up}
Return
You can now use the Surface Dial to change the throttle speed in the game.
Using Surface Dial as throttle in Train Sim World 2 Read More »
Finally got to write up two LED strip project I did the past years.
DIY LED strip decorations Read More »
Moodle allows assignments and group assignments to be graded offline. This helps to assign a graded group work to each of its members, but also requires a special naming and formatting of files and csv content. To help, this small web app, helps to generate the offline grading zip and attribute a group grade to all its members. It only requires the initial offline grading worksheet and optionally a feedback file for each group.
Screen after uploading a feedback file
Moodle Assignment Feedback Packager Read More »
In addition to the provided guide by Google.
Here is the changes I had to make in my code for futur reference:
OLD <1.0 | NEW< >=1.0 |
event.params.uid | context.params.uid |
event.data.val() | change.after.val() |
event.auth.variable.name | context.auth.token.name |
event.data.ref.remove() | change.ref.remove() |
.onWrite(event => { | .onWrite((change, context) => { |
.onDelete((event) => { | .onDelete((snap, context) => { |
event.auth.variable.email | context.auth.token.email |
const object = event.data; | object |
storage.object().onChange(event => { | storage.object().onFinalize((object, context) => { |
Firebase SDK for Cloud Functions Migration Read More »
In order for Micro-Manager to recognize my cheap china microscope, I needed to patch the provided OpenCVGrabber driver.
The original version of the driver always selected the first USB camera available, and did not pass validation of the configuration for the webcam driver from the microscope.
As Micro-Manager is Open Source, I looked into making a patch. The new version which supports camera selection from a dropdown by name. Is available for windows 10 and Version 2.0 beta of Micro-Manger:
Status for integration into the application can be followed on the pull request.
Using Cheap China Microscope with Micro-Manager on Windows Read More »
In samba 4 the force user has also to be listed in valid users in order to not get a permission denied error…
valid users = root, foo, bar
has to include the user in
force user = root
source: https://bbs.archlinux.org/viewtopic.php?id=161389&p=2
Samba 4 config changes for force user Read More »
A small script to export moodle 2 participants with their group information.
Drag the bookmarklet to your bookmarkbar: Moodle Group Export
You can then click it when you are on the moodle 2 > Users > Enrolled users page to get a csv file of the displayed table.
var script = document.createElement('script'); document.head.appendChild(script); script.onload = function(){ var separator = ','; var pattern = /id=(.*)&/; var csv = [['userid', 'name','idnumber','email','group'].join(separator)]; $('table.userenrolment').find('tr').each(function(index, tr){ var r = []; var $tr = $(tr); var a = $tr.find('a'); var userid = pattern.exec(a[0])[1]; r.push(userid); r.push($tr.find('.subfield_firstname').text()); r.push($tr.find('.subfield_firstname').text()); r.push($tr.find('.subfield_idnumber').text()); r.push($tr.find('.subfield_email').text()); r.push($tr.find('.group').text()); csv.push(r.join(separator)); }); csv = csv.join("\r\n"); window.open("data:application/octet-stream;charset=utf-8," + encodeURIComponent(csv)); }; script.src = 'http://code.jquery.com/jquery-2.1.4.min.js';
Moodle 2 export participants with group information Read More »
Durant le cours d’Intégration des systèmes d’information d’entreprise 2011 du Master en Système d’information de HEC Lausanne, j’ai enregistré une série de vidéos démontrant l’utilisation de Bonita Studio sur un cas pratique “Travel Expenses“.
Les vidéos sont disponibles sur YouTube (http://www.youtube.com/playlist?list=PLB6EA69FBFAFDC459) et couvres les thèmes suivants :
Le cas Travel Expenses traite la demande, la consolidation et la vérification de notes de frais pour des voyages de collaborateurs.
Pour permettre l’échange des données entres processus avec une seule variable, plusieurs objets complexe ont été créés: TravelPlan contient un Hotel et une liste d’Expense. De plus ces objets ont une méthode toHtml et toString pour faciliter l’affichage dans un formulaire Bonita.
JAR: travel_plan_1.1.jar
GrovoyDoc: travelplan/groovydoc/
Source: src.zip
Groovy Date
formatage de l’objet Date groovy pour le service REST ou la requète SQL
new Date().format('MM/dd/yyyy') new Date().format('yyyy-MM-dd')
Expedia REST service
Documentation du service REST utilisé: http://developer.ean.com/docs/read/hotels/version_3/Request_Hotel_List
Crédits
Dr. Thibault Estier (Enseignant du cours)
Boris Fritscher (Assistant doctorant, préparation du cas et enregistrement des vidéos)
Alexandre Métrailler (Assistant doctorant, préparation du cas)
Bonita Studio tutoriel vidéo Read More »
Since I did not find any official conference application for either ECIS2011 or CAiSE’11, I decided to make my own version. Thanks to Google’s open source I/O application this was not so hard and the result can be tested here:
Android Conference Application for ECIS2011 and CAiSE’11 Read More »