daily

Sonarqube Upgrade Error due LDAP

While upgrading Sonarqube i am getting the next error message An error happened, some parts of the page might not render correctly. Please contact the administrator if you keep on experiencing this error As you can see the message is not to explicit, in reality it doesnt have anything to do with reality. In my case i had copy as per the instructions the sonar.properties file. after searching i fouund this discussion post.

ubuntu not restarting or turning off

Lately I have been getting tired of my operating system just not wanting to reboot or sometimes not turning off. This happens in my version off ubuntu due a problem with the energy management. The way to solve this is changing the boot parameters for the operating system. So you will need to follow the next steps: 1. Edit the grub settings file (if you use nano as at the end do CTRL+O to save CTRL+X to close)

Unit Test CheatSheet

##mstest links: * assert * collection assert ##Nunit links: * Attributes * Assertion ##MOQ Example public interface IFoo { public bool DoSomething(string); } int calls; var mock = new Mock<IFoo>(); mock.Setup(foo => foo.DoSomething(It.IsAny<string>())). Returns((string s) => s.ToLower()) .Callback(() => ++calls); mock.SetupProperty(f => f.Name, "foo"); mock.VerifySet(foo => foo.Name = "foo"); mock.Verify(foo => foo.DoSomething(It.IsAny<string>()), Times.Never()); ##Test internal Classes In assembly info to test internal classes you will need to know the name of the file

Meteor - FlowRouter

This package is a very useful to define the navigation on your client side application. To add it just use the next command line: meteor add kadira:flow-router a static route can be done as the next code. Where name needs to be a unique identifier, and the render string has to be the name of the template. FlowRouter.route('/', { name: 'homeId', action(){ BlazeLayout.render('homeTemplate'); } }); in case of requiring a dynamic page.

C# - Path.Combine

When using path.Combine if the second argument starts with a /. the first path is ignored and will give a path based on the C: drive. var path = Path.Combine(firstpath,$@"\myfolder\myfile.txt"); will not return will return . Meteor - Session variables Session variables are easy to use in meteor. the can ve get and set from the javascript code using: Session.get('variableName'); Session.set('variableName', true); on your HTML you can reference the get method easily by:

Meteor - Session variables

Session variables are easy to use in meteor. the can ve get and set from the javascript code using: Session.get('variableName'); Session.set('variableName', true); on your HTML you can reference the get method easily by: <template name="admin"> {{#if $.Session.get 'variableName'}} I am here {{else}} I am not here {{/if}} </template>

Meteor - Query subdocument

To make a query over a subdocument in meteor is not posible to use directly the ‘$’ or ‘$elemMatch’ notation. It is necesary to use the keyword ‘fields:’ to do this. To publish just part of a mongo document you should do a query similar to this: Meteor.publish('chapter', function(id, name){ check(id,String); check(name,String); return Playlists.find({ _id: id }, { fields: { chapters: { $elemMatch: { name: name }}}}); }); That from the original document:

TFS 2015 - vnext and sonarqube integration

The modifications required to use the integrated sonarqube steps are: On your administration panel add a new Generic Endpoint with the connection name you decide and the sonarqube server address. Configure the start step as per the next image select the endpoint configured before Add the project parameters: key (this is an unique identifier). Name (display name for your software). Version (related software version).

C# - Paths to system folders

In the Environment class there is a property called SpecialFolder. This will provide the paths to folders like: Program files, desktop, AppData, etc. The use is the next one: Environment.SpecialFolder.<NameSpecialFolder> Where is the given name of the folder required, for example the AppData Local folder will be Environment.SpecialFolder.LocalApplicationData

C# - Paths to system folders

##GIT - Branches, Tags and Commits I was concern what will happend with my comments in the case i remove a branch. In git Commits are independents of branch’s and Tag’s. This last two are just pointers to certain commit. Trying to delete a Branch could create unreachable commits but if this are tag they become reachable. Removing branches will not remove commits, they will just become unreachable. Unless they are deleted with the git-gc command for example.