Archive | Education RSS feed for this section

Milk and Water Report Submitted in Supreme Court of Pakistan

5 Jan

Prema is only pure milk Declared by Supreme Court

Fresh Milk

Dairy Milk

Supreme Court Order

Read and Write A Tag Value From PI-Server Using PI-SDK Through VBA (Visual Basic)

13 Mar

Reading a tag value from PI-Server

Private Function TargetValue()
Dim valueRet As String
Dim srv As Server
Dim dt As New PITimeFormat
Dim pt As PIPoint

Dim MYPIServer As PISDK.Servers
Set srv = PISDK.Servers.DefaultServer

TargetValue = srv.PIPoints(“Target”).Data.Snapshot

‘ Target is the tag name here.
End Function

Writing a tag value to PI-Server

‘***************************Writing into Target Tag****************************
Private Sub WriteTargetInstructionPI()
Dim srv As Server
Dim dt As New PITimeFormat
Dim pt As PIPoint

Dim MYPIServer As PISDK.Servers
Set srv = PISDK.Servers.DefaultServer

TagName = “Target”
Set pt = srv.PIPoints(TagName) ‘ it’s your PI point

dt.InputString = “*”        ‘it’s data. InputString – Converting String in PIdata format

pt.Data.UpdateValue TextBoxTarget.Text, dt, dmReplaceDuplicates ‘function for Update (reed help)

End Sub

 

Note: I have used Sub for writing the tag value and Function for reading tag value for my own business logic. You can use either Function or Sub according to your own requirements.

Java based OPC UA library replacement to .NET’s DCOM

3 Mar

Inductive Automation uses OPC UA to build its industrial platform on Java and offers the Ignition OPC UA server for free, whether users purchase the Ignition software or not. Keep reading to request a free activation key.

Inductive Automation was the first private organization to write their own OPC Unified Architecture (UA) stack—and they chose to write it completely in Java. The company’s vision was to develop control system software that was not dependent on any particular operating system. The old OPC spec was based on Microsoft’s Distributed Component Object Model (DCOM), which tied every OPC server to Windows. 

In order to achieve their goals of a software platform that would work on any system, Inductive Automation needed an OPC server that wouldn’t lock their software into a Windows-only environment. 

“We made the decision that we wanted everything written in Java so that users would have the freedom to choose their operating system,” said Colby Clegg, software developer for Inductive Automation. “The platform-neutral OPC UA specification enabled us to write our own stack in Java. Now our entire software package is in Java, and this offers a lot of benefits for users.” 

The result was the Ignition OPC UA server, which can work either as a stand-alone OPC server for third-party OPC UA clients, or as part of the comprehensive Ignition software package. In either case, it provides fast, reliable, and secure access to PLC data through its pluggable driver architecture. 

Why Java? 

ADVERTISEMENT

Java is one of the most popular programming languages in the world (see the TIOBE Programming Community Index for September 2010). Java runs on more types of consumer and embedded devices, smart cards, ATMs, thin clients, PCs, servers, and mainframes than any other language. 

“Java is the ‘write once, run anywhere’ language,” said Steve Hechtman, president of Inductive Automation. “This is a major reason why we selected it. By writing Ignition in Java, it runs equally well on Linux as it does on OSX, Windows or Solaris.”

Java is also highly resistant to viruses. It is designed from the ground up to be more secure than legacy programming languages, offering a rich array of features that prevent many common security holes. That makes it ideally suited to the industrial environment.

“Rather than following the flock and just selecting the current Microsoft technology, we took a step back and evaluated what language provided the most portability, security, stability and support—and Java was the clear winner,” Hechtman said.

Why Free?

Inductive Automation offers the Ignition OPC UA server for free, whether users purchase the Ignition software or not. “We want the market to get excited about the potential of OPC-UA,” explains Clegg, “and in the freedom of selecting your own platform. Plus, once users get started with Ignition, we’re confident that they’ll be blown away by everything it can do.”

The Ignition OPC-UA server is free and can be used with any OPC-UA client: Simply request a free activation key, download the software, and get started using it on your control system. It features an open driver API, and includes free Allen Bradley and Modbus TCP drivers.

The activation key and download page can be accessed here:https://www.inductiveautomation.com/products/ignitionopc/download

 

This article is fully copied from

http://www.automationworld.com/opc-ua-stack-written-java-write-once-run-anywhere

All credit goes to it’s parent website. I have just shared this information

Through VB: Get Weather Information Using Web Service

21 Feb

Dim Req As New XMLHTTP
Dim Resp As New DOMDocument
Dim Weather As IXMLDOMNode
Dim CurrentWeather As IXMLDOMNode

Req.Open “GET”, “http://api.worldweatheronline.com/free/v1/weather.ashx?q=Karachi&format=xml&num_of_days=1&key=enter_you_own_key_by-registering”, False
Req.Send
Resp.loadXML (Req.responseText)

For Each CurrentWeather In Resp.getElementsByTagName(“current_condition”)
Me.LabelTemp.Caption = ” ” & CurrentWeather.SelectNodes(“temp_C”)(0).Text
Me.LabelTemp1.Caption = ” ” & CurrentWeather.SelectNodes(“humidity”)(0).Text
Me.LabelTemp2.Caption = ” ” & CurrentWeather.SelectNodes(“windspeedKmph”)(0).Text
Me.LabelTemp4.Caption = ” ” & CurrentWeather.SelectNodes(“winddir16Point”)(0).Text
Me.LabelTemp3.Caption = ” ” & CurrentWeather.SelectNodes(“pressure”)(0).Text

Next

 

Microsoft SQL Server 2008/2012 Installation Guide

11 Dec

Microsoft SQL Server 2008 R2 (Standard Edition) Installation Guide

This document will guide you step by step installation of Microsoft SQL Server 2008 R2 Standard Edition on Window Server 2008 R2.

Running the Setup

Open the installation media, you will see the list of files. Run “Setup.exe” as show below.

1

Figure 1: Setup.exe

On running the “setup.exe” following screen will appear.

2

Click “Installation” from the top of left side of window.  Select “New installation add features to an existing installation” at top of right side of window. See the figure below.

3

Following screen will appear for some time

4

Following screen will appear, press “OK” button.

 5

Figure 2: Setup Support Rules

Product Registration

In this step you will enter registration key of MS SQL Server 2008 R2. After entering registration key successfully press “Next” button. See the figure below.

 7

Figure 3: Product Registration Key

License Terms

This step will ask you to accept the license terms and condition. Check the both check boxes and press “Next” button. See the figure below.

 9

Figure 4: License Terms

Setup Support Files

This step will install the setup support files. Press “Install” button. See the figure below.

 10

Figure 5: Setup Support Files

 11

Figure 6: Setup Support Rules Progress

Setup Support Rules

This step will check the potential problems that can occur during the installation. All test should be passed in-order to continue to next steps. Incase all the tests passed “Next” button will get activated, press “Next” button. See the screen below.

 5

Figure 7: Setup Support Rules

Setup Role

Select first option “SQL Server Feature Installation” then press “Next” button. See the following screen.

14

Figure 8: Setup Role

Feature Selection

This step offers you to select features of SQL Server that you want to install. Select all the features by pressing “Select All” button and then press “Next” button. See the screen below.

15

Figure 9: Feature Selection

 Installation Rules

If all the tests gets passed the press “Next” button. See the screen below.

 16

Figure 10: Installation Rules

Instance Configuration

In this step we specify instance related configuration. Select “Default instance” option and press “Next” button. See the screen below.

 17

Figure 11: Instance Configuration

Disk Space Requirement

This step checks space availability to install the SQL Server. In case of success press “Next” button.

 18

Figure 12: Disk Space Requirement

Server Configuration

This step is important in the installation of SQL Server. Press “Use the same account for all SQL Server services”.

 19

Figure 13: Server Configuration

A screen will appear, it will ask about Account Name and Password to be used for services. Browse

“NT AUTHORITY\NETWORK SERVICE” and press “OK” without entering any password. See the screen below.

 20

Figure 14: Account Credentials

 After above step press “Next” button. See the screen below.

 21

Figure 15: Server Configuration Final Step

Database Engine Configuration

This is most important step during the installation of SQL Server.  This steps asks about the accounts permissions and security mode of Database Engine.

a-      Select “Account Provisioning” tab.

b-      In “Authentication Mode”, select “Mixed Mode (SQL Server authentication and Windows authentication)”.

c-       Specify the password for the SQL Server system administrator (sa) account. Enter password “Password?

d-      Specify SQL Server Administrators, press “Add Current User” button.

e-      Press “Next” button after entering all the above information.

See the screen explaining all the above step below.

22

Figure 16: Database Engine Configuration

Analysis Services Configuration

Select “Account Provisioning” tab. Add the current user by pressing “Add Current User” button then press “Next” button. See the screen below.

 24

Figure 17: Analysis Services Configuration

Reporting Services Configuration

This step specify the reporting services configuration.  Select third option “Install, but do not configure the report server” and press “Next” button.  See the screen below.

 25

Figure 18: Reporting Services Configuration

Error Reporting

Select check box and press “Next” button.  See the screen below.

 26

Figure 19: Error Reporting

Installation Configuration Rules

If all the test gets passed then press “Next” button. See the screen below.

27

Figure 20: Installation Configuration Rules

Read to Install

At this step SQL Server setup is ready for final installation. It will show the summary of all the features going to be installed. Press “Install” button. See the screen below.

28

Figure 21: Ready to Install

Installation Progress

This step shows installation progress. Installation will take about half an hour. Installation times basically depends upon the speed of your system. See the screen below.

 29

Figure 22: Installation Progress

Complete

On the completion of installation, it will prompt and show the following screen.  Press “Close” button.

 30

Figure 23: Installation Complete

Restarting the Computer

On pressing the “Close” button, setup will ask you to restart your computer in order to take changes. Press “OK” button. See the following screen.

 31

Figure 24: Restart Computer

After restarting your system you can use your MS SQL Server  successfully.

/*******************End of Document*******************/

Read / Write into App Settings and Connection String Section of App.Config using C#

10 Dec

Business Problem:

We have an application which connects to a database server for operations. Our company recently installed a backup database server for high availability. Now we want our application to connect to backup database server in-case one server goes down.

I have recently wrote code which first checks the availability of database servers and then it updates the App.Config to store the new available database server.

So one can use my code for reading and updating the “App.Config’s” App Settings, Connection Strings sections using C#.

Let me share code.

private bool IsServerConnected(string conString)
{
try
{
using (var l_oConnection = new SqlConnection(conString))
{
try
{
l_oConnection.Open();
return true;
}
catch (SqlException)
{
return false;
}
}
}
catch (SqlException exp)
{
labelOutPut.Text = “Invalid Connection String “;
return false;
}
}

/***********************************************************************/

private void updateAppSettingsSection()
{
/// <summary>
/// Update App Settings Section in App.Config File
/// </summary>
///
string connectionString1 = “Server=localhost;Database=OSL11NOV13;User Id=sa;Password=***;”;
string connectionString2 = “Server=localhost;Database=SecondDB;User Id=sa;Password=****;”;

if (IsServerConnected(connectionString1))
{

string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
string configFile = System.IO.Path.Combine(appPath, “App.config”);
ExeConfigurationFileMap configFileMap = new ExeConfigurationFileMap();
configFileMap.ExeConfigFilename = configFile;
System.Configuration.Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configFileMap, ConfigurationUserLevel.None);

config.AppSettings.Settings[“connString”].Value = connectionString1;
config.Save();
ConfigurationManager.RefreshSection(“appSettings”);

labelOutPut.Text = “Connection String 1 is available and updated”;
}
else if (IsServerConnected(connectionString2))
{

string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
string configFile = System.IO.Path.Combine(appPath, “App.config”);
ExeConfigurationFileMap configFileMap = new ExeConfigurationFileMap();
configFileMap.ExeConfigFilename = configFile;
System.Configuration.Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configFileMap, ConfigurationUserLevel.None);

/***************App Settings Section***********************/
config.AppSettings.Settings[“connString”].Value = connectionString2;

config.Save();

ConfigurationManager.RefreshSection(“appSettings”);

labelOutPut.Text = “Connection String 2 is available and updated”;
}
else
labelOutPut.Text = “None of Connection Strings are available and updated”;

}

/***********************************************************************/

private void readAppSettingsSection()
{

/// <summary>
/// Read App Settigs Section of App.Config File
/// </summary>
/// <param name=”sender”></param>
/// <param name=”e”></param>

string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
string configFile = System.IO.Path.Combine(appPath, “App.config”);
ExeConfigurationFileMap configFileMap = new ExeConfigurationFileMap();
configFileMap.ExeConfigFilename = configFile;
System.Configuration.Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configFileMap, ConfigurationUserLevel.None);

string connTest = config.AppSettings.Settings[“connString”].Value;
labelAppSettings.Text = “App Settings Section: ” + connTest;
}

/***********************************************************************/

private void updateConnStringSection()
{

/// <summary>
/// Updating Connection Strings Section in App.config
/// </summary>
/// <param name=”sender”></param>
/// <param name=”e”></param>

string connectionString1 = “Server=localhost;Database=OSL11NOV13;User Id=sa;Password=****;”;
string connectionString2 = “Server=localhost;Database=SecondDB;User Id=sa;Password=****;”;

if (IsServerConnected(connectionString1))
{

string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
string configFile = System.IO.Path.Combine(appPath, “App.config”);
ExeConfigurationFileMap configFileMap = new ExeConfigurationFileMap();
configFileMap.ExeConfigFilename = configFile;
System.Configuration.Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configFileMap, ConfigurationUserLevel.None);

/***************Connection String Section***********************/
config.ConnectionStrings.ConnectionStrings[“MyConStr”].ConnectionString = connectionString1;
config.Save();
ConfigurationManager.RefreshSection(“connectionStrings”);

labelOutPut.Text = “Connection String 1 is available and updated”;
}
else if (IsServerConnected(connectionString2))
{

string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
string configFile = System.IO.Path.Combine(appPath, “App.config”);
ExeConfigurationFileMap configFileMap = new ExeConfigurationFileMap();
configFileMap.ExeConfigFilename = configFile;
System.Configuration.Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configFileMap, ConfigurationUserLevel.None);

/***************Connection String Section***********************/
config.ConnectionStrings.ConnectionStrings[“MyConStr”].ConnectionString = connectionString2;
config.Save();
ConfigurationManager.RefreshSection(“connectionStrings”);

labelOutPut.Text = “Connection String 2 is available and updated”;
}
else
labelOutPut.Text = “None of Connection Strings are available and updated”;

}

/***********************************************************************/

private void readConnStringSection()
{
/// <summary>
/// Read Connection Strings Section in App.Config
/// </summary>

string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
string configFile = System.IO.Path.Combine(appPath, “App.config”);
ExeConfigurationFileMap configFileMap = new ExeConfigurationFileMap();
configFileMap.ExeConfigFilename = configFile;
System.Configuration.Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configFileMap, ConfigurationUserLevel.None);

string conStrValue=config.ConnectionStrings.ConnectionStrings[“conStrFirst”].ConnectionString;

}

 

ICT R&D Fund Announces ICT Research and Development Awards 2013-Deadline 30-Jun

25 Jun

 

Masters in Innovative Technologies in Education at NUST

18 Jun

 

NUST is planning to launch a new program “Masters in Innovative Technologies in Education (MsITE)” which will be a two year long (30 credit hours) semester based program at the School of Electrical Engineering and Computer Science within NUST . A background in technology and/or education is recommended but not required. Most courses require lab work and group projects and you will be spending your final semester working on your Master’s Thesis. The details are available at the following link

http://ite.seecs.nust.edu.pk/root/

 

This newly started graduate program will provide a design space for mixing and matching of diverse disciplines and research areas thus creating disruptive technologies at the innovative edge of psychology, information technology, graphic design, story telling and drama. It will provide a practical forum to look beyond the obvious, to ask questions not yet asked and to provide innovative solutions that could dramatically improve the way people learn – not only for those who go to a school but also those who can not attend a conventional school.
Educational innovation, driven by a need for continuing education in the labor force, is transforming the global industrial landscape. Moreover, this need has also put a lot of stress on producing dynamic and diverse educational entrepreneurs as well as researchers who can steer the next revolution in education.  We are the first program in Pakistan that will address the deficiency of such individuals and aim to create graduates with the ability to “Learn, Think, Apply, Innovate and Educate”.

 

Educational Objectives:

  • To develop entrepreneurial innovations in educational practice
  • To evaluate technology’s impact on learning and developmetnt
  • To excel in designing interactive media content and learning applications

Target Industry:

Graduates of this program shall be sought after in the following capactities

  • Interactive text book design
  • Schools
  • Games and Interactive media
  • Online education companies
  • Instructional designer, online training
  • Animation development, children’s and adults educational television network
  • Educational start-ups
  • War games design and development

(Copied Content)

Railway ticket booking through SMS in India… When in Pakistan?

15 Jun

I am quoting BBC here. Now you can book your ticket by simply sending an SMS to specific number in India. We in Pakistan can also work in this field to increase the use of SMS for the improvement of the living standards of a common man.

بھارت میں ایس ایم ایس سے ٹرین کی بکنگ

بھارت میں ریل ٹکٹ کے لیے اب آپ کو لمبی قطار میں لگنے کی ضرورت نہیں ہے کیونکہ اب موبائل فون سے صرف ایک ایس ایم ایس بھیج کر ٹکٹ بُک کروایا جا سکتا ہے۔

بھارت میں موبائل فون کے بڑھتے رواج کو دیکھتے ہوئے بھارتی ریلوے کیٹرنگ اور سیاحت کارپوریشن یعنی (آئی آر سی ٹی سی) نے ٹکٹ ایس ایم ایس کے ذریعے بک کروانے کا منصوبہ متعارف کروایا ہے۔یکم جولائی سے یہ منصوبہ نافذ العمل ہو گا۔

آئی آر سی ٹی سی کے ایک سینیئر افسر نے بھارتی خبر رساں ادارے پی ٹی آئي سے کہا کہ یہ اقدام ماحول دوست بھی ہے کیونکہ اس میں کاغذ کی بچت کی جا سکے گی۔

موبائل کے ایک خاص نمبر پر ایس ایم ایس بھیج کر بکنگ کروائی جا سکتی ہے۔ اس نمبر کا اعلان جلد کیا جائے گا۔

سفر کے دوران ٹکٹ کی دستاویز ساتھ رکھنے کی ضرورت نہیں ہے اور بکنگ سینٹر کے جوابی پیغام کو ہی سفر کے لیے قابل قبول سمجھا جائے گا۔

موبائل سے ریل ٹکٹ بک کرانے کے لیے اپنے موبائل نمبر اور بینک اکاؤنٹ کو آئی آر سی ٹی سی میں رجسٹرڈ کروانا ہوگا۔

بھارت میں ریل سب سے بڑا شعبہ ہے

ریلویز کے اہلکار نے کہا کہ ایس ایم ایس بکنگ کا عمل انتہائی آسان ہے اور مسافر کو ایس ایم ایس باکس میں اپنے سفر کی تفصیلات لکھ کر بھیجنی ہوگی۔

اس کے بعد ایس ایم ایس بھیجنے والے کو ایک ٹرانزیكشن شناخت ملے گی جس کے بعد اسے مزید ایک ایس ایم ایس بھیجنا ہوگا جس میں اسے ایم ایم آئي ڈی اور پاس ورڈ فراہم کرانا ہوگا۔

ٹکٹ بکنگ کی یہ سہولت تمام موبائل سروس فراہم کرنے والی کمپنیوں کے لیے دستیاب ہوگی اور ہر ایس ایم ایس کے لیے تین روپے لیے جائیں گے۔ اس کے علاوہ 5000 روپے تک کی ٹکٹ کے لیے پانچ روپے اور اس سے زیادہ رقم کے لیے دس روپے گیٹ وے پیمنٹ کے طور پر ادا کرنا ہوں گے۔

This    article is copied from BBC Urdu. Credit of this information goes to BBC. I am just sharing this information.

Team Pakistan Microsoft Imagine Cup-Worldwide Finals

11 Jun

Worldwide Finals – Team Profile

PAKISTAN : WORLD CITIZENSHIP COMPETITION

Team Epi-C- Ghulam Ishaq Khan Institute , Topi Pakistan

Project Epi-C

Epi-C is an app for the Windows 8 Phone that has two main parts: / 1. A fall detection part which uses a custom fall detection algorithm to detect falls, it then plays an on spot alarm so that nearby people can be notified, it also sends the victim’s GPS coordinates to predefined people (such as guardians or emergency services) so that help can arrive as soon as possible. / 2. A portable EEG, the NeuroSky Mindwave, which is connected via bluetooth to a Windows 8 Phone and constantly records the patient’s brainwaves, these can then be uploaded to the cloud on the press of a button, so that doctors and therapists can get information which is extremely useful in neurological disorders.

What They Learned

We learnt a lot from this year’s Imagine Cup, teamwork, dedication, staying up till 6am in the morning, laughing together hysterically, and in short how fun it can be to make something that can actually help people.

Project Screenshots

 

Last year the team who won the national finals were from NUST SEECS.  All team members were from my class.

 

FROM THE TEAM

The idea for our app came when we learned about epileptic children, due to the onset of sudden unpredictable sizures, they have to be constantly monitored which severely limits their freedom and can lead to lack of independence and social anxiety, we thought instead of parents constantly worried about children having an unexpected seizure and falling, we could use a mobile phone, a powerful computing device that millions already have in their pockets, to detect falls and inform the parents or guardians. / Also, epilepsy is one of the least understood of medical disorders, so we included an EEG device in our app which monitors brainwaves, this brainwave data can be extremely useful for research purposes and in the future can be even used to predict seizures.

“With EPI-C we plan to reach out to people vulnerable to falls, and help them lead an independent life, and not worry about restricting their personal freedom, we hope to make EPI-C a complete telehealth experience in the future” / -Suleman Kazi Team EPI-C

 

 

(Contents Copied from http://www.imaginecup.com/ic13/team/teamepi-c#?fbid=rnMcpB1h8oo)