Metah - A Web Technologist Adventure

Tweets

Archive for the 'Tutorials' Category

Synchronous and Asynchronous use of Delegate with C#

January 18th, 2010 at 1:25 pm by Ahmet Gyger

Tags: , ,
Posted in CSharp, Microsoft, Tutorials



 For developers the quality of a program can be often express in the time used to finish the computation. With current multicore processor we have to move our thinking from a serial execution to a concurrent execution. Using delegates in an asynchronous way can force the CLR to allocate multiple threads to your computation.
In below [...]

Get Arguments array from CmdLine of a WPF Application.

December 18th, 2009 at 6:24 pm by Ahmet Gyger

Tags: ,
Posted in CSharp, Microsoft, Tutorials



 
This is my first post of, I hope, a series related to WPF and C#.
The examples below are made with VS (Visual Studio) 2010 and .Net 4.0, for this precise example you can make it work with .Net 3.5 at least.
During the life of an application we can listen for some important events, these events [...]

WMI and CSharp (C#)
Enumerate all the instances (and properties) from a class via WQL

November 26th, 2008 at 12:32 am by Ahmet Gyger

Tags: , , , ,
Posted in CSharp, Microsoft, Tutorials



In the two previous posts (Enumerate all classes from a namespace and Enumerate all Namespaces from Root) we gather enough information to enumerate namespaces and classes. In this post we are going to see how to enumerate all the instances from a class via WQL.

using System;
using System.Collections.Generic;
using System.Text;
using System.Management;

namespace WmiNamespace
{
class Program
[...]

WMI and CSharp (C#):
Enumerate all classes from a namespace

October 29th, 2008 at 10:57 pm by Ahmet Gyger

Tags: , , , , ,
Posted in CSharp, Microsoft, Tutorials



Now that we know how to enumerate all the namespace from root, let’s have a look on how to enumerate all the classes from a namespace.

using System;
using System.Collections.Generic;
using System.Text;
using System.Management;

namespace WmiNamespace
{
class Program
{
static void Main(string[] args)
[...]

WMI and CSharp (C#):
Enumerate all Namespaces from Root

October 28th, 2008 at 11:29 pm by Ahmet Gyger

Tags: , , ,
Posted in CSharp, Microsoft, Tutorials



I like to understand WMI (Windows Management Instrumentation) as a database, main concepts are:
Namespaces: Databases
Classes: Tables
Properties: Columns
Instances: Lines
Values: Fields
With this in mind, we can start enumerating all the namespaces we can access locally.

using System;
using System.Collections.Generic;
using System.Text;
using System.Management;

namespace WmiNamespace
{
class Program
{
static [...]

How To Delete of an Outdated AIR Application? Uninstall AIR …

July 25th, 2008 at 4:36 pm by Ahmet Gyger

Tags: ,
Posted in AIR, Tutorials



While cleaning my PC, I noticed several old AIR applications I installed only on testing purpose. As they were installed with a old version of AIR, I was asked to upgrade my AIR application to be able to delete it…
Deleting the AIR plugin solved the problem :)
Ahmet

A Chat with FMS 3 coded in ActionScript 3.0

May 30th, 2008 at 11:35 am by Ahmet Gyger

Tags: , , , ,
Posted in ActionScript3, Experiment, Flash, Tutorials



Some days ago I started using FMS (Flash Media Server). Obviously I wanted to write my project in AS3 and realized that they weren’t a lot of documentation on the topic, that why I’ll post here every part of code I made working.
My last project was about creating a chat. I downloaded the demo from [...]

Flash Media Server 3: calling a function from ASC to AS3
(Server – Client interaction)

May 15th, 2008 at 1:51 pm by Ahmet Gyger

Tags: , , ,
Posted in ActionScript3, Flash, Tutorials



I had quite a hard time figuring out how to call a function hosted on FMS (an .asc file) and how to call a function on the client from the server. I’m new to FMS (Flash Media Server) and there is not a ton of documentation, updated, for ActionScript 3.0.
So here is a simple example [...]

Using URLVariables()

January 30th, 2008 at 5:03 pm by Ahmet Gyger

Posted in AIR, ActionScript3, Flash, Flex, Tutorials



URLVariables Class allow you to send or receive data from an URL encoded feed (with the data property of the URLRequest class).
There is so two possible use:

Sending parameters to a server side script
Read parameters written from a server side script

The use is quite simple, let’s start by building the PHP file that will receive the [...]

JSON and AS3 URLRequest Class

January 29th, 2008 at 6:43 pm by Ahmet Gyger

Tags: , ,
Posted in AIR, ActionScript3, Flash, Flex, RIA, Tutorials



A while ago, the as3corelib has been published on Google Code with a useful tool: JSON encoder and decoder.
JSON (JavaScript Object Notation) is a lightweight computer data interchange format (that is intended to solve XML structure weight), that allows you to send Object (Array, Strings, Number, …) to your server scripts or to JavaScript.
JSON is [...]


Warning: mysql_real_escape_string(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 478

Warning: mysql_real_escape_string(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 478

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713

Warning: mysql_affected_rows(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 719

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713

Warning: mysql_error(): 10 is not a valid MySQL-Link resource in /home/www/1b7001c59fc4fd9d46b099f76e406fc1/web/blog/wp-includes/wp-db.php on line 713