Posts

"C:\Microsoft.Cpp.Default.props" was not found.

I was getting this error when running npm install.

The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Solution :-

SET VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140

Thanks to Stackoverflow for this answer! :)






understanding keras 's layer

dot - computes a dot product between 2 tensors. Just like doing multiplication.

conv2d - creates a convulsion - a square box that you hover over a 2d image matrix.

maxPool2d - taking the max values out of a stride after we iterate our image with a predefined filter size. Small little window walks through our image to produce a matrix - which made up of biggest value of a filter.

To see more please read from this link here.

https://www.quora.com/What-is-max-pooling-in-convolutional-neural-networks

dense layer - it is a linear function which maps input directly to output based on a predefined weight. sometimes weight can be a softmax function.



dropout is a techniques used to prevent over fitting in neural network. Performs averaging and prevent co-adaptions.





Sourcetree - pulling remote branch to your local drive

Image
To pull remote branch into your sourcetree is pretty easy with sourcetree.

Double click on any of the branch below :-






then you will be prompted with the following screen :-



Just provide a name and you will get your remote branch downloaded locally.




Git - reset all local changes and commit then sync with remote branch

If you ever need to discard local change and sync everything from the start



git reset --hard origin/develop (develop is your remote branch)

git pull origin develop  (just funny they omit the slash here

This is all you need. 

classifying text sentiment simple way

Once of the easiest way to classify a text sentiment is to use the following Keras code :-

A Git a day : Merge vs rebase

Image
Merge combines commit from say a master branch into a feature branch while retaining history from both branch.


Rebase places new changes on top of a master branch. While the picture looks fine, all changes from feature branch are sync with master's commits. If this is the other way around, rebasing master in feature branch, then master commits will be lost.

So the golden rule of using rebase is :-

Is anyone looking / using this branch before we do our rebasing. We don't want to change history for master and confuse developers.

If you want to use rebase, create a feature branch.




Interactive rebasing - here you get to choose which histories you want to be included in the commit.

Sitecore Commerce server configuration : value cannot be null

Image
Bump into this error and i decided to disable my Sitecore from using SiteCore Commerce server. 




So go into App_Config and then rename CommerceServer.Core.config to CommerceServer.Core.config_disabled.

Try to refresh your browser

COM services control panel (comexp.msc)

It has been such a long time that i had to deal with COM service. The command to kick off this is called "comexp.msc". 

Image
I find the following information is relevant when it comes to FTP over TLS, that i ripped it out of Fluent FTP site.

These are the commands issued by the client to configure / setup channel to use a  TLS .

Outputs coming out from console are show here.




FTP Support
Mapping table documenting supported FTP commands and the corresponding API.. Connection commands CommandAPIDescriptionUSER, PASSCredentialsLogin with username & passwordQUITDisconnect()DisconnectPASV, EPSV, EPRTDataConnectionTypePassive & Active FTP modesFEATHasFeature()Get the features supported by serverSYSTGetSystem()Get the server system typeOPTS UTF8 ONEncodingEnables UTF-8 filenamesOPTS UTF8 OFFEncoding, DisableUTF8()Disables UTF-8 filenamesAUTH TLSEncryptionModeSwitch to TLS/FTPSPBSZ, PROTEncryptionMode and
DataConnectionEncryptionConfigure TLS/FTPS connectionCCCPlainTextEncryptionSwitch to plaintext FTPPRETAutomaticPre-transfer file informationTYPE AUploadDataType and
DownloadDataTypeTransfer data in ASCIITYPE …

fluent ftp - transferring file securely

I don't think you will believe this but to transfer or upload a file securely, all you need to do with fluent ftp is the following :-

I download and trace through fluent ftp code and this is as fluent as it can get.





If you get "unexpected format " - this means the protocol you specified is not supported by your server. Please find out

Transfering files via FTPS

Image
WinSCP provides easy to use nuget library to work with FTP, FTPS (Secure FTP over SSL /  TLS) and SFTP (ssh over ftp)

In my scenario, I am trying to transfer file via FTPS.

If you need some help with the codes, download the WinSCP installer and try connecting to the server and try out the supported protocol like ssl, tls or ssh. Goto -> Session -> Generate Session URL / Code.




To help you figure out the code, you can try looking at .Net assembly code tab.





So this will help you resolve many of the issue trying understand how to configure your session.


Some common error messages you will get includes :-

"SessionOptions.Protocol is Protocol.Sftp or Protocol.Scp, but SessionOptions.SshHostKeyFingerprint is not set." - Please try out approaches above.

You can always use "GiveUpSecurityAndAcceptAnyTlsHostCertificate" or "GiveUpSecurityAndAcceptAnySshHostKey".










Creating a ftp upload client

Creating a ftp client is relatively easy. I got it working with the following code snippet.  The problem i had was with parsing the url with filename before i can upload a file. Tricky...