Wednesday, November 19, 2014

Default reminder not working in Thunderbird Lightning calendar

You may encounter the problem that the default reminder does not work any more if you access the Google calendar through Provider for Google Calendar in Thunderbird Lightning. Whenever you create a event and use the Default Reminder, it does not work. If you edit that event, you will find the reminder option is set to No reminder. However, in Options --> Calendar --> Alarms, Reminders are set to on for events.  Thus it should add a reminder by default. In about:config, you may find similar entries like
calendar.registry.*****-******-******-******-******.settings.defaultReminders
and the value is set to [].

Why the Alarms setting does not work on the Google calendar? This problem occurs because you have NOT set a reminder in Google calendar settings through web interface, and it is inherited to your local computer. To solve the problem, follow the steps below.
  1. Log in to Google Calendar web interface (https://www.google.com/calendar);
  2. Go to Settings -->Calendars and find out the calendars you would like to add a default reminder.
  3. On the right side of the calendar name, click on Edit notifications.
  4. In the Event notifications, add a pop-up notification.
  5. Quit Thunderbird and restart it.

Monday, November 17, 2014

MATLAB: use 'save' in 'parfor' loop

In the Parallel Computing Toolbox of MATLAB, parfor plays a significant role to speed up the MATLAB simulation. It is not uncommon that we need to save something at the end of each loop. While you want to use save, MATLB will kindly remind you that "SAVE cannot be called in a PARFOR loop". To fix this issue, the save command should be used in a function instead of being called directly in your parfor loop. For example,
parfor m =1:100
 (your code here...)
 save_parfor(mat_file, var1, var2)
end

 The mat_file is where the variable data will be saved, and var1, var2 are simply the variables themselves (not their names). Inside the save_parfor function, the save command is called. The complete save_parfor function is given below.
 
function save_parfor(name_mat, varargin)
% save_parfor 
%
%   Inputs: name_mat: where the .mat will be saved, absolute path is
%                     recommended.
%           varargin: the variables will be saved, don't pass on the names of
%                     the variables, i.e, strings.
%
%   Outputs: 
%
%
% EXAMPLE
%
%
% NOTES
% Wenbin, 11-Nov-2014
% History:
% Ver. 11-Nov-2014  1st ed.

num_vars =nargin-1;
name_input =cell(1, num_vars);
for m = 1:num_vars
   name_input{m} =inputname(1+m);
   eval([name_input{m} '=varargin{m};']);
end

save(name_mat, name_input{:});

Monday, October 20, 2014

SmartAudio has stopped working

SmartAudio is part of Conexant Audio driver. In some cases, when you start your computer, a window may pop up and it tells you that SmartAudio has stopped working. There are lots of people who had this problem. However, the cause and the solution may be different.

If you have tried most of the approaches you can find on the Internet and they all don't work, before you give up, check if the HDMI audio driver that comes with your video card drive has been uninstalled or corrupted. I just fixed an office computer with the SmartAudio issue. It had HDMI audio driver uninstalled and led to the error. Installation of HDMI audio driver from AMD fixed the problem.