Allgemein

Up and downs with the FRITZBox 6490 Cable

This issue might be only useful for people living in Germany. My internet provider is UnityMedia and for some time now users are able to use the router they want and do not have to rely on the on by UM – a hard to work with Technicolor router. I had my problems with the router as well:

  • It has 2,4 and 5 Ghz support but not in dual mode
  • Port Forwarding is a real hassle
  • It looses connection without any apparent reason

So it has plenty of reasons to switch to another one. I always liked the ones by Fritz! and so I looked into buying the 6490 cable version. But it is 250 € new and 110-150€ used. So a scrimper as I am I bought a used one on a german “craigs list” and got it for incredible 50€.

But then I discovered that it is difficult to reuse a device that somebody else already registered with UM. BUT – for me it worked. I had to convince the person in the service hotline to try it anyway and surprisingly for her it worked! I cannot promise anything for people buying used ones as well – but there is hope.

Then there came the down

Ok so I got the router, registered it with UM, changed some settings and then: I had the glorious idea to try to remove the KDG branding that was on it by logging into the Adam2 FTP account and change the firmware_version env to the avm firmware. But careful: Since there apparently no avm firmware available on the device it will get stuck into a bootloop. 

The solution: So what this post is actually about! I tried hard to get back onto the box and try to change it back

  • Regular FTP did not work
  • Safety Access IP via 168.254.1.1 did not work
  • Safety Access IP via 192.168.178.254 did not work

But, if you have the same problem, try using the firmware recovery of the Fritzbox 7390. This will of course not be able to recover anything but it will lead you with an IP that you can use to access the system again. Just FTP to the IP the recovery tool gives you.

 

Standard
Allgemein

Creating Windows 10 User Accounts after Upgrade

Apparently there is a problem with upgraded Windows 10 systems which has a corrupted default user file. Creating a new user works fine but a logon leads to a “User cannot be loaded” Error.

Windows tries to create the new user profile by copying the necessary files from the default profile (which is corrupted) and fails doing so.

This can be solved by overwriting the Default Users’ NTUSER.DAT under C:/Users/default as shown in other tutorials. My Problem was to obtain a non-corrupted user file.
So to help everyone with the same problem, one can find an working default user file HERE!

Standard
Study

Repetico Flashcards

I am currently preparing for several exams this semester and I am using a flashcard service, called “Repetico”, for the first time. I am using it to help me prepare on three modules which a high amount of slide and a wide variety of subjects which must be learned by heart. The modules are:

Up until now I am happy with the solution even though the final success of this study approach will only be judged after my exam result.

But for now everybody that has the same modules can apply for learning with those flashcard sets. You can write an request by clicking on the links above.
Maybe it helps some of you as well.

Please not that I am not solely relying on those cards especially because there are a lot of exercise on those topics, but rather to know definitions, principals or procedures.
Especially in distributed systems and Infovis it is crucial to know the protocols, procedures, algorithms and to have created so lattices, serialization-graphs and visualizations by hand.

Standard
Workflow

Todoist

I am strongly relying on Todoist for organizing all my todo’s – freelancing work, privat as well as my studies. So far I am happy with the workflow even though I haven’t tried Wunderlist yet. I am using the pro version since it offers you to add reminders

But I noticed that it takes some time to get to know all the little tricks and shortcuts which help you to just “get there faster” when creating, updating or managing tasks in the app. I just wanted to give a quick reference guide for features I found very helpful (and sometimes had a hard time to find out about)

Quick Task Assignments

When creating new tasks (Hint: Shortcut is Q) you can use short codes:

  • To set a due date you can use task descriptions like: today, tomorrow, every friday, next month
  • To add a label (which are just tags for tasks) use the @ symbol for that. I use labels for categorizing my tasks into Collaboration (where I have to do phone calls or write an email) or sort my work into coding or administration tasks
  • To assign a task to a project use the #-symbol: Do laundry #Household, Code something #Work. Note: If you don’t specify a project it will be created in the project where you are right now or in your inbox
  • For a quick priorisation of tasks use the double exclamation mark. So for example “!!1” gives the task priority 1.

Note: Some of the quick assignment “short codes” are not available in the android app yet. I filed in a feature request about that since I predominantly use the app to create tasks.

Hierarchical Tasks

With Todoist you are able to create subtasks. This is very helpful when making list for things to buy or for packing lists. The parent task won’t be marked as finished until all its subtasks are finished as well.
So I use such sub tasks for example when packing for a holiday: I create a task “Holiday Packing” under my “Private” project and assign subtasks for each item I want to take (you can intend a subtask with the arrow on top of the text edit line)

So that’s it for now. I’ll try to extend this guide if I find more interesting tricks.

Standard
PySide/ PyQt

PySide/ PyQt Statusbar with colored Popup

I recently wrote an PySide UI where I needed Feedback for the user when an exception occured. I did not catch the underlying functions in any special way and just let them propagate to the top. But since the command line was hidden I looked for a way to make those exceptions visible to the user – and especially in a readable and noticable way.

So I implemented this Statusbar. Nothing fancy and coded real quick but maybe it helps someone else

<pre>from PySide import QtGui, QtCore

class ExceptionStatusBar(QtGui.QStatusBar):
    EXCEPTION_COLOR = QtGui.QColor("red")

    def __init__(self, level, **kwargs):
        super(ExceptionStatusBar, self).__init__(**kwargs)

        # Prepare background
        self.setAutoFillBackground(True)

        # Insert exception hook
        import sys
        sys.excepthook = self.create_excepthook(sys.excepthook)

    #
    # Background Property
    # -----------------

    def set_color(self, color):
        self.setStyleSheet("background-color: rgb({0}, {1}, {2});"
                           .format(color.red(), color.green(), color.blue()))

    def get_color(self):
        # Will not be used
        return self.palette().color(QtGui.QPalette.Background)

    backgroundColor = QtCore.Property(QtGui.QColor, get_color, set_color)

    def create_excepthook(self, sys_hook):
        def custom_hook(exc_type, exc_value, tb):
            self.handle_exception(exc_type, exc_value)
            return sys_hook(exc_type, exc_value, tb)

        return custom_hook

    def handle_exception(self, exc_type, msg):
        # Need to make it a property of the instance instead it is garbage collected
        self._anim = QtCore.QPropertyAnimation(self, "backgroundColor")
        self._anim.setDuration(800)
        self._anim.setStartValue(QtGui.QColor(self.EXCEPTION_COLOR))
        self._anim.setEndValue(self.palette().color(QtGui.QPalette.Background))

        # Actually showing the message
        self.showMessage("{0}: {1}".format(exc_type.__name__, msg), timeout=2000)

        self._anim.start()</pre>

By inserting my own excepthook in the sys.excepthook I get access to all Exceptions that will eventually happen. The QPropertyAnimation animates the Background Color.

Standard
Python, VRED

Custom Key Value Pairs in VRED (Resolved

Ok so I am trying for some time now to get something like custom attributes on a VRED node. I would like to use this as storage for meta data in the scene. But the VRED Python API, as always, does not give much help.

But so far I managed to store some information on an ValuePair attachment which is stored on every node in the AttachmentMap attachment.

vred_attachment_valuepair

RESOLVED:
Ok so apparently this was just an issue due to the old API (VRED 2016) where the function getMString was missing!

Two function to set and get key value pairs may look like this (fast prototype – no testing):
Note that this code only works in VRED > 2016

import vrFieldAccess
import vrNodeUtils

def get_value_pair(node, key):
    fields = node.fields()

    if not fields.hasAttachment("ValuePair"):
        raise IndexError("Node '{0}' has no key '{1}'"
                         .format(node.getName(), key))

    attachment = vrFieldAccess.vrFieldAccess(fields.getAttachment("ValuePair"))

    keys = attachment.getMString("key")

    if key in keys:
        return attachment.getMString("value")[keys.index(key)]

    raise IndexError("Node '{0}' has no key '{1}'"
                     .format(node.getName(), key))

def set_value_pair(node, key, value):
    fields = node.fields()

    if not fields.hasAttachment("ValuePair"):
        attachment = vrNodeUtils.createAttachment("ValuePair")
        fields.addAttachment(attachment)
        attachment = vrFieldAccess.vrFieldAccess(attachment)
    else:
        attachment = vrFieldAccess.vrFieldAccess(fields.getAttachment("ValuePair"))

    keys = attachment.getMString("key")
    values = attachment.getMString("value")

    if key in keys:
        values[keys.index(key)] = value
    else:
        keys.append(key)
        values.append(value)

    attachment.setMString("key", keys)
    attachment.setMString("value", values)

    return True
Standard