Accessing elements in an iframe
A word about interaction between DOM objects in master view (website) and slave view (iframe).
A word about interaction between DOM objects in master view (website) and slave view (iframe).
It is quite easy for not showing something in the first row in CGridView. You need to use 'visible'=>'$row > 0'
row expression. But, it becomes difficult, when we want to show something in every row except last one.
Read More “Show value in every CGridView’s row except first and last”
You may notice, that many MP3 players (both Windows programs — not tested on other OSs — as good as external hardwares) are making their file lists in some strange order. This may not be a big deal, when talking about music (though, when listening to a particular album, you may get yourself pissed-off as well), but became a really pain in the ass, if we’re talking about audiobooks.
Read More “Incorrect music or audiobook order in MP3 player”
If you’re an “old-school” MP3 user, and ID3 Tag version 1 data is all you need to get happy, you may find a shit stick to version 2 of ID3 Tag a little bit annoying. If it is so, then the big question is, how to quickly get rid of ID3v2 data for many files? Many programs are allowing to do a massive ID3 tags (both versions) change/edit, but there aren’t many of them that allows to delete particular tag version out of many files massively. And here comes my little trick.
Read More “Get rid of ID3v2 tag from many files at once using Winamp”
When CD or DVD is ejected from drive, Total Commander “resets” contents of the pane to nearest available drive (usually C:
). It is normal and obvious because contents of CD or DVD are no longer available. But, the same thing happens even if Total Commander is in background. This might be seen as an annoying feature, because each time you change CD or DVD in drive, you have to manually again select that drive in Total Commander. Fortunately, there is an easy solution for this.
Read More “Disable refreshing of removable drive contents in Total Commander”
Since I have been developing in Yii for my “entire life”, I’m bound to MVC model. And since it suits me very good, I don’t want to and don’t plan to change it. Even though, it is nearly always good to know, what are the alternatives — MVP and MVVP.
When you right-click Windows Explorer icon on the taskbar in Windows 7, you can see list of recent items (i.e. recently opened folders) with an option to pin some of them permanently. On some Windows 7 systems user may experience issues with recent items and pinned entries list not being displayed, missing or cleared without reason. New items cannot be added to these lists.
Read More “Can’t pin folders to my Windows Explorer icon on the taskbar”
The CGridView
class in Yii is a state of art solution, that gives you out-of-the-box full model browsing features including filtering, pagination and sorting. The picture would be perfect, if not for default look of grid view, which is a little bit “nasty”! :> It is understandable, as Yii author focused himself on delivering perfectly working framework, that does not necessary have to be pretty in the same time.
However, basing on famous flexibility of all components in Yii, with a help of few simple steps, you can completely change the look & feel of your grid view.
Suppose, you place your self somewhere in the middle of Yii 1.1 experience ladder. You’re no longer new to Yii 1.1, but you’re not an experienced Yii developer in the same time. In this case, I strongly encourage you to spare half an hour or so on reading articles in Yii Wiki, that are grouped in this table-of-contents article. These articles contains a lot of useful information, a must-know for all experienced Yii developers, that are mostly not know to those with middle experience
Bear in mind that when writing JavaScript / jQuery code for handling user changes made to dropdown boxes, you must program your website reaction not only to onChange
but also to onKeyPress
events. Why? There is a rare situation, where user selects value by clicking dropdown and then using keyboard’s cursor up or cursor down keys. onKeyPress
event will be fired in this situation instead of onChange
event. And desired effect won’t work, if you put it only to onChange
event handler.
Read More “Dropdown must use both onChange and onKeyPress events”
You can use CActiveRecord::populateRecord
method in Yii to create new record basing on existing one. And, as this descriptions means, you must use it like that:
[code language=”php”]
$data = $this->getUser($id);
$model = new Users;
$model = $model->populateRecord($data, FALSE);
[/code]
instead of (last line):
[code language=”php”]
$model->populateRecord($data, FALSE);
[/code]
because populateRecord
creates new model instead of modifying existing one!
A default file encoding for every file in Netbeans is defined at project level — see Project Properties
dialog, Sources
category. But there’s nothing similar (possible) for particular files without a project. If you’re using Netbeans just as an editor then all files opened from outside any project will be scrambled, because Netbeans is not using UTF-8 encoding by default on all files.
Read More “Forcing default encoding on all files in Netbeans”
I personally adore Diablo I and Diablo II. Since first version of this game is already fifteen years old (published in 1996) it requires special steps to play it on Windows 7. The most popular solution is to use IPXWrapper. However, in my case it required some additional works.
Read More “Playing Diablo I in multiplayer-mode on Windows 7”
The Synchronize directories tool in Total Commander is magnificent and I’m using it very often for all my backup-like and sync-like works. The only thing, that I was missing is an ability to ignore hidden system files or files stored in .svn
or .git
folders, i.e. hidden version control files. So, I wrote to Total Commander’s author and received immediate response, that this is possible.
Read More “Synchronize directories in Total Commander ignoring certain files”
Even prettiest wallpapers looks pretty ugly when stretched by Android to fit different device screen size. Either used algorithm is poor or I have too high expectations, but most of my Windows wallpapers look like a real crap, when copied to Android and used there as that system wallpaper. Some idea is to prepare own set of wallpapers, especially fit to your device screen size. For this purpose it is good to know, how to calculate it.
Read More “Correct wallpaper dimensions for different Android-based devices”
Well.. at least on my QNAP TS-210 it is in:
[code language=”shell”]
/mnt/ext/opt/apache/bin/
[/code]
You can validate this by executing:
[code language=”shell”]
/mnt/ext/opt/apache/bin/php –version
[/code]
Which should show version PHP installed on your QNAP box.
…are possible! All you need to do is to use mklink
program:
[code language=”shell”]
mklink /d "D:\Photos" "\\SERVER\Photos\Family\Dad"
[/code]
After installing Service Pack 1 over your Windows 7 (or some other update “around”) you may find, that some of your folders has now a strange name. This happen mostly in non-English versions of Windows 7.
To fix this problem, turn displaying of hidden files on, locate desktop.ini
file, edit it and remove LocalizedResourceName
key from it or delete entire desktop.ini
file at all.
There are two ways of resetting (not: restarting) QNAP TS-210 — basic and advanced method. This article discusses both of them along with implications on your QNAP after each type of reset.
Here is just a bunch of Yii forum topics, that talks various approaches to make Yii application serve Rapidshare-like routes, i.e. URLs without action (with just the controller) or without both controller and action:
That’s just a memo for me and a start point for future reading, nothing else.
It is a simple example how to call AJAX request right as page loads, not requiring user to do any action. This examples correctly handles both expected result and AJAX error and puts it into selected element.
Read More “Calling AJAX directly after page loads”Yii is automatically publishing core scripts (i.e. jQuery and some others) with each generated page. You may include following piece of code in your application configuration to disable this behavior:
'components' => array( 'clientScript' => array( 'scriptMap' => array( 'jquery.js' => false, ), ), )
Refer to Yii API manual, CClientScript::scriptMap
section, for more details.
If you want to display HTTP 403 error (instead of files list) for folder, where there is no index.html
or index.php
file, then in .htaccess
file you must add following line:
Options -Indexes
This works for current folder and all subfolder (unless .htaccess
file if any of these subfolders will “locally” change this setting).
If found an interesting tip on how to get listing of your folder as text, that you can copy to any document or email, without need to manually write all folder and file names. It requires console window and… Word.
Read More “Quick directory listing using console and… Word”If you don’t know, what WolframAlpha is then consider a Star Trek computer answering your even wildest mathematical and statistical questions. Want to know the population of Far East countries in mid-fifties of XX century? Or statistically how many cities were involved in biggest earthquakes in history?
This and many other questions may be easily solved with WolframAlpha. If you’re still not convinced, then why don’t you take a look at live demo of WA for iPad. Let it convince you!