Educational Materials like Computer, engineering, software and Property , Entertainment: February 2012
Custom Search

Subscribe Now: Feed Icon

February 16, 2012

Code to find to count blank cells in excel

Code to find  to count blank cells in excel

dim c as long
on error resume next
c = range("d42:d51").specialcells(xlcelltypeblanks).count
on error goto 0
if c>0 then
msgbox "your message here",vbcritical
end if

Code to concatenate multiple cells in a range using excel macro

Code to concatenate multiple cells in a range using excel macro

Sub Combine_Multiple_Cells()
On Error Resume Next
Application.DisplayAlerts = False
Dim Myrange As Range
Dim mydelim As String
Dim Combine As String
Dim eachcell As Range
Dim getvalue As Range
Set Myrange = Application.InputBox(Prompt:="Please select a range with your Mouse to be Concatenated.", Title:="dseri", Type:=8)
On Error GoTo 0
If Myrange Is Nothing Then
Exit Sub
Else
mydelim = Application.InputBox(Prompt:="Please enter a Delimiter.", Title:="Tejas Gandhi")
For Each eachcell In Myrange
Combine = Combine & mydelim & eachcell.Text
Next eachcell
Set getvalue = Application.InputBox(Prompt:="Select a Cell where you want the Combination.", Title:="dseri", Type:=8)
getvalue = Right(Combine, Len(Combine) - 1)
End If
End Sub

One more option is there to create a User Defined Function (UDF)

Function Combine(MyRange As Range, Optional Delimiter As String = " ")
Dim myAdd As String
myAdd = MyRange.Address
Combine = Join(Evaluate("transpose(" & myAdd & ")"), Delimiter)
End Function

Excel Macro to paste all the images in excel book one after the other

Excel Macro to paste all the images in excel book one after the other

Dim MyFolder As String, fn As String, i As Long
MyFolder = "C:\Pictures\"
If Right$(MyFolder, 1) <> "\" Then MyFolder = MyFolder & "\"
fn = Dir(MyFolder & "*.jpg")
i = 2
Do While fn <> ""
Set p = ActiveSheet.Pictures.Insert(MyFolder & fn)
p.Top = i
i = i + p.Height + 5
fn = Dir()
Loop
End Sub

Retrive image from database and open in new page using asp.net

Retrive image from database and open in new page using asp.net

MemoryStream mstream = new MemoryStream();
SqlConnection conn = new SqlConnection("Data Source=(local)\\sqlexpress;Initial Catalog=master;Integrated Security=True");
conn.Open();
SqlCommand cmd = new SqlCommand("select Image from student1 where Id=" + TextBox1.Text, conn);
byte[] image = (byte[])cmd.ExecuteScalar();
mstream.Write(image, 0, image.Length);
Bitmap bitmap = new Bitmap(mstream);
Response.ContentType = "image/gif";
bitmap.Save(Response.OutputStream, ImageFormat.Gif);
conn.Close();
mstream.Close();
 

C# code for Sending an email

C# code for Sending an email

private void send_mail()
{
MailMessage mm = new MailMessage("write_emailid_reciever", txtEmailId.Text);
mm.Subject = "Thnaks for your Feedback.";
mm.Body = "Dear Costomer Thanks for your feedback.You are more than welcome to give us a try again. Thank you.";
SmtpClient sc = new SmtpClient("mailing_server", 25);//25-is smtp port number
NetworkCredential nc = new NetworkCredential();
nc.UserName = "write_emailid_sender";
nc.Password = "password";
sc.Credentials = nc;
sc.Send(mm);
}

code for resize image in ASP.NET while uploading an image

code for resize image in ASP.NET while uploading an image

public bool SaveThumbnailImage(System.Web.UI.WebControls.FileUpload fu, string FullSavePath, int HeightMax, int WidthMax)
{
try
{if (fu.HasFile)
{string tmpSaveDir = pg.Server.MapPath("~/TempUploads/");
if (System.IO.Directory.Exists(tmpSaveDir) == false)
{
System.IO.Directory.CreateDirectory(tmpSaveDir);
}
string tmpSavePath = pg.Server.MapPath("~/TempUploads/" + fu.FileName);
if (System.IO.File.Exists(tmpSavePath))
{
try
{
System.IO.File.Delete(tmpSavePath);
}
catch
{ }}
fu.SaveAs(tmpSavePath);
System.Drawing.Image img = System.Drawing.Image.FromFile(tmpSavePath);
double ratioWidth = (double)img.Width / (double)WidthMax;
double ratioHeight = (double)img.Height / (double)HeightMax;
double ratio = Math.Max(ratioHeight, ratioWidth);
int newWidth = (int)(img.Width / ratio);
int newHeight = (int)(img.Height / ratio);
System.Drawing.Image thub = img.GetThumbnailImage(newWidth, newHeight, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);
if (System.IO.File.Exists(FullSavePath))
{
try
{ System.IO.File.Delete(FullSavePath);
 }
catch
 { }}
thub.Save(FullSavePath, System.Drawing.Imaging.ImageFormat.Png);
thub.Dispose();
img.Dispose();
if (System.IO.File.Exists(tmpSavePath))
{try
{ System.IO.File.Delete(tmpSavePath); }
catch { }}
setError(false, string.Empty);
return true; }
else
{
setError(true, "No file input found.");
return false; }}
catch (Exception ex)
{setError(true, ex.Message);
return false;}}
private bool ThumbnailCallback()
{ return false;}

 

C# code for encription and decription of password or text

C# code of encription and decription

following are two functions. one for encryption and second for decryption. textbox3 is text box to input data and textbox4 is textbox shows encrypted data.

private void encrypt()
{
int i = 0; string result = "";
string old = textBox3.Text;
do
{
result = result + Convert.ToChar(Convert.ToInt32(old) + (i + 2));
i = i + 1;
} while (i < old.Length);
textBox4.Text = result;
textBox3.Text ="";
}
private void decrypt()
{
int i = 0; string result = "";
string old = textBox4.Text;
do
{
result = result + Convert.ToChar(Convert.ToInt32(old) - (i + 2));
i = i + 1;
} while (i < old.Length);
textBox3.Text = result;
textBox4,Text="";
}

How to send data at Business Logic layer by repository pattern

How to send data at Business Logic layer by repository pattern

Core--> interfaces, entities, helpers, constants etc
Data-->responsible for fetching data from DB. mostly returns DataTable
DataSets--> if m using LINQ, this would be the DataContext
Service--> Converts DataTable etc into Entities .
Application --> Knows how to deal with entities .
show them manipulate them send them back and forth .
 insert data using Service layer .
If you  find this pattern more flexible .. you could write multiple Data layers that could fetch data from more than one kind of DB and use what you want.
If you want to write Data layer that targets more than one kind of DB types (Oracle, Sql, MySql) with little code change then you can use the provider pattern.

Change textbox color if textbox is empty in asp.net using c#

Change textbox color if textbox is empty in asp.net using c#

private void button1_Click(object sender, EventArgs e)
{
textBox1.BackColor = Color.White;
textBox2.BackColor = Color.White;
textBox3.BackColor = Color.White;
textBox4.BackColor = Color.White;
string[] text = new string[4];
text[0] = System.Convert.ToString(textBox1.Text);
text[1] = System.Convert.ToString(textBox2.Text);
text[2] = System.Convert.ToString(textBox3.Text);
text[3] = System.Convert.ToString(textBox4.Text);
for (int i = 0; i <= 3; i++)
{
if (text == "")
{
errorshow(i);
}
}
}
private void errorshow(int k)
{
switch (k)
{
case 0:
textBox1.BackColor = Color.Red;
break;
case 1:
textBox2.BackColor = Color.Red;
break;
case 2:
textBox3.BackColor = Color.Red;
break;
case 3:
textBox4.BackColor = Color.Red;
break;
}
}

How to call a report designer at runtime

How to call a report designer at runtime

Crystal Report is built in object of VS. You can find it from toolbar. Drag Crystal report viewer and drop it on your form. Crystal Report viewer is container of Crystal Report, in which you can open your report(*.rpt).

Following is sample code for Crystal Report...
/* Init. Crystal Report object*/
CrystalReport1 rptReport = new CrystalReport1();
/* Declaration and assignment of datatable as report source for report object*/
DataTable dtTemp = new DataTable();
rptReport.SetDataSource(dtTemp);
/*Init. of report file to Reportviewer to view report*/
crystalReportViewer1.ReportSource = rptReport;

This will work with Crystal Report. Data report is also there but Crystal report is more professional in compare to Data report

Code to copy data from textbox on button click to clipboard in asp.net using c#

Code to copy data from textbox on button click to clipboard in asp.net using c#

string mytext= mytext.toString(); // the text u want to copy
Clipboard.Clear();//Clearing the clipboard
Clipboard.SetText("mystext");//Copying text to Clipboard
string text=Clipboard.GetText();//pasting the text from clipbord.

Display an image on calendar control in a particular date in asp.net using C#

You can use dayRender event of calendar control
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if (e.Day.Date == DateTime.Today)
{
Image imageobject= new Image();
img.ImageUrl = @"~\images\test1.gif";
e.Cell.Controls.Add(img);
}
}
This code will show image for the current date.

February 15, 2012

Code To create event handler at run time on button click in asp.net using c#

Code To create event handler at run time on button click in asp.net using c#
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page
{

protected void Page_Load(object sender, EventArgs e)
{
Button btn2 = new Button();
form1.Controls.Add(btn2);
btn2.Text = "Example1";
btn2.Click += new EventHandler(btn2_Click);
}

void btn2_Click(object sender, EventArgs e)
{
Response.Write("Gooooooogle");
}

}

February 13, 2012

ITIL,itil foundation version 3 certification

ITIL,itil foundation version 3 certification

Any service oriented company can practice ITIL, to manage Infrastructure, Development and Operations. within this category youl find a lot of indian companies are practicing ITIL.

The Lifecycle modules limit itself to the lifecycle stages and their dependencies - and will make sense for someone on the way to EXPERT certification. The Capability stream on the other hand is targeted at Practitioners and goes more into detail of the processes and their implementation. The Capability exams would hold more value owing to the depth, breadth and coverage of the subject area but I would expect the Capability exams to be tougher. For someone working in SW Development, the RCV (Release Control and Validation) capability module would probably hold most value followed by PPO (Planning, Protection and Optimization).
http://ithelpline.com/files/docs/ITILQualS.pdf

ITIL Process Based Approach

http://www.securityfocus.com/

Dfiierence between ITIL ver2 & ver3
in ITIL terminology 'Service Desk' is the face of the service provided to the 'user'. it also cooordinates with all teams/parties, maintains records, communicates information to related parties (status updates to user, or periodic Report to managers etc).
The Call Center function (although there are different types of them, like inbound/outbound, the category of transaction like credit card, banking, telecom etc that enables the call center to 'do further processing of the transactions'.
i.e the call center is typically an entity to respond to 'users' as a call (via phone, web or chat or whatever); while the service desk does more than this as said above
you may want to read the topic http://www.itsmwatch.com/news/article.php/3635986

What is different about V3 is that the former Service Support (SS) and Service Delivery (SD) processes will be integrated into a service life-cycle. The content of V3 in this regard will better reflect how service management is applied in every day practice and so your implementation of them is likely to become easier.
Incident Management - Service Requests:
In V2, service requests were included as part of the incident management life cycle. In V3 they are not. Service request will now be a function included as part of 'request management' on its own that ties to the change management process. The need to log service requests through a single point of contact as you would today in V2 is still there, however, you may choose to manage them in a different way, perhaps as a part of an enhanced change model that deals with service requests as standard changes.

New topics within version 3 include: Strategy Generation, Service
Design Aspects, Request Fulfillment, Supplier Management, Outsourcing
Models, Service Knowledge Management System and Application Design.

February 12, 2012

Some Important keywords for education category for bloggers

Some Important keywords for education category for bloggers

computer education,computer fundamental,computer programming and tutorials,code help,property,sql server management studio,sql,query,pl sql, .NET ,.NET 3.5 Interview Questions ,.Net Interview ,UM Interview questions ,  3BHK starting ,asp.net tutorial ,A Letter To Bill Gates its funny   ,blog ,Blogging ,asp.net forums, ado.net How To Make Extra Money Online Earn money while working at home , Aankhen Khuli Ho, c programming tutorial, Acting Schools ,admission news ,Admission Notifications , advantages of asp with c over asp with vb.net , Ahmedabad property , AJAX  album ,mesothelioma symptoms,peritoneal mesothelioma,trans union,lung cancer,home equity loans , album review  All songs notation and chords at one place , allah , Analogies , Application Domain , Architecture Interview Question Java Interview Question , Article, Artificial   Neural Networks , ASp.Net  ASP.NET 2.0 Interview Questions , Asp.net question with Answer , microsoft asp.net, aspnet account, rent on bunglows flat,fun clips,funny,funtastic clips,great clips,learn website develpment,web technology,network clips,mesothelioma symptoms,peritoneal mesothelioma,trans union,lung cancer,home equity loans, beauty , Beauty Collection From India ,domain search , beauty of jamnagar , programming in c, Blogging for Money – An Easy Way to Earn Some How To Make Extra Money   Online Earn money while working at home  Blogs with solution for your problems , c for, microsoft visual c,C++ , C sharp , c and a ,Interview Questions , c virtual,  canara bank netbanking , Chalte Chalte , chinese food , chmod , CHORD FORMULAS OF KEYBOARD ,CASHIO , Cisco exam objective Question and Answer on Networking   , Clear Content of selected range including formulas , Code To Fill DataGrid using asp.net , Code to import excel file data to sql server table or database   using asp.net,.Cricket.Finance , Convert To Letter in excel micro ,   copyright , create object for delegate , Create table in sql , CSharp Interview Questions  CSharp Interview Questions and answer  data entry home , data   entry online , data entry operator , data entry service , data entry services , DATA FLOW DIAGRAM , Database Protection in India , date , Deewali , DFD ,   differences between .NET application and a Java application , Dot Net Codes , Dot Net help , DOTNET  DotNet 3.5 Questions , DotNet and SQL Interview   Questions or FAQ website , DotNet Interveiw Questions , dropdown and Cell value in excel , E-Book Links , e-book , Enabling right click on sites that disable it , English learning , Entrance   Exam announcements , Entrance Exam syllabus , Equity shares , ERP development solution , exam , Excel 2007 Formulas , Exporting the datagrid data in excel   sheet using C sharp .Net , faith , fist of god  flat and Bunglows , Flixya , Foundation of Multiapplication Support , FREE Download eBook for Computer IT ,   FREE EBOOK FOR BIOTECHNOLOGY , Free Registration , Free semester study materials , freelance data entry , Function for initializing the matrices tt and w for   Gaussian Integration; with n = 5 , Function to check key validation using asp.net , Function to get Finacial opening and closing date in Axapta , function to   Get scalar value using asp.net code , function to Get value of table using query in asp.net , funny jokes , Funny jokes ha ha ha , Generating DropDown in   excel , Get High on Happiness , God , God at Temple  God Images  God is great  God Song , Gods photos , Google Adsense , Google Adwords , Google Adwords and   Google Adsense , Google index checker , GRE important words , Gujarati Food , HDFC Netbanking , Hindi , Hindi Journey , home based data entry jobs , hostname   , Hotels , Hotels of chinese food in India , How to bind data grid using asp.net code , How to fill grid in asp.net through code in function of class , How   to fill static combo using data table and data reader in asp.net  How to get financial year using asp.net code in class , how to write your resume and tips   for interviews , Httpmodule and httpahndler , icicibank netbanking , Important Link To Earn Money , India , India is great , india netbanking , Indian   Earning website. , Inline function using c++ , Intellectual property rights , Interview question on Threading , Intranet and Extranet , Jai Swaminarayan    jamnagar , Janmastami , Java , JAVA Interview questions  JavaInterview Question , JDBC , JDBC Interview Question , JNI Interview Question , Job announcements   , just Rs. 18 Lakhs near Chandigarh , Kali Ma  Kedareshwar , Keyboard shortcuts in Windows , keyword , Keyword List of Property Dealing of Land , keyword search tool, keyword suggestion , keywords , king , Know the indexing status of a website , kotak bank netbanking , L  Latest Articles Latest Articles at   Boddunan , Legal Affairs , legit work at home jobs, Links To Learn english , linux command , List of Best Real Estate website  List of Open University In   India , List of top Cricket Websites  , love arrranged marriage , Luxurious Apartments near Chandigarh , Lyrics of Jan Gan Man Adhinayak Jay He , Macro code to check duplicate in excel column ,   Main Festivals of India Like Holi , Saansoon Ke Jaroorat Hai Jaise , SC questions , Scholarship details , SE index checker , Search engines , Sentence   Completion questions of GRE , SEO tools  Server and Workstation , set parent child sheet distribution in excel , Several useful commands in linux , Shri   krishan  simple queue , Smiling increases your happiness : Study Formula for happiness : mentoring Her happiness shows Peoples happiness counts  Happiness   for our Dear Leader , Software Ideas Modeler , soluzione italiana per Microsoft Ax  Some Educational Articles at boddunan , Some keyword list that is helpful   , Some link to earn money , Some tips for Sentence completion and analogies question , Some useful websites links , Song lyrics chords and notation , Songs   with notation , SQL FAQs-Answers , SQL Server Integration Service , Stored Procedure , Stored Procedure example to get Grand Total using query , Stored   Procedure example to get Total Rows using query , Stored Procedure example to Insert values in tables , Stored Procedure programming code , Stored Procedure   to generate ID from any Table , Structured query language , Struts , Support function in excel micro , Swaminarayan  Switch case in excel micro , Temple    Test Your .NET Knowledge , The art of teaching democracydemocracy , The Top Ten Software Companies in India , This is little bit funny , Thread , Threading ,   Threading in Java , Three tips for attracting more customers , Tips to improve your business , Tips To Improve Your Business Reputation , Top tips to   innovate , Top Property website , trade marks and allied rights , UDP and TCP , UML Interview questions , umount , Education system the problem , work at home ,careers , work at home loan officer , work at home online jobs   , XML , XML and SQL Interview Questions

February 11, 2012

Search string in stored procedures of SQL

A select statement that is running somewhere in our system and putting an extremely heavy load on the server. We would like to fix it, but we can't seem to locate it. We believe it is either hard coded into the reporting server, or somewhere in a stored procedure possibly

declare @SearchStr      varchar(100)
set @searchstr = 'String to search for'
SELECT DISTINCT USER_NAME(o.uid) + '.' + OBJECT_NAME(c.id) AS 'Object name'
FROM  syscomments c
      INNER JOIN
      sysobjects o
      ON c.id = o.id
WHERE c.text LIKE '%' + @SearchStr + '%'  and
      encrypted = 0

Copy and paste the data entered into a master data worksheet in a different workbook


Copy and paste the data entered into a master data worksheet in a different workbook

Sub CopyDataMacro()

Workbooks.Open "D:\test\MasterData.xlsx"

ThisWorkbook.Sheets("test1").Range(A11:K20").Copy
Workbooks("MasterData.xlsx").Sheets(   "test1").Cells(Rows.Count, 3).End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
ThisWorkbook.Sheets("test1").Range(C5").Copy
Workbooks("MasterData.xlsx").Sheets(   "test1").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues

ThisWorkbook.Sheets("test1").Range(C6").Copy
Workbooks("MasterData.xlsx").Sheets(   "test1").Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues

Workbooks("MasterData.xlsx").Save
Workbooks("MasterData.xlsx").Close

End Sub

February 7, 2012

Text to columns through code in excel

All the data are combined in one column. Each cell has multiple values  to separate into the neighboring columns, which are separated by commas.

Sub BreakDownTextToColumns()
Dim strTextData As String
Dim i As Integer, x As Integer
Dim strSplitText$()
x = 1
Range("A1").Select ' cell above data to separate
Do Until ActiveCell.Offset(x, 0).Range("A1").Value = ""
strTextData = ActiveCell.Offset(x, 0).Range("A1").Value
strSplitText = Split(strTextData, ",") ' a comma is used as the signal to separate
For i = 0 To UBound(strSplitText)
ActiveCell.Offset(x, i).Range("A1").Value = (strSplitText(i))
Next i
x = x + 1
Loop
End Sub

How to Use a correlated subquery to get sum of colums for particular items

How to Use a correlated subquery to get sum of colums for particular items

select itemid from table1 A
where col1 = 'sp'
and amt <>
  (select sum(amt) from table1 B
   where B.itemid = A.itemid
   and col1 in ('a','b')
  )
;

February 4, 2012

Check exists validation using pl/sql

Check exists validation using pl/sql

declare
v_deptno dept.deptno%type:=&gdeptno;
cursor deptcursor
is
select * from dept where deptno=v_deptno;
v_deptcursor deptcursor%rowtype;
begin
open deptcursor;
fetch deptcursor into v_deptcursor;
if deptcursor%found then
dbms_output.put_line('v_deptcursor.ename);
else
dbms_output.put_line('sorr..! no deptloyee exists..');
end if;
end;

February 3, 2012

Sending mail through SQL Stored proceduare

Sending mail through SQL Stored proceduare

@SenderNm varchar(100),
@Senderemail varchar(100),
@RecipientNm varchar(100),
@Recipientemail varchar(100),
@Subject varchar(200),
@Body varchar(8000)AS
SET nocount on 
declare @oMail int --Object reference
declare @resultcode int
EXEC @resultcode = sp_OACreate 'CDONTS.NewMail', @oMail OUT 
if @resultcode = 0
 BEGIN 
  EXEC @resultcode = sp_OASetProperty @oMail, 'From', @Senderemail
  EXEC @resultcode = sp_OASetProperty @oMail, 'To', @Recipientemail 
  EXEC @resultcode = sp_OASetProperty @oMail, 'Subject', @Subject
  EXEC @resultcode = sp_OASetProperty @oMail, 'Body', @Body
  EXEC @resultcode = sp_OAMethod @oMail, 'Send', NULL
  EXEC sp_OADestroy @oMail
 END 
SET nocount off

Follow by Email

Video Bar

Loading...

Followers

Educational Materials like Computer, engineering, software and Property , Entertainment

Recent Visitors

Active Search Results
Wink Bingo | Slots Tips | Football manager 2010 | blackjack free | Poker Stars
Submitdomainname.com