Thursday, February 23, 2012

Eclipse: Access restriction: The type x is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar

To resolve this problem go to project properties. Under Java Compiler>Errors/Warnings
Under "Deprecated and restricted API" change "Forbidden reference (access rules)" to "Ignore"


Thursday, February 16, 2012

C#: Copying 2 buffers


Use Buffer.BlockCopy method
<span style="color:Blue;">public</span> <span style="color:Blue;">static</span> <span style="color:Blue;">void</span> BlockCopy(
Array src,
<span style="color:Blue;">int</span> srcOffset,
Array dst,
<span style="color:Blue;">int</span> dstOffset,
<span style="color:Blue;">int</span> count
)
Example:
byte[] dataRcvd = new byte[20];
byte[] commBuffer = new byte[5];
Buffer.BlockCopy(commBuffer,0, this.dataRcvd,0, 5);

Wednesday, February 15, 2012

Viewing CVS Repositories

Step 1:From the CVS menu, choose Remote>Checkout module...


Step 2:The Checkout settings dialog will pop-up. From the Checkout settings tab, click the "..." button to display the list of repositories.


Step 3: Choose the repository you want to checkout then click OK


Step 4:Click OK again.


Step 5: After a successful checkout, you should see the project folder in your workspace.