Tech blog

Solving problems

About
Contact

Archive for the ‘Tips and Tricks’ Category

Three essential plugins for Expression Blend

leave a comment

When it comes to vector graphics in Windows applications XAML is the most advanced format to choose from. XAML is great because developer/designer has full control over the graphics. Hidden reference lines, or garbage shapes, or objects can be relatively easily detected and removed from the code as compared to those formats that entirely rely on GUI editor.

A XAML document can be created with plain Notepad but there are great apps like Visual Studio, Expression Blend and Kaxaml that simplify editing. What is missing in those apps is lack of XAML exporting support, like saving .xaml to .png file. Luckily there are plugins to do just that.

xbprint is printing plugin for Expression Blend 3 hosted on CodePlex. Installation of the utility must be perfomed manually by extracting files to the Addins folder in Expression Blend directory. But once the plugin is installed it is easy to use. Set margins, alignment, paper size and click Print.

xbprint screenshot

xbraster is xaml to raster image converting plugin, a close relative to xbprint. Installation and use is similar. xbraster can convert XAML to PNG, JPEG, TIFF, GIF or bitmap.

xbraster screenshot

xbsprite is a sprite image generating plugin. Input xaml files are rasterized and combined in one image with optional CSS and HTML output for use on a web page.

xbsprite screenshot

For advanced and professional use of XAML xbprint, xbraster and xbsprite are must-have plugins.

EDIT: xbprint, xbraster and xbsprite can run directly from desktop – no need to have
Expression Blend installed.

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Written by developer

July 5th, 2010 at 10:49 am

Thoughts on android mobile development

leave a comment

Intro
We like the taste of MVC in ASP .NET and have some practical experiences in coding Java applets, J2ME and Silverlight applications.

Lately our team decided to build a simple application for Android phone to try the platform. Story begins with an idea and motivation, installing and setting Eclipse + Android SDK, and like always, a sketch, todo list, etc.

Issues

  • For each property in layout xml the “android:” namespace is needed. Of course it can be replace with “a” but it still annoying to write it every time. Example <LinearLayout android:id=”@+id/pnlSomething” />   There is more advanced graphical xml standard – SVG
  • oops, I tried (miss-clicked) to run android as classic Java application but it returns an error (like build error),
    next time I try running as android application this error wont go away even if the code is fine
    solution: delete error from the error list and it should work fine :)
  • sometimes I run a debug and don’t notice the tiny icon in the far right bottom corner of eclipse
    that shows the application is launching and it’s stuck… and I try to launch it again, and again
    and applications are trying to launch parallel… solution: close eclipse and start again
  • connection refused on localhost? is this a joke? is only google.com allowed?
    firefox opens it normally, firewall is off, same on IIS and apache, permissions are set in manifest.xml
    reason: ‘localhost’ means the internal loopback of device (emulator) not the PC,
    solution: use your LAN IP
    //solution: edit hosts and set something like 127.0.0.1   pc-localhost //does not work
    http://groups.google.com/group/android-developers/browse_thread/thread/801645febf0523ea/9e779925e9570828
  • when a crash occurs it is just a crash, without detailed message or tip, developer should guess the error
    * and, BTW, emulator shows wrong time on windows (7:04 PM while the real time is 21:04 on GMT+1 timezone
    or 5:07 PM when the time is 19:07)
  • Record breaker among IDEs: 1.131 GB of RAM taken by Eclipse
  • A lot of features: social media, web, google maps, sqlite, bluetooth,
  • gestures, camera, speech recognition, 3D, processing…
  • s it easy to learn? theory yes, it is logical and quite simple, well documented;
    but dealing with basic practical issues is a pain

What really annoys us is that when we write layout in xml and we are confidant with it schema is right, works in theory, draws a preview but just don’t work in emulator Eclipse won’t tell what is the problem it just says “Source Not Found.”

Comparison: C# vs Java

A good programming language uses less code and effort to complete a task. What makes Silverlight (C#) coding easier and Android (Java) coding harder? Advantages of C# over Java or what is missing in Java:

  • lambda expression and Linq make handling data, arrays, xml easy
  • properties
  • partial types when dealing with large files
  • preprocessor directives (#if, #region) to bring visual focus on the particular part of code that is being developed and hide the other code
  • verbatim string, like @”C:\Program Files\android\sdk.exe” without escape characters
  • nullable types, like int? that can be -n…0, 1, 2…n or null
  • ‘yield’ keyword
  • ‘??’ operator
  • enumerations that are avoided in Android (Android uses constants, requires documentation to locate a constant)

* comparing to Silverlight you need to write more code in a more complex way for same features (ie. async, binding,
db, events)

* nullable types, like int? that can be -n…0, 1, 2…n or null
VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Written by developer

June 28th, 2010 at 2:04 pm

Export from Excel 2007 to XML Data

leave a comment

Quick olnine tool to create simple HTML table from Excel worksheet is here: http://tableizer.journalistopia.com/

Export XML data in mapped cells to an XML data file

  • If the Developer tab is not available, do the following to display it:
    • Click the Microsoft Office Button Button image, and then click Excel Options.
  • In the Popular category, under Top options for working with Excel, select the Show Developer tab in the Ribbon check box, and then click OK.
    Note
    The Ribbon is a component of the Microsoft Office Fluent user interface.
  • On the Developer tab, in the XML group, click Export.

XML group in Ribbon

Note If a small Export XML dialog box appears, click the XML map that you want to use, and then click OK.

The Export XML dialog box will only appear if an XML table is not selected and if the workbook contains more than one XML map.

  • In the large Export XML dialog box, in the File name box, type a name for the XML data file.
  • Click Export.

Note There may be headings or labels in your worksheet that are different from the XML element names in the XML map. However, the XML element names are always used when you export or save XML data from the worksheet.

About creating XML Schema…

Here is a sample XML:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Root>

  <EmployeeInfo>
    <Name>Jane Winston</Name>
    <Date>2001-01-01</Date>
    <Code>0001</Code>
  </EmployeeInfo>

  <ExpenseItem>
    <Date>2001-01-01</Date>
    <Description>Airfare</Description>
    <Amount>500.34</Amount>
  </ExpenseItem>

  <ExpenseItem>
    <Date>2001-01-01</Date>
    <Description>Hotel</Description>
    <Amount>200</Amount>
  </ExpenseItem>

  <ExpenseItem>
    <Date>2001-01-01</Date>
    <Description>Taxi Fare</Description>
    <Amount>100.00</Amount>
  </ExpenseItem>

  <ExpenseItem>
    <Date>2001-01-01</Date>
    <Description>Long Distance Phone Charges</Description>
    <Amount>57.89</Amount>
  </ExpenseItem>

  <ExpenseItem>
    <Date>2001-01-01</Date>
    <Description>Food</Description>
    <Amount>82.19</Amount>
  </ExpenseItem>

  <ExpenseItem>
    <Date>2001-01-02</Date>
    <Description>Food</Description>
    <Amount>17.89</Amount>
  </ExpenseItem>

  <ExpenseItem>
    <Date>2001-01-02</Date>
    <Description>Personal Items</Description>
    <Amount>32.54</Amount>
  </ExpenseItem>

  <ExpenseItem>
    <Date>2001-01-03</Date>
    <Description>Taxi Fare</Description>
    <Amount>75.00</Amount>
  </ExpenseItem>

  <ExpenseItem>
    <Date>2001-01-03</Date>
    <Description>Food</Description>
    <Amount>36.45</Amount>
  </ExpenseItem>

  <ExpenseItem>
    <Date>2001-01-03</Date>
    <Description>New Suit</Description>
    <Amount>750.00</Amount>
  </ExpenseItem>

</Root>

And here is a sample schema:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="Root">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element minOccurs="0" maxOccurs="1" name="EmployeeInfo">
          <xsd:complexType>
            <xsd:all>
              <xsd:element minOccurs="0" maxOccurs="1" name="Name" />
              <xsd:element minOccurs="0" maxOccurs="1" name="Date" />
              <xsd:element minOccurs="0" maxOccurs="1" name="Code" />
            </xsd:all>
          </xsd:complexType>
        </xsd:element>
        <xsd:element minOccurs="0" maxOccurs="unbounded" name="ExpenseItem">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="Date" type="xsd:date"/>
              <xsd:element name="Description" type="xsd:string"/>
              <xsd:element name="Amount" type="xsd:decimal" />
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Prevsmeritev mobilne številke

leave a comment

Včasih se zgodi da pozabite mobitel doma in v tem primeru je najboljše da naredite prevsmeritev vseh klicev z vašega mobitela na drugo telefonsko številko.
Če je recimo druga telefonska številka (fiksni telefon): 015000400 bi komanda za prevsmeritev bila:
*21*015000400#

Ko želite preklicati prevsmeritev (dobite mobitel v roke) potem morate vpisati komando za preklic:
#21#

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Auto-incement assembly build version in Visual Studio 2008

leave a comment

When building a project with Visual Studio an output assembly with embedded version is generated. Version indicates how an application is advancing in development.

Developer can change output assembly version for each project by opening project’s properties (right click, Properties), clicking Assembly Information… button and editing text in fields (see marked area on the image below).

VS2008 window for changing assembly version

VS2008 window for changing assembly version

Alternative is to open Properties/AssemblyInfo.cs or .vb and change AssemblyVersion value in a text editor.

Version can be automatically incremented on each build. To enable counter open Properties/AssemblyInfo.cs and set:

//Change AssemblyVersion's value from 1.0.0.0 to 1.0.* and comment AssemblyFileVersion
[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

Auto-increment symbol (‘*’) cannot be set in GUI (like screenshot above) but only in code.

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Written by developer

January 18th, 2010 at 5:12 pm

Mozilla Thunderbird 3 – črkovalnik za slovenski jezik – slovenian dictionary – slovenian spellchecker

one comment

Slovenski črkovalnik se ne more pravilno namestiti v e-poštnem odjemalcu Mozilla Thunderbird 3.0
Obstaja rešitev za to težavo.

  1. Prevzemite Add-on s spletne lokacije https://addons.mozilla.org/en-US/thunderbird/addon/3046 in ga shranite na disk (Download)
  2. Odprite shranjeno datoteko (dejansko je ZIP arhiva) slovar_za_slovenski_jezik-0.1.1-fx+tb+sm.xpi s dvojnim klikom (če gre) – če ne gre razpakirajte zadevo v eno novo podmapo in potem z Notepad-om odprite datoteko install.rdf in v vrstici št. 19 spremenite <em:maxVersion>2.0.0.*</em:maxVersion> v <em:maxVersion>3.*.*</em:maxVersion> Na ta način boste podprli delovanje za vsako verzijo 3, ne glede na podverzijo.
  3. Shranite spremembe in še enkrat celotno vsebino podmape v katero ste razpakirali Add-on zapakirajte v eno ZIP arhivo.
  4. Spremenite ime v originalno slovar_za_slovenski_jezik-0.1.1-fx+tb+sm.xpi
VN:F [1.9.3_1094]
Rating: 5.0/5 (2 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 2 votes)

Minimize All on Logitech Performance Mouse

leave a comment

We are very pleased with new Logitech® Performance Mouse MX™ mouse.

The only bad thing is that it has not in the function list “Minimize All” command – alternative to WINDOWS LOGO + M.

Logitech

So we should do it ourself. We will explain it for Window 7.

First, create “Show Desktop” shortcut yourself by this method:

  • Open Notepad and paste the following block of code there:
  • [Shell]
    Command=2
    IconFile=explorer.exe,3
    [Taskbar]
    Command=ToggleDesktop
  • Write: “File Name”: “ShowDesktop.scf”; “Save As” “All Files”, and save to your preferred location.

Second, open Logitech software and assign it to preferred button Keyboard shortcut. We chose CTRL+ALT+9 (you will see some strange symbol like apostrophe)

LogitechProgram

Third, create a shortcut from ShowDesktop.scf and assign it a keyboard shortcut using right click on created shortcut and enter CTRL+ALT+9

Shortcut

Test your magic mouse button. Voilla! It works :-)

VN:F [1.9.3_1094]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Most helpful windows keyboard shortcuts

one comment

We have found this list at this location and decide to share with all of you.

Let’s learn how to use the 15 top most commonly used Windows XP shortcuts.

15 Helpful Keyboard Shortcuts

To take advantage of this drill, you should be comfortable using a keyboard, otherwise the speed you want to increase will be taken away by you not being entirely sure where a certain key is, so it helps to be familiar with the layout.

First, take a good look at your keyboard and be familiar with the layout. Most of you will have something similar to the illustration seen here as this is a standard 101 key keyboard layout.


Figure 1

Note:
Laptop users may have the same keys on their systems, but in different places so take a second to familiarize yourself with key placement before you begin the exercise. If you have something similar, then you will be fine. Many peripheral vendors added a lot to their keyboards, such as multimedia options and so on.

Tip 1: Quickly Accessing the Start Menu

Keyboard Shortcut: Windows key


Figure 2

If you are just plan old ‘sick and tired’ of using the mouse to click on the infamous button to display the Windows Start Menu, then you simply only need to hit the ‘Windows’ Key. Using either or (there are usually two of them, one on a laptop keyboard) so you can use either or. The Windows key once pressed will launch the start menu – once you release the key, the menu will appear. Get used to this key; many of the other shortcuts you will use rely on this key.

Note:
You may have a ‘very’ old keyboard that may not include the Windows Key on it. You will not be able to use this shortcut unless you get a new keyboard.

You can also use Ctrl + Esc

Tip 2: Quickly getting to your System Properties

Keyboard Shortcut: Windows key + Pause/Break


Figure 3

There will certainly be times where you will need to access the System Properties for your computer. When you need to get to the properties, many times you will go through a pretty long exercise. There are a couple of ways to get to the properties, most commonly by right clicking the mouse over the ‘My Computer’ icon on your desktop and then selecting properties from the drop down menu. If you do this very often, you may consider using this keyboard shortcut.

Tip 3: Quickly getting to your Run Dialog Box

Keyboard Shortcut: Windows key + R


Figure 4

The Run dialog box is used to allow you to either browse to a command to run, or simply enter the path to one if not already entered in the system’s path statement. (path=)

To quickly run an executable (such as calc.exe), just type calc in the Run dialog box and if in the path statement, it will simply run. The Run dialog box is used often so this shortcut will really come in handy.

Note:
You can also quickly access websites by entering URLs in the Run dialog box …. http://www.rsnetworks.net/

-or- You can also open files with the following: file:///C:/filename.txt

Tip 4: Quickly Locking your System

Keyboard Shortcut: Windows key + L


Figure 5

There will surely be times where you want to quickly step away from your system and not leave it accessible to prying eyes in the office or home. How do you quickly lock up your PC and allow it to be secure from immediate access at the console? By locking it up, that’s how.
Commonly, the quickest way to do this was to use the Ctrl+Alt+Del key sequence (will be covered shortly) which would allow you to select an option to ‘Lock Workstation’. Using this keystroke will allow you from moving to using three keys and the mouse to navigate to a simple keystroke that will lock your system immediately.

Tip 5: Quickly Search for Anything

Keyboard Shortcut: Windows key + F
Keyboard Shortcut: Windows key + Ctrl + F


Figure 6

If you want to find files (and or computers, and other random things on your system) you will want to use the Search feature built into Windows XP. To use this, remember the old name for it, which was simply Find. Now – the Windows Key + F will invoke the Search function and within a few seconds, you should see your Search Results dialog box come up. Use this feature to find items on your system or on remote systems that you may have access and connections to. You can also use this feature to find other computers on your network if you wanted to add the ctrl key in that keystroke sequence. If not, you can use the original keyboard shortcut and then just select Computers or people as the criteria you want to search.

Tip 6: Quickly Minimizing and Restoring Windows

Keyboard Shortcut: Windows key + D


Figure 7

One of my favorite keyboard shortcuts is the Windows Key + D shortcut. Try to remember the word ‘desktop’ when you try to remember the D, think of using this shortcut to reveal the ‘desktop’ and it may help you remember it.

Many times I am very tied up (like right now) with many Windows open on my system. This is because most times, I am working within multiple applications. There are times where I may want to view the desktop for one reason or another, and that can ‘very’ quickly be done with a keystroke. There were many ways to minimize all Windows that may be blocking view of the desktop, but this is one of the quickest. Another very quick way is if you have the ‘quick launch’ toolbar setup in your Taskbar. If you do in fact have this set up, this is also a quick way to reveal the desktop, as well as to put it back again.

Tip 7: Quickly getting to the Utility Manager

Keyboard Shortcut: Windows key + U


Figure 8

Users can start accessibility programs before logging on to the computer by using this keystroke. If you are fond of using the Utility Manager, then this keyboard shortcut will definitely help you to get to it. Tools such as ‘Magnifier’ and ‘Narrator’ can be set to start automatically and so on with this system utility.

Note:
Utility Manager enables users to check an accessibility program’s status and start or stop an accessibility program. Users with administrator-level access can designate to have the program start when Utility Manager starts. The built-in accessibility programs available from the Utility Manager are Magnifier, Narrator, and On-Screen Keyboard. Narrator, a text-to-speech program, starts when Utility Manager opens. This gives users who are blind or have impaired vision immediate access to Utility Manager. Using Utility Manager, you can tell Windows to automatically start accessibility programs each time you log on to your computer, when you lock your computer desktop, or when Utility Manager starts.

Tip 8: Quickly getting to Help and Support

Keyboard Shortcut: Windows key + F1


Figure 9

If you are in need of help or support, look no further. By using Windows Key + F1 (the F1 key), then you can use the help and support system that comes with Windows XP.

Note:
Help and Support may take a second to load on most systems, so be patient.

Tip 9: Quickly getting to Windows Explorer

Keyboard Shortcut: Windows key + E


Figure 10

Here is another great shortcut you may not know about. If you want to access Windows Explorer (not Internet Explorer – the Web browser), you can use the Windows Key + E shortcut. This will open up Windows Explorer for you so you can manage files and other forms of data on your system.

Be aware that this may take a moment to open if you are working on a network and have mapped drives, so be patient if it takes a moment.

Tip 10: Quickly delete something without being ASKED to

Keyboard Shortcut: Shift + Del


Figure 11

This is absolutely my all time favorite shortcut, now you can delete something from your system and not be asked 82 times if I really am sure I want to do that…. this keyboard shortcut allows you to bypass the asking – your data is deleted without question.

Note:
This is only dangerous if you are not sure if you want to delete something or not, but honestly, with the fact being that you have to ‘empty’ your recycle bin anyway… as long as you don’t have a task set up to do it – then this is definitely something you want to consider.

Tip 11: Quickly getting to your shortcut menu

Keyboard Shortcut: Windows key


Figure 12

Newer keyboards have a key that allows you to now get properties menus from anything you select that can provide you with a menu. For instance, if you have Office document on your desktop (let’s say, a spreadsheet named tax.xls) then you can select it and press the Window key and then the shortcut menu key and you can now quickly view properties for a selected object. Although this is not the ‘fastest’ keystroke sequence in the world, it happens to be a very helpful one especially if you do not have a mouse attached to your system.

Tip 12: Quickly getting to your Task Manager

Keyboard Shortcut: Ctrl + Alt + Del


Figure 13

By far the most commonly used keystroke sequence used on just about any and every Windows system ever created. By pressing (and holding down) the Control key (ctrl), then the Alt key (Alt), and then the Delete key (Del), it will allow you to lock your workstation, change a password as well as use Task Manager.

Tip 13: Quickly switch between running programs

Keyboard Shortcut: Alt + Tab


Figure 14

If you work with many programs (most people who work on computers these days fit this description) then you will definitely want to learn about and master the Alt + Tab keystroke sequence. By selecting the Alt key and then holding it down (try this with your left thumb) and then use the tab key to switch between running programs, highlighting and selecting a specific program will bring that one to the foreground, maximized in your screen so that you can work within it. Releasing the Alt key brings up the program you want to use.

Note:
This keystroke needs to come with a small warning. If you hit the Caps Lock key by accident, then you will get no results other than your Caps Lock being on and maybe causing you some confusion and headaches a little later on. As well, if you hit the Alt key only by accident, it will select the ‘menu’ in just about any open dialog box you have in the foreground. Just be aware that missing keys and hitting others in this situation will not only cause you to not get the result you wanted, but then some unwanted results as well.

Tip 14: Quickly Getting to Full Screen Command Prompt

Keyboard Shortcut: Alt + Enter


Figure 15

If you want to see the Command Prompt in full screen (not in a small Window), you can quickly expand it to full screen with the Alt + Enter keystroke sequence. The only problem with this is, you need to have the Command Prompt open to expand it to full screen, so, to open it you can use the Run dialog box.

Here is a way to use two keyboard shortcuts at once… as you may recall, we already learned the shortcut to get to the Run dialog box, which was using the Windows Key + R. Now, once open, type cmd and hit enter. This will then open your Command Prompt.

CMD gives you full screen mode only if you select it from the properties of the Command prompt Windows – you can select full screen mode by default, but I don’t like it this way, it is too intrusive and cumbersome – using the Keyboard shortcut will give you want you want very quickly and give you access to both types (Windows or Full Screen) as quickly as you can hit the keystroke sequence.

Note:
Alt + Enter can be very confusing because its one keystroke that does ‘many’ different things depending on where you are at the time of usage. Alt + Enter with no programs open it may do nothing. Just be aware of how you are using the command keystroke and what you have open at the time.

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Written by Avivo

December 22nd, 2009 at 11:44 pm