Posts

Error : Cannot find type [Microsoft.SqlServer.Management.Smo.RelocateFile]:

Image
I have multiple version of Microsoft.SqlServer.Management.So installed, from version 10.0, 11.0, 12.0 and 13.0.

Tried adding the following text on top of my script


[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91") | Out-Null [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91") | Out-Null
And same error. Wow!

Until i bump into this site and made the following change.


Powershell runs as expected. Sweet!
If your path points to version 12, please change it and points to version 13 as shown above.



facebook field guide to machine learning series.

https://research.fb.com/the-facebook-field-guide-to-machine-learning-video-series/

Sitecore controller rendering simple example

Image
I think the trick to go about setting up a project for this are :

a) Add reference to Sitecore.kernel and Sitecore.Mvc manually

b) Create a blank project and as you add "Empty Controller", the required folders will be added for you

c) Manually copy .dll to your Sitecore 9 project.






Creating your controller code base 

Create your controller just like how you would do it for asp.net, which means you create controller, model and view.

Model 




Controller 




View




Integrating it to the code layout in sitecore - all you need is @Html.Sitecore().Rendering







Failed to start service 'Sitecore XConnect Search Indexer - xp0.xconnect-IndexWorker

I bump into this error earlier and for the longest time trying to figure out why this is happening.

After can't get it to start .... i restarted my computer and ran the installation until it crashed and get this beautiful message.

Then i edited my script to force it to continue......... Same scripts just small change. Please have a look at Line 49. Re-execute the same script again. Good luck. You might have to restart your computer a couple of times in case SOLR don't like you so much.










Sitecore rocks - unable connect to server in visual studio

After installing sitecore rocks 2.1,  still have problem connect to my local sitecore.  This is really puzzling.

Turn out, there is an issue with user permission (although i ran my Visual Studio community in Administrator mode).

Edit web.config and change to the following configuration.



Installing Local Development of SiteCore 9 - step by step.

Pre-requisite (version must match otherwise good luck :) 

Powershell 5.0

Webdeploy 5.0

Site core main files

Download and extract sitecore 9.0 files from here.)

Extract this file and then (XP0 Configuration files rev.171002.zip) -this will get some json files extracted.

Using powershell prompt running in Administrator mode, execute the following command :-

Install-Module SitecoreInstallFramework

Import-Module SitecoreInstallFramework 

solr solr_6.6.2 (must match)

nssm - to install solr as windows service (must) - install using chocolatey

Please ensure you setup your JAVA_HOME otherwise, running it as a Window Service, otherwise you will get error.

Sql server 2016 - you must have this version installed. Sitecore will not install successfully if you don't

In case your script fails half way

1. Restart your solr window service

2. Delete databases the script created example xp0_Processing.Pools, xp0.ReferenceData

Then re-run the script.


Modify your solr.in.cmd file to remove REM comments to…

Predicting value from using keras mnist sample data

In this example, we use Keras to do a simple prediction. Here is the code for doing it.

x_train[0]  has the value 8 and the prediction shows column 8 gives the highest probability.






simple keras classification model

The following keras script demonstrate a simple classification problem using neural network. The  neural network is made up of 3 layers and the key here is using sgd as it optimizer.



The following code also give a pretty good classification sample based on the same data set.