C# – Compare Two Doubles


Scott Lilly has blogged a useful article for comparing two doubles in C#. You can read his blog post here.

Advertisements
Posted in C#Tagged

Importing Blender Models into Unity 2017


Recently, I have needed to import 3D Blender models into Unity 2017. This proved difficult for me as the assets always seemed pixilated. I found that this was the case when importing .fbx files generated from Blender. But this was not the case when importing .blend files. When importing .blend files, your assets are in the image quality you expect. The only downside is that the materials are plain without the original textures. To solve this, simply import your PNGs and drag them to your material’s Albedo setting. Here are the steps to follow when importing Blender assets into Unity 2017:

  1. Add a new project in Unity 2017.
  2. Save the current scene into a folder called Scenes.
  3. Add a folder called Models under the Assets root folder.
  4. In the Models folder add a folder for the named asset to be imported.
  5. Copy the .blend file into the model’s folder.
  6. Open up the Materials folder for the imported model.
  7. Copy the PNG files into the Materials folder.
  8. Click on the material to display its properties in the Inspector.
  9. Drag the relevant PNG image onto the Albedo square to the left.
  10. Add the model to the scene, and tweek as necessary.

Adaptive Code in C#: Agile Coding with Design Patterns and SOLID Principles


 Adaptive Code via C: Agile coding with design patterns and SOLID principles

For anyone who is serious about writing good, clean code that is adaptive this book is a must. Even though the book is written for C# programmers, any programmer who needs to learn agile coding using design patterns and SOLID principles will find this book of great value.

The book is partitioned into three sections. Part 1 provides you with a foundation into agile software project management using Scrum. Then you learn about programming with dependencies and layering, before you move on to reading about interfaces and design patterns. This part finishes with a look at unit testing and refactoring.

In Part 2 you are guided through the process of writing SOLID code. There are eight chapters in all in Part 2. These chapters cover the single responsibility principle, the open/closed principle, the Liskov substitution principle, interface segregation, and dependency injection.

You then move on to Part 3 which guides you through the initial phases of developing an adaptive software product over two sprints. Using a fictitious team and project, chapters 10 , 11, and 12 describe the conversations the team members have and the decisions they must make along the way.

You can find the code samples on GitHub. The code examples reflect a selection of some of the patterns and practices that were covered in Parts 1 and 2. Not everything is covered, but some of the more common implementation questions are answered.

All-in-all a very good book, and one that is easy to read from cover-to-cover.

Test 65+ WordPress Themes for Free (No Credit Card Required)


TeslaThemes provide you with the ability to test their WordPress templates for free, and you don’t need to provide credit card details either. There are over 65 themes for you to experiment with until you find the one that is right for you.

The process is rather easy in order to get up and running. All you have to do is visit the Tesla Test Room insert your email, check your inbox, and then you can log in and test the themes.

You get access to a test WordPress Install with all the themes in it for 7 days. After that the test website and created user will be deleted.

You can see online demos of TeslaTheme WordPress themes including the Design Portfolio here.

Unity 2017.1


I have just visited the Unity website to view the Asset Store, and have learnt that they are moving to a new release cycle. The current release is 2017.1, and I must say that the new additions to Unity are impressive, especially for teams, artists and designers. You can read about the new release on the Unity Blog.

I am looking to enhance my game created with Unity called Muddle Puzzle. Improvements include making the game available on other platforms, and adding the ability to take photographs and use them in the game. So I will be downloading the new version of Unity, and will be developing my game against it.

TeslaThemes


TeslaThemes is a selected shop of Premium WordPress Themes coupled with awesome design and advanced features. It offers Multipurpose WordPress Themes for all bloggers, developers, creative agencies or business owners, willing to set up and run professional websites with beautiful layouts.

TeslaThemes gives its users the possibility to personalize the look and feel of their websites and turn them into anything they want. All the themes come with extensive documentation, set up guides, free 24/7 support and updates.

Currently, it’s offering 64+ high quality WordPress themes and at least 1 or 2 new themes per month at just $48. Get yours! You will get: – 64 Beautiful WordPress Themes: + all new items during 1 Year. The themes have a modern, bold, elegant design and are packed with lots great features powered by a robust Framework.

  • PSD Files: if you wish to customize your theme you have a total control over your layout, as all PSD files are included and can be edited/modified.
  • Premium Support: a dedicated team of professionals who is ready to help you out + a dedicated support Forum. – Responsive Design: your design will look great on all devices, whether it’s a tablet, smartphone, laptop or desktop computer. The layout is adjusting according to your screen resolution and offers the same experience across different devices.
  • Extensive Documentation: all these responsive WordPress themes come with extensive documentation with snapshots and step by step instructions.
  • Tesla Framework: a powerful frame and administration tool that allows you to easily customize the look and functionality of your theme, without advanced knowledge of programming.
  • Free Updates: you’ll be able to update your theme from your WordPress dashboard, once a new version is available.

Configure External Hyper-V Switch For Internet Access


To enable Hyper-V virtual machines to access the internet on  Windows Server 2012 or higher, from within Hyper-V select Virtual Switch Manager. Add a new virtual network switch and select External. From the drop down select the network adapter you want to use to connect to the internet, and select Allow management operating system to share this network adapter.

This will create a bridged network on the host computer. Edit the TCP/IP v4 settings for the external virtual switch on the host computer as follows:

  • Open a command window and type: ipconfig, then press enter.
  • Using the given details from the results of the command:
    • Modify the IP address
    • Subnet Mask
    • Default Gateway
    • Primary DNS
    • Enable Internet Connection Sharing
  • Add the external virtual switch to your virtual machine whilst it is turned off.
  • Start your virtual machine.
  • Edit your external virtual switch, and give it the same property values as the host external virtual switch.

Example:

IP Address: 192.168.1.47

Subnet Mask: 255.255.255.0

Default Gateway: 192.168.1.1

Preferred DNS Server: 192.168.1.1 (Default IP Address of XyXEL Routers, will more than likely be different for different routers.)

Once you have performed the above, you should have a working internet connection.