Menu
Cutty
  • Chryslers
  • Lutherie
  • YLSNED
  • About
Cutty

Category: You Learn Something New Every Day

Proof that you do actually learn something new every day.

Xamarin debugging Android from Virtual Box

Posted on March 22, 2021 by Iain 'Cutty' Carlin

Background/Environment

Virtuality

I like to develop inside a Virtual Machine. The advantages of this are:

  • The environment is portable, so I can move it between machines;
  • I can backup and/or snapshot machines so can recover quickly in the event of some failure or error;
  • I can set up different machines for different workflows (e.g. one for API dev, one for Mobile dev etc.)
  • I can replace my physical device without going through the pain of rebuilding my development environment, and;
  • I can use any OS on my physical device

I use VirtualBox to host my guest machines – I’ve tried Microsoft Hyper-V, but for whatever reason it just lacks the performance and flexibility that I’ve found with VirtualBox.

…
+

SqLite Auto-increment fields in Entity Framework

Posted on December 11, 2019December 11, 2019 by Iain 'Cutty' Carlin

By default, Scaffolding a table with an auto-increment field adds:

.ValueGeneratedNever();

To the field in the Model Builder. This will cause an automatic value NOT to be generated. This needs to be removed.

Also, we need to add:

        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int? TemplateId { get; set; }

To the item – and ensure it is a nullable int. https://docs.microsoft.com/en-us/ef/core/modeling/generated-properties …

+

Interface the virtual abstract

Posted on November 29, 2019December 1, 2019 by Iain 'Cutty' Carlin

I’ve researched this several times now and keep forgetting the results. So, putting it here to record it for next time. What is the difference and usage for c# interfaces, virtual and abstract classes and methods? And where do you use them?

Interface

An interface specifies a contract.

  • Interfaces contain only declarations of the members in the class but cannot contain implementation details.
  • Interfaces do not have constructors
  • All methods in an interface MUST be implemented by the class
  • It only contains public access modifier because everything in the interface is public.
  • A child class can inherit from multiple interfaces (multiple inheritance)
  • [Note that properties in C# are in effect a method, so you can specify a property in an interface, but the property needs to be implemented by the derived class].
…
+

Configuring SSIS on SQL 2017

Posted on February 14, 2018December 1, 2019 by Iain 'Cutty' Carlin

Not as easy as you would think, once installed, the service wouldn’t start, then I couldn’t log on (Access Denied) then I couldn’t connect remotely.

  • Install and Configure DCOM: https://docs.microsoft.com/en-us/sql/integration-services/service/integration-services-service-ssis-service
  • Configure Firewall to allow RPC: http://slavasql.blogspot.com.au/2016/07/ssis-rpc-server-is-unavailable-error.html
  • Create SSIS Catalog: https://technet.microsoft.com/en-us/library/gg471509(v=sql.110).aspx
  • Run SSIS Package with Powershell: https://docs.microsoft.com/en-us/sql/integration-services/ssis-quickstart-run-powershell

 …

+

SSIS Toolbox missing in Visual Studio 2017

Posted on November 2, 2017 by Iain 'Cutty' Carlin

I have installed the Data-Tier Application Framework and SQL Server Data Tools for VS 2017 . I created a solution then returned to it a week later and the SSIS toolbox had disappeared.

I opened the toolbox window using View -> Toolbox but it was empty.

To get the SSIS toolbox back, right-click on the SSIS design surface in the project and select SSIS Toolbox – hey presto! it reappears.

 …

+

SharePoint Calendar – Offset and length were out of bounds….

Posted on September 19, 2016September 23, 2016 by Iain 'Cutty' Carlin

When swapping from the Day view to Week view of a SharePoint calendar, we were getting the following error message: “Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection”.

Tried setting the Information Management Policy Settings to 2 months (was 3) to archive list down to less items (It had about 4800 records, got it down to 4200). [NB: Run Information Management Policy job first, then Expiration Policy]. Problem was not resolved.

We have 2 views of the data, filtered to a different number of items in each.…

+

Error opening SharePoint calendar item

Posted on May 17, 2016December 1, 2019 by Iain 'Cutty' Carlin

“Item does not exist. It may have been deleted by another user.”

Remove everything after the ID value in the url for the item, after and including the first dot. You can then use the view screen to delete the item.

http://blog.incworx.com/blog/sharepoint-developer-blog/let-me-tell-you-how-i-conquered-item-does-not-exist-it-may-have-been-deleted-by-another-user…

+

C# tip-bits

Posted on April 22, 2015December 1, 2019 by Iain 'Cutty' Carlin

Learning some interesting stuff doing the edX Microsoft Programming with C# course. Thought I’d list some of them here for reference

  • The test value in a while loop is called the sentinel value.
  • A do loop always executes at least once (so use it instead of setting the sentinel value first before entering a while loop)
  • You can use named arguments so that you don’t have to pad out optional parameters, e.g.: StopService(true, serviceID: 1); serviceID is the name of one of many optional parameters but not necessarily the second one for the StopService method.
…
+

Changing data source on a DataFormWebPart

Posted on April 20, 2015 by Iain 'Cutty' Carlin

https://tommdaly.wordpress.com/2013/10/22/reuse-dataform-web-part-change-listid-to-listname-and-scrub-guids…

+

Infopath form error when calling WCF service via SSL

Posted on April 14, 2015December 1, 2019 by Iain 'Cutty' Carlin

Interesting issue with a few Infopath forms. They’ve been working fine for ages using a WCF service to update another system.

When we changed our SharePoint site to use SSL, the form was generating an error when calling the WCF service. There were a number of factors at play:

  1. The WCF service was not configured correctly to have an SSL end point. By changing the binding configuration in the web.config for the web service, I was able to get the WSDL to display correctly using https when browsing to the service. However, the form still didn’t work AND the WSDL returned had the wrong URL (was the internal server name not the FQDN).
…
+
  • 1
  • 2
  • 3
  • 4
  • Next

Recent Posts

  • Instrument Making Course
  • Jigging, plating and sanding
  • A building block….
  • Fridays are lutherie days!
  • Music is your art…

Categories

  • Chryslers (1)
  • Cutty's Blog (7)
  • Lutherie (38)
  • You Learn Something New Every Day (39)
©2022 Cutty | Powered by WordPress & Superb Themes