If you have more then one language installed on your computer, sometimes the active language changes, seemingly by itself. It takes a restart to go back to the original default language. In the meantime, you will see different characters appearing with many keys you use.
What happens and how do you solve it?
If you click the right ALT key plus the left SHIFT key simultaneously, the active language changes. If you want to change it back, try hitting this key combination again.
Or, if you don't want this key combination to change languages in the first place, go to your control panel, choose languages or country settings. On the Advanced keyboard settings tab, you can disable the shortcut.
Friday, August 1, 2008
Mystery solved: Why does the active language of my computer change all of a sudden?
Posted by
Sandra Both
at
7:01 AM
0
comments
Saturday, May 10, 2008
Handy subversion commands
I am using subversion as a versioning system on my local computer. It works great. For integration with windows explorer, I use TurtoiseSVN. Also great.
I thought I'd list some handy subversion and turtoise commands I often use in this blog. Complete documentation can be found on the subversion and TurtoiseSVN websites, by the way.
Note: my subversion repository is located in F:\sv, my working directories are in F:\xampp\htdocs\.
Start the svnserve server:
svnserve -d
Add a new project to the subversion repository:
F:\>svn import "F:\Documents\website" file:///sv/website -m "initial import"
Checkout a project in a new working directory:
- Open Windows Explorer, browse to the new working directory, for example F:\xampp\htdocs\website.
- Click rightmouse button on this directory and click 'SVN Checkout'.
- In the field 'URL of repository' fill in the location of the repository for this project, for example file:///F:/sv/website.
Commit changes:
- From Windows Explorer, rightmouse click on the file or the directory you want to commit.
- Choose 'SVN Commit'. You will see all files that have changed and - if you tick the checkbox 'Show unversioned files' - also files that are not under version control.
- You can now select the files you want to commit, write a comment and click OK.
- If you want to see the exact differences in a file, you can right-mouseclick the file in the list and choose 'Compare with base'.
List all projects in the subversion repository:
svn list --verbose file:///F:/sv
Posted by
Sandra Both
at
12:18 PM
0
comments
Labels: Subversion
Saturday, January 26, 2008
Opening an Excel file as Administrator on Vista
This week I was coding a Macro in an Excel file that would open a certain Word file. I used the following code to open Word from Excel:
Set wrd = CreateObject("Word.Application")
wrd.Visible = False
Set doc = wrd.Documents.Open(fileName)
When I opened the Excel file by double clicking it in the Windows Explorer and ran the macro, it gave me an error 'Access denied - 70'. It turns out that on Vista, even if you think you are an administrator, you do not always have administrative rights.
To open the Excel file as an administrator, I had to do the following:
- Open the Windows Explorer.
- Right-mouse click on the Excel file and choose "Create Shortcut".
- Right-mouse click on the shortcut and choose "Properties".
- Click on the tab "Shortcut".
- In the "Target" field, add the path to your Excel program before the filename. Leave a space between the path and the filename. In my case, the path to Excel is "C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE".
- Click the "Advanced" button.
- Click "Run as administrator".
- Click "OK" to close the small window and "OK" again to close the properties window.
Now, when you double click the shortcut, you open the Excel file as an administrator and the macro that opens Word runs just fine.
Posted by
Sandra Both
at
5:22 PM
0
comments
Thursday, January 3, 2008
Check the date a webpage was last changed
When you browse the web, you sometimes want to know when the page you are viewing was last updated. While viewing the page in your browser, type the following in the address bar of your browser and hit Enter:
javascript:alert(document.lastModified);
It gives you a popup with the date the page was last updated.
Note:
It only works for static HTML pages, since dynamically created pages are created on the fly, that is, today.
Posted by
Sandra Both
at
3:32 PM
0
comments
Labels: JavaScript
Sunday, October 14, 2007
Sticky columns or rows in OpenOffice Calc
A very handy feature of OpenOffice Calc that I often use, but never seem to remember is freezing columns or rows. Meaning, when you have a large worksheet and you scroll down or you scroll to the right, some specified columns or rows stay fixed. This is very handy for columns/rows containing headings.
Since I always forget how to do this in OpenOffice Calc, I thought I would write it down here.
Suppose you have an OpenOffice Calc document to keep a list of things to do. It has columns for the task you need to do, the status of this task, the date you last changed the status and any additional remarks.
Select the columns or rows you want to keep on every screen even when scrolling and then select one more.
Now, click Window - Freeze.
That is all. When you scroll down, the top rows will stay visible.
Somehow, I always start looking at print ranges and repeating rows or columns, which does exactly the same, but when printing only.
And, funny, remember to select one row/column more then the rows/columns you want to freeze.
Tip:
If you want both columns and rows to freeze, click on the top left cell you don't want to freeze and click freeze. That way, two lines will show up, one on the left of the cell and one just above the cell and all columns and rows to the left/top of these lines will freeze whenever you scroll.
Posted by
Sandra Both
at
4:04 PM
7
comments
Labels: OpenOffice
Wednesday, October 3, 2007
DOS Command for searching text in files on windows
When you want to know which files in a specific directory contain a certain text, it is sometimes easier to search with a DOS command, rather then using the Windows Search functionality. The Windows Search functionality can have trouble finding files with certain extensions, such as .php.
To search quickly from the command prompt for files containing a certain text, I often use the DOS command findstr. It is easy to use and fast.
Let's say you want to find all php files in the directory C:\htdocs\joomla that contain the text "mail". With findstr you can do that as follows:
This will give the names of all php files in C:\htdocs\joomla that contain the text "mail". If you also want to see which lines exactly contain the text, leave out the 'M'. The 'S' makes sure that you also search all subdirectories.
Tip:
Type findstr /? to see a list of all possible options you can use with the findstr command.
Posted by
Sandra Both
at
2:47 PM
0
comments
Labels: PHP
Friday, August 17, 2007
Setting group permissions in JCalPro
For a client of mine, I tried to change the permissions of JCalPro, the calendar extension for Joomla!. It turned out to be easy, but not after quite a long search. This is how I managed to do it in the end.
This client uses Joomla! with the JACLPlus extension to manage several usergroups. What they wanted was pretty straightforward: a calendar that everyone can see, but only users of one particular usergroup can add events to.
JCalPro was the calendar of choice. Now, this calendar has settings for exactly what we wanted: which usergroup can add, edit, delete or approve events. But... this works for the default Joomla! groups only, not for the JACLPlus groups my client uses.
So, after some wading through the code I discovered that JCalPro calls the function $acl->check_acl() to see what permissions a certain user has. It calls this function with the following parameters (see components\com_jcalpro\include\functions.inc.php):
$acl->acl_check( 'content', $action, 'users', $my->usertype, 'calendar', 'all' )
I debugged and found that in my particular case, the value of $my->usertype was 'Members'.
I never really looked into the acl system before and since I couldn't add the desired record in the jos_jaclplus table via the JACLPlus User Group Manager, I added the following record to the database manually (feeling quite awkward adding something to the database this way, but still, I just tried it on my test system anyway... ):
INSERT INTO `jos_jaclplus` ( `id` , `aco_section` , `aco_value` , `aro_section` , `aro_value` , `axo_section` , `axo_value` , `enable` )
VALUES (NULL , 'content', 'add', 'users', 'members', 'calendar', 'all', '0');
What happened? Nothing! That is, everything stayed the same, as if I hadn't added the record.
My first thought was that it had to do with the uppercase M of the usertype 'Members'. But, changing the record had no effect.
After some more code-wading, I stumbled over a very usefull file:
components\com_jcalpro\config.inc.php
This happened to include calls to add records to the jaclplus or acl tables in a sort of temporary way.
I added some calls to this file for my members group:
setRights ( 'add', 'calendar', 'members' );
setRights ( 'edit', 'calendar', 'members' );
setRights ( 'approve', 'calendar', 'members' );
and... tadaa... there it was: all users of my members group could add, edit and approve calendar events.
Since this was an easy, but very hidden kind of solution, I wrote it down here. For others to be usefull for, or for others to comment on. Feel free to leave your comment if you have a much better or simpler way to do this!
Posted by
Sandra Both
at
2:05 PM
0
comments
Labels: Joomla