Posts by OnoSendai • 36,218 points
614 posts
-
4
votes1
answer693
viewsA: Use of $rootscope Angularjs
I believe you’re referring to good practice. If this is the case, I imagine that what you want to do (share data with other scopes) can be better implemented via service (or, alternatively, a…
-
2
votes1
answer588
viewsA: Repeat element with ng-Repeat
It seems to me that the ng-repeat is creating a different scope for each instance of agencia, and each has a different copy of listaAgencias. Initialize the scope variable early in the controller,…
-
10
votes3
answers1766
viewsA: Ajax cross Domain
Instead of specifying the protocol in the property src: <script type="text/javascript" src="http://projetos.lucaspeperaio.com.br/ajax-cross-domain/jquery.xdomainajax.js" ></script> Leave…
-
5
votes1
answer157
viewsQ: 3D Visualization at Angular Google Maps
Preamble I use Angular Google Maps to indicate the location of several buildings in the campus from a university. My initialization is as follows: $scope.map = { control: {}, center: { latitude:…
-
8
votes3
answers1459
viewsA: How to get only the second class with Jquery?
$(":radio[name='Form1a1']").attr('class').split(' ')[1] Explanation: $(":radio[name='Form1a1']") - gets the list of all Radiobuttons that have the attribute name equal to Form1a1; .attr('class') -…
-
1
votes2
answers220
viewsA: Get number of computers that are using the network system
Depends on its implementation. If you are using direct TCP/IP connections, it’s easy: Monitor the collection of connections, and deny new connections if the value reaches the expected maximum. If…
-
6
votes6
answers2762
viewsA: How to walk an Enum?
Strictly using the points of your original question (Lookup in a Enum), your test should be as follows: var valorEnum = (triaguloLetra)Enum.Parse(typeof(triaguloLetra), letra); The method Enum.Parse…
-
9
votes3
answers387
viewsA: How does semantics/indexing work with Angularjs?
According to this post, Google’s Crawler renders pages that contain Javascript and navigates through the listed states. Interesting parts of the post (free translation): [...] We decided to try…
-
3
votes1
answer2933
viewsA: Sending a message to a local network broadcast via UDP
One of the ways to understand how UDP works is by comparing it to TCP. TCP Connection: To use the TCP protocol you need to establish a connection with one (and only one) host remote. Bi-directional…
-
12
votes2
answers1506
viewsA: How is the algorithm of a P2P application?
There are several implementations of protocols peer to peer (among equals in free translation). In general, they are characterized by: Communication of non-linear content: Large contents can be…
-
2
votes1
answer285
viewsA: Angular.js configuration not working
Your code does not mention the basic Angular library. Try adding the following line (before angular-resource): <script…
-
0
votes2
answers5761
viewsA: Angularjs ng-options: Use object property as value instead of array index
Include the AS clause to help Angularjs determine the value/text pair to be used. In your case, replace <select class="form-control" name="uniforme" id="uniforme" ng-model="uniforme"…
-
3
votes1
answer240
viewsA: Geoprocessing framework for Brazil
Google Maps offers resolution functionality via Geocode API; you can combine with Fusion Tables via Fusiontableslayer. use the following endpoint for research:…
-
14
votes3
answers515
viewsA: Company can monitor everything employee does on work computer?
There are priors. If the software is understood as a working tool, it is equal to a telephone, and its monitoring does not constitute violation of articles X and XII of art. 5th of the Federal…
-
5
votes2
answers303
viewsA: Logic ports in SQL
SQL ANSI '92 Operação Modelo XOR (a != b) XNOR (a == b) bitwise XOR (a OR b) AND NOT (a AND b) bitwise XNOR NOT ((a OR b) AND NOT (a AND b)) XOR (or exclusive OR) is the difference operator; XNOR,…
-
0
votes1
answer143
viewsA: Font style of googlefont works on localhost but not in gdrive
You are encountering a mixed content (CORS) error - in your case, load dependencies via HTTP from a page loaded via HTTPS. Change the call links to the source <link…
-
10
votes2
answers3219
viewsA: Connect Arduino to SQL Server
Unfortunately there are no native drivers for SQL Server that you can use directly from Arduino. You can use a web application such as Broker to post values from your sensors. EthernetClient client;…
-
4
votes1
answer351
viewsA: Difference between Cope declaration
Yes, there are differences. The second uses the standard service nickname $scope, homonymous. The first creates an injection of service $scope, and uses the nickname '$Scope' to reference this…
-
2
votes1
answer40
viewsA: Font Awesome has CSS Reset?
CSS Reset is not a concern of Fontawesome. It is not necessary to include any type of Reset for your use. As a consequence, your code does not include any type of global property standard setting,…
-
2
votes3
answers178
viewsA: Effect of filling in a line
You can implement directly using JS and SVG: $('#percent').on('change', function(){ var val = parseInt($(this).val()); var $circle = $('#svg #bar'); if (isNaN(val)) { val = 100; } else{ var r =…
-
5
votes1
answer303
viewsA: Angular, use same Cope between controls
Use a service to contain the values to be shared. When it is necessary that one of the controllers change a value, use a service store the value locally and use $scope.$broadcast to issue a warning…
-
5
votes2
answers1770
viewsA: Object filter disregarding accents in Angularjs with Ionic
Bad news: there is no support in the ECMA standard for diacritical treatment. Good news: Someone implemented a functional filter for 99% of cases. The following snippet maps diacritics to their flat…
-
3
votes2
answers4336
viewsA: How to run program in C# by cmd
Adjusting the variable Path In order for your executable to be found via command line, you need to include the directory where the program is in the global variable Path. To see the current content…
-
1
votes1
answer1419
viewsA: How do I access a dynamic id via a directive?
When the user selects an item from Accordion, save Id on $scope: View <div class="panel-heading" ng-click="selecionaId(local.id)"> Controller $scope.selecionaId = function(parm) {…
-
1
votes1
answer2187
viewsA: Angularjs - Unknown Provider
The error points to the lack of reference to the module $scope. Check that the reference is being correctly injected.
-
1
votes1
answer383
viewsA: Error if user does not release Geolocation
watchPosition accept, as a second parameter, a callback if an error occurs - one of the possible ones being denied permission. navigator.geolocation.watchPosition(function(position) { // Código caso…
-
2
votes1
answer421
viewsA: C# : Show Thumbnail without resizing the image in ASP
What you want is a backend service that is responsible for resizing images, but not storing them. Here are some code snippets that can help you: Create a page where you receive the parameters Url,…
-
0
votes3
answers2843
viewsA: Controller Angularjs Statement
I understand that your question refers to the difference between the version without declaration of dependency injections... var controller1 = function ($scope,$http){} and the version with addition…
-
4
votes2
answers298
viewsA: How to generate incremented variables with Javascript?
Some ways follow below. 1) A global scope variable: window['nomeDaVariavel'] = 1; console.log(window.nomeDaVariavel); // Irá exibir o valor '1' no Console. 2) Compilation via Eval: eval("var…
-
18
votes4
answers19183
viewsA: Is it possible to comment on a JSON file?
The ECMA-404 standard, which specifies the JSON standard, makes no provision for comments. In cases where comments are strictly necessary, post-parsers can be implemented to manipulate the payload…
-
1
votes1
answer236
viewsA: Latency <audio> Html5 on mobile phones
You have two options. Download the resources as blob, and add them to the DOM directly: var xhr = new XMLHttpRequest(); xhr.open('GET', 'audio/1.mp3', true); xhr.responseType = 'blob'; var audio =…
-
2
votes1
answer119
views -
0
votes3
answers217
viewsA: Is it possible to use Controllers hierarchically in the Angular JS?
Yes, it is possible (and desirable in various situations - for example in List/Detail content.) In the following code you can check that the content of $scope is shared hierarchically: var app =…
-
3
votes6
answers12215
views -
1
votes2
answers953
viewsA: Same controller for different views
The correct way to share values between different scopes is by using a service (or, alternatively, a Factory). Example to follow: var app = angular.module('app', []);…
-
7
votes2
answers399
viewsA: Doubt about HTTP POST
Yes, it is possible in C#. Your code would look like the following sample: var destinos = "5555-5555\n5555-5556\n5555-9999"; //<-Números que receberão a msg byte[] buffer=…
-
1
votes1
answer530
viewsA: Problems with Xmlhttprequest Angularjs
Possible causes: If your request returns $http.get have a mention to a javascript file, jQuery (as well as other libraries) will try to load the mentioned file in synchronous mode (since it assumes…
-
2
votes1
answer248
viewsA: Use Angular routes straight from HTML file
Your offline application can make use of Application Cache. Basically, you will need to create a file manifest containing a mention to all the files you want to offer in offline mode. When prompted,…
-
1
votes1
answer86
viewsQ: Webapi 2.0 - Apicontrollers in another Assembly do not suffer mapping if runAllManagedModulesForAllRequests="false"
I have an app Webapi2 that implements some Apicontrollers. This same application references a Assembly that implements some more. All of these controllers utilize Attribute Routing, as in the…
-
1
votes1
answer1414
viewsA: Show/Hide dynamic content-based table rows using Angularjs
You are changing an object that is visible in the scope of all your tables - so they are all having their views changed. In the following example, the parent-control (paiCtrl) has the collection to…
-
3
votes2
answers158
viewsA: Video loop in Html5 making endless re-downloads. Overflowing bandwidth
Several approaches are at your disposal. Choose one (or several) of them. Reduce the bitrate of the video in background. Use a Tiling Mask on video to reduce granulation effect. Run the video for 5…
-
4
votes1
answer130
viewsA: How to resolve the conflict between Angularjs and Django?
Angularjs provides tools for setting markers via $interpolateProvider. For example, if you want to use [[ and ]] as markers, use the following snippet: var myApp = angular.module('myApp', [],…
-
1
votes1
answer186
viewsA: Directive is executed 2 times
Different browsers interpret the event of resize in different ways. Some trigger an event before starting the resize; other, each window event that transforms the viewport; others, only when the…
-
2
votes1
answer299
viewsA: Broadcast runs once but the event is called 2 times
This may be an indication that you actually have two instances of your controller. This may occur if you are mentioning the controller as part of the ui-router (or $stateProvider, if you are using…
-
2
votes2
answers2222
viewsA: Socket UDP Send and Receive C#
UDP is a protocol that requires no connection, unlike TCP. What you need is an endpoint that will receive the package. Your client code may contain something similar to the section below: //Prepara…
-
2
votes2
answers655
viewsA: Module error in Angularjs
According to the description of the error, it seems to me that the module inparty.controllers is not yet loaded/set when angular starts bootstrap. Test the following changes: app js. var…
-
4
votes2
answers370
viewsA: How to select from a night period (18hrs to 6hrs)
You can use the BETWEEN operator in conjunction with NOT for this: select count(*) as contador,log_desc,'Noite' from log where extract(hour from log_data_hora) NOT BETWEEN 6 AND 17 group by…
-
1
votes1
answer583
viewsA: Trolley with dynamic options with Angularjs
The name of this operation is diff, and you want to get the delta (difference) between the two collections. There is a library calling for jsondiffpatch (link) that can be useful for you. The output…
-
9
votes2
answers7111
viewsA: How do I pass a parameter to another Scope with Angularjs?
The recommended way to share values between Controllers is using Services. Example to follow: angular.module('minhaApp', []) .service('PropriedadesCompartilhadas', function () { var ItemSelecionado…
-
1
votes1
answer930
viewsA: How to Filter after pressing a keyboard key, ENTER for example
You can implement a directive: angular.module('meuApp').directive('ngEnter', function () { return function (scope, element, attrs) { element.bind("keydown keypress", function (event) { if…