Posts by OnoSendai • 36,218 points
614 posts
-
6
votes3
answers335
viewsA: Dynamic path C#
If called in the context of an HTTP call, use the following function to get the root directory of your application: HttpContext.Current.Server.MapPath("~"); If you don’t have the HTTP context, you…
-
1
votes2
answers8065
viewsA: How to make the background image transparent - image?
Implement a pseudo-element where your background will be applied. In the example below: body > :first-child:before Means: Apply the following rules immediately before the first element within the…
-
2
votes2
answers401
viewsA: Simultaneous calls in Restful service
[...] to do this I need to use await and async or if the httpClient class already has something by default [...] The class Httpclient does not have native support for managing multiple requests. A…
-
2
votes2
answers260
viewsA: How to view front-end projects?
Semantic versioning brings the following approaches: [...] but a frontend artifact does not have Apis, making them not break compatibility with those who use them. Exact. Semantic versioning is used…
-
1
votes1
answer314
viewsA: ng-maxlength="1" does not work - Angular
A the property maxlength determines a maximum value of length, useful for type content string. A numerical value has, instead, a maximum value. Try it this way: <input id="turbidez" type="number"…
-
2
votes3
answers390
viewsA: Get specific application memory usage
For private memory consumption use the method GetCurrentProcess() to reference the current process; the property value PrivateMemorySize64 will indicate the size in bytes. A oneliner would be so:…
-
1
votes1
answer147
viewsA: Loading date in millisecond format in Angularjs
You need to implement, in this case, a directive that preserves the original format, while converting the value to a datatype that can be used with input type='datetime-local'. Functional example to…
-
16
votes3
answers314
viewsA: What is "Idempotency Messages", "idempotentive", "idempotency"?
An idempotent operation can be understood as something that establishes a value or state rather than modifying it. A simple example could be the bank balance. Imagine the statement below: Data Valor…
-
0
votes1
answer236
viewsA: Validation does not work with ng-model
With the line return false; The evaluation is returning at the very end of the first cycle of for (tarefa in $scope.tarefasSelecionadas). You need to iterate through all the items before you finish.…
-
3
votes1
answer1218
viewsA: Prevent typing letters into the angular input
Use a directive that removes all non-numeric characters. angular.module('myApp', []) .directive('numerosApenas', function() { return { require: 'ngModel', link: function (scope, element, attr,…
-
1
votes1
answer25
viewsA: Change class when changing view
Add the directive ui-sref-active, as in the following example: <li role="presentation" ui-sref-active="active"> <a value="overview"…
-
5
votes2
answers52
viewsA: Error in Angularjs when save date, why?
In the view you are defining agenda.dia as a date: <input class="form-control" type="date" name="dia" ng-model="agenda.dia" required> But with the line agenda.dia = ano+'-'+mes+'-'+dia; you…
-
0
votes3
answers62
viewsA: Click for more than one item
Separate visibility control from each button individually. var app = angular.module('myApp', []); app.controller('myCtrl', function($scope) { $scope.abreConteudo = {b0: false, b1:false, b2:false };…
-
1
votes2
answers872
viewsA: Update only in one column character - Oracle
The expression below will update all COLUMN values where the value starts with R.: UPDATE TABELA SET COLUNA = REPLACE(COLUNA,'R. ','RUA. ') WHERE COLUNA LIKE 'R. %';…
-
8
votes1
answer751
viewsA: What does document-oriented mean?
What it means document-oriented? In the context of Mongodb means that data is stored in complex object format, as in the example below: { title: "MongoDB: The Definitive Guide", author: [ "Kristina…
-
3
votes2
answers123
viewsA: Filter example in Angular 1
Implement a general search filter. The example below serializes the object and caches the result into a hidden property of the object. The search is then performed on the serialized content. Click…
-
1
votes1
answer161
viewsA: Angularjs need to create a list-Divider in the middle of a list
One of the possibilities is to create an object that separates words into groups. angular.module('myApp', []) .controller('myController', function($scope){ var palavras =…
-
1
votes1
answer46
viewsA: How do I get a PHP Angularjs URL
In the URL http://link.com.br/ead/moodle2017/#/aulas/39 The party defining the resource is http://link.com.br/ead/moodle2017/ while the party defining the state is #/aulas/39 The problem you are…
-
2
votes1
answer97
viewsA: Open site by Google gives error 500
The difference between a direct request and one via Google is that in the second case the header Referer is added: Without further information, I would investigate the processing of this entry in…
-
5
votes1
answer681
viewsA: How to check if a file is an image?
Try to open the stream of the file in an object Bitmap. If it works the image is content crawl valid (png, jpg, jpeg, gif and others). try { var bitmap =…
-
3
votes2
answers1865
viewsA: How do I display a map with a proximation circumference?
You need to add an object of the type google.maps.Circle. The example below demonstrates this feature: function initialize() { var map = new google.maps.Map(document.getElementById("map_canvas"), {…
-
5
votes1
answer1318
viewsA: What is $Parent in Angularjs?
$parent is a way to access data from previous scopes in the hierarchy from isolated scopes. Example: angular.module('myApp', []) .controller('myController', function($scope){ $scope.dados =…
-
2
votes2
answers312
viewsA: Would it be possible to make a project in html, css, js, and run on a native like android?
Progressive Web Apps. Characteristics: Reliability: When released from the user’s home screen, service Workers allow a Progressive Web application (or PWA) to load instantly, regardless of network…
-
8
votes2
answers225
viewsA: Quit my internship and removed me as a collaborator, I lost all my commits in my history
According to the github documentation: Private contributions are not Shown by default and, when enabled, are completely anonymized to the general public. [...] Details of the issues, pull requests,…
-
8
votes2
answers1833
viewsA: Create objects without reference C#
Quick explanation of your code: Pais pais3 = new Pais(); // Cria uma nova instância de pais(), // e a referencia como pais3. pais3 = pais2; // pais3 recebe uma nova referência, e agora // aponta…
-
3
votes1
answer803
viewsA: How can a WEB application that uses Oauth for authentication manage the user session?
There are several ways. First, let’s go to the questions: In theory, it would not be Google itself (serve-oauth) that should manage the session instead of the WEB application that used Oauth to…
-
1
votes1
answer289
viewsA: How to enumerate the position of a bit within a byte?
The way To would be right. Ignore the name bit - A binary value is represented in the same way as a decimal value: In an integer the highest value positions are located on the left, since new…
-
5
votes3
answers1044
viewsA: How to edit and load class only for a single element
What should I do to make it happen only in the clicked item? You must uniquely identify the item under editing. ng-click is inside the loop ng-repeat="item in items track by $index" Then you can use…
-
3
votes1
answer1128
viewsA: Running a package.json file
The presence of a file package.json indicates that the project is a package NPM. This file contains various data relevant to the project, such as its identification and dependencies, licenses and…
-
2
votes1
answer1048
viewsA: how to load a select with data coming from an Angularjs API
In an initial analysis it seems to me that your code has no problem. What may be happening is that your application is not being initialized correctly. Below is your code in functional state, with…
-
1
votes1
answer73
viewsA: TCP Server + Web Server in the same application
It is possible to create a TCP Server that will handle the connection with the Client along with a Web Server using express that will have functions like start, stop and Restart tcp server? Yes, it…
-
22
votes2
answers4241
viewsA: What is a rubber duck and what is it for?
Duckling, my duckling, is there code more crooked than mine? Source: Talk to the Duck - debugging and Resilience Despite the strange name, programming the rubber duck is a software engineering…
terminologyanswered OnoSendai 36,218 -
1
votes2
answers719
viewsA: How to pass data from a selected ng-repeat item to another view
Whenever you want to share information between parts of your Angular application, use Services or Factories. The example below demonstrates the use of a service to share player data, as well as a…
-
11
votes4
answers8192
viewsA: How to exclude an item from an array by the attribute value?
Utilize filter. function removeItem(arr, refId) { return arr.filter(function(i) { return i.id !== refId; }); };…
javascriptanswered OnoSendai 36,218 -
3
votes2
answers1182
viewsA: call an . exe in Java or html
You can implement a Handler URI. Create a . REG file to be executed, with the appropriate permissions, on Windows machines, with content similar to this: REGEDIT4 [HKEY_CLASSES_ROOT\SuaAplicacao]…
-
2
votes1
answer103
viewsA: Difference between Webapi and SPA
It’s actually two very different scopes. SPA, or single-page application, is a definition of user interface behavior where no content reloads occur, only partial exchanges - in a very similar way to…
-
0
votes1
answer43
viewsA: Layer KML using Openlayers3
Let’s assume your polygons are composed of coordinate lists lat x lng, for example: var a =[ { "lng": 106.972534, "lat": -6.147714 }, { "lng": 106.972519, "lat": -6.133398 }, { "lng": 106.972496,…
-
2
votes3
answers2830
viewsA: Loop of repetition in Assembly
Something like that? Instruction reference of the MIPS. .globl main main: li $v0, 0 # registrador li $t0, 1 # valor inicial do índice do laço loop: bgt $t0, 5, exit # se $t0 > 5, interrompa laço…
-
2
votes3
answers92
viewsA: VB.NET to C#
You can use the operator switch(): { HttpWebRequest WebReq = HttpWebRequest.Create(GET_Data); using (HttpWebResponse WebRes = WebReq.GetResponse) { using (StreamReader Reader = new…
-
0
votes1
answer26
views -
5
votes1
answer77
viewsA: Doubt about services Angularjs
If I understand correctly, you want to isolate scopes of instances of ServiceY: controller_A and controller_B share an instance (let’s call it ISY1 for reference purposes); controller_C and…
-
4
votes1
answer75
viewsA: What is the difference between $Animate and ngAnimate?
These two providers are different ways to handle the same module, module.animation(). ngAnimate is a directive that is injected into directives (such as ngRepeat, ngView, ngIf and others ) that can…
-
10
votes3
answers2079
viewsA: How do I activate the Caps Lock key warning?
Utilize getModifierState('CapsLock') in an event to detect the state. Functional example below: document.addEventListener('keydown', function( event ) { var flag = event.getModifierState &&…
-
1
votes1
answer168
viewsA: Angularjs is clearing the Url parameters
Standard route handling does not preserve querystrings, and your route is not waiting parameters. For all purposes, the route #!/login?parametro1=10¶metro2=20 It is non-existent, so the…
-
1
votes2
answers544
viewsA: Send an array of objects in an ng-click?
You can use ng-model to directly map the status assessment of a checkbox. Functional example below, click on Execute: var myApp = angular.module("myApp", []) .controller("testController", function…
-
1
votes2
answers575
viewsA: Angular does not recognize a variable out of control
In your code, you are interrupting the execution of the function before to print the contents: angular.module("NaBalada").controller("NaBaladaLocal", function(data){ return $scope.teste = 'Testando…
-
5
votes2
answers665
viewsA: What is the maximum size of an object in 32 and 64 bits?
If by object you mean a array, System.Array uses a Int32 as index - then its limit is defined by System.Int32.MaxValue ( 2.147.483.647, or 0x7FFFFFFF hexadecimally.) The.Net 4.5 pre-limit was 1.2…
-
3
votes3
answers16842
viewsA: What is Batch and Online Processing?
[batch processing:] what that means ? It is a term referring to a data processing that occurs through a batch of queued tasks, so that the operating system only processes the next task after the…
-
1
votes1
answer923
viewsA: Switch with Angularjs
Two amendments: Refactoring its structure of switch for an object containing a key/value map; and Implementation of a mapping function between the members of an array and the object satisfying the…
-
1
votes1
answer332
viewsA: Angular.js Directive with dynamic templateURL
This is happening because the value is being passed literally, without evaluation in the scope context. In theory you can use $scope.eval(attrs.type) to evaluate the expression: however this is not…