Monday, 17 June 2013

Change Photoshop language to English

I installed localized version of Photoshop CS6 (this tutorial works well with previous versions too).
Problem is, that all online tutorials are based on English version. So I want to change my UI language.

Go to where you installed Photoshop -> Locales -> language folder -> Support Files
eg.
C:\Program Files\Adobe\Adobe Photoshop CS6\Locales\pl_PL\Support Files
Then find file "tw10428.dat" and change it's extention to ".bak". Restart Photoshop.

Now, because Photoshop cannot find your localized language, it will display menus in English.

Thursday, 6 June 2013

Missing ACPI Driver

Zainstalowałem Windows 8 na netbooku ASUS Eee PC 1201N. 
Natychmiast po aktualizacji do Win 8 zaczął wyskakiwać komunikat "Missing ACPI Driver". Jest to spowodowane błędnym sterownikiem klawiszy skrótów (te małe niebieskie ikonki na klawiaturze) w ASUSie. 

Aby naprawić ten błąd, należy najpierw odinstalować stary sterownik.
Po restarcie wyszukaj na stronie producenta sterowników do ASUS 1225B. Można wybrać Windows 8 i pod "Other" będzie do pobrania "Hotkey services". Pobierz i zainstaluj.

Wpis pochodzi z bloga http://windows8betatest.blogspot.com/

Friday, 5 April 2013

Animated tile-style hyperlinks

I must admit, I begin to love jQuery. I am not JavaScript developer, yet jQuery is so easy, that even I can use it.

In this post I will explain how to create animated, scrollable box with alternating links and images. Just like this one:


1.       Start by adding these scripts inside body of your page:

    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.cycle/2.88/jquery.cycle.all.min.js" type="text/javascript"></script>
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.18/jquery-ui.min.js" type="text/javascript"></script>
   <script type="text/javascript">

        $(document).ready(function () {
            var randomDelay = function () {
                var min = 1000;
                var max = 1500;
                var wait = Math.round(Math.random() * (max - min) + min);

                return wait;
            };

            $('.animated-tile').cycle({
                fx: 'scrollDown',
                easing: 'easeOutBounce',
                speed: 3000,
                delay: -3000,
                timeoutFn: randomDelay,
                random: 0,
                pause: 1,
            });
        });

    </script>

Here, in randomDelay function, set minimum and maximum time in milliseconds.

2.      Put div section where the box will be:
<div class="animated-tile" style="position: relative; width: 110px; height: 110px; overflow: hidden;">
Width and height should be the same as dimensions of images to cycle.

3.       Put multiple links with images inside. That's it!
<a href="http://goleszympansy.pl>
   <img src="myimage.jpg" height="110px" width="110px" border="0px">
</a>

Tuesday, 22 January 2013

Crystal Reports: page orientation

Right-click on report page:
Choose Design -> Page Setup -> Orientation

Saturday, 19 January 2013

Autofokus w Nikon D7000

Ujęcie zarejestrowane aparatem Nikon D7000.
Nowe Nikony mają funkcję ciągłego autofokusu podczas nagrywania. Jak ta funkcja sprawdza się w praktyce, można zobaczyć na poniższym video.

  • jeśli filmuję z ręki, aparat łatwo "gubi" ostrość. Żeby ją odnaleźć czasami przeszukiwany jest nawet cały zakres
  • autofokus hałasuje. Nawet na nagraniu cały czas słychać silnik.


Wednesday, 28 November 2012

Sync SkyDrive Pro

With SkyDrive Pro, files can be synchronized easily between PC, SharePoint library, and other devices. Necessary are:
Office 2013
SharePoint 2013 or Office 365.
This functionality was previously known as SharePoint Workspace. It 2013 version it is just much simpler.


Run SkyDrive Pro

Enter URL of what you want to sync
Click Sync Now.

After just few minutes you will see SkyDrive folder in Windows Explorer…
that is synchronized with SharePoint

Thursday, 15 November 2012

SharePoint 2013 Look & feel in WebApp

Include these files

Copy sp.ui.controls.js from
<15 Hive>\TEMPLATE\LAYOUTS

Also, add SPHostUrl variable to query string, so address is something like:
TestPage.aspx?SPHostUrl=https%3a%2f%2fmyofficethreesixtyfive.sharepoint.com
<head runat="server">
    <title></title>
    <script src="../Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="../Scripts/sp.ui.controls.js" type="text/javascript"></script>
    <script type="text/javascript">
        var hostweburl;
        $(document).ready(function () {
            hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
            var scriptbase = hostweburl + "/_layouts/15/";
            $.getScript(scriptbase + "SP.UI.Controls.js")
        });
        function getQueryStringParameter(paramToRetrieve) {
            var queryString = document.URL.split("?")
            if (queryString.length > 1) {
                var params = queryString[1].split("&");
                var strParams = "";
                for (var i = 0; i < params.length; i++) {
                    var singleParam = params[i].split("=");
                    if (singleParam[0] == paramToRetrieve) {
                       return singleParam[1];
                    }
                }
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div
            id="chrome_ctrl_container"
            data-ms-control="SP.UI.Controls.Navigation"
            data-ms-options='{
                "appHelpPageUrl" : "HelpPage.html",
                "appTitle" : "Diff App",
                "settingsLinks" : [
                {
                    "linkUrl" : "Page1.html",
                    "displayName" : "Navigation 1"
                },
                {
                    "linkUrl" : "Page2.html",
                    "displayName" : "Navigation 2"
                }
            ]}'>
        </div>

Snippets can be downloaded from here:
Scripts snippet
Div container snippet


Wednesday, 14 November 2012

Tuesday, 13 November 2012

Step-by-step: creating Remote Event Receiver

In this example I will show, how to create autohosted SharePoint 2013 app with Remote Event Receiver, and then how to deploy it to Office 365 Developer Preview.

Start with creating a list in SharePoint site, to which you will attach Event Receiver.
Go to site contents and create new Announcements list.

In Visual Studio, create new project type: App for Office 2013. For hosting type, choose autohosted.
In Solution Explorer, right-click on newly created project and choose Add > New Item. Add Remote Event Receiver

In next dialog, choose list type and which events will be handled.

You will notice, that new project has been added to your solution. This is a web service, that will be hosted outside SharePoint, on Windows Azure. SharePoint will make calls to this web service, that contain code to handle remote events.

At this step, Visual Studio has generated some boilerplate code, that you will need to extend.
Notice 'TokenHelper.cs' file. This file contains ready to use methods, to retrieve SharePointContextToken. This context token can be later used to call back to SharePoint. You can make calls to SharePoint using Client-Side Object Model (CSOM).

If you selected several different events for your list, like eg. ItemAdded, ItemUpdated, ItemDeleted, etc., they will all be handled by ProcessEvent method in web service. To be able to differentiate between various event types, use RemoteEventProperties.EventType property.

    switch (properties.EventType)
    {
        case RemoteEventType.ItemAdding:
            break;
        case RemoteEventType.ItemUpdating:
            break;
        case RemoteEventType.ItemDeleting:
            break;
        default:
            break;
   }
When you finish writing Event Receiver code, deploy it to website.
You should have already Site URL in project properties set. Select Build > Deploy Solution. Visual Studio will connect to your website, ask you for login and password and then deploy solution. You will have to confirm, that you trust this app.

More reading on MSDN:
[3] Bing Video - Remote event receivers in SharePoint 2013 demo (video tutorial for preview version of SharePoint15)

Monday, 12 November 2012

Getting started with SharePoint 2013 development - prerequisites

What you need before you start:
1. You have to get Visual Studio 2012. Previous version is not enough.
2. You need to install Office Developer Tools for Visual Studio 2012. Get it from http://go.microsoft.com/fwlink/?LinkID=261869.

Unfortunately, the installation failed

It says right there: "ensure that all instances of Visual Studio are closed". Then try again - go to Web Platform Installer 4.0 and search for "Office".


And now, it's all working.

Remember to start Visual Studio now as administrator.