|
You're welcome!
The only instant messaging I do involves my middle finger.
|
|
|
|
|
ankum16 wrote: we use base.Method() call first
You don't have to, it depends on what you are doing, I find that I rarely do that.
|
|
|
|
|
I'm trying to display a copyright symbol and am getting strange results as follows.
using ©
firefox = copyright
chrome = heart
IE - heart
using ©
firefox = copyright
chrome = heart
IE - heart
using Ó
firefox = opera sign
chrome = copyright
IE - copyright
Font is Calibri
doctype is
Don't know where to go as googling has got me to the japanese language sites without an answer!
|
|
|
|
|
Errm, what has this got to do with C#? You should be asking this in the web forum.
|
|
|
|
|
|
With Html5 you can use &trade ™ or ® ®.
|
|
|
|
|
Hello everyone,
I have a course project and i need your suggestions that how I can implement it. Basically I have to find pdf files on web. these could be free eBooks for students. So user only have the name of book or keywords and results will be best matched free pdf file links. Now I dont know how I should crawl the web. I have a list of free eBooks websites. May be those are enough.
I have searched and tried to use Google custom search api but I am not successful, may be it is too complex and also I was not sure that it would help or not. I will be very thankful if you have a good and quick suggestion for me because I have to start it asap.
Thanks in advance.
|
|
|
|
|
|
Thank you for your advise. I have successfully implemented the Book search using the api. But in my project work I have to search pdf files only on web. And I have red whole description of api but did not find anything that can implement it. Also I want to save the result links in a file. But there is no option to handle the results. May be I have misunderstood it. Please guide if you know anything.
Thanks in advance
|
|
|
|
|
I would start by studying this[^] article and its code.
|
|
|
|
|
I am exporting a datatable to EXCEL . i want to set the font of excel columns as bold and some colour. i was using something like
Excel.Application Obj_Excel_App = new Excel.ApplicationClass();
Excel.Workbook Obj_Excel_ExcelWork = Obj_Excel_App.Workbooks.Add(Type.Missing);
Excel.Range obj_Range;
obj_Range = Obj_Excel_App.get_Range("A1", "E1");
obj_Range.Font.Bold = true;
but here i have to hardcode the range , i dont want to do that.plz help
|
|
|
|
|
You could create a small helper method or class that converts a row and column number into A1 style notation.
Veni, vidi, abiit domum
|
|
|
|
|
You can refer to a specific column, or set of columns, using the Columns collection and set its properties
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Actually i want to get the range of excel and set it colour and font
currently i am doing like this
Microsoft.Office.Interop.Excel.Range last = excelApp.Cells.SpecialCells(Microsoft.Office.Interop.Excel.XlCellType.xlCellTypeLastCell, Type.Missing);
Microsoft.Office.Interop.Excel.Range range = excelApp.get_Range("A1", last);
range.Font.Bold = true;
range.Font.Size = 12;
range.Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.White);
range.Cells.Interior.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.SteelBlue);
but it actually set the colour of all the rows , i just want to do it for first row which is my column header
|
|
|
|
|
Your original post said that you wanted to set the attributes of a column, not the row headers.
To find the last used cell in a row, I have used this code (VBA, but you should be able to work out what it is doing.
Dim WS As Worksheet
Dim LastCell As Range
Dim LastCellRowNumber As Long
Set WS = Worksheets("Sheet1")
With WS
Set LastCell = .Cells(.Rows.Count, "C").End(xlUp)
LastCellRowNumber = LastCell.Row
End With
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Hi i have a datatable having columns Col1 and Col2
Col1 Col2
A,B,C,D P,Q,R
I want to get the final output in datatable as
Col1 Col2
A P
B Q
C R
D
The first datatable will always have one row but the number of columns will vary . The final datatable should be exact replica of first datatable but the column values in first datatable separated by comma should be displayed as a row in final table. Please help.
|
|
|
|
|
Is there a way to identify how many items does the first column have?
I can see that the P, Q, R values are for the second column, how would you know where to start splitting?
superselector wrote:
Col1 Col2
A P
B Q
C R
D
|
|
|
|
|
The number of items may vary in a culumn.. but one thing is consistent that values will be seperated by comma,its just a sample i have given for understanding of the question. also the number of columns in first datatable is dynamic. it will change based on certain condition but irrespective of the number of columns i want to replicate this datatable and display those comma separated values in a row. The final datatable should have as many rows as the highest lenght of the splitted value
|
|
|
|
|
OK, maybe I was not clear, lets have this example:
DataTable 1:
Column1, Column2, Column3
DataTable 2:
Value1, Value2, Value3, Value4, Value5, Value6, Value7, Value8
The final result for you should be like below?
Column1, Column2, Column3
Value1, Value2, Value3
Value4, Value5, Value6
Value7, Value8
if the above representation is OK, its quite simple, you just have to:
1. Add to the new DataTable the content of the first DataTable
2. Add a new row to the new DataTable, start to add the values
3. When you reached the length of the first DataTable (or first row of the current DataTable) you need to start a new row.
|
|
|
|
|
Thanks , I was able to get it working.
|
|
|
|
|
Ok, if I am understanding correctly, I would approach it like this.
Loop through each column
Convert the data from that column to a 'table' - I do this with some SSRS reports. There are a lot of links about doing this example 1, example 2.
I would try putting each into it's own table then combining them in the end, but it seems like there should be an easier way.
|
|
|
|
|
I am Making Application in visual studio 2010 in windows form using C#
I want to get scan images from scanner.
How can i do???
Please help
Thank You
Sanket
|
|
|
|
|
A quick search found this[^] article here on CodeProject.
|
|
|
|
|
Hi! I trying to use DataContractSerializer to save objects with crossreference. It´s two lists of objects.
I doesn´t get a error but even though the file is created it does´t work to get it back.
Maybe it´s better to use BinaryFormatter?
Some of my code:
DataContractSerializer xs = new DataContractSerializer(typeof(List<Customer>));
DataContractSerializer xs2 = new DataContractSerializer(typeof(List<Book>));
Book-class:
[KnownType(typeof(FaktaBok))]
[KnownType(typeof(BarnBok))]
[KnownType(typeof(SportBok))]
[DataContractAttribute()]
public class Book
{
[DataMember]
protected int isbn = 0;
[DataMember]
protected string titel = null;
[DataMember]
protected string author;
[DataMember]
protected int price;
[DataMember]
protected String isType = null;
[DataMember]
protected Kund biblioteksKund = null;
One derived class:
[DataContractAttribute()]
public class SportBok : Bok
{
[DataMember]
private string sport;
Serialize:
using (Stream s = File.Create(path))
{
xs.WriteObject(s, CustomerList);
}
using (Stream s2 = File.Create(path2))
{
xs2.WriteObject(s2, BookList);
}
DeSerialize:
if (File.Exists(path))
{
using (Stream s = File.OpenRead(path))
{
CustomerList = (List<Kund>)xs.ReadObject(s);
}
}
if (File.Exists(path2))
{
using (Stream s2 = File.OpenRead(path2))
{
BookList = (List<Bok>)xs2.ReadObject(s2);
}
}
|
|
|
|
|
I have done some modification for your code -
[KnownType(typeof (FaktaBok))]
[KnownType(typeof (BarnBok))]
[KnownType(typeof (SportBok))]
[DataContractAttribute()]
public class Book
{
[DataMember]
public int IsBn = 0;
[DataMember]
public string Titel = null;
[DataMember]
public string Author;
[DataMember]
public int Price;
[DataMember]
public String IsType = null;
}
public void SerializerTestMethod()
{
List<Book> books = new List<Book>
{
new Book()
{
Author = "author1",
IsBn = 1,
IsType = "istype1",
Price = 10,
Titel = "booktitle1"
},
new Book()
{
Author = "author2",
IsBn = 2,
IsType = "istype2",
Price = 20,
Titel = "booktitle2"
}
};
string writeTo = @"FilePath";
DataContractSerializer xs2 = new DataContractSerializer(typeof (List<Book>));
using (Stream s2 = File.Create(writeTo))
{
xs2.WriteObject(s2, books);
}
List<Book> outBook = null;
if (File.Exists(writeTo))
{
using (Stream s2 = File.OpenRead(writeTo))
{
outBook = (List<Book>) xs2.ReadObject(s2);
}
}
} }
}
|
|
|
|