Tuesday, May 28, 2013
The Controls collection cannot be modified because the control contains code
fixed this with placeholder tag
Thursday, May 23, 2013
Unable to start debugging on the web server on local VS
app pool maybe closed
Orwell
From George Orwell's essay, Politics and the English Language, http://gutenberg.net.au/ ebooks03/0300011h.html#part42
I am going to translate a passage of good English into modern English of the worst sort. Here is a well-known verse fromEcclesiastes:
I returned and saw under the sun, that the race is not to the swift, nor the battle to the strong, neither yet bread to the wise, nor yet riches to men of understanding, nor yet favour to men of skill; but time and chance happeneth to them all.
Here it is in modern English:
Objective considerations of contemporary phenomena compel the conclusion that success or failure in competitive activities exhibits no tendency to be commensurate with innate capacity, but that a considerable element of the unpredictable must invariably be taken into account.
This is a parody, but not a very gross one. Exhibit (3) above, for instance, contains several patches of the same kind of English. It will be seen that I have not made a full translation. The beginning and ending of the sentence follow the original meaning fairly closely, but in the middle the concrete illustrations -- race, battle, bread -- dissolve into the vague phrases "success or failure in competitive activities." This had to be so, because no modern writer of the kind I am discussing -- no one capable of using phrases like "objective considerations of contemporary phenomena" -- would ever tabulate his thoughts in that precise and detailed way. The whole tendency of modern prose is away from concreteness. Now analyze these two sentences a little more closely. The first contains forty-nine words but only sixty syllables, and all its words are those of everyday life. The second contains thirty-eight words of ninety syllables: eighteen of those words are from Latin roots, and one from Greek. The first sentence contains six vivid images, and only one phrase ("time and chance") that could be called vague. The second contains not a single fresh, arresting phrase, and in spite of its ninety syllables it gives only a shortened version of the meaning contained in the first. Yet without a doubt it is the second kind of sentence that is gaining ground in modern English. I do not want to exaggerate. This kind of writing is not yet universal, and outcrops of simplicity will occur here and there in the worst-written page. Still, if you or I were told to write a few lines on the uncertainty of human fortunes, we should probably come much nearer to my imaginary sentence than to the one from Ecclesiastes.
Monday, May 13, 2013
how to have updatable data from any query in SSMS
edit top 200-> right click on grid -> pane- > sql-> change the sql
Friday, May 10, 2013
Returning from definition in VS
Thursday, May 9, 2013
Linq to select all rows with data in datable
_data.Tables[tempStr].Rows.Cast<DataRow>().Where(row => !row.ItemArray.All(field => field is System.DBNull || string.Compare((field as string).Trim(), string.Empty) == 0)).CopyToDataTable();
Monday, May 6, 2013
format config files in notepad++ nicely
alt-L -> X
removing a row in spreadsheetgear from a range
You can't do this range( "1:1").delete - you will get an error that s/sh gear can only delete a full row
you have to refer to the row of the range as if the range is a full spreadsheet
You can't refer to the underlying location values
you have to refer to the row of the range as if the range is a full spreadsheet
this is what I did
public static IRange
RemoveHeader(IRange range)
{
try
{
string
startingCol ="a";
string
endingCol = GetExcelColumnName(range.ColumnCount);
int
startRow = 2;
int
endRow = range.RowCount;
string
newrange = string.Format("{0}{1}:{2}{3}", startingCol, startRow,
endingCol, endRow);
if
(!range.Union(range.Range[newrange]).Equals(range))
{
throw
new EExcelUtilsRangeOutOfBoundsOfData();
}
return
range[newrange];
}
catch
{
throw
new EExcelUtilsRangeOutOfBoundsOfData();
}
}
Guid like strings in SQL
we were having an issue that there was a table that had all string values, guids and non guids, and a join on a guid table was failing so we did this
select * into #blah
from
blah WITH (NOLOCK)
where string_val LIKE
REPLACE('00000000-0000-0000-0000-000000000000', '0', '[0-9a-fA-F]')
Wednesday, May 1, 2013
Defaults with WCF
if you set up a WCF service the default Binding type will be basicHttpBinding
when you create a reference the name of the binding will be basicHttpBinding_theinterface
it makes no difference if the name is different on the client , as long as the type is the same
when you create a reference the name of the binding will be basicHttpBinding_theinterface
it makes no difference if the name is different on the client , as long as the type is the same
Spreadsheetgear Issue with Macros
S/shgear lists macros under namedranges
this makes no sense to me
I had to do this to weed them out:
this makes no sense to me
I had to do this to weed them out:
SpreadsheetGear.IRange tempName = name.RefersToRange;
//tempName.Name!=
null avoids adding macros
//wish
s/sh gear had a better way of identifying name type
if
(tempName != null && tempName.Name!= null)
{
Subscribe to:
Posts (Atom)