Using Yii2’s DetailView in a little bit more advanced way

The simplest and easiest way of rendering DetailView is to declare model and attributes list. This will renders each listed model’s attribute in a cool-looking, responsive table.

This article contains examples and solutions for going a little bit beyond that and using DetailView in a little bit more advanced way.

Read More “Using Yii2’s DetailView in a little bit more advanced way”

Multi-folder usage of IrfanView’s batch mode

Batch conversion tool (B in main screen or File > Batch Conversion/Rename) in IrfanView is both flexible and powerful tool that allows you (as menu item says) to: quickly convert many images, quickly rename many files or mix these two operations.

The Add All button in mentioned tool’s window is even more powerful, because it lets you add files (to be converted or renamed) from given folder and all subfolders. But not everyone knows, that the same goes for saving converted files. They also can be placed by IrfanView in many folders

Read More “Multi-folder usage of IrfanView’s batch mode”

Enabling Polish letters in Delphi 2010

Using non-Latin keyboards with Delphi and non-Latin characters in code was always a big problem in Delphi.

To enable correct support in Delphi 10 you have to:

  • go to Tools > Options > Editor Options > Key Mappings,
  • uncheck Use Ctrl-Alt keys.

Hopefully in Delphi 2010 you can do this from IDE settings. You don’t have to play with stupid .reg files to change some dully strings in Windows Registry, as you were forced in Delphi 5 to achieve the same.

Resolving strange FTP-related issues on your QNAP

Not being able to delete or rename a file on QNAP via FTP? First thing you have to check, is:

  • who is the file owner (it should be your user name) and
  • what is file group (it should be everyone).

On various occasions QNAP can set it to admin:administ, which is wrong, in this case.

The same problem will most likely appear, if you access your QNAP via FTP and try to rename or delete a file while using different credentials that were used when uploading that file. If another FTP user uploads a file then only that user can delete or rename or move that file.

If you wish to do this yourself, you have two options:

  • use that other user’s credentials (if possible) or
  • change owner and a group of that file to you.

The second solution is discussed in this article.

Read More “Resolving strange FTP-related issues on your QNAP”

Deploying a PhoneGap app to Windows Marketplace

After Deploying a PhoneGap application to iTunes (App Store) and Deploying a PhoneGap app to Google Play articles, here comes the time to deal with Windows Mobile platform and Windows Marketplace. This article should provide you with all the necessary information on how to successfully submit your .xap file (compiled locally or through Phonegap Bulid) to Windows Marketplace.

Read More “Deploying a PhoneGap app to Windows Marketplace”

Remove system menu button from PhoneGap application

By default your PhoneGap application will contain system menu button, even on those systems (Android 4.0+) that doesn’t support this button any more (i.e. applications written for this system should not use this button; it is handled anyway and you can use it, if you really wish to).

On most new devices user pressing this button will be simply ignored by system and nothing will happen. So, this problem reduces itself to purely aesthetic means (whether you care about seeing that unusable button on system bar, when your app is active, or not).

However, there are reports, that PhoneGap applications crashes on small group of devices, when user presses this not handled system menu button. In this case, more radical solutions must be considered.

Read More “Remove system menu button from PhoneGap application”

Deploying a PhoneGap application to iTunes (App Store) [updated]

This article was initially written in June 2015 and generally updated 15 months later so you’ll find information and examples as they were available in mid-August 2016.

This article deals about deploying PhoneGap application to Apple App Store. Question: Is it possible without having a real Mac computer or using Mac-lease-like service? The quick an straight answer is: you can’t do this. It was possible around two years ago, but things has changed and s for now (2015) you must have any of above to submit your application to App Store.

Read More “Deploying a PhoneGap application to iTunes (App Store) [updated]”

Install and run OS X Yosemite in Virtualbox on your Windows

There are so many articles in the Internet (type Mac OS X virtual machine to Google or your favorite search site to get thousands of them) about running OS X on PC in VirtualBox, that writing another one is just a pure stupidity. Instead, this article includes only a quick check-list to extract essential information from these articles and leave all unnecessary garbage blah-blah behind.

This post is a short version of this article. Refer to it for all details, explanations, solutions for a possible problems and things like that. This guide assume, that you’re installing OS X inside a virtual machine only for one purpose — sending your iOS apps to iTunes through ApplicationLoader program. For this reason, certain parts of original guide are skipped. If you intend to use OS X for other purposes, you may need to enhance your knowledge, by reading missing parts from other sources.

Read More “Install and run OS X Yosemite in Virtualbox on your Windows”

A link to the same URL with a different port

Let’s say, that you need to make a <a href=""></a> link, that will point you to the very same URL (as page, in which have this link), but to a different port. Even though there are no reasons for not implementing support for links like <a href=":8080">jump</a>, as of writing this, such support is not implemented in any known browser. And thus, neither this link work nor pure-HTML solution is available.

You must hire Javascript to resolve this problem.

Read More “A link to the same URL with a different port”

Triple Town

Just wanted to share a couple of cool and not-so-cool screenshots about my favourite game.

Well… I think, I can call it a favourite game given the fact that I’ve been playing it for four years in a row (and another four years from time to time — update from 2021).

Read More “Triple Town”

AdMob Plugin and pure-Javascript ads in PhoneGap Build application

It all started with this Stack Overflow question asked by me 2,5 year ago, when I was attempting to strike with ads in mobile applications for the first time. I’m still using PhoneGap Build only therefore in the past I was very limited to only these ad networks, that supported displaying their add through pure Javascript only. However, all the things had changed radically, with introduction of npm plugins to PhoneGap Build. You can now use in pure Javascript PhoneGap Build application all the ad networks, that require you to use their native SDKs…

Read More “AdMob Plugin and pure-Javascript ads in PhoneGap Build application”

Delete an undeletable file in Windows

I found a folder named with random sequence of digits and letters like 4b64f439c26281ab01b0a9ce. With contents cleary suggesting that this is some kind of garbage left by some installation process, most likey Windows Update or some core Windows driver update.

Many attempts to delete this folder, including this one failed, so I had to come with my own solution.

The fastest way

From mydigitallife.info comes the quickest solution with using command-line (run cmd.exe as an admin):

For files:

cd <folder>
takeown /f <filename>
icacls <filename> /grant administrators:F

Where:

  • <folder> is a full path to directory holding file, you want to delete or take ownership of
  • <filename> is questioned file name

Note, that original article has takeown /f <filename> /d y in second line, which was not working in my case, throwing some errors. Executing just takeown /f <filename> was enough.

For folders command sequence is very similar, only this time all actions will be performed recursively:

takeown /f <folder> /r /d y
icacls <folder> /grant administrators:F /t

Again, if takeown /f <folder> /r /d y fails, then try to use just takeown /f <folder> /r or just takeown /f <folder>. You can also remove the /r (from takeown) and /t (from icacls) switch to prevent the task been perform recursively.

For both solutions (for taking over files or folders) if you’re assigned to other user account or group than default administrators group, change administrators to the desired user name or group name accordingly.

This solution does not work in every situation, so follow to other solutions presented below.

The clickable way

This solution shows you, how you can gain permissions or take ownership of file or folder by clicking through endless number of windows and prompts. It is quite hard at the beginning, but can come handy at some point.

The thing, you need to know, is that Windows will do the best, to make you deleting such folder as hard as possible! As you can see on mentioned page, solution consists of five steps and nearly twenty points on check list. In my case, solution was quite different (given below), but still you have to reserve some time for this process, so don’t get your hands on this, if you have about a minute or so.

All right, let’s get to work.

I skip first part given in cited solution, as I assume, that you already have an administrator account enabled, you’re logged in and since you still can’t delete that damn folder, your frustration rises. Let’s get to second part. Remember, that you can start doing these things on root folder (i.e., the one you actually want to delete), but this will most likely fail, and you’ll have to start the entire job from changing properties and deleteing first of all subfolders in root folder.

Let’s start with changing owner of a folder:

  1. Right-click the folder, you want to delete. Go to the Security tab. Click the Advanced button at the bottom.
  2. In newly opened another window, go to the Owner tab and click the Edit button below the list.
  3. In third opened windows, check, if you have YOURACCOUNTNAME (YOURCOMPUTERNAMEYOURACCOUNTNAME) placed on list titled Change owner to. If not, reffer to Step 3.d in this article.
  4. Select YOURACCOUNTNAME (YOURCOMPUTERNAMEYOURACCOUNTNAME) on that list.
  5. Check Replace owner on subcontainers and objects checkbox to force Windows to propagate all changes.
  6. Click OK four times, to close all opened windows and to confirm, that you know, what you’re doing.

We’re talking about the account you’ve just logged in with (it, of course, have to have administrator rights or else, we have nothing to talk about).

Now, we have to deal with changing folder’s permissions:

  1. Again, right-click the folder, go to the Security tab and again click the Advanced button at the bottom.
  2. On the Permissions click the Change Permissions button.
  3. Uncheck Include inheritable permissions from this object's parent checkbox and click Add.
  4. Check Replace all child object permissions with inheritable permissions from this object.
  5. Select YOURACCOUNTNAME (YOURCOMPUTERNAMEYOURACCOUNTNAME) on list above and click Edit below it.
  6. Select second option (This folder, subfolders and files) on combobox below.
  7. Check first checkbox on the list below (Full control). This should mark all other checkboxes on that list.
  8. Make sure that the only checkbox below the list is not checked.
  9. Click OK four times, to close all open windows. After first click you’ll be prompted for confirmation. Click Yes.

After this mindless, stupid and very irritating process you should finally be able to delete this damn folder.

To conclude, let me tell you, that if above fail and you’ll still not be able to delete this folder, you have to options to consider:

  1. Repeat all above steps for all subfolders included in root folder (the one you want to delete).
  2. Repeat all above steps, but this time change owner and all permissions not for your own account, but for the entire group of administrators (i.e. Administrator (YOURCOMPUTERNAMEAdministrator)).

The visual way and some alternatives

mydigitallife.info have come with a fabulous guide on taking ownership of file or folder with many alternatives. Key article is above procedure, but this time heavily pictured. You’ll also find a command-line alternative mentioned in the beginning of this article as good as two others: for taking ownership by running a special prepared VBS script and by adding “Take Ownership” item to each file and folder context menu. Have fun.