Posts by anisanwesley • 2,280 points
41 posts
-
1
votes1
answer617
viewsQ: Grant permission to a new user in SQL Server 2014
I’m trying to assign permissions to db_datawriter and db_datareader a new user in SQL Manager The following steps have been executed: -- criação do usuário CREATE LOGIN apostila WITH PASSWORD =…
-
0
votes4
answers1531
viewsA: How to assign a value to an Enum with binary notation?
Working a little with the DLLImport for Microsoft assemblies, I noticed that they use a notation for enuns [Flag] very efficient, simply using hexadecimal values: public enum Direction { None = 0x1,…
-
3
votes4
answers1114
viewsQ: Create string array in C#
There is a way to create an array of string constant? Something like: class Teste { public const string[] Array = new string[] {"a","b"}; } But this one doesn’t compile. In this case nay would…
-
2
votes1
answer2062
viewsQ: List all properties of a C#object?
I need to write all the primitive properties of a C# object regardless of how many "levels" I enter these objects. I have the following object in Javascript: var objeto = { propriedade:{ valor:42 },…
-
6
votes2
answers241
viewsQ: Why does Steam api refuse Angular calls?
I am simply trying to feed my application data from the Steam Api. Let’s take this example:…
-
2
votes1
answer3659
viewsQ: How to customize checkbox/radio without using background: url?
Whenever I search for "customize", "checkboxes" and "radios", examples appear using background:url(image.png). There is a way to customize a "checkbox" with "CSS only" without use background:url?…
-
1
votes0
answers127
viewsQ: Webapi . net40 basic authentication
I need to create a basic authentication in an Asp.net webapi project, but it has to be on . Net Framework 4.0, but all the content I find on the internet is for 4.5 Some north?
-
1
votes1
answer101
viewsQ: How to get the name of the parent object of the Javascript property
I have the following code: var teste = 'objeto': { version: '5.x.x', name:this[??] // 'objeto' }; What could be done for that property name has the same name of the object to which it belongs (which…
-
7
votes2
answers1022
viewsQ: How to get the return of an instantiated Function (new + Return) - Javascript
I have a Function where I assign values in this, why it will be instantiated function Teste(){ this.valor='Valor no this'; return "Valor no return"; } I urge her var t = new Teste(); But now, like…
-
2
votes0
answers104
viewsQ: Create VSIX projects in Visual Studio Professional
I created templates for Visual Studio in the version Ultimate, but for some reasons I needed to migrate to the Visual Studio Professional, and since then my projects VSIX no longer work. The…
-
1
votes0
answers59
viewsQ: Open local machine files via Javascript
I need to simply run a local file via Javascript. For example, in the C# I have the System.Diagnostics.Process.Start("C:\\teste.txt") which will open in the notebook the teste.txt. How do I open…
-
3
votes2
answers122
viewsQ: Heirs attributes with prototype do not appear in Javascript Reflection
I have the class Animal that has some properties that are enumerable: true, that is, I can list them via Reflection using for..in. So I have the class Coelho that has the attribute cor. How rabbit…
-
2
votes1
answer51
viewsQ: Testing Jasmine in separate files without breaking the describe?
I want to organize my javascript tests in separate files, but these can be part of a common module. For example: describe("Controllers", function () { describe('Move list Controller', function () {…
-
0
votes2
answers3400
viewsA: custom filter with Angularjs
You can create a custom filter and register it at the angle. 1 - Create a module var app = angular.module('app',[]); <html ng-app="app"> 2 - Register the controller in this module…
-
0
votes1
answer878
viewsA: Create advanced route in Angular.js
Dude, I answered two questions that might help you, follow the links: Consume Rest with Angularjs How to use Angular UI Router? and what are the advantages?…
-
0
votes2
answers273
viewsA: Abstract unit tests
The class AbTest nay need to be abstract, because you don’t have to worry about instantiating those classes, since Nunit will do it for you. I always use "base" test classes to encapsulate…
-
0
votes2
answers945
viewsA: Is it possible to exchange route system ($route) in the same URL? Angular JS
In fact the native router of Angularjs has some disadvantages, I advise you to use the Angular Ui-Router. Follow the link of a reply of mine on it, take a look at it calmly, I hope it helps: How to…
angularjsanswered anisanwesley 2,280 -
19
votes1
answer7712
viewsA: How to use Angular UI Router? and what are the advantages?
He’s much better and more powerful than the native angler, I’m going to make a basic comparative: ngRoute URL-based routing That is, only one route per screen and a controller for it Does not…
angularjsanswered anisanwesley 2,280 -
3
votes2
answers1497
viewsA: Error: $injector:modulerr Module Error
The @Marco Antônio response concept is correct, but it contains some compilation errors, so I’m going to go through a simpler way of doing: Ah, and another thing, you don’t need to attach the…
angularjsanswered anisanwesley 2,280 -
0
votes3
answers354
viewsA: Angularjs templateUrl error does not find html file
Understanding the problem Angularjs Injects service dependency according to argument name when you do not specify this. In this case, the argument $routeProvider is being minified and therefore…
angularjsanswered anisanwesley 2,280 -
6
votes3
answers993
viewsQ: How to simulate JSON responses?
I need something that simulates JSON responses for me. A while ago I had seen a site that did the following: You pass parameters through a URL, e.g.: ?nome=Wesley&idade=21 Received in the call…
-
3
votes2
answers2435
viewsA: Generate reports in c#
I use the iTextSharp and the PDFSharp to generate reports, grids and requests, these two are the most popular for dotnet. One of them will solve your problem.…
-
2
votes1
answer103
viewsQ: How to turn off Visual Studio 2013 Intellisense for Text Plan only?
I need to edit a text file in Visual Studio 2013, but the Intellisense keeps bothering me like this: By squeezing space for the next word is "Troque object leitor de DVD" and it is unproductive to…
-
1
votes1
answer304
viewsQ: How do I know which State I’m coming from using ui-router?
I’m using Angular-Ui ui ui and the only thing I need to know is which state I’m coming from. I already have for example; app.controller("MainCtrl", function($scope,$state) { //$state.current ok, mas…
-
3
votes1
answer270
viewsQ: What’s wrong with this pseudo-code?
Who is following the Sof-br saw that I asked something about pseudo-code a few hours ago (here if you want to follow the context) Well, I need to make a pseudo-code in English that serves as a basis…
pseudocodeasked anisanwesley 2,280 -
6
votes3
answers156
viewsQ: What name is given to code modeling/notation?
I know the question got a little weird, but here’s the thing: It has a type of notation that is no language, but it serves as a basis to implement in some language. for example the algorithm of…
pseudocodeasked anisanwesley 2,280 -
2
votes2
answers4968
viewsQ: Error initializing SQL Server Express
I try to initialize the SQL Server service (SQLEXPRESS) and I get this error message: What can it be?
-
11
votes1
answer1230
viewsQ: How to make README.Md multilingual for Github?
In one of my git projects, the archive README.md is in English, so I made another call README-pt.md and a link to navigate between them, for example: [Read this page in English](http....README.md)…
githubasked anisanwesley 2,280 -
0
votes1
answer1298
viewsQ: Get the selected row object with ng-grid Angular-UI
I’m using ng-grid of Angular-UI and need to get the selected object when clicked on the grid line. I have the function: $scope.selectItem = function(item) { $scope.selectedItem = item; } I tried to…
-
2
votes2
answers4407
viewsA: Pass data between Forms
A quick solution would be to create a static class to store the information you want, such as mailing list, passwords and names, these would be accessible from anywhere in the system. First thing:…
-
0
votes1
answer175
viewsQ: Listactivity does not work Android
I have an Activity with a button calling a List Activity. This Listactivity quickly creates a string list, I just want to show this list on the screen and display the selected item in a Toast. But…
-
12
votes1
answer100
viewsQ: How to define Titlecase using regex in Javascript?
I have this Function: var titleCase = function(s) { return s.replace(/(\w)(\w*)/g, function(g0, g1, g2) { return g1.toUpperCase() + g2.toLowerCase(); }); } If I call her by passing something she…
-
9
votes4
answers1531
viewsQ: How to assign a value to an Enum with binary notation?
To work with hexadecimal numbers, just add 0x in front of the number, this way: var numeroHexa = 0xff1120; The same goes for octal numbers, adding the 0: var numeroOct = 037; But how do you declare…
-
2
votes1
answer2082
viewsQ: How to pass parameters by Angularjs providers?
I have the default site routes on a constant: app.constant('defaultRoutes', { home: { url: '/home', templateUrl: 'templates/home.html', controller: 'HomeController' }, [...demais rotas....] }); I’m…
-
2
votes2
answers1019
viewsA: How to make nested directives Angularjs?
Answering my own question. While waiting for answers I was doing tests in Jsbin and managed to solve with some patch: In the shared directive I concateno styleSource in a variable and return it as…
-
1
votes2
answers1019
viewsQ: How to make nested directives Angularjs?
The idea is to make sure that when calling a single directive, it renders the directive corresponding to the preconfigured CSS framework. For this I have a global variable var window.styleSource =…
-
5
votes1
answer125
viewsQ: How to show correct name on an Enum bitwise?
I have this one marked as [Flag], ie, are values in bit [Flags] public enum Position { None, Left, Right, Both=3 } Setei to Both(both) position in 3 why if it is Left and Right at the same time, it…
-
20
votes1
answer200
viewsQ: How to make a test fail if it takes too long?
I’m using Mstest which is the default drive testing platform in visual studio and have this test here: [TestMethod] [ExpectedException(typeof(InvalidOperationException))] public void…
-
52
votes9
answers13997
viewsA: How to create a website without reloading every click on a link?
I use Angularjs to make websites on a single page, it is much easier and simple to use than ajax and other paraphernalia see only this Step by step from single page site Before you start, all the…
-
5
votes2
answers7840
viewsA: How to redirect using Angularjs
Before you start, all the code below is working on: http://jsbin.com/roqil/edit To have control of redirecting pages you need to follow a few steps before. Reference the Angularjs routing libraries…
-
8
votes3
answers581
viewsA: What is the best way to load JS?
You need to use a framework that manages file requests for you and does so only on demand, for example the file with the method validar() will be loaded only if the method is actually called, so…