Sunday, 15 May 2016

Quotes To Remember



Don't start a business unless there is a wrong that you want to right, otherwise you're going to stick  it through the hard times.

Steve Jobs noted that a lot of people would ask him how to become an entrepreneur, but that they didn’t have an idea yet.
He’d tell them, “I think you should go get a job as a busboy or something, until you find something you’re really passionate about.”
Then, “You’ve got to have an idea, or a problem, or a wrong that you want to right that you’re passionate about, otherwise you’re not going to have the perseverance to stick it through.”
It’s hard starting a business. If you don’t have a deeper conviction that you’re solving a problem that really needs to be solved, you’ll never make it through the adversity.


http://www.businessinsider.com.au/steve-job-on-entrepreneurship-2016-5?r=US&IR=T

 ---- -------------------------------------------------------------------------------------------------------------

"Never play to the gallery, never work for other people in what you do, always remember that the reason you initially started working was that there was something inside yourself, that you felt if you could manifest it in someway, you would understand more about yourself and how you co-exist with the rest of society. I think it's terribly dangerous for an artist to fulfill other peoples expectations, I think they produce their worst work when they do that.
Another thing I'd say, is that if you feel safe in the area you're working in, you are not working in the right area, always go a little further in the water then you feel you're capable of being in, go a little bit out of your depth and when you don't feel that your feet are quite touching the bottom, then you're just about in the right place to do something exciting."

David Bowie.


-------------------------------------------------------------------------------------------------------------------------

Build your own dreams, or someone else will hire you to build theirs.

Farrah Gray

Thursday, 12 May 2016

Managed and Unmanaged resources, idisposable

The term "Managed resource" is usually used to describe something directly under the control of the garbage controller. 
The term "unmanaged resource" is usually used to describe something not directly under the control of the garbage collector. For example, if you open a connection to a database server this will use resources on the server (for maintaining the connection) and possibly other non-.net resources on the client machine, if the provider isn't written entirely in managed code.
This is why, for something like a database connection, it's recommended you write your code with "using":
using (var connection = new SqlConnection("connection_string_here"))
{
    // Code to use connection here
}
As this ensures that .Dispose()is called on the connection object, ensuring that any unmanaged resources are cleaned up.

Saturday, 23 January 2016

Unity (game)

Two types of animation 




Sprite Atlases Animation



----- MULTITOUCH

if you have a Compiled C++ dll as 64 bit, and import it into unity make sure when you build unity solution you select 84_64 option. Can build on 64 bit unity.

Also GETWINDOWTEXT takes a lpwstr  AND GETWINDOWTEXTA takes a Char



----



http://unity3d.com/learn/tutorials/projects/roll-ball-tutorial

Tuesday, 12 January 2016

Web development problems and fixes





Firefox rest client plugin A great way of immediately testing a service get and post methods



Thursday, 17 December 2015

Xamarin Development Problems And Fixes

Problem

Xamarin.Forms.WebView Control wont display webpage, even thought a web address has been supplied to its source property.
By default application can only communicate with servers that implement best-practice security (ATS).
 
Fix

To fix this, the most simple way is to change the http of an address to https
otherwise read more here
https://developer.xamarin.com/guides/cross-platform/xamarin-forms/user-interface/webview/

 

-------------------------------------------------------------------------------------------------------

Problem


Json retrieved from web service padded with escape characters '\\\', wont de-serialize back to objects;

Json looks like below

"\"{\\\"BeaconId\\\":\\\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\\\",\\\"BeaconName\\\":\\\"Milk - Cereal Aisle - Ice\\\",\\\"BeaconUuid\\\":\\\"B9407F30-F5F8-466E-AFF9-25556B57FE6D\\\",\\\"FirstName\\\":\\\"Tom\\\",\\\"LastName\\\":\\\"Jones\\\",\\\"ProductAdId\\\":\\\"375b973f-b7b0-49e2-bef1-53cc64f0adc9\\\",\\\"ProductAdUrl\\\":\\\"http:\\\\/\\\\/www.smh.com.au\\\\/lifestyle\\\\/diet-and-fitness\\\\/the-skinny-on-lowfat-20130703-2pd1y.html\\\",\\\"ProductCategoryId\\\":1,\\\"ProductName\\\":\\\"Brownes Low-Fat Milk\\\",\\\"UserId\\\":\\\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\\\"}\"";
 

Fix

json = json.Remove(0, 1);

json = json.Remove(json.Length - 1, 1);
json = Regex.Unescape(json);



---------------------------------------------------------------------------------

Xamarin Page Navigation Tutorial using MVVM light

https://mallibone.com/post/xamarin.forms-navigation-with-mvvm-light 


-------------------------------------------------------------------


Gesture API and samples allows you recognize gestures and perform actions, for example has a same that rotates/ zooms into pictures using the pinch gestures

https://github.com/MichaelRumpler/GestureSample
https://forums.xamarin.com/discussion/33214/zoom-on-image



-----------------------------------------

Pin Login Control

http://www.wintellect.com/devcenter/jprosise/writing-cross-platform-mobile-apps-with-visual-studio-2015-and-xamarin-forms-2


--------------------

Authentication saving

https://developer.xamarin.com/recipes/cross-platform/xamarin-forms/general/store-credentials/ 


--------------
Navigation page removing icon

https://forums.xamarin.com/discussion/34871/remove-icon-from-action-bar-from-xamarin-forms-android-project


------------------------------------------------------Splash Screen

http://codeworks.it/blog/?p=294

Wednesday, 16 December 2015

Code First Problems and Fixes

Problem

After you delete a database and come across this problem

"Cannot attach the file  ERROR"  -    after Deleting MDF (database) file

Fix

  1. Remove old database connection string out of Web.Config
  2. Open the "Developer Command Propmpt for VisualStudio" under your start/programs menu.
  3. Run the following commands:
    sqllocaldb.exe stop v11.0
    sqllocaldb.exe delete v11.0