Saturday, January 28, 2012

Remotely Log Off Remote Desktop Users

How to query for users on a machine?

qwinsta /server:

ex:
qwinsta /server:172.168.80.20


How to log a user off of a machine? [[ how can we force one to disconnect]]

logoff /server:

ex:
logoff 2 /server:172.168.80.20

Wednesday, December 28, 2011

A great video player which is suitable for SharePoint video galley.

you can download the video from the link below http://jarisflvplayer.org/ or exactly from the link http://sourceforge.net/projects/jaris/files/Jaris%20FLV%20Player/Version%202.0/JarisFLVPlayer-v2.0.15b.zip/download this control is working independently(simply it can be working by using content editor web-pat), and then by using the content query web-part or data-list view, you can embed this control with the indeed design. Salam Ahmad Hindash

Monday, October 31, 2011

C# function Convert From Hijri to Georgian

C#

public string ConvertDateCalendar(DateTime DateConv, string Calendar, string DateLangCulture)
{
DateTimeFormatInfo DTFormat;
DateLangCulture = DateLangCulture.ToLower();
/// We can't have the hijri date writen in English. We will get a runtime error - LAITH - 11/13/2005 1:01:45 PM -

if (Calendar == "Hijri" && DateLangCulture.StartsWith("en-"))
{
DateLangCulture = "ar-sa";
}

/// Set the date time format to the given culture - LAITH - 11/13/2005 1:04:22 PM -
DTFormat = new System.Globalization.CultureInfo(DateLangCulture, false).DateTimeFormat;

/// Set the calendar property of the date time format to the given calendar - LAITH - 11/13/2005 1:04:52 PM -
switch (Calendar)
{
case"Hijri":
DTFormat.Calendar = new System.Globalization.HijriCalendar();
break;

case"Gregorian":
DTFormat.Calendar = new System.Globalization.GregorianCalendar();
break;

default:
return"";
}

/// We format the date structure to whatever we want - LAITH - 11/13/2005 1:05:39 PM -
DTFormat.ShortDatePattern = "dd/MM/yyyy";
return (DateConv.Date.ToString("f", DTFormat));
}

Saturday, June 12, 2010

(CSS + Javascript + HTML) Tools for Compression

I used these tool to compress the HTML,Javascript and CSS files.
these tools are great :)


Copressing Javascript and HTML
http://dean.edwards.name/packer/


Compressing CSS
http://www.cssoptimiser.com/

Wednesday, May 26, 2010

TFS Implementation

Application Life cycle management ALM

ALM three aspects
Governance : business management
1) Business case
2) Project portfolio management
3) Application portfolio management


Development
SDLC : Scrum , algae, CMMI , MSF.

TFS Architecture information
- Team Project Collection : each project has a project collection that has all projects, by this ; admin can grant the privileges for users on the TFS. such like TTL has some admin but the Dev doesn't have , but he has some rights to check-in check-out

- Database Changes: Branches, label
Branching : like labeling in VSS but it considered for the major release for the application.
- TFS Farms
Distribute the TFS on Farm application.

Tuesday, May 18, 2010

Simple way to user CallPage with ASP.Net

aspx Page:
---------------------------------

---------------------------------
javascript:
-----------------------
var xmlhttp
// function showHint(str) {
function showHint() {

xmlhttp = GetXmlHttpObject();
if (xmlhttp == null) {
alert("Your browser does not support XMLHTTP!");
return;
}
var url = "http://localhost:2144/CWeb/Default3.aspx";
url = url + "&xxx=" + "1";
xmlhttp.onreadystatechange = stateChanged;
xmlhttp.open("GET", url, true);
xmlhttp.send(null);
}
function stateChanged() {
//readyState means after the code behind is done the job
if (xmlhttp.readyState == 4) {
var Time = xmlhttp.responseText;
alert(Time);
}
}
function GetXmlHttpObject() {
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
return new XMLHttpRequest();
}
if (window.ActiveXObject) {
// code for IE6, IE5
return new ActiveXObject("Microsoft.XMLHTTP");
}
return null;
}




--------------------------
The Code Behind Is:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["xxx"] == "1")
{
Response.Write("One");
}
Response.Flush();
Response.End();

}

}

Sunday, May 9, 2010

Shrinking log Database SQL Server 2005

USE DBNAME
GO
DBCC SHRINKFILE(DBNAME_log, 1)
BACKUP LOG DBNAME WITH TRUNCATE_ONLY
DBCC SHRINKFILE(DBNAME_log, 1)
GO