Posts by OnoSendai • 36,218 points
614 posts
-
1
votes1
answer48
viewsA: Angularjs: Request $http to consume the domain’s external API giving error
Your problem does not seem to originate in the client where the Angularjs snippet is running. Assuming your API is written in . NET Core 3.1, the solution would be to add policies which allow local…
-
2
votes1
answer111
viewsA: What is the difference between $Dirty vs $invalid in Angularjs? For form validations?
$dirty indicates that the model has been modified since the scope initialization. $invalid indicates that at least one of the contents of the interface elements is not going through validation. In…
-
1
votes1
answer242
viewsA: Change SDK version 3.1 to 2.1
There is a a post on the original Stackoverflow which details all possible causes of this behavior. In literal translation: These days, I had to overcome this problem in several machines/containers…
-
5
votes3
answers137
viewsA: SQL Query - ORA-01795
Create a temporary table to contain the desired Ids; Modify your query to reference the temporary table. Example: CREATE PRIVATE TEMPORARY TABLE ora$ptt_t_IDS ( ID NUMBER ); Amended WHERE…
-
1
votes2
answers42
viewsA: insert value into a Json data request
id1 is the name of a property of the object expressed in dados.json. So you can access your value via Bracket Notation, or notation in square brackets: function myFunction (x) { fetch ('dados.json')…
-
11
votes6
answers623
viewsA: What is the reason for the application of the concept LIFO (Last In, First Out)?
I do not believe that the application of the concept of structure LIFO (or the semantic variant FILO - First In, Last Out) be a matter of head start, but rather of appropriateness the requirement of…
computer-scienceanswered OnoSendai 36,218 -
1
votes1
answer141
viewsA: Controlling the Plot range of matplotlib , use problem of 100% of ram memory
Perhaps the problem is with the accuracy of the variable. Change line 12 of while (i!=0.000007): for while (i<=0.000007): # menor ou igual a 0.000007 The comment below from @Eltonnunes is…
-
1
votes2
answers51
viewsA: Update Oracle Error
I do not believe that Oracle supports multiple operations of update in a statement unique. The solution would be to encapsulate the two operations in one transaction: START TRANSACTION; UPDATE…
-
2
votes1
answer64
viewsA: How can I further reduce how to write routes?
There is no problem in implementing in this way. What happens is that this Object follows a pattern called Fluent Builder Pattern, or Fluent Constructor Standard, where each method returns the…
javascriptanswered OnoSendai 36,218 -
10
votes3
answers2559
viewsA: What is the difference between software, program, app, and system?
First, a few definitions: Software A set of instructions or data that operate the hardware. Program A set of instructions that define tasks to be performed by the computer. Application / Application…
-
3
votes2
answers557
viewsA: Divide in equal parts c#
You can create a generic distribution method: public static class Extensoes { public static Dictionary<TU, List<T>> Distribuir<T, TU> (this IEnumerable<TU> membros,…
-
2
votes1
answer393
viewsA: How to create composite key in Mongodb
As mentioned by @fajuchen, nothing prevents you from populating _id with a compound object: { _id: { a: 'b99c514b-cb23-4b42-8710-a69db774c904', b: '1caf0d2f-3f03-4287-a8ed-65c77f1d0ef4' } } This is…
-
7
votes3
answers184
viewsA: Differences in the method call
This is because the public method Replace(), which is defined in the class string, returns an object instance that happens to be of the same type as a - in this case, string. Chain calls result from…
-
3
votes1
answer51
viewsA: Where and when to decide which concrete class (which implements a given interface) should be instantiated?
You can implement a two-part solution: Dynamic assemblies via Reflection, and resolution of instance. Charge of Assemblies via Reflection Once compiled the client generated classes can be…
-
1
votes1
answer36
viewsA: Add multiple transcludes to a Directive Angularjs
Adjust your template so it has multiple transclusion positions (Multi-slot transclusion): <nav class="navbar"> <div class="row"> <div class="col-md-2 logo"> EMPRESA </div>…
-
1
votes2
answers131
viewsA: Difference between the event (Submit) and (ngSubmit)
The final part of the standard behavior of the event Submit() of a form is the sending of the contents of the form to the destination specified in the attribute action, following a page reload. This…
-
3
votes1
answer1146
viewsA: What is video frame interpolation (video frame Interpolation)?
In the context of the question, video frame Interpolation refers to the practice of generating intermediate frames between two frames reference. Consider the animation below: It is composed of 3…
-
5
votes2
answers222
viewsA: Bold "<b>" does not apply in a range
According to the living standard of the element Table only the following elements may be used with 'children': caption colgroup thead tbody tr tfoot script/template This is because the element aims…
-
3
votes1
answer427
viewsA: How to Identify Screenshot
Short answer: There is no reliable way to detect screenshot. Long answer: There are several ways the operating environment captures what is being displayed; this is true for both Windows and Linux…
-
3
votes1
answer66
viewsA: Microsoft Edge passing strange characters in AJAX call
This is a known behavior. Edge includes, in its data processing chain, a parser which identifies the date format according to the standard ECMA-402 and includes special characters such as LTR and…
-
1
votes2
answers1034
viewsA: How do you pass two parameters in Ng-click Angular JS?
...it is possible to pass ng-click="deleteCategory(cat.id, cat.name)"? Yes, and possible. However, your event model might be even more resistant if you go through object reference:…
-
3
votes1
answer1123
viewsA: Redirect URL on IIS 7.5
1) Confirm that the redirect module is installed: In the English version the module is called Http Redirection. 2) Open OSI, locate the module HTTP Redirect under the website and directory where you…
-
1
votes1
answer53
viewsA: Like I do to Quebar the line in the D3 node.append
Instead of .append("text") ... .text(function (d) { return d.nome + "\n"+ d.tipo; }) try .append("div") ... .html(function (d) { return d.nome + "<br/>"+ d.tipo; }) .text() uses the parser…
-
4
votes2
answers99
viewsA: Save the same file at the same time in different threads
The resource you want to access/manipulate (the file) is unique. So it is interesting that you can center operations on an object Singleton whatever thread safe. A model like this forces the…
-
1
votes1
answer55
viewsA: What is $$hasKey in the array items?
What is this? The estate $$HashKey is created internally by Angularjs (more explicitly by the internal function $id()) when the library needs to identify only members of a collection - as is the…
-
3
votes1
answer497
viewsA: Where and how to save the API authentication token?
Depende to TTL (time-to-live, or lifespan) token. If the token is short-lived: Keep it in memory (or cache) only. If the token is long-lasting: Store it in bank, associated with the user (or…
-
1
votes1
answer28
viewsA: value passed via Service is not being updated in the second controller
This is because you are referencing a literal value. A literal is its own instance: When you update the value of url_grafico you are associating a new literal value. Your second controller will not…
-
0
votes2
answers295
viewsA: Update page with route without "#" Angularjs
You need to determine the mapping, on your server, to the base page. When the user accesses the following URL: https://www.meuservidor.com/app/#cadastros/123 In fact, the content accessed is:…
-
2
votes1
answer440
viewsA: Relationship between Mongodb collections
This is good practice or should I use SQL for this? Yes, this practice (referential ID storage on object) is common in implementations using Mongodb. If it’s good practice, how can I create this…
-
1
votes1
answer79
viewsA: Basic HTTP authentication
You can use the same technique available for cross-Omain calls, certificate setting or Certificate pinning. To documentation for Android developers explains how the concept works. Copying from the…
-
1
votes1
answer430
viewsA: ng-model of an object
I imagine your problem is at another point during the boot process of your application. The functional example below declares the function using the extension .controller(). Click on Execute to see…
-
1
votes1
answer652
viewsA: How to use a Webhook in Angular?
A Webhook functions as a callback - in this case a URL that is called by the remote server. I would like to know how to listen to a Webhook communication and see which event was sent by the Moip…
-
1
votes1
answer87
viewsA: Edit array within another array
I create a Fork of your codepen with a possible solution. Basically - keep a reference to the original object: $scope.edit = function(user, i) { $scope.source = user; // Preservando a referência…
-
1
votes1
answer1242
viewsA: Form validation - Angularjs
The example below works with the element form to manage content validations. Note that it receives a name, userForm. This is important because the Angular tando adds a mention to the form to the…
-
1
votes1
answer881
viewsA: Turn a string into json
JSON, which in free translation Javascript Object Notation means javascript object notation, is itself a serialized representation of an object. To describe it as a string you only need to format…
-
1
votes1
answer64
viewsA: Create nuget package from a REST web API application
Yes, nothing prevents you from implementing a Nuget package that when invoked prepares endpoints Webapi. This scenario can be useful when you are developing a web application compatible with…
-
4
votes2
answers872
viewsA: How to prevent http auto-redirect to https?
This will depend on the browser in use. Apparently Chrome is the only one that allows you to use a localhost without SSL via the following flag: chrome://flags/#allow-insecure-localhost…
-
5
votes2
answers636
viewsA: Request of type Options
Angular respects the behavior specification in the case of HTTP requests for cross source resources (English CORS, or Cross-Origin Resource Sharing). One of these specifications determines the need…
-
3
votes1
answer115
viewsA: How to send a video via POST?
Use the module request to carry out the operation, and createReadStream to read the local file in binary mode: const request = require("request"); request({ method: "POST", url:…
-
2
votes1
answer123
viewsA: Problem registering objects nested in Mongodb with Mongoose
In your model, you have the following specification: nome: { type: String } But you are sending an array of objects: nome: [ {name: "Super Homem", ticked: true}, {name: "Batmam", ticked: true} ]…
-
6
votes2
answers1573
viewsA: What is the advantage of a 1:1 relationship?
What is the advantage of using several tables with 1:1 relationship, instead of using everything in the same table? I would say the most significant advantage would be: Segmentation by domain Assume…
-
1
votes1
answer53
viewsA: Is it possible to prevent the user screen from erasing on a page?
There is no standard yet. Several browsers and Oses implement in a certain way. That said, there are standardization initiatives. iOS: UIApplication.idleTimerDisabled Android: Wake Locks: supports…
-
2
votes1
answer56
viewsA: Angularjs ignores content-type for GET requests
This is the right and expected behavior. Methods HTTP GET and DELETE do not have payload; both clients and servers are not required to implement interpreters for a header content-Type in these…
-
1
votes4
answers1576
views -
3
votes2
answers483
viewsA: Problem saving information to localstorage via js
Change the line: if(access == '') { for: if(access == null) { This is the value default return method localStorage.getItem() to an unpopulated key.…
-
1
votes2
answers703
viewsA: Calling Jquery function in an Angular controller
You have a variable scope visibility problem (do not confuse with $scope). On your first call, $(document).ready(function () { function alerta(msg){/.../}}); You are creating a function, alerta()…
-
1
votes2
answers356
viewsA: Take any variable from an array that has a certain id in Angularjs
Using Javascript only (ES5): $scope.listademercadoria.filter(function(i){ return i.id == 2; }); Source.…
-
0
votes1
answer310
viewsA: Progress bar Angular js
Implement a Interceptor. Of original documentation: The interceptors sane service Factories registered with the provider $http, via addition to the array $httpProvider.interceptors. To Factory is…
-
2
votes2
answers105
viewsA: How do I use dynamic information coming by ng-repeat {{}} and use it as the argument of an ng-click (button) function?
Ccastro’s answer is correct - however I think it is worth an explanation of which cases need the markers, and which not: Double keys ({{}}) are used to mark an Angular expression. You use them when…
-
0
votes1
answer343
viewsA: Add map with search service using Angularjs and google maps
Use the Geocode API. http://maps.google.com/maps/api/geocode/json?address=rua são joão,403, São Paulo, Sp Returns an object that contains even the property geometry.location : { "lat" : -23.4346994,…