Category Archives: Programming

[Solved]Ubuntu 13.04 Blankscreen on boot problem

Today I booted to my Ubuntu but it welcomed me with a blank screen without any light from the screen.

I thought it is the normal brightness and back-light problem so I tried to turn up brightness level from keyboard but nothing happened.

Then when I tried to adjust volume using keyboard, I was surprised(or rather not surprised) to hear the usual sound effect from Ubuntu system. So I was assured that the system has been booted properly and the only problem is that the screen did not show up.

Intuitively, I thought of the possibility that the screen is actually “turned off” the same way as the brightness was set to zero on boot. With that I tried to press the keyboard combination to “turn on” the screen, which is “Fn+F2” (for my Lenovo Y410P).

And yes, I got back my Ubuntu desktop. Pressing the keys again will give me blank screen again(as expected since it is indeed designed to work).

No idea why the screen was initially turned off though.

Solved issue with vglnk (all websites having a script related to vglink attached to the end)

So today I was trying to pick up node.js. So I run through the first tutorial for displaying hello word.

To my horror, the simple website seems to different than what I expect. I looked at the console where I see something related to a website called viglink.

vglnk

vglnk2

It appears that some code (vglnk) related to this site viglink is “attached to” the end of my webpage. Apparently I did not do this so I suspected this is due to node.js.

However, when I opened up other websites and looked at the Chrome console again, I saw that script appearing again:

vglnk3

This was kind of scary to think about, the fact that every webpage I visit is attached with some script that comes from nowhere.

I was thinking of browser hijacking but I could not find anything on Internet that says viglink is hijacking the web browser.

Just when I was about to give up, the Chrome console gave me an important clue:

vglnk4

So it appears that something else is behind this script and actually calling the script, I clicked on the links.js.

Here I found out the codes that attached the scripts to the end of each webpage:

vglnk5

Following the description above the code, I guessed that it is the Chrome plugin – Unblock Youku that is creating all of this.

And it turns out that indeed that was the case.

The origin of this viglink issue is written here by the author of Unblock Youku:

https://github.com/zhuzhuor/Unblock-Youku/wiki/Support-Us

https://github.com/zhuzhuor/Unblock-Youku/issues/47

The truth is,  the author of this plugin wants to get some profit from the plugin. If you choose to support the plugin, you will experience the issue mentioned above.

I also found out that the author has given information about this VigLink when user clicks the extension icon and sees the option to support the plugin:

vglnk6

However, this information was not there when I installed the plugin and clicked on the support button. Now as I think back, I went through much trouble only because this information was missing. The author should have added this notice when implementing the “support option”.

Actually, I would not have noticed this added information if I did not click on the extension icon again to try disabling it. (This is really no reason for clicking on an extension icon when I know that it works automatically, especially after I have already clicked on it once)

Wrapping up CS1101S Programming Methodology

Today is the last lecture of this introductory module for computer science, CS1101S Programming Methodology.
We followed our own JS implementation of SICP.
We learnt the concept of programming – communicating computational processes.
We learnt functional programming.
We learnt higher order functions.
We learnt order of growth to assess the resource requirements.
We learnt iterative processes and recursive processes and space consumption.
We learnt scoping.
We learnt substitution model, environmental model.
We learnt memoization concept.
We learnt OOP implemented in JavaScript.
We learnt lazy evaluation, streams.
We learnt writing a basic meta-interpreter.
So, here we finished the introduction, and move on to the next step, CS2020.

Constructing infinite sequences using stream

In CS1101S today, we are learning to use stream as a way to delay evaluation. In this way, we can use a function to construct an infinite data structures. For example, integers, Fibonacci sequence.
This stream is achieved by modifying the list concept. The head of the stream is a data value, the tail of the stream is a function to wrap the actual tail value. The function could be returning the reference of the stream itself.

Programming languages which will not evaluate the argument until needed are called lazy . For example, Haskell. Ocaml provides annotations.

This concept is very new and interesting for me as so far I have only seen finite data structures. With infinite data structure, we can do maths involving infinity in programming.