Friday, December 30, 2011
Search Center & Search Control Related Topics
http://waelmohamed.wordpress.com/2011/05/31/add-custom-search-properties-in-your-advanced-search-sharepoint-2010/
http://dhondiyals.wordpress.com/2010/03/07/steps-to-search-a-specific-custom-list/
http://sharepointgeorge.com/2010/configuring-enterprise-search-sharepoint-2010/
http://sharepointsearch.com/cs/blogs/sanjaya/archive/2009/06/12/create-and-configure-a-scope-to-return-only-documents-in-search.aspx
Tuesday, December 20, 2011
Sunday, December 11, 2011
Sharepoint 2010 - Search
Saturday, November 26, 2011
Thursday, November 24, 2011
Sunday, November 13, 2011
Wednesday, November 2, 2011
Friday, October 21, 2011
Wednesday, October 19, 2011
Wednesday, October 12, 2011
Tuesday, October 11, 2011
Monday, October 10, 2011
Friday, October 7, 2011
Friday, September 30, 2011
Tuesday, September 27, 2011
Friday, September 23, 2011
Wednesday, September 14, 2011
Entity Framework 4.1 - Code First
The DbContext API is a simplified abstraction over the existing ObjectContext type and a number of other types that were included in previous releases of the Entity Framework. The DbContext API surface is optimized for common tasks and coding patterns. Common functionality is exposed at the root level and more advanced functionality is available as you drill down through the API.
Code First is a new development pattern for the Entity Framework that provides an alternative to the existing Database First and Model First patterns. Code First lets you define your model using CLR classes; you can then map these classes to an existing database or use them to generate a database schema.
Source : http://www.sandeepsachan.com/
Tuesday, September 13, 2011
Thursday, September 8, 2011
PC Assembling
Items required to assemble the PC.
1. Case & power supply
2. CPU - Processor (AMD or Intel)
3. CPU Coolers and Case Fans
4. Mother board
5. Video card
6. Sound Card
7. Card reader
8. LCD Monitor
9. RAM - DDR, SDR
10. HDD
11. Optical drive - DVD
12. Mouse-KB-Speaker-Printer
http://www.mysuperpc.com/build.shtml
Wednesday, September 7, 2011
Risk Management - Vocabularies
Corporate governance – CG relates to how well the company is managed – Good corporate governance, is about Responsible and Transparent decision making and Leadership.
Ex : Good corporate governance is especially important in times of Economic Instability.
Compliance – Following rules, regulations and laws is compliance.
Eg : Our lawyers have reviewed the contract to ensure that we are in full compliance with Industry regulations.
Due Diligence
When we do all the necessary research before make a decision or signing a contract, we are performing due diligence
Due diligence might show that people were not honest about profit or potential risk
Ex: Before buying a business, you must perform due diligence on both business and seller.
Exposure – In Risk management, exposure is about how much risk you face.
High exposure means you face a lot risk and a potential damage.
Risk appetite – The amount of risk or level of exposure, that a company is willing to accept is its risk appetite.
Ex : people or company with a high risk appetite such as venture capitalists, usually anticipate great future profit.
Public scrutiny – Scrutiny is close examination or study
Ex: After scandals in companies such as Enran, corporate accounting is subject to much greater public scrutiny.
Diagnose – When we diagnose the problem, we find the cause or reason for the problem.
Critical Incidence Analysis- Is a set of techniques that are used to find and solve the problems in a company, a process or a System.
Ex: CIA has provided our company with the tools to deal with big problems when they happen.
Volatility
Natural disaster
External and Internal Risks
There may be a risk management strategy for the organization as a whole, which attempts to account for External and Internal risks to the company.
Ex
External risk – Global Economic condition / Competitor
Internal risk – Problem employees / Budget overrun.
Project Appraisal
When you examine a project to figure out whether Good or Bad, Risk or safe, you are doing Project appraisal.
Conducting project appraisal will help a company determine which project or product will make money.
Predict / foresee – To predict or foresee is to look into the future and try to guess what will happen. Ex : Smart investors try to predict the changes in the market before they happen.
Hazard - The specific situation that might cause damage or harm to the company in future are called Hazards.
Ex : Employee dissatisfaction / Product failure / Increased competition.
Avoid Risk – Ex avoid invest in a particular country
Transfer Risk – When we share or give it to another company, we are transferring that risk. Risk transfers almost and always means buying Insurance.
Mitigate risk - Another way to deal with risk is mitigate it or decrease the potential damage of a risk that can be avoided.
Ex: Companies use antivirus software to reduce the probability and damage of computer virus.
Retain Risk : A company may retail or Accept risk if they see the potential from profit or advantages.
Disclosure : It is showing or revealing Information, usually negative Information about a situation.
Reputation management : Companies must pay close attention to their public image and what people think.
Tuesday, August 30, 2011
JSON & .NET
Employee oEmployee1 = new Employee { Name = "Pini", ID = "111", Age = "30" };
Employee oEmployee2 = new Employee { Name = "Yaniv", ID = "Cohen", Age = "31" };
Employee oEmployee3 = new Employee { Name = "Yoni", ID = "Biton", Age = "20" };
List
Serialization.JavaScriptSerializer serializer = new Serialization.JavaScriptSerializer();
string jsonString = serializer.Serialize(oList);
List
oListNew = serializer.Deserialize
- >(jsonString);
- (new StreamReader(response.GetResponseStream()).ReadToEnd());
//ser.Deserialize
Saturday, August 20, 2011
Thought of the day
Oh God! Make the world better place to live in.
Tuesday, August 16, 2011
JQuery - Found Solution for Nested Droppable items
$(".myDropClass").droppable(
{
accept: '.myDragClass',
drop: function (event, ui) {
//remove old item
alert('Dropped');
$(this).find(".myDragClassPlaceHolder").remove();
var listHtml = "
"
"New Droppable area" + ui.draggable.text() + "
alert('Added1');
$(this).append(listHtml);
alert('Added');
$(this).find('#ontheflyDiv').droppable({
drop: function(event, ui)
{
alert('Set the droppable behavior to the newly created element');
$(this).append("hello");
}
});
}
});
Tuesday, July 12, 2011
Parent Child Relation
http://sharepointhillbilly.com/archive/2009/08/07/getting-your-feet-wet-writing-code-for-sharepoint-ndash-part.aspx
Parent Child Relation : Video
http://sharepointhillbilly.com/archive/2009/12/08/creating-a-sharepoint-list-parentchild-relationship-ndash-video-remix.aspx
http://sharepointhillbilly.com/archive/2009/12/18/outing-sharepoint-workflows-ndash-linking-to-workflows-in-list-views.aspx
Custom Action
http://msdn.microsoft.com/en-us/library/bb802730.aspx
http://msdn.microsoft.com/en-us/library/ms473643.aspx
ECB : Add an Edit Control Block Menu Item
Add an Item to the Site Actions Menu
Thursday, July 7, 2011
Workflow : SharePoint 2010
------------
http://www.sheltonblog.com/archive/2007/11/04/series-of-sharepoint-workflow-how-to-videos.aspx
http://www.microsoft.com/resources/msdn/en-us/office/media/video/sharepoint.html?cid=sharepoint-video&VideoID=0b9b9198-6ad5-4cb0-9ff2-60b505f4ed4d&from=mscomsharepoint
http://archive.msdn.microsoft.com/SharePointDev2010/Release/ProjectReleases.aspx?ReleaseId=4171
http://www.josetamez.com/post/2011/03/24/Workflows-in-SharePoint-2010.aspx
http://msdn.microsoft.com/en-us/SP2010DevTrainingCourse_WhatsNewinSharePoint2010Workflow.aspx
Video
http://ecn.channel9.msdn.com/o9/learn/videos/SharePoint2010Developer-Workflow-DevelopingWorkflowswithVS2010/SharePoint2010Developer-Workflow-DevelopingWorkflowswithVS2010_2MB_kit.wmv
Tuesday, July 5, 2011
Wednesday, June 22, 2011
SharePoint Industry Requirement
- In depth understanding of the capabilities of Microsoft Office SharePoint Server 2003/2007/2010 and SharePoint Designer.
- Knowledge must include architectural design, web parts, management and troubleshooting with a focus on planning, deploying and supporting enterprise SharePoint implementations.
- In depth experience with Collaboration, Portals, Enterprise Search, Enterprise Content Management, Business Process and Forms, and/or Business Intelligence.
- SharePoint experience must include SharePoint Designer workflows, effective use of the data view web part , content query web part, data form web part, navigation customization, and some branding customization.
- Experience with SharePoint templates (site templates, list templates, master page customization) is required.
- Experience configuring and working with Microsoft Internet Information Server (IIS) and SQL Server 2005 is required.
Monday, June 20, 2011
Thursday, June 16, 2011
Saturday, May 21, 2011
MSSQL T-SQL DB Table column info
select distinct
TBL.name as TableName,
COL.Name as ColumnName, TYP.name as Type, COL.max_length as Length,
COL.precision as Precision, CASE COL.is_nullable WHEN 1 THEN 'Null' ELSE 'Not Null' end as 'Null' from sys.columns COL
inner join sys.objects TBL on COL.object_id= TBL.object_id
inner join sys.types TYP on TYP.system_type_id= COL.system_type_id
where TBL.type ='u' and TBL.name != 'sysdiagrams'
and TYP.name !='sysname' order by
TBL.name,
COL.name
select
distinct
--TBL.name as TableName,
COL.Name as ColumnName, TYP.name as Type, COL.max_length as Length,
COL.precision as Precision, CASE COL.is_nullable WHEN 1 THEN 'Null' ELSE 'Not Null' end as 'Null' from sys.columns COL
inner join sys.objects TBL on COL.object_id= TBL.object_id
inner join sys.types TYP on TYP.system_type_id= COL.system_type_id
where TBL.type ='u' and TBL.name != 'sysdiagrams'
and TYP.name !='sysname' order by
--TBL.name,
COL.name
Wednesday, May 18, 2011
Friday, May 6, 2011
Friday, April 29, 2011
SQL Best practices and Tips
1. Avoid DISTINCT
2. TOP 1 ORDER BY ID desc (to get the last record) - Use WHERE ID = (SELECT (MAX(ID) FROM Tbl) - TOP N * or TOP N PERCENTAGE or TOP N WITH TIES (tank)
3. Table Scan needs to eliminate if the cost is high... Always Table Seek is better for IO operation and Performance.
4. INNER join is better than Equi join ECT col1, col2, col3... FROM table_name1, table_name2 WHERE table_name1.col2 = table_name2.col1;
5. Use PRIMARY key and then use Non clustered index as Non clustered index uses the Clustered index key
6. Use Order by only if required
7. Use composite index keys if the Where condition using more than one filters CDN
8. Use INCLUDE
CREATE NONCLUSTERED INDEX [
Index fragmentation - Health check
SELECT CAST(DB_NAME(database_id) AS varchar(20)) AS [Database Name],CAST(OBJECT_NAME(object_id) AS varchar(20)) AS [TABLE NAME], Index_id, Index_type_desc, Avg_fragmentation_in_percent, Avg_page_space_used_in_percentFROM sys.dm_db_index_physical_stats(DB_ID('SOLO'),OBJECT_ID('dbo.order'),NULL,NULL,'Detailed')
SELECT index_id, index_depth, cast(avg_fragmentation_in_percent as int), page_count FROM sys.dm_db_index_physical_stats(DB_ID('SOLO'), OBJECT_ID('dbo.order'), NULL, NULL, 'DETAILED') order by 1,2
replace the NOT IN clause with a != , if you are comparing with 1 value
Avoid Index for a fixed value columns such as "Boolean", "Status" which will not give a great benifit.
WHERE SUBSTRING(firstname,1,1) = 'm'
can be rewritten like this:
WHERE firstname like 'm%
If you currently have a query that uses NOT IN, which offers poor performance because the SQL Server optimizer has to use a nested table scan to perform this activity, instead try to use one of the following options instead, all of which offer better performance:
-Use EXISTS or NOT EXISTS -Use IN -Perform a LEFT OUTER JOIN and check for a NULL condition
WHERE clauses that use NOT are not sargable, but can often be rewritten to remove the NOT from the WHERE clause, for example:
WHERE NOT column_name > 5
to
WHERE column_name <= 5
if you can rewrite the WHERE clause so that the column and function are separate, then the query can use an available index, greatly boosting performance. for example: Function Acts Directly on Column, and Index Cannot Be Used:
SELECT member_number, first_name, last_nameFROM membersWHERE DATEDIFF(yy,datofbirth,GETDATE()) > 21
Function Has Been Separated From Column, and an Index Can Be Used:
SELECT member_number, first_name, last_nameFROM membersWHERE dateofbirth < DATEADD(yy,-21,GETDATE
SELECT column_name FROM table_nameWHERE LOWER(column_name) = 'name'
SELECT column_name FROM table_nameWHERE column_name = 'NAME' or column_name = 'name'
This code will run much faster than the first example.
Here are the key operators used in the WHERE clause, ordered by their performance. Those operators at the top will produce results faster than those listed at the bottom.
= >, >=, <, <= LIKE <>This lesson here is to use = as much as possible, and <> as least as possible.
Carefully evaluate whether your SELECT query needs the DISTINCT clause or not
While is most cases, using either option works equally efficiently, there are some instances (such as rows returned from an unsorted heap) where the TOP operator is more efficient than using SET ROWCOUNT. Because of this, using the TOP operator is preferable to using SET ROWCOUNT to limit the number of rows returned by a query.
Whenever SQL Server has to perform a sorting operation, additional resources have to be used to perform this task. Sorting often occurs when any of the following Transact-SQL statements are executed:
ORDER BY GROUP BY SELECT DISTINCT UNION CREATE INDEX (generally not as critical as happens much less often)In many cases, these commands cannot be avoided. On the other hand, there are few ways that sorting overhead can be reduced. These include:
Keep the number of rows to be sorted to a minimum. Do this by only returning those rows that absolutely need to be sorted. Keep the number of columns to be sorted to the minimum. In other words, don't sort more columns that required. Keep the width (physical size) of the columns to be sorted to a minimum. Sort column with number datatypes instead of character datatypes.When using any of the above Transact-SQL commands, try to keep the above performance-boosting suggestions in mind.
USE NorthwindSELECT OrderIDFROM [Order Details]WHERE UnitPrice > 10GROUP BY OrderID
or
USE NorthwindSELECT DISTINCT OrderIDFROM [Order Details]WHERE UnitPrice > 10
Both of the above queries produce the same results, but the second one will use less resources and perform faster.
It is fairly common request to write a Transact-SQL query to to compare a parent table and a child table and find out if there are any parent records that don't have a match in the child table. Generally, there are three ways this can be done:
Using a NOT EXISTS
SELECT a.hdr_keyFROM hdr_tbl aWHERE NOT EXISTS (SELECT * FROM dtl_tbl b WHERE a.hdr_key = b.hdr_key)
Using a Left Join
SELECT a.hdr_keyFROM hdr_tbl aLEFT JOIN dtl_tbl b ON a.hdr_key = b.hdr_keyWHERE b.hdr_key IS NULL
Using a NOT IN
SELECT hdr_keyFROM hdr_tblWHERE hdr_key NOT IN (SELECT hdr_key FROM dtl_tbl)
Here's how you might use COUNT(*):
IF (SELECT COUNT(*) FROM table_name WHERE column_name = 'xxx')
Here's a faster way, using IF EXISTS:
IF EXISTS (SELECT * FROM table_name WHERE column_name = 'xxx')
The reason IF EXISTS is faster than COUNT(*) is because the query can end immediately when the text is proven true, while COUNT(*) must count go through every record, whether there is only one, or thousands, before it can be found to be true.
Performing UPDATES takes extra resources for SQL Server to perform. When performing an UPDATE, try to do as many of the following recommendations as you can in order to reduce the amount of resources required to perform an UPDATE. The more of the following suggestions you can do, the faster the UPDATE will perform.
If you are UPDATing a column of a row that has an unique index, try to only update one row at a time. Try not to change the value of a column that is also the primary key. When updating VARCHAR columns, try to replace the contents with contents of the same length. Try to minimize the UPDATing of tables that have UPDATE triggers. Try to avoid UPDATing columns that will be replicated to other databases. Try to avoid UPDATing heavily indexed columns. Try to avoid UPDATing a column that has a reference in the WHERE clause to the column being updated. Of course, you may have very little choice when UPDATing your data, but at least give the above suggestions a thought. [6.5, 7.0, 2000]
If you have created a complex transaction that includes several parts, one part of which has a higher probability of rolling back the transaction than the others, better performance will be provided if you locate the most likely to fail part of the transaction at the front of the greater transaction. This way, if this more-likely-to-fail transaction has to roll back because of a failure, there has been no resources wasted on the other less-likely-to-fail transactions.
you often need to INSERT the same value into a column. For example, perhaps you have to perform 100,000 INSERTs a day into a particular table, and that 90% of the time the data INSERTed into one of the columns of the table is the same value.If this the case, you can reduce network traffic (along with some SQL Server overhead) by creating this particular column with a default value of the most common value. This way, when you INSERT your data, and the data is the default value, you don't INSERT any data into this column, instead allowing the default value to automatically be filled in for you.
we discussed various T-SQL discovery, optimization and tuningtechniques using the SET and DBCC commands. SQL Server performance is acomposite of many factors. And while T-SQL p
Friday, April 22, 2011
FaceBook - My view
I am new to Face book (FB) and understood the wonderful features of the FB application. It helps us to remind the birthday of friends, send messages, and share information across the group.
The downside is it tempts us to login to the application multiple times a day to read the comments and messages, eventually makes us addict to it.
Most of you are adding YouTube movie songs, which we are seeing it in all TV music channels, which is ultimately not useful, and waste of bandwidth and time.
I gradually reduced my time in FB and using my time in reading books which will focus the mind in one direction. Whereas In web, we jump from one link to another and finally we will do noting.
I suggest the youngsters not to spend more time in FB. This is the right age for you to focus on your career and studies.
Facebook in a part of life and not the heart of life.
Warm Regards
Balakrishnan G.
Thursday, April 21, 2011
SQL COALESCE & Top N within Group By
[EMPLOYEEID] INT PRIMARY KEY,
[NAME] NVARCHAR(50),
[MANAGERID] INT
)
GO
INSERT INTO EMPLOYEE VALUES(101,'Mary',102)
INSERT INTO EMPLOYEE VALUES(102,'Ravi',NULL)
INSERT INTO EMPLOYEE VALUES(103,'Raj',102)
INSERT INTO EMPLOYEE VALUES(104,'Pete',103)
INSERT INTO EMPLOYEE VALUES(105,'Prasad',103)
INSERT INTO EMPLOYEE VALUES(106,'Ben',103)
GO
SELECT E1.[NAME],COALESCE(E2.[NAME],'No Manager') AS [MANAGER NAME]
FROM EMPLOYEE E1
LEFT OUTER JOIN EMPLOYEE E2
ON E2.EMPLOYEEID =E1.MANAGERID
SQL Select Top N within Group By
drop table #test
create table #test (testid int identity(1,1), personid int, persondate int)
insert into #test (personid, persondate) values (1, 1)
insert into #test (personid, persondate) values (1, 2)
insert into #test (personid, persondate) values (1, 3)
insert into #test (personid, persondate) values (1, 4)
insert into #test (personid, persondate) values (1, 5)
insert into #test (personid, persondate) values (2, 1)
insert into #test (personid, persondate) values (2, 2)
insert into #test (personid, persondate) values (2, 3)
insert into #test (personid, persondate) values (2, 4)
insert into #test (personid, persondate) values (2, 5)
insert into #test (personid, persondate) values (3, 1)
insert into #test (personid, persondate) values (3, 2)
insert into #test (personid, persondate) values (3, 3)
insert into #test (personid, persondate) values (4, 1)
insert into #test (personid, persondate) values (4, 2)
SELECT * FROM #test
SELECT b.testid, b.personid, b.persondate, count(1) AS RowOrder
FROM #test a, #test b
WHERE a.persondate >= b.persondate AND a.personid = b.personid
GROUP BY b.testid, b.personid, B.persondate
HAVING Count(1) BETWEEN 1 AND 1
ORDER BY 1 DESC
Tuesday, April 5, 2011
Query Tuning Steps
Monday, April 4, 2011
Thursday, March 24, 2011
Tuesday, March 8, 2011
திருப்த்தி
Friday, February 25, 2011
WPF : Restrict Multiple Instance
protected override void OnStartup(StartupEventArgs e){
// Get Reference to the current Process
Process thisProc = Process.GetCurrentProcess();
// Check how many total processes have the same name as the current one
if (Process.GetProcessesByName(thisProc.ProcessName).Length > 1)
{
// If ther is more than one, then it is already running.
MessageBox.Show("Another Instance is already running.");
Application.Current.Shutdown();
return;
}
base.OnStartup(e);
}