Software

Deployment of package.xml failed

by Niklas Waller on October 20, 2011

in Cloud computing,Salesforce,Software

Usually when I deploy things from the Salesforce sandbox to production I choose some of the elements to deploy and that works well.

This time, I wanted to deploy all design elements, i.e. deploy everything that is deployable using the Force.IDE plugin for Eclipse for a Salesforce sandbox. I wanted to deploy from Test to Dev.

It takes quite some time and when it was done I got one failure saying:

package.xml : Bad manifest file:Invalid byte 2 of 3-byte UTF-8 sequence.
package.xml : No package.xml found

I found a fast fix to this here. Read here for a good explanation.

Basically what you need to to is to add a few parameters to the eclipse start-up command.

C:\eclipse\eclipse.exe -vmargs -Dfile.encoding=UTF-8

Restart Eclipse and try again and there should be no problem!

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

Be the first to comment

An easy and efficient way of working with files

by Niklas Waller on September 30, 2010

in Software

A while ago I was in the process of working with a couple of really big CSV-files which varied in size.

My options were to either use Excel or Notepad as I saw it:

  • Excel has a limit of how many rows of data you can work with; the old version can take 65536 rows and the newer version can take 1048576 rows. If your files have more rows than this, Excel is not an option.
  • Notepad is a fantastic tool when it comes to many things. However it has limitations regarding file size. I got problems when the file size was getting closer to 1GB. If the files are smaller in size they can be opened but depending on what you want to do it can take a lot of time to process the job. For example if you want to replace all occurrences of the the character “,” with “;” and you have many thousands of rows, the number of replacements will be dependent on how many columns you have times the number of rows. This takes a lot of time even for files smaller than 10MB.

Either way, if any of these options would be sufficient you still face the problem of the tiresome process to do any manual modification work on every single file you have to process. And if you have quite a few and they are also not very small you’ll get tired of it in no time.

UFU – Useful File Utilities
The solution that I found while browsing the Internet was UFU – Useful File Utilities. This piece of software removes these obstacles. UFU is a fast and easy to use file browser that you can use to manipulate files in most ways; you can do it fast and on multiple files. Furthermore, there doesn’t seem to be a limitation in file size for it to handle and it handles all types of MS Office files.

Basic functionalities
For most functionalities you can specify files and folders to work with by standing on them and pressing SPACE or right-click the file(s). The files/folders will be marked red which means that these are the ones that will be processed.

UFU can do several things and have some basic functionalities worth mentioning:

  • Browser
    This reminds me of Windows Commander for those of you who might remember that application – except for the FTP-functionality. You can have one drive on the left side and another drive on the right side and get a good overview and/or move/copy/delete files and folders.
  • Finder
    You can search generally for files or filename patterns, by dates, file attributes or by content. It is also possible to either specify files and folders to search for/in or to search more widely.
  • Renamer
    Rename files or folders by changing the name and/or extension. You can rename using for example name, date, time and counter and preview the result before the actual rename takes place.
  • Replacer
    With the Replacer you can replace text in one file or several files. But you can also insert text before, between or after some search string or even delete. When replacing you are also offered to create a backup copy of the file(s) before replacing.
    One practical use I have had of this is when I needed to find newlines and replace them with some characters. UFU can find these hidden characters (just like notepad++).
  • Batch Replacer
    With Batch Replacer you can work with hundreds of files and do simple and complex operations. Recommended tool for programmers for example.

Plug-ins
As a registered user you can also download plug-ins with extra functionality that can be accessed via the Plug-ins menu choice in the UFU application. One of them are:

  • The encoder
    I downloaded and tried the encoder (http://www.replsoft.com/encoder.html) since I needed it for a practical reason.
    CSV-files that are downloaded from Salesforce.com with Apex DataLoader comes encoded as UTF-8. However I needed them to be in ANSI format for insert into a MySQL database. The easiest way to fix this turned out to be the Encoder plugin. Simply mark the files you want to re-encode and start the encoder plugin. Then choose From encoding format and To encoding format and start.

See the available plug-ins on this page (http://www.replsoft.com/plugins.html).

Execution time comparison
Since I have noticed quite a difference in response times I wanted to get some numbers on it and decided to compare how fast Notepad++ would replace characters in one file or multiple files to how fast UFU would do the same operations. The results are amazing! See the results table below to get the idea.

All files are csv-files with ten columns and each column contains four characters. The columns are separated by semi-colons. The file operation is to replace semi-colons with commas. You can see the number of rows, the file size and the number of operations for each run in the table below for both Notepad++ and UFU.

Notepad++

No rows File size(s) No operations Execution time
10.000 550KB 100.000 20sec
10.000*10 5,5MB 1000.000 3.27min
100.000 5,5MB 1000.000 3.10min
1.000.000 55MB 10.000.000 35min
1.000.000*10 550MB 100.000.000 Can’t do

UFU Replacer

No rows File size(s) No operations Execution time
10.000 550KB 100.000 < 1sec
10.000*10 5,5MB 1000.000 < 1sec
100.000 5,5MB 1000.000 < 1sec
1.000.000 55MB 10.000.000 5.5sec
1.000.000*10 550MB 100.000.000 49sec
3.000.000 165MB 30.000.000 16sec
3.000.000*5 825MB 150.000.000 3.45min

I really recommend this application!

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

Be the first to comment

No Java virtual machine was found

by Niklas Waller on September 23, 2010

in Software

I installed Eclipse 3.4 Classic on a new computer a while ago and it worked fine as usual. However, suddenly after a few weeks, it started behaving strange. Whenever after I restarted the computer and tried to open Eclipse I got the following error message:

A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations:
C:\eclipse\jre\bin\javaw.exe
javaw.exe in your current PATH

If I uninstalled the current JRE and reinstalled another version it suddenly started to work to start Eclipse but only until the next time the computer was restarted.

I tried to remove the current Eclipse package and install a newer version (3.5) but that didn’t work either. In fact, my fix with uninstalling and reinstalling the JRE didn’t work either.

I browsed the Internet and finally found a solution that worked for me. It is rather simple. The only thing needed is to add something to the PATH environment variable.

Detailed description:
1. Go to Control Panel
2. Click on ‘Systems’
3. Click on ‘Advanced tab’
4. Click ‘Environment Variables’
5. Go to Path in the ‘System Variables’ section and edit it.
6. Add this string to the end of the PATH; C:\Program Files\Java;C:\Program Files\Java\jdk1.6.0_19\bin. It is the path to the Java directory and to the JDK bin directory.

Now, start Eclipse and it should work again!

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

8 comments

An easy way to create mind maps

by Niklas Waller on September 9, 2010

in Software

During a meeting at work this week one of the attendees took notes of errors to correct and what to improve when demonstrating the work that they had done. I noticed that the person were using a tool that seemed simple but very effective. A mind mapping tool called FreeMind that after more research turned out to be free as well – it is a sourceforge project.

Here is an example where I try to describe the Wohill blog as a map with Wohill as the parent node. From Wohill we have categories, archives, posts, comments, tags, an rss-feed etc. Categories can in turn be divided up into main categories and sub categories.

In its simpliest form this is very useful; for example during a meeting where you need to take fast notes.
You start by creating a new sheet and by doing so you get a parent node that you can name. From there you click the INSERT button to create a child node. In our example Wohill is the parent node and Categories is a child node to Wohill. While you are on the Categories node you can create a child node to the Categories node by clicking the INSERT button. Or you can create a sibling node by clicking the RETURN button. This work the same way for all nodes. You can not create sibling nodes to the ultimate parent node (Wohill node) though. When you’re done with your mindmap you can choose to make it more fancy by making text bold, italic or colorful, changing background color or add icons to them. And if you want to you can export the map as many things, for example HTML, PDF, JPG etc.

This is actually something that I will use in my daily work!

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

Be the first to comment

Replacing characters with Notepad++

by Niklas Waller on August 19, 2010

in Software

Notepad++ is an excellent tool for text processing of different kinds.

Let’s assume you have a CSV-file on this form:

"FIELD 1 HEADER","FIELD 2 HEADER","FIELD 3 HEADER"
"row 1 field 1","row 1 field 2","row 1 field 3"
"row 2 field 1","row 2 field 2","row 2 field 3"
"row 3 field 1","row 3 field 2","row 3 field 3"

And you want it on this form:

FIELD 1 HEADER;FIELD 2 HEADER;FIELD 3 HEADER
row 1 field 1;row 1 field 2;row 1 field 3
row 2 field 1;row 2 field 2;row 2 field 3
row 3 field 1;row 3 field 2;row 3 field 3

When extracting object data using the Sales Data Loader you get a CSV file that is comma separated as the first example above. Each line ends with a new line or more exactly with the characters CRLF (\r\n). Possible line breaks within a column is used with the character
LF (\n).

If you want to load this file into for exampel MySQL later on, you specify what each line ends with and this way line breaks will be preserved within the columns.

Keeping this in mind you can do the following replacements to get the results wished for.

1. Remove first apostrophe

2. Press Ctrl-F and search for any semi-colons. If any are found replace them with something appropriate.

3. Press Ctrl-H (replace dialogue box) and find “,” and replace with ;

Now the file will look like this:

FIELD 1 HEADER;FIELD 2 HEADER;FIELD 3 HEADER"
"row 1 field 1;row 1 field 2;row 1 field 3"
"row 2 field 1;row 2 field 2;row 2 field 3"
"row 3 field 1;row 3 field 2;row 3 field 3"

Now if you show all characters (Menu – View – Show all characters) you will see the newline characters.

4. Replace end-of-line characters apostrophes and beginning-of-line apostrophes

4.1 Press Ctrl-H
4.2 Choose Extended Search mode (at the bottom of this dialogue box)
4.3 Find “\r\n” and replace with \r\n

5. Remove last apostrophe

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

Be the first to comment

A workaround for encoding problems in Excel

by Niklas Waller on October 22, 2009

in Software

When I download a file from one of the data tables in BigMachines I want to modify it in some way and then upload it back again.

If there are hundreds or thousands of rows I need this data manipulation to be in Excel. Sometimes there are Swedish characters like å, ä or ö in the file and they need be be preserved this way.

However when opening a csv-file encoded with UTF-8 in Excel these characters are displayed as very odd characters instead. If I replace the odd characters with the correct ones and save it, it is saved as ANSI and uploading it will instead make it look strange and cause errors in the system.

Here is a little workaround to make it work.
1. Open the csv-file in Notepad++ and convert it to ANSI and save.
2. Import to excel and modify and save.
3. Open again in Notepad++ and convert to UTF-8

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

2 comments

Start MSN messenger from command line

by Niklas Waller on April 23, 2009

in Software

MSN Messenger appeared to be missing from my wife’s computer one day. I don’t really know why but it didn’t start automatically as it usually does and we could find it. This happened to me at some point too.

If this happens there is a quick way to start it.

Go to Start -> Run and type ‘msnmsgr‘.

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

2 comments

A feature in Google Chrome (Google’s web browser) let’s you not only see the memory usage for Google Chrome’s different tabs and components but also for the other browsers that are currently running on the computer. It is called the task manager and can be started by either typing ‘about:memory’ in the address bar or by clicking the task manager.

The task manager offers a summary view of the memory usage of the running browsers. You can see private, shared and total memory in the picture below (and virtual). In this little comparison experiment I opened 4 tabs in three different browsers; Google Chrome, Firefox and Internet Explorer. The pages were iGoogle, Twitter, Planetlotus and Wohill. According to the task manager, Internet explorer requires most memory usage (168.784 MB RAM), Chrome comes on second place (165,588 MB RAM) and Firefox first (141,852 MB RAM). It depends on how you read these numbers though.

Chrome actually takes up more RAM than that. If you look at the processes section below you can see how much the different processes uses. The actual web browser process uses 86248 MB and the shockwave flash plugin process uses 22996 MB. There can be other plugin processes here of course like the Google Talk plugin.

The amount of memory usage differs between the rest of the tabs depending on the specific website. iGoogle and Wohill requires a bit more memory than Twitter and Planet Lotus for example – Good work there Yancy! And shame on me…

So over all Google Chrome actually uses more memory than the other browsers, but since each tab is a different process it runs much faster. If you are not short of RAM memory, Chrome is a better option in my opinion.

While talking about the different browsers, Chrome and Firefox together comes on the first place. Chrome because it runs fast and is very easy tow work with and never goes crazy with memory. Firefox goes crazy with memory sometimes which transforms the computer into a helicopter. On the other hand it is mostly also fast and have the outstanding Firebug-plugin which you can not live without as a web developer. Internet explorer comes last because is does not have anything special in my opinion. Now it has tabs but for some reason the content has to load in a tab until you can start typing in an address for instance, extremely irritating.

Which is your favourite browser?

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

3 comments

A tip on how to fit data in excel

by Niklas Waller on December 30, 2008

in Software

Sometimes you need to fit a lot of data into an excel spreadsheet. You might want to choose 7 or 8 as font size. When you start typing in information you suddenly notice that the text, that numbers the rows, are too big and gets cut off, see below.

As far as I know there is no way of changing the size of the numbers and letters. If there is, then great, another way. But this is how you should do it otherwise. Keep the default size of 10 or 11 or what it is. Then zoom out, that is set the percentage of what you are viewing to 75% or something like that. This will give you the same effect but it also makes the numbers and letters of the columns and rows to look as if they have the same font-size.

Now, if you print this, it will probably be in 10 or 11 as font size anyway. What you do to fix that is that you set the scaling in the ‘Page Setup’ dialog to the same percentage. Now when printing you will fit more information on one page.

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

3 comments

Digsby = IM + Mail + Social Networking

by Niklas Waller on June 14, 2008

in Software

I would like to present a really cool software I found via a friend on Twitter called Digsby.

It is as it says in the headline a tool for IM, Mail and Social Networking. More specifically it lets you use one software only to keep track and handle all of your chat clients, mail clients and social networks – or at least the supported ones.

IM/Chat

The IM-part consists of a combined buddy list for all of your contacts that you have in any of the following:
- AIM
- MSN
- Yahoo
- ICQ
- Google Talk
- Jabber

If you have the same contact in for example both MSN and Google Talk, then it will be displayed as one contact (it seems to go for the email address when merging). Some other features are renaming contacts, sending SMS, manage multiple conversations with tabbed windows. No support for Sametime unfortunately.

Email

The supported ones are:
- Hotmail
- Gmail
- Yahoo mail
- AOL/AIM mail
- IMAP and POP accounts

Send e-mails right from the IM-windows with the chosen mail client.

Social networking

The supported networks are:
- Twitter
- Facebook
- MySpace

You can post status messages directly from the client. Receive twitter messages as small self-disappearing popups and see notifications from facebook etc.

Status for social networks and mail clients are seen as small icons in the status bar and with just a single click a windows slides up showing the latest status or received mails.

This is an extremely cool and very useful software. Nowadays everything that is cool is web-based. This shows on a great desktop program that really impresses. Download it, you won’t be disappointed!

Share and Enjoy:

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • Google Buzz
  • RSS
  • Slashdot
  • Technorati
  • Add to favorites
  • DZone
  • LinkedIn
  • MySpace
  • Tumblr

Be the first to comment