<< < 157 158 159 160 161 162 163 164 165 166 167 > >>   Sort: Date

I have a program which mallocs and later frees a lot of memory ...
I have a program which mallocs and later frees a lot of memory, but I can see from the operating system that memory usage doesn't actually go back down. Most implementations of malloc/free do not return freed memory to the operating system, but merely make it available for future malloc calls within...
2016-03-28, 1801👍, 0💬

What should one do to make class serializable?
What should one do to make class serializable? Answers1: To make a class serializable is to mark it with the Serializable attribute as follows. [Serializable] public class MyObject { public int n1 = 0; public int n2 = 0; public String str = null; }
2013-12-26, 1801👍, 0💬

Difference between Class And Interface
Difference between Class And Interface Class is logical representation of object. It is collection of data and related sub procedures with defination. Interface is also a class containg methods which is not having any definations. Class does not support multiple inheritance. But interface can suppor...
2013-12-04, 1800👍, 0💬

How can I get the numeric value corresponding to a character? ....
How can I get the numeric value (i.e. ASCII or other character set code) corresponding to a character, or vice versa? In C, characters are represented by small integers corresponding to their values in the machine's character set. Therefore, you don't need a conversion function: if you have the char...
2016-03-07, 1799👍, 0💬

How does you handle this COM components developed in other programming languages in.NET?
How does you handle this COM components developed in other programming languages in.NET? Answer1: add the component in add reference window, click .NETCOM tab. Answer1: While adding the refferences we can handle the COM components in other .Net programming languages.
2014-11-12, 1799👍, 0💬

y program is crashing, apparently somewhere down inside malloc ....
My program is crashing, apparently somewhere down inside malloc, but I can't see anything wrong with it. Is there a bug in malloc? It is unfortunately very easy to corrupt malloc's internal data structures, and the resulting problems can be stubborn. The most common source of problems is writing mor...
2016-04-06, 1797👍, 0💬

What property must you set, and what method must you call in your code, in order to bind the data from some data source to the R
What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control? You must set the DataMember property which Gets or sets the specific table in the DataSource to bind to the control and the DataBind method to bind data fr...
2014-01-29, 1797👍, 0💬

How do I swap bytes?
How do I swap bytes? V7 Unix had a swab function, but it seems to have been forgotten. A problem with explicit byte-swapping code is that you have to decide whether to call it or not, based on the byte order of the data and the byte order of the machine in use. A better solution is to define functio...
2015-02-16, 1794👍, 0💬

What class does Icon derive from? Isn’t it just a Bitmap with a wrapper name around it?
What class does Icon derive from? Isn’t it just a Bitmap with a wrapper name around it? No, Icon lives in System.Drawing namespace. It’s not a Bitmap by default, and is treated separately by .NET. However, you can use ToBitmap method to get a valid Bitmap object from a valid Icon object.
2013-11-22, 1790👍, 0💬

What tags do you need to add within the asp:datagrid tags to bind columns manually?
What tags do you need to add within the asp:datagrid tags to bind columns manually? Column tag and an ASP:databound tag.
2014-02-07, 1785👍, 0💬

If I have a char * variable pointing to the name of a function ...
If I have a char * variable pointing to the name of a function, how can I call that function? Code like extern int func(int, int); char *funcname = "func"; int r = (*funcname)(1, 2); or r = (*(int (*)(int, int))funcname)(1, 2); doesn't seem to work. By the time a program is running, information abou...
2015-02-20, 1781👍, 0💬

I thought that ANSI function prototypes were supposed to guard against argument type mismatches.
I thought that ANSI function prototypes were supposed to guard against argument type mismatches. When a function accepts a variable number of arguments, its prototype does not (and cannot) provide any information about the number and types of those variable arguments. Therefore, the usual protection...
2015-11-06, 1780👍, 0💬

Why doesnt the call scanf work?
Why doesn't the call scanf("%d", i) work? The arguments you pass to scanf must always be pointers: for each value converted, scanf ``returns'' it by filling in one of the locations you've passed pointers to. To fix the fragment above, change it to scanf("%d", &i) .
2015-11-02, 1779👍, 0💬

Difference Abstract class and Interface
Difference Abstract class and Interface Abstract class: This class has abstract methods (no body). This class cannot be instantiated. One needs to provide the implementation of the methods by overriding them in the derived class. No Multiple Inheritance. Interfaces: Interface class contains all abst...
2013-12-03, 1779👍, 0💬

What is the best way of making my program efficient?
What is the best way of making my program efficient? By picking good algorithms, implementing them carefully, and making sure that your program isn't doing any extra work. For example, the most microoptimized character-copying loop in the world will be beat by code which avoids having to copy charac...
2015-02-11, 1777👍, 0💬

What are the different methods to access Database in .NET ?
What are the different methods to access Database in .NET ? What are the different methods to access Database in .NET ? * OleDB,ODBC,SQLClient * OleDB, JDBC, SQLServer * ODBC-JDBC, DataSet, SQLClient * Datasource, DataSet, DSN OleDB,ODBC,SQLClient
2014-07-17, 1777👍, 0💬

I figured I could use scanf more safely if I checked its ...
I figured I could use scanf more safely if I checked its return value to make sure that the user typed the numeric values I expect: int n; while(1) { printf("enter a number: "); if(scanf("%d", &amp;n) == 1) break; printf("try again: "); } printf("you typed %d\n", n); but sometimes it seems to go...
2015-10-19, 1776👍, 0💬

What is Duff's Device?
What is Duff's Device? It's a devastatingly devious way of unrolling a loop, devised by Tom Duff while he was at Lucasfilm. In its ``classic'' form, it was used to copy bytes, and looked like this: register n = (count + 7) / 8; /* count > 0 assumed */ switch (count % 8) { case 0: do { *to = *from++;...
2015-01-02, 1775👍, 0💬

What doesu mean by .NET framework?
What doesu mean by .NET framework? The .NET Framework is an environment for building, deploying, and running Web Services and other applications. It consists of three main parts: the Common Language Runtime, the Framework classes, and ASP.NET
2013-12-05, 1769👍, 0💬

How do you find the error, how can you know the number of rows affected by last SQL Statement?
How do you find the error, how can you know the number of rows affected by last SQL Statement? Answer1 @@errors-&gt;give the last error occured in the current DB. Ans. select @@rowcount Answer2. Use @@ERROR which returns the error number for the last Transact-SQL statement executed fro knowing t...
2014-11-03, 1757👍, 0💬

How can I use a macro argument inside a string literal in the macro expansion?
How can I use a macro argument inside a string literal in the macro expansion? Some pre-ANSI compilers/preprocessors interpreted macro definitions like #define TRACE(var, fmt) printf("TRACE: var = fmt\n", var) such that invocations like TRACE(i, %d); were expanded as printf("TRACE: i = %d\n", i); In...
2016-01-22, 1752👍, 0💬

Explain features of SQL Server like Scalibility, Availability, Integration with Internet.
Explain features of SQL Server like Scalibility, Availability, Integration with Internet. Scalibility - The same Microsoft SQL Server 2000 database engine operates on Microsoft Windows 2000 Professional, Microsoft Windows 2000 Server, Microsoft Windows 2000 Advanced Server, Windows 98, and Windows M...
2014-10-27, 1749👍, 0💬

A new server-side control can be created by implementing the class ___________
A new server-side control can be created by implementing the class ___________ A new server-side control can be created by implementing the class ___________ * System.Web.WebControl * System.Web.UI.WebControl * System.Web.UI.WebControls.WebC ontrol* Any one of the above System.Web.UI.WebControls.Web. ..
2014-06-27, 1748👍, 0💬

So what could go wrong? Are there really any systems where void main doesnt work?
So what could go wrong? Are there really any systems where void main doesnt work? It has been reported that programs using void main() and compiled using BC++ 4.5 can crash. Some compilers (including DEC C V4.1 and gcc with certain warnings enabled) will complain about void main().
2015-12-18, 1744👍, 0💬

<< < 157 158 159 160 161 162 163 164 165 166 167 > >>   Sort: Date