|
I have a third party chat application where user will chat using this application.
We have one more application which was developed in C# and which provides details of account by providing the account number.
My requirement is need to read the contents (account no) from third party chat application and open the account details of entered account number in the Chat.
Is this feasible? How we can implement this.
Cheral
modified 27-Sep-13 8:17am.
|
|
|
|
|
Your best bet is to contact the people who wrote the Chat Application you are trying to integrate with.
There are a few things you can do yourself, such as looking for the account number being stored in some sort of file, but it is a longshot.
If you can't get the vendor to provide information and the account number is stored in memory then you've got real problems, so I'd exhaust the above first.
|
|
|
|
|
If the chat system has a log stored on the local driver (or on the server and they are willing to share it), you can read this log.
|
|
|
|
|
Hello all,
While implementing a abstract class, when we override a method, why do we use base.Method() call first and then implement the method? Why this is considered as good practice? When I am sure that I don't want to use any of the variables nor any changed properties from base method.
And Why override is preferred over new keyword? One solution is: 'New' creates new instance of method whereas override uses same memory location. any other suggestions are welcome.
public abstract class A
{
public void method()
{
// Concrete method
}
}
class Class1 : A
{
public override void method()
{
base.method();
}
}
This question was asked during my interview. Please suggest.
|
|
|
|
|
We call the base class method from the derived class method for the simple reason that it does some work that the whole base class (and by implication all derived classes) expect to have been done!
For example, if you have an abstract Fruit class, then the Picked method will probably set the abstract class field value "datePicked" to the current date - so that you can use it later in the GetBestBeforeDate method. If your derived class overrides the Picked method, then you must set the "datePicked" field correctly, or future abstract class methods won't work properly. Calling the base class implementation is the easiest and most reliable way to make this work properly.
Why use override? Well, again, it is so that things work correctly!
new hides (or replaces) the base class method, override extends it. What that means is that if you declare a derived Fruit class Apple, and it has the Picked method we talked about:
Apple a = new Apple();
Fruit f = a; Then we call the Picked method
a.Picked();
f.Picked(); The results differ depending on how Picked was declared in the Apple class:
If Picked was an override method:
The two lines call the same method: Apple.Picked because you extended the method.
If Picked was a new method:
The two lines call different methods: the first calls Apple.Picked, the second calls Fruit.Picked because you replaced it
If you aren't sure of this stuff, then you do need to learn it - look back at your course notes, or read up on MSDN because it is pretty important to know what is going on here!
The only instant messaging I do involves my middle finger.
|
|
|
|
|
Thanks, very good explanation.
|
|
|
|
|
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.
|
|
|
|