Posts by OnoSendai • 36,218 points
614 posts
-
9
votes3
answers15395
viewsA: Google MAPS API location from the address
Use the API GeoCode. Example: http://maps.google.com/maps/api/geocode/json?address=Avenida%20Rio%20Branco,%20Rio%20from%20Janeiro&sensor=false Return the coordinates of Rio Branco Avenue in Rio…
-
3
votes2
answers3335
viewsA: Select with angular loading blank value
Utilize ng-options as source of your data. When present in an element SELECT, it allows the default selection of the value identified by the key term track by. In the following example I used the…
-
1
votes3
answers4420
viewsA: Error when signing a SHA256 Hash using Digital Certificate
There are several possible causes; but the most common is when the certificate issued does not support the desired signature algorithm. To check, open the certificate and select Detalhes. The…
-
2
votes2
answers5603
viewsA: Check if it is empty regardless of type, javascript
In Javascript, the fastest way to validate the result of an expression including the most commonly used types of values representing a nonvalue is the double negation. More details on this reply.…
javascriptanswered OnoSendai 36,218 -
1
votes1
answer871
viewsA: Can you make a HEAT MAP in an image?
There are several ways to implement a heatmap. If you want to use something already ready, Heatmap.js is a javascript library that does just that. According to its documentation, the library…
-
71
votes6
answers16518
viewsA: What does NULL really mean?
So said the Master Programmer: Even if the program has only three lines, someday someone will have to maintain. Legend has it that in a remote province there was a monastery where the Master…
-
36
votes6
answers10103
viewsA: What is a Web Service?
This is a case where maybe a picture is worth a thousand words. For example, we will use a site like pt.stackoverflow.com. You can imagine the structure as follows: A typical web application with…
-
2
votes1
answer1455
viewsA: Block routes according to user permission Angularjs
Monitor the notification queue for the event $locationChangeStart, and if necessary cancel the event: $scope.$on('$locationChangeStart', function(event) { if (!validaPermissoesUsuario()) {…
-
4
votes1
answer320
viewsA: Variables with special characters
Try to inform the alias via declaration of ownership Name of DataMember: [DataContract, Serializable] public class XMLCM5050 : XmlApi { [DataMember(Name="$name")] public string name{ get; set; }…
-
3
votes3
answers2501
viewsA: Build problem in C#release mode
Because of the support to runtimes in parallel, version 4.0 of the . NET platform changed the way the framework binds to old mixed mode assemblies (Mixed mode). These assemblies are, for example,…
-
3
votes3
answers1435
viewsA: How to convert an Object into an Array? (c#)
This is an extension that converts the properties of an object to a dictionary of objects having the name of the property as key: public static IDictionary<string, object> ToDictionary(this…
-
8
votes3
answers576
viewsA: Session Limitation to Save Data
As Gypsy and Maniero said, no, there are no limits. But if your problem is performance in an Oracle database, I have a suggestion: Materialized Views. One Materialized View is basically a snapshot…
-
7
votes2
answers66
viewsA: Show or hide a pregnancy option, whenever the user selects in the registration that is female
Utilize ng-if or ng-show to control the display of content. ng-if creates and destroys objects in the DOM. ng-show only controls the object’s visibility, preserving it. Example to follow: function…
-
24
votes3
answers2481
viewsA: How is a sound interpreted by a computer?
How a song is interpreted by the computer? In the same way as a video is interpreted: By changing values over time. To understand how this occurs, let’s establish some basic concepts: Resolution per…
answered OnoSendai 36,218 -
1
votes1
answer299
viewsA: How to display an Enum item on my table using Angularjs?
One possibility is to create a ng-repeat internal, and filter content - only display the description when the value of Id is the same as Type element referenced by main loop. Example to follow:…
-
6
votes4
answers1247
viewsA: Function within another
In Javascript a function creates its own scope, and subfunctions inherit scopes. In C#, scopes are defined by blocks (classes or methods), and are inherited by internal classes only. An expression…
-
3
votes1
answer217
viewsA: AES128/256 C#. net AND SQL 2008/2012 encryption
You can implement the encryption library in . NET and install it directly in your MS SQL Server service. Once Assembly has been properly installed on the server, its classes can be configured and…
-
4
votes3
answers197
viewsA: What is the function of this 'and' that is passed as a parameter?
Let’s disassemble the function call: $(".fotos").each(function(e) { $(".fotos") is a selector jQuery. The target may be a single member, or a collection; .each is a method that allows a function…
-
3
votes1
answer579
viewsA: Rationale: How does a friend localization app work?
By and large: The app collects from time to time via Geolocation API the coordinates of all users, and sends the result to a central server. Implementations may vary, but in general a service is…
-
1
votes1
answer28
viewsA: What is Fauxgap.js for
According to the page on the Intel website, This script fulfills the entire Apache Cordova* (Phonegap) API and is configurable. It can be used with pages that are being tested with Preview or for…
-
11
votes4
answers3187
viewsA: Should one use break in going?
In a strict sense, does not proceed. In several real situations you have objects that can change state during the execution of a loop, and the treatment can induce an assessment that the loop is no…
-
15
votes2
answers8235
viewsA: How to place a clickable area on a piece of an image?
The original image does not need to have defined sizes - but the map areas need absolute values. However, you can recalculate the image size via CSS property Zoom, and the map will meet the…
-
9
votes5
answers1153
viewsA: If the image is large vertically, height: 100%, if it is large horizontally, width: 100%?
Use a combination of background images and behavior settings via CSS. Explanation: background-size:contain will force the background image to be contained within the element;…
-
2
votes2
answers208
viewsA: I need a code that gives the error Accessviolationexception
The code below consistently generates a type exception AccessViolationException: var ptr = new IntPtr(42); Marshal.StructureToPtr(42, ptr, true); That said, @Maniero’s response is correct. There is…
-
11
votes1
answer500
viewsA: Pick up news from a specific website
The name of this type of practice is scraping page, a variation of screen scraping. According to the Wikipedia page, [..] a technique in which a computer program extracts data from video output from…
-
1
votes1
answer406
viewsA: Error starting Powershell on Windows Server 2008 R2. How to resolve?
You need to install the Microsoft® SQL Server® 2008 R2 Shared Management Objects before using Microsoft.SqlServer.BatchParser. This is the item you must download and install according to the version…
-
2
votes4
answers630
viewsA: How do I use the F2 key to open another form?
The ideal way to process keyboard events in a form where the control that receives the event is irrelevant (i.e., the focus may be on any control present in the form) is via override of the method…
-
7
votes2
answers239
viewsA: How to place a property name on a Javascript object?
This is an object: {qq: "qq_val"} Has an attribute, qq, whose value is the string qq_val. The notation is correct. This is a collection with a single member: [{qq:"qq_val"}] A collection is…
-
3
votes4
answers11622
viewsA: Is it possible for a Javascript function to call a method that is in the Behind code of the page?
If your implementation is restricted to an ASP.NET codebehind page, you can implement a call to a Webmethod as follows: Mark the method as a Webmethod. It must necessarily be a static method. public…
-
85
votes3
answers68185
viewsA: What is the difference between endpoint and API?
A endpoint of a web service is the URL where your service can be accessed by a client application. One API is a set of routines, protocols and tools to build applications. APIs can exist without…
-
1
votes4
answers1114
viewsA: Create string array in C#
Alternative solution: Enumeration class Teste { public enum Array = {a, b}; } Thus, the passage [CustomAttribute(Teste.Array)] public void Metodo(){ ... } will allow compilation. If necessary,…
-
5
votes2
answers1462
viewsA: Is it possible to register . go domains?
The list of Top-Level Domains (Tlds, or top-level domains) is managed by an entity called ICANN (Internet Corporation for Assigned Names and Numbers) and maintained by IANA (Internet Assigned…
-
2
votes2
answers122
viewsA: Use token to access a platform
It may be necessary to authorize the service $http to use cookies (which is probably where the authentication preserves the bearer token). Add the following snippet to the startup: .config(function…
-
5
votes1
answer2210
viewsA: Order by with Union
You are using the dial *, which means all fields. Change your SQL from: SELECT * FROM ( for SELECT Resultado FROM ( So only this field will be returned.…
-
1
votes1
answer284
viewsA: Problem with Datepicker Angularjs
Try modifying the line in the directive that attempts to resolve the element, $(element).datepicker([...] For element.datepicker([...] There is no need to attempt to resolve the element; Angularjs…
-
0
votes1
answer300
viewsA: Automatically open my program c#
In Visual Studio: Project Properties > Publish > Options > File Associations You will see the following interface: Enter the desired extension and associated program. Using the Clickonce…
-
0
votes1
answer198
viewsA: Modal W3.CSS conflicts with Angularjs
Use the service $AnchorScroll. Example of implementation: app.run(function($rootScope, $location, $anchorScroll) { $rootScope.$on('$routeChangeSuccess', function(newRoute, oldRoute) {…
-
1
votes2
answers204
viewsA: Move task - Angularjs
I’ve altered three segments of your code. Segment 1 <div ng-repeat="tarefa in tarefas | filter: {selecionado: false}"> I added a filter to your ng-repeat original to only display tasks where…
-
6
votes1
answer566
viewsA: Consuming Webservice with large data volume
Simple version: Segment your result using paging. There are several ways to implement this mechanism, an example follows below. Instead of sending 60k records, implement a process that: Store your…
-
6
votes2
answers554
viewsA: How can I leave half a side of a curved element inside as in the figure with css?
2 solutions: Creating 3 different elements, or 2 if you don’t mind absolute positioning. Solution 1: Element 1 has border-radius on all left banks, and border-right-width: 0; Element 2 has border:…
-
0
votes3
answers1823
viewsA: How to implement spinner loanding in Angularjs?
There are some ways. If you want to show the spinner whenever Angular requests, implement an Interceptor Factory, as in the answer accept this question in the English OS:…
-
7
votes2
answers516
viewsA: All keys work as enter
I understood your question this way: How to automate form submission after automatic completion of a field? Monitor the events Keydown and Keyup, and after a few seconds of inactivity validate the…
javascriptanswered OnoSendai 36,218 -
2
votes3
answers1134
viewsA: How to access the $Cope variable?
The reference to the scope needed to be corrected. The example below shows your content working: var app = angular.module('vagalume', []); app.controller('BandsController', function ($scope) {…
-
4
votes3
answers3527
viewsA: How to find the Javascript version (via code)?
Via conditional compilation: <script type="text/javascript"> var jsver = 1.0; </script> <script language="Javascript1.1"> jsver = 1.1; </script> <script…
javascriptanswered OnoSendai 36,218 -
2
votes3
answers239
viewsA: jquery function does not work with routeprovider Angularjs
You are running the function maskMoney the moment the page finishes the load (via $()). The jQuery then maps the DOM Object that has the #valor1 ID, and applies the function. In a second moment,…
-
1
votes1
answer684
viewsA: Bootstrap button with Angularjs
You came close. The syntax for ng-class needs to be adjusted as in the example below: angular .module('ui.bootstrap.demo', []) .controller('ButtonsCtrl', function ($scope) { $scope.BA = 'btn…
-
27
votes1
answer23926
viewsA: Is there an API that lists states and cities?
You can use the public service geonames.org. This example tab shows calls to the service: http://vikku.info/programming/geodata/geonames-get-country-state-city-hierarchy.htm The specific function…
-
4
votes3
answers381
viewsA: Chrome [v44] - Bug in tables inside a div with overflow
It is a known and reported bug: https://code.google.com/p/chromium/issues/detail?id=512872 The merge for the main project trunk has already been requested.…
-
5
votes2
answers8501
viewsA: Synchronous requests
Via Angular you can make use of chained Promises: $http.get('http://server.com/endpoint1') .then(function(response) { //seus dados obtidos em http://server.com/endpoint1 // estarão em response.data.…
-
0
votes4
answers579
viewsA: Get the date and time the computer called
If your computer never spends more than 49.7 days on: Get the number of milliseconds passed from boot to current; Subtract this number from the current date. This code can be expressed on a line:…