Posts From May, 2011

How to make JSON more readable by human eyes 

Posted by Magnetic_dud Monday, May 30, 2011 5:31:00 PM Categories: Coding

For a new functionality that I am developing for this website, I am using the JSON-C application interfaces (API) from YouTube. When you try the link, you will face an huge problem: to save space and bandwidth, the file is minified, without spaces and line breakers, making it almost unreadable.

What we can do?

We can use JSON Formatter & Validator, an useful service that will parse JSON making it more readable, with syntax highlighting. Great!

Install the Android SDK in Windows FLP 

Posted by Magnetic_dud Wednesday, May 25, 2011 11:49:00 AM Categories: Android Software Windows

Just for fun, I tried to install the Android SDK in Windows FLP (Fundamentals for Legacy PCs) that's a "secret" stripped down Windows XP version optimized for slow computers.

If you try to install the Android SDK on Windows FLP, you will get an error like "can't find a suitable Java JDK, or can't find Java SDK in your path, even if you installed it, making it impossible to download vital files.

At the first check, the one during the setup, just press "back" and then "next" again, and you can pass the check, but at the second one, there is not an evident workaround... let's find it!

The second check runs the content of C:\Program Files\Android\android-sdk\tools\lib\find_java.bat , so, if you open it, you can see which command will cause an error:

%java_exe% -version 2>nul

In this command the output is redirected on the null device, that means: if the command does not give an error, it is not shown to the user.

The problem is that on Windows FLP the null device is not implemented, so the command returns an error, letting the batch fil misinterpretate the detection.

So, if you delete 2>nul, the Android SDK will work great!

Now, if I could manage to let Titanium Studio recognize the SDK...

Photoshop can't save file - disk full 

Posted by Magnetic_dud Tuesday, May 24, 2011 5:38:00 AM Categories: Software Windows

Sunday I upgraded my Windows Home server with a new 2TB hdd, because it was becoming full.

Then, I saved an image in Photoshop 7, and i get an error "Disk full"

What?? The server has more than 1.3 TB free!

I search for a solution from Adobe and I find:

"Adobe recommends that you not save directly to servers, because writing directly to servers adds a level of complexity to the function of saving."

Oh, great! They won't fix the bug!

It happens that Photoshop has a known bug from year 2002 that won't save a file in a disk that has more than 1 TB free!

How to fix the problem? Unfortunately, the only way is to create an huge garbage file to have less than 1 TB free.

How to create an huge garbage file in a short time? It's very easy, using the command prompt!

First open the command prompt with administrative privileges (On Vista and Windows 7, select "run as administrator", on XP and below, just run it)

Then, write:

net use z: \\server\yoursharename

The share will be temporarily connected as z:, and going in z: and writing dir this comes out:

Z:\>dir
 Directory Z:\

17/01/2011  19:31    <DIR>          .
17/01/2011  19:31    <DIR>          ..

               0 File              0 byte
               0 Directory  1.282.964.344.832 byte available

We must have less than 1000 billions of bytes available to have Photoshop working on this drive, so we have to create a file that has a size of at least 283 billions of bytes.

For creating an huge file in seconds, we use fsutil, that has this syntax:

Z:\>fsutil file createnew file.name 12000

Where 12000 is the size in bytes

I wrote this รจ:

Z:\>fsutil file createnew photoshop.bug 290000000000
The file Z:\photoshop.bug has been created
Z:\>dir
  Directory Z:\

24/05/2011  10:59    <DIR>          .
24/05/2011  10:59    <DIR>          ..
24/05/2011  10:59   290.000.000.000 photoshop.bug
               1 File 290.000.000.000 byte
               0 Directory  992.930.263.040 byte available

After that, Photoshop 7 allowed to save files in that location

Will Skype change its name? 

Posted by Magnetic_dud Tuesday, May 10, 2011 4:03:00 PM Categories: Internet Software Windows

I'm sure that you heard about that today Microsft bought Skype for an hefty price.

My question is: how will they change the name of Skype?

I bet on "Microsoft Windows Live Text Audio and Video Calling United Platform Ultimate Edition 2012 Service Pack 2 with Bing Toolbar"

Here's what would have happened if Microsoft marketed the iPod: