How to break Google Chrome

by 9. March 2010 23:47

Wanna get "Uncaught SyntaxError: unexpected token new" error?

Just write something like this:

var obj = {
    new: true
}
 see? simple isn't it?

Tags: ,

Software | Life

Reopen closed tabs on ExtJS TabPanel and autoDestroy

by 5. January 2010 00:58

Basically when you close a tab TabPanel completely destroys it by default (and you can’t reopen closed tab).

To override this behavior add autoDestroy: false to your TabPanel settings object.

But when you try to close a tab you will see  something like this:

autoDestroy_before

That is, tab header is disappeared but the body still visible.

The problem is that you should process remove operation by yourself. Especially if you still want to hide tab body after closing the tab. To do this add two event handlers:

listeners: { 
            remove: function(tp, c) { 
                c.hide(); 
            }, 
            add: function(tp, c) { 
                c.show(); 
            } 
        }

autoDestroy_after

Tags:

IT | Software

AG_E_UNKNOWN_ERROR (code 4004) while referencing custom control in Silverlight

by 28. December 2009 16:20

AG_E_UNKNOWN_ERROR

Check all namespace declarations in your Generic.xaml.  If you find something like this:

xmlns:local="clr-namespace:Your_namespace" you should add assembly reference as well:
xmlns:local="clr-namespace:Your_namespace;assembly=Your_assembly"

AG_E_PARSER_BAD_TYPE

Maybe you forgot add reference to assembly(and all its references) with custom control?

Error: Unhandled Error in Silverlight Application Code: 2103 Category: InitializeError Message: Invalid or malformed application: Check manifest

Right click on project, go to properties, and select the valid name under "Startup object"

Tags: ,

IT | Software

3 wtf Internet Explorer Javascript Errors

by 26. November 2009 23:43

 

  • Invalid property value. bodyStyle: 'background-color: <-space_here#dfe8f7;'. Without space it works perfectly. You can find bodyStyle setting in ExtJs control constructors.
  • Unkown runtime error Ext.DomHelper.overwrite("_id_here_", '       ');. You cannot set innerHTML of table in Explorer directly. Use deleteRow/appendRow methods.
  • Invalid source HTML for this operation (also known as Unknown runtime error) $('span').innerHTML += <div>...</div>''. You cannot insert a block element inside a non-block element

For me, these errors became a revelation =). Mainly because of the fantastically useful error messages.

Tags: , ,

IT | Software

Latex and Cyrrilic

by 17. November 2009 21:51

documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}

\title{Cartesian closed categories and the price of eggs}
\author{Jane Doe}
\date{September 1994}
\begin{document}
\maketitle
Привет Мир!
\end{document}

 

Also i have cm-super installed together with all other available in Ubuntu Cyrillic fonts.

And note utf-8 mule mode in Emacs.

And very nice pages about using Latex with Emacs(in russian) 

Tags: ,

IT | Software

How to make F# compilation command shorter

by 31. October 2009 12:52

Here the script:

===========================================

#!/bin/bash

NEWARGS=""

while [ $# -gt 0 ]
do
NEWARGS="$NEWARGS $1"
shift
done

mono /usr/bin/fsharp/bin/fsc.exe $NEWARGS

=============================================

Here we just assembly command line back to one string

 

it assumses that you have fsharp installed in /usr/bin/fsharp.

Create a file named fsc in /usr/bin (for example). Make in executable chmod +x /path_to_fsc. And now you can call just fsc <your_args> instead of mono fsc.exe <your_args> (i assume that you add /usr/bin/fsharp/bin to $PATH)

 

With help of this toy script i've compiled http://www.piotrzurek.net/2009/07/11/worlds-first-f-web-browser-runs-on-linux-using-gtk-and-webkit/. And the browser works great!.

Tags: , ,

IT | Software

WpfKlip on softpedia

by 8. August 2009 22:19

Tags:

Software | My code

Clear Design

by 5. June 2009 11:33

C#

public static void qwe(dynamic arg)
{
    Console.Write(arg.Last);
}

 

.NET Reflector

public static void qwe([Dynamic] object arg)
{
if (<qwe>o__SiteContainerd.<>p__Sitee == null)
    {
<qwe>o__SiteContainerd.<>p__Sitee = CallSite<Action<CallSite, Type, object>>.Create(new CSharpInvokeMemberBinder(CSharpCallFlags.None, "Write", typeof(Program), null, new CSharpArgumentInfo[] { new CSharpArgumentInfo(CSharpArgumentInfoFlags.IsStaticType | CSharpArgumentInfoFlags.UseCompileTimeType, null), new CSharpArgumentInfo(CSharpArgumentInfoFlags.None, null) }));
    }
if (<qwe>o__SiteContainerd.<>p__Sitef == null)
    {
<qwe>o__SiteContainerd.<>p__Sitef = CallSite<Func<CallSite, object, object>>.Create(new CSharpGetMemberBinder("Last", typeof(Program), new CSharpArgumentInfo[] { new CSharpArgumentInfo(CSharpArgumentInfoFlags.None, null) }));
    }
<qwe>o__SiteContainerd.<>p__Sitee.Target(<qwe>o__SiteContainerd.<>p__Sitee, typeof(Console), <qwe>o__SiteContainerd.<>p__Sitef.Target(<qwe>o__SiteContainerd.<>p__Sitef, arg));
}

Tags: ,

IT | Software

New WpfKlip version!

by 4. June 2009 10:28

Whats New:

- Exclusions list - now it is possible to disable text capturing for an application 

- Restore clipboard chain - the '...' button context menu item added. Click on this item cause WpfKlip to re-register clipboard viewer.

Install it! [Downloads: 211]

Project on Codeplex

Tags: , ,

Software | My code

WpfKlip Just Released on Codeplex

by 24. May 2009 15:00

Wow! I made it:-). What we have

  • Rewrited application with some killed bugs
  • I use WPF commands
  • even with styles
  • Tested under Windows 7 RC wither highest UAC level
  • Fork with plug-ins support which will be released soon

Technically the following cubes are used:

Native chained clipboard viewer (this place is source for problems since not all application carefully support chain)

Shell Hook – something similar to look less windows taskbar, however only two events are supported WindowActivated and RudeAppActivated. This module used for paste-on-click functionality – we must keep a reference to the previous active window.

Registry autorun manager

Install it! [Downloads: 211]

Project on Codeplex

And WpfKlip icon:

WpfKlip icon

Tags: , ,

Software | My code

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

Name: Ilya Khaprov (rus Илья Хапров)

Age: 23

Sex: Male

I'm a postgraduate (an "aspirant" in Russian terminology see Wikipedia for details) at Bryansk State Technical University.

I'm working with .Net since 2004. Also i like lisp.

My research interests lie in the area of Intelligence. In particular i am studing personal information filters, ontology learning, and some other stuff.

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in  anyway.

© Copyright 2009

Recent Visitors