Friday, June 29, 2007

== es != operatorok tipust castolhatnak javascriptben

Ezert jobb a === es a !== operatorokat hasznalni mert azok a tipusellenorzest is elvegzik

var a = 5
var b = “5″

Print(a == b) //True
Print(a === b) //False

Crockford video (27:25)

falsy - truthy values in javascript

Crockford video (20:40)

Falsy values:

  • false
  • null
  • undefinded
  • “” (empty string)
  • 0
  • NaN

All other values (including all Objects) are truthy “0″, “false”

NaN != NaN

Javascriptben a NaN nem egyenlo semmivel, meg onmagaval sem.

Es azzal egyutt, hogy a NaN azt jelenti, hogy Not a Number, a tipusa megis number:

Print(typeof(NaN)) // number

Numbres in javascript

Douglas Crockford video (13:40)
  • Only one number type (No integers)
  • 64-bit floating point
  • IEEE-754 (aka “Double”)
  • Does not map well to common understanding of arithmetic:
  • 0.1 + 0.2 = 0.30000000000000004

Tehat az Crackford tanacsa, hogy ha penzzel szamolunk akkor szorozzuk fel szazzal az operandusokat, vegezzuk el a szamitast majd az eredmenyt osszuk vissza szazzal.

Wednesday, June 27, 2007

Brad Abrams: Silent install of the .NET Framework

Itt van az eredeti, de inkabb bemasolom az egeszet:

When I talked to ISV, they often just want to use the .NET Framework as an implementation detail of their applications.. they don’t want their users to have to go to windows update or MSDN to download the framework, and they don’t want to have some Microsoft setup UI popping up during the install experience of their application.

For this scenario, we have a little known feature of setup where you can install it the .NET Framework silently.. that is with no-UI popping up at all. This allows you to have full control of the experience…

For .NET FX 3.0: the magic command line is: Dotnetfx3.exe /q
See this white paper for more details.

Oh, and if you are still on .NET Fx 2.0, the command is: Dotnetfx.exe /q:a /c:”install /q”
And you can find more out here.

lifted function

Eric Lippert irt rola a C# 2.0 Standard-ban tortent teves hasznalat kapcsan:

Precisely what mathematicians mean by “lifted”.

Suppose we’ve got a function f which maps values from a set A into a set B. That is f:A→B.

Suppose further that null is not a member of either A or B.

Now consider the sets A’ = A ∪ { null } and B’ = B ∪ { null }

We define the “lifted function” f’ as

f’:A’→B’ such that f’(x) = f(x) for all x ∈ A and f’(null) = null

Similarly, if we had a two-argument function f: A × B → C, we would define f’: A’ × B’ → C’ as f’(x,y) = f(x,y) for all (x,y) ∈ A × B and null if either x or y is null.

What we’re getting at here is that “lifted” means “takes nulls, always agrees with the unlifted version when arguments are not null, maps everything else onto null”.

ubiquitous, mature

ubiquitous: mindenutt jelenlevo, szeles korben hasznalt

mature: megfontolt, atgondolt, erett

Tuesday, June 26, 2007

parseInt radix attibutuma

A javascript-ben a parseInt igy nez ki:

parseInt(string[, radix])

A radix-et tehat el lehet hagyni csak nem erdemes, mert ha nem adjuk meg akkor a string alapjan probalja megallapitani es ha “0″-val kezdodik akkor 8-as alapunak veszi es peldaul a “011″-bol decimalis 9 lesz, a “08″-bol pedig 0, mert ugye 8 nincs okatlis szamrendszerben.

Wednesday, May 23, 2007

ListBox control: Right click: No Click events raised

Innen

The following controls do not conform to the standard Click event behavior:

  • Button control
    • Left click: Click
    • Right click: No Click events raised
    • Left double-click: Click, Click
    • Right double-click: No Click events raised
  • CheckBox control
    • Left click: Click
    • Right click: No Click events raised
    • Left double-click: Click, Click
    • Right double-click: No Click events raised
  • RadioButton control
    • Left click: Click
    • Right click: No Click events raised
    • Left double-click: Click, Click
    • Right double-click: No Click events raised
  • TextBox control
    • Left click: Click
    • Right click: No Click events raised
    • Left double-click: Click, DoubleClick
    • Right double-click: No Click events raised
  • ListBox control

    Note The event behavior detailed below happens whether the user clicks on an item or not (that is, a mouse click or double-click anywhere within the ListBox control raises these events).

    • Left click: Click
    • Right click: No Click events raised
    • Left double-click: Click, DoubleClick
    • Right double-click: No Click events raised
  • CheckedListBox control

    Note The event behavior detailed below happens whether the user clicks on an item or not (that is, a mouse click or double click anywhere within the ListBox control raises these events)

    • Left click: Click
    • Right click: No Click events raised
    • Left double-click: Click, DoubleClick
    • Right double-click: No Click events raised
  • ComboBox control

    Note The event behavior detailed below happens whether the user clicks on the edit field, the button, or on an item within the list.

    • Left click: Click
    • Right click: No Click events raised
    • Left double-click: Click, Click
    • Right double-click: No Click events raised
  • RichTextBox control
    • Left click: No Click events raised
    • Right click: No Click events raised
    • Left double-click: No Click events raised
    • Right double-click: No Click events raised
  • ListView control

    Note The event behavior detailed below happens only when the user clicks on the items in the ListView control. No events are raised for clicks anywhere else on the control. In addition to those described below, there are the BeforeLabelEdit and AfterLabelEdit events, which may be of interest to developers wishing to use validation with the ListView control.

    • Left click: Click
    • Right click: Click
    • Left double-click: Click, DoubleClick
    • Right double-click: Click, DoubleClick
  • TreeView control

    Note The event behavior detailed below happens only when the user clicks on the items themselves or to the right of the items in the TreeView control. No events are raised for clicks anywhere else on the control. In addition to those described below, there are the BeforeCheck, BeforeSelect, BeforeLabelEdit, AfterSelect, AfterCheck, and AfterLabelEdit events, which may be of interest to developers wishing to use validation with the TreeView control.

    • Left click: Click
    • Right click: Click
    • Left double-click: Click, DoubleClick
    • Right double-click: Click, DoubleClick

Sunday, May 06, 2007

Net helpmsg

Explains why an error occurred and provides problem-solving information.

Wednesday, April 25, 2007

Software as a service

Software as a service (SaaS) is a software application delivery model where a software vendor develops a web-native software application and hosts and operates (either independently or through a third-party) the application for use by its customers over the Internet.

Wednesday, April 04, 2007

Jeff Smith: Conditional Joins in SQL Server

Itt van reszletesen, de a lenyeg:

Sometimes, when writing SELECTs, we come across situations in which we we need to write a join containing a condition of some sort. You might think to do this with either a CASE expression or with some OR boolean logic in your JOIN expression. Often, you might encounter syntax errors, performance problems, or results not being returned the way you expect when trying this. There’s a much better way to approach the problem.

Instead of trying to alter a single INNER JOIN’s relation from row to row, instead use multiple LEFT OUTER JOINS in your SELECT, one for each table or condition that you need to consider.

Transact-SQL: ISNULL(), COALESCE()

COALESCE(Transact-SQL): Returns the first nonnull expression among its arguments.

ISNULL(Transact-SQL): Replaces NULL with the specified replacement value.

Sunday, February 25, 2007

Peter-Paul Koch: Object detection

If you want to use an advanced bit of script, you first have to check whether a browser supports the objects you want to use. This page explains how to do it.

De a lenyeg:

If you want to know whether the browser that views your page supports certain objects you want to use in your code, you should never EVER use a browser detect.

Instead, we simply look if the browser supports the object (method, array or property) we want to use. Let’s continue with the mouseover example. This script relies on the document.images array, so first and foremost we’ll have to detect if the browser supports it. This is done by

if (document.images)
{
do something with the images array
}

Another common detect is for window.focus. This is a method (a command by which you tell JavaScript to do something for you). If we want to use the method, we’ll have to check first if the browser supports it.

Note the correct way of doing this: you ask for the method without brackets. This code

if (window.focus)

means: “If the focus method is supported”, while this code

if (window.focus())

means: “If you can put the focus on the window” and assumes that focus is supported. If it isn’t, this line of code creates errors. The brackets () actually execute the focus command, which is not what we want in this case. So we check it without the brackets (see if it exists) and only when the browser passes the check we actually execute the command by adding brackets:

if (window.focus) window.focus()

So the whole point is that if you want to use the array document.images, first check if it is supported. If you want to use the focus method of the window, first check if it is supported.

If you always use object detection, your scripts will never generate any error messages, although they might not work in certain browsers.

Friday, February 23, 2007

Tommy Olsson: Graceful Degradation & Progressive Enhancement

Itt van a teljes cikk, de lenyeg:

The premise for graceful degradation is to first build for the latest and greatest, then add handlers for less capable devices.

Another common occurrence in sites built from the graceful degradation point of view is the noscript element. You provide some feature based on JavaScript and add a more basic version for user agents that do not support JavaScript or have client-side scripting disabled.

There is one problem with noscript, though. I may use a browser that supports JavaScript and has it enabled, but there could be a company firewall that strips incoming JavaScript for security reasons. In this case the noscript element will not be rendered (because my browser supports scripting) but the JavaScript code that should create the menu won’t be applied either, because it gets stuck behind the firewall.

Progressive enhancement starts at the opposite end from graceful degradation: begin with the basic version, then add enhancements for those who can handle them.

The most common occurrence of progressive enhancement is probably the external CSS style sheet.

This is progressive enhancement: it works for everyone, but users with modern browsers will see a more usable version.

Thursday, November 30, 2006

MX record

An MX record or Mail exchanger record is a type of resource record in the Domain Name System (DNS) specifying how Internet e-mail should be routed. MX records point to the servers to send an e-mail to, and which ones it should be sent to first, by priority.

forras: wikipedia

Wednesday, November 22, 2006

javascript - error object kiiratasa 1 sorbol

try {
not_existing_method();
}
catch (err) {
for(var i in err){
Print(i + “: ” + err[i]);

}
}

Persze kell egy Print fv. is, hogy ez mukodjon.

obtrusive - unobtrusive

obtrusive: eroszakos, feltuno, szembeotlo, tolakodo, athato

unobtrusive: diszkret, szereny, tartozkodo, nem tolakodo, nem feltuno

Tuesday, November 14, 2006

Software interview questions and answers

Here we are giving high level training at Technical Interviews to our visitors and support to providing high quality Technical Questions at a no cost. We Providing Free technical skills testing and technical interviewing guides to qualify a candidate or prepare for the technical interview.

Saturday, August 12, 2006

Unidirectional Merge az SQL2005-ben

Amint arra sikerult rajonni a merge tipusu replikacional is be lehet allitani a Synchronization Direction-t, ami lehet:

-Bidirectional
-Download-only to Subscriber, allow Subscriber changes
-Download-only to Subscriber, prohibit Subscriber changes

Azzal volt bajom, hogy barmelyiket is valasztottam az visszaallt Bidirectional-ra mindenfele figyelmeztetes nelkul. Aztan vegul itt talaltam meg, hogy mitol van ez:

“to take advantage of this property (@subscriber_upload_options) the subscription must be marked as a ‘Client’ subscription and not the default of ‘Server’ subscription (see below). If you leave the default ‘Server’ option, the subscriber will always be created as bidirectional.”

Saturday, August 05, 2006

LAMP

The acronym LAMP (or L.A.M.P.) refers to a set of free software programs commonly used together to run dynamic Web sites or servers:

Linux, the operating system;
Apache, the Web server;
MySQL, the database management system (or database server);
Perl, PHP, Python, and/or Primate (mod mono), scripting/programming languages.

forras: wikipedia

Friday, July 28, 2006

Hosts file

In computing, a hosts file, stored on the computer’s filesystem, is used to look up the Internet Protocol address of a device connected to a computer network. The hosts file describes a many-to-one mapping of device names to IP addresses. When accessing a device by name, the networking system will attempt to locate the name within the hosts file if it exists. Typically, this is used as a first means of locating the address of a system, before accessing the Internet domain name system. The reason for this is that the hosts file is stored on the computer itself and does not require any network access to be used, whereas DNS requires access to an external system, which is typically slower.
Bovebben

aspfaq.com: Why won’t my session variables stick?

Itt van 10 dolog, ami miatt “elveszhet” a session valtozo.

Mi a 4-esbe futottunk bele, azaz: “If you are using IE 5.5 or IE 6.0, and your local server name has an underscore or other non-alphanumeric character (other than a dash) in the name, then cookies will not work correctly.”

K. Scott Allen: Impersonation and Application_Start in ASP.NET

Itt van az egesz, de a lenyeg:

…impersonation isn’t “on” during Application_Start… Application_Start is an odd event. It’s not really a request related event, but of course it won’t fire until the first event arrives. The ASP.NET runtime doesn’t start impersonation until it begins to process the request in earnest. This event fires just before impersonation begins, during a time when ASP.NET is laying out the cocktail napkins and setting up for the party.

Friday, July 14, 2006

CAPTCHA

CAPTCHA stands for “completely automated public Turing test to tell computers and humans apart.” What it means is, a program that can tell humans from machines using some type of generated test. A test most people can easily pass but a computer program cannot.

This article demonstrates how to create such an image and employ it within an ASP.NET web form.

Tuesday, July 11, 2006

episztemologia, echolalia

episztemológia: A megismerés feltételeit, határait meghatározó tanítás. A megismerés módszereit próbálja meghatározni, a tudományok alapjaival foglalkozik. Azt szeretné meghatározni, hogy mi a tudás, illetve, hogy mi a tudás megszerzésének legbiztonságosabb útja. Témakörébe egyaránt beletartozik a megismerés szubjektuma mint objektuma is.

echolália: Kényszer a hallott szavak visszhangszerű utánzására.

Wednesday, June 07, 2006

K. Scott Allen: Build Failed With No Errors

Itt van a teljes cikk.

Temak:

MSBuild maximum verbosity

Client Report Definition (rdcl) files

ReportViewer control;

Tuesday, June 06, 2006

Milan Negovan: Session_Start or Session_OnStart (event handlers in global.asax)

itt van a teljes cikk.

What if you define the following methods in global.asax (yes, all of them):

  • void Session_Start(object sender, EventArgs e)
  • void Session_Start()
  • void Session_OnStart(object sender, EventArgs e)
  • void Session_OnStart()
  • void Session_Start(object sender)

Having these five event handlers, which one(s) will be called?

It turns out all of them, except the last one, will be called, and in the same order as listed!

Karl Seguin: HttpHandlers – Learn Them. Use Them.

Itt van a teljes cikk.

Why use a handler?
First and foremost, HttpHandlers are far more reusable/portable than pages.
Secondly, the Page handler is relatively expensive… if you do that in a page you’ll end up raising a number of events (onInit, onLoad, onPreRender, onUnload, …) and make use of a number of ASP.NET features such as viewstate and postback. In most cases, the performance hit is negligible, but it nonetheless highlights that you’re using the page framework when you have no need to.

Why not to use HttpHandlers?
The biggest and very significant drawback of HttpHandlers is that they can only be used for extensions that are mapped to ASP.NET in IIS.