Tag Archives: C++

Calling an ASP.Net web service using jQuery and JSON.

Let’s say you have a webpage where you need to call a service but cannot perform a post back.  Recently I was on a client engagement where we needed to improve page performance by dynamically loading a navigation tree with a potential for several thousand links.  We implemented a solution that would load each branch [...]

Posted in .NET Framework, Ajax, Enterprise .NET, JavaScript, jQuery | Also tagged , , , | Leave a comment

.NET File Compression in Memory

File compression is nothing new to .NET.  However, in many solutions it requires the developer to establish a file folder which they will write the compressed file to and later read from.
This solution cannot work if you want to compress and use the file in memory without writing to disk.  An example of this [...]

Posted in .NET Framework, Enterprise .NET, User Groups | Also tagged , , | Leave a comment

Pass by reference

In C++ and C#, developers have freedom to modify variables by directly having access to memory location.
In C++,
#include <stdio.h>
void swapnum(int &i, int &j) {
int temp = i;
i = j;
j = temp;
}
int main(void) {
int a = 10;
int b = 20;
swapnum(a, b);
printf(“A is %d and B is %d\n”, a, b);
return 0;
}
In C#,
int a = 1;
modify(ref a); //now [...]

Posted in Enterprise Java | Also tagged , | 2 Comments