You are here

dev

How to retarget a Studio 5000 or RSLogix 5000 project to another controller

This is particulatly handy if a project targets a ControlLogix controller and you re prting to a CompactLogix controller; because you may not have the higher licence installed.

The project must be saved in .L5K format. Simply open it and change the controller string in the header.

Tags: 

.NET class library for SainSmart relay boards

SainSmart.NET is a .NET class library (and example application) for controlling USB and network relay boards sold by SainSmart.

I developed this library as part of my current project to automate photography capture of about 15000 35mm slides.

Tags: 

Cannot register ActiveX/COM control, Exception has been thrown by the target of an invocation

A COM component cannot be registered from a network drive.

Tags: 

Days in which everything works the first time look like this.

Tags: 

Centring in CSS: A complete guide

A Complete Guide to Flexbox

The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.

You just added a Razor web page to a traditional ASP.NET project and now you get this error.

A new section has been added to your Web.config file. Modify it like so:

  <appSettings>
    <add key="webpages:Enabled" value="true" />
    <add key="enableSimpleMembership" value="false" />
  </appSettings>
Tags: 

Deployment failed because of an internal error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

I encountered this error when deploying an Android app that was built for an older version (4.2.x) of Mono for Android.

Detecting installed packages
 
Waiting for packaging to complete
 
Installing application on device
 
Deployment failed because of an internal error: Unexpected install output: &nbsp;&nbsp;&nbsp; pkg: /data/local/tmp/ca.guelph.visit-Signed.apk
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
 
Deployment failed. Internal error.

The cause of the problem was these lines in the AndroidManifest.xml:

<!-- Allow the application to access Google web-based services. -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
 
<!-- Notice here that we have the package name of our application as a prefix on the permissions. -->
<uses-permission android:name="Visit.Guelph.permission.MAPS_RECEIVE" />
<permission android:name="Visit.Guelph.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
Tags: 

How to write to stderr in .NET

TextWriter stderr = Console.Error;
stderr.WriteLine("Error, world!");
Tags: 

Block length does not match with its complement

Problem: You are using System.IO.Compression.DeflateStream to decompress a stream, and you are getting this message.

Solution: Seek forward 2 bytes first. There is a two byte signature 0x789c at the beginning of the deflated file.

Tags: 

Pages

Simple Copyright Policy: If you want to reproduce anything on this site, get my permission first.