segunda-feira, 3 de dezembro de 2018

MSDEPLOY - example 2


"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb=sync -source:package=C:\Deploy\Pacote\PacoteWebDesenv.zip -dest:contentPath=websitename,publishSettings=C:\Deploy\publish-profile\desenv\myproject-web.pubxml,userName=="LS-DEVELOPER\user.deploy",password="*******" -allowUntrusted -enableRule:DoNotDeleteRule


This is a result of trying to publish an angular website.

sexta-feira, 30 de novembro de 2018

MSDEPLOY - example


msdeploy -verb:sync -source:package="C:\Deploy\Pacote\XXXXX.zip" -dest:contentPath="[mysite.web]",computerName="the computer name",userName="your user",password="XXXX",authtype="Basic",publishSettings="C:\Deploy\publish-profile\desenv\example.pubxml" -allowUntrusted

example.pubxml
<?xml version="1.0" encoding="utf-8"?>
<publishData>
  <publishProfile
    publishUrl="https://ec0-00-000-000.sa-east-1.compute.amazonaws.com:8172/msdeploy.axd"
    msdeploySite="mysite.web"
    destinationAppUrl="http://dev.xxxx.com.br:80/"
    mySQLDBConnectionString=""
    SQLServerDBConnectionString=""
    profileName="Default Settings"
    publishMethod="MSDeploy"
    userName="your user" />
</publishData>


quinta-feira, 29 de novembro de 2018

Could not find module "@angular-devkit/build-angular" from "C:\\Program Files (x86)\\Jenkins\\workspace\\Desenv_Web".

Solution

npm install --save-dev @angular-devkit/build-angular

-----------

Error: Could not find module "@angular-devkit/build-angular" from "C:\\Program Files (x86)\\Jenkins\\workspace\\Lawsoft_Desenv_Web".
    at Object.resolve (C:\Users\jenkins-devops\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\core\node\resolve.js:141:11)
    at Observable.rxjs_1.Observable [as _subscribe] (C:\Users\jenkins-devops\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\architect\src\architect.js:132:40)
    at Observable._trySubscribe (C:\Users\jenkins-devops\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:44:25)
    at Observable.subscribe (C:\Users\jenkins-devops\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:30:22)
    at DoOperator.call (C:\Users\jenkins-devops\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\tap.js:32:23)
    at Observable.subscribe (C:\Users\jenkins-devops\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:25:22)
    at C:\Users\jenkins-devops\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\util\subscribeTo.js:22:31
    at Object.subscribeToResult (C:\Users\jenkins-devops\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\util\subscribeToResult.js:10:45)
    at MergeMapSubscriber._innerSub (C:\Users\jenkins-devops\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:82:29)
    at MergeMapSubscriber._tryNext (C:\Users\jenkins-devops\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:76:14)

quinta-feira, 1 de novembro de 2018

sexta-feira, 14 de setembro de 2018

TemplateDoesNotExist at /accounts/login/

Verify the attribute DIRS

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': ['./templates',],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]


TemplateDoesNotExist at /accounts/login/

registration/login.html
Request Method:GET
Request URL:http://127.0.0.1:8000/accounts/login/?next=/versioning/
Django Version:2.1.1
Exception Type:TemplateDoesNotExist
Exception Value:
registration/login.html
Exception Location:C:\ci_database_lawoffice\ci\lib\site-packages\django\template\loader.py in select_template, line 47
Python Executable:C:\ci_database_lawoffice\ci\Scripts\python.exe
Python  

segunda-feira, 27 de agosto de 2018

The MNIST database

http://yann.lecun.com/exdb/mnist/

Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2

WINDOWS CPU


pip install --ignore-installed --upgrade "https://github.com/fo40225/tensorflow-windows-wheel/tree/master/1.1.0/py36/CPU/avx2/tensorflow-1.1.0-cp36-cp36m-win_amd64.whl"

How to upgrade tensorflow script

For Python 2.7 type the following command:
$ python tf_upgrade.py --infile InputFile --outfile OutputFile
For Python 3.3+n type the following command:
$ python3 tf_upgrade.py --infile InputFile --outfile OutputFile

How to find out the tensorflow version

python
>> import tensorflow as tf

>> print (tf.VERSION)

Launching tensorflow

tensorboard --logdir=path/to/log-directory

terça-feira, 21 de agosto de 2018

Complaining and explaining are not the same things.

Complaining and explaining are not the same things. You can explain a horrible situation without complaining. If you do that, most of the time, it means you want to solve a situation. Now, here comes the question. In your company, when you gather people together, do they complain or explain the difficult situations they are going through? Complaining doesn't help. It is just an exhausting habit for you and for everybody around you. Every complaint is praying to the devil - Bob Marley.

Why daily meetings do not encourage the habit of documenting.

Why daily meetings do not encourage the habit of documenting. Very simple. Unless the company has a department focused on documentation, daily meetings make people talk (a lot, depending on your country). When people talk, subconsciously they think that what they know is already known by everybody. So, "Why documenting, if everybody knows what I know. After all, we talk every day. It's impossible that he or she isn't aware of what I'm doing, right?" It's a tricky situation. Daily meetings pass two messages. A clear one is that everybody must be "on the same page", and another hidden one "Don't worry. We already talked. You don't need to write anything"

sexta-feira, 27 de julho de 2018

SELECT failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.

SELECT failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.

This problem was happening whatever I tried to execute a stored procedure.
My solution was

At the beginning of the stored procedure I wrote

CREATE PROC [dbo].[YourProc]
    @yourparameter varchar(50)
AS
BEGIN

    SET ARITHABORT ON



quinta-feira, 26 de julho de 2018

WINRAR.exe zip - How to zip de files and subfolders

a -afzip -r -ep1  "path\file.zip"  "path\directory you want to zip\"

Don't forget the last left slash.
Do the test with and without the left slash and you'll see the subtleness.

:)

quarta-feira, 25 de abril de 2018

How to cause a deadlock on SQL Server on purpose

Hi!

What I really needed was an error with the word deadlock inside of the message, so this is what I did.
Whenever I need a deadlock to raise up I execute my procedure proc_deadlock.
Then I make my code treatment based on the message that contains the word deadlock.


USE [master]
GO

/****** Object:  StoredProcedure [dbo].[proc_deadlock]    Script Date: 25/04/2018 12:47:19 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

create procedure [dbo].[proc_deadlock]
as

    -- RAISERROR with severity 11-19 will cause execution to 
    -- jump to the CATCH block. 
    RAISERROR ('this is my deadlock', -- Message text. 
               16, -- Severity. 
               1 -- State. 
               ); 

GO