Posts by Vinícius Gobbo A. de Oliveira • 5,575 points
114 posts
-
4
votes1
answer401
viewsA: How does an e-CPF work?
e-CPF is about the same as NF-e. -With you it brings a set of public and private key or should I generate them from the Certificate? It brings with itself. In the A3 certificate, the keys are inside…
-
0
votes3
answers792
viewsA: Add DIV’s with different ID’s using Jquery
You must set a counter and generate the id dynamically: var contador = 0; // <<<=========== CONTADOR DECLARADO AQUI var main = function(){ $('button').click(function(){ var tarefa =…
-
1
votes2
answers530
viewsA: Angularjs ng-repeat does not return data, always returns empty
The problem is not in Angular, but in the way you handle the results returned by the API call. The line return data; is returning data within the function performed by promise, and not by factory.…
angularjsanswered Vinícius Gobbo A. de Oliveira 5,575 -
1
votes2
answers1891
viewsA: Upload with $http post
As you may have noticed, Angular by default makes POST with the Content-Type: application/json. To change the behavior, it is necessary to build a FormData and instruct Angular not to change the…
-
1
votes2
answers56
viewsA: Linux using on Travis
No. As the documentation itself says, only Ubuntu and OS X are available, and OS X is only used for Objective-C builds. Of the item CI Environment OS: Travis CI virtual machines are based on Ubuntu…
travis-cianswered Vinícius Gobbo A. de Oliveira 5,575 -
2
votes3
answers626
viewsA: How does php guarantee a single session_id?
The default PHP behavior is to use the hash md5 or sha1 of some values obtained at the time of ID generation: Client IP; Current time; Any random number (can be provided by an OS PRNG, such as…
-
4
votes1
answer2277
viewsA: Creating dynamic ng-model with angular
Instead of using form.{{campo.name}}, utilize form[campo.name]. Besides, I don’t see any problems.
-
3
votes1
answer3305
viewsA: Creating bat at runtime and process in Delphi
A file bat is not an executable. Like sh, it is just a text file, which needs to be interpreted and then yes its commands are executed by the interpreter. However, Linux, Windows does not know how…
-
5
votes1
answer2135
viewsA: What is a "cacert.pem"?
Filing cabinet *.pem It’s a container file. Generally, it contains the public certificate, but can also contain the entire chain of intermediate certification bodies and even public and private…
-
0
votes1
answer42
viewsA: Parse error: syntax error, Unexpected
You have a ' the most in the middle and at the end. Which of the options you want? $page_atual = !preg_replace('/[^0-9]+\',',$_GET['var1']); Or (makes more sense): $page_atual =…
phpanswered Vinícius Gobbo A. de Oliveira 5,575 -
2
votes2
answers2071
viewsA: Javascript with Object Vectors
Yes, each vector position can be an object: var marcaModelo = []; for ( var i = 0, ii = carros.length; i < ii; i++ ) { marcaModelo.push({ marca: carros.getMarca(), modelo: carros.getModelo() });…
javascriptanswered Vinícius Gobbo A. de Oliveira 5,575 -
4
votes3
answers42472
viewsA: Error Segmentation fault (core dumped)
There are several problems in your code. Seg fault occurs because you are allocating insufficient memory for your variable and access unallocated memory regions. The logic of its function aloca…
-
-1
votes2
answers1700
viewsA: Query to return only higher values
It’s not clear what you want, so I’ll cover the two ways I understand your question. To get the longest year according to the specific contract code, use: SELECT * FROM Tabela WHERE Contrato = 12…
-
2
votes1
answer64
viewsA: Error prompts Ajax(Get) Angularjs
This is because the call $http.get is asynchronous. That is, when it is called, it does not block processing until an API response is received. Therefore, even without the received response, the…
-
1
votes1
answer82
viewsA: Doubt about development in firefox/firebug
In Chrome I can edit javascript and do a runtime rebuild, in Firefox I could not. Is there any way to do? No. It is only possible for you to execute commands in the console or add small scripts in…
-
2
votes1
answer357
viewsA: Read PHP data in Javascript
A web application has 3 elements: client, server and persistence. On the client side, Javascript is used in virtually all cases. On the server, PHP is used, for example. And in persistence any DBMS,…
-
6
votes1
answer10937
viewsA: Difference between Ansistring, Widestring, Unicodestring, Shortstring and String and how to convert
AnsiString: string composed of ASCII characters. Each Char has exactly 1 bytes. A pointer to a AnsiString (^AnsiString) amounts to char* in C; WideString: exists only for compatibility with Windows.…
-
5
votes1
answer1066
viewsA: Explanation about redirect loop
Redirect loop is when the following situation occurs: Let A, B and C be any pages. when accessing A, it redirects to B. when accessing B, it redirects to C. when accessing C, it redirects to A. Note…
-
0
votes2
answers953
viewsA: Same controller for different views
It is not possible directly. But you can use a service and prepare the $scope to make it accessible and transparent. The general idea is as follows:: Each view of yours must be associated with a…
angularjsanswered Vinícius Gobbo A. de Oliveira 5,575 -
11
votes1
answer164
viewsA: How Google Analytics Works
This answer is very long, but here goes my 2 cents of what I learned until today by watching Google: 1. How Google knows which search keywords led the user to the site? Note that when you do a…
-
0
votes2
answers13898
viewsA: How to use jQuery Fadein and Fadeout effect in user warnings
Utilize setInterval to wait for a time after displaying the messages. Also use the parameter callback of commands fadeIn and fadeOut, to start the timer only when the effect has completed:…
-
1
votes1
answer4689
viewsA: How do I create a custom format in a string with Angularjs?
What you’re looking for in Angularjs is called filter. A filter takes an input value and optional configuration parameters, and returns a value that will be effectively displayed in the interface. A…
-
6
votes2
answers362
viewsA: How do I convert LINQ to SQL for Mysql?
Stored Procedure has no significant performance gain for CRUD operations, unless you are doing complex data aggregations and manipulations that would involve a lot of "coming and going" between your…
-
1
votes2
answers1392
viewsA: "Transform" one element into another with Jquery
What happens is that the replaceWith destroys the element, and so the event is lost. It is then necessary to re-associate the events with the element. As you are working with a iframe, I don’t know…
-
1
votes1
answer965
viewsA: how to validate form with ajax return
One of the problems is that you are not manipulating the value returned by validarVeiculos(). Do the following: if ( !validarVeiculos() ) { return false; } document.form.submit(); Note also that you…
-
8
votes1
answer1038
viewsA: Is there a data structure like an associative array in Java?
You can use the class HashMap to do this. Example: Map<String, Integer> vehicles = new HashMap<>(); vehicles.put("BMW", 5); vehicles.put("Mercedes", 3); vehicles.put("Audi", 4);…
-
28
votes3
answers10342
viewsA: What are Unions? Why use them within structs?
The great advantage this in the organization of memory, and in its reuse. The variables in a struct are organized in sequential addresses, so that each variable that makes up the struct stand side…
-
1
votes1
answer86
viewsA: error when converting an Oracle precedent into a Postgresql function in pl/pgsql
The problem is on the line: CAMPOS1 CAMPOS%ROWTYPE; You can’t declare CAMPOS1 with the data type CAMPOS%ROWTYPE because there is no table (relation) with the name CAMPOS. Just declare CAMPOS1 as…
-
3
votes1
answer886
viewsA: Change url of pages with ajax and click on another browser
As you mentioned that you are using jQuery, I recommend the plugin History API: History If you don’t want to use a plugin, I recommend this article that deals in detail how to work with the API:…
-
6
votes2
answers3396
viewsA: What is the use of methods with an "inter-ternal" modifier?
It would be used when you want the method to be used only by classes declared in the same Assembly, similar to internal class. There is also the protected internal, that allows any class in the same…
-
3
votes2
answers887
viewsA: Can I use a variable to overwrite a method?
Yes. In many cases we just want to add a behavior to an inherited method. That is, we want, in addition to the behavior of the parent class, a new action to be taken. In these cases we call the…
-
0
votes2
answers2335
viewsA: PHP with HTML - Place an array inside a select html
You can use the command foreach or the for as follows: <select> <?php foreach ( $arr as $k => $v ) { echo "<option value=\"" . $k . "\">" . $v . "</option>"; } ?>…
-
4
votes1
answer155
viewsA: Update data in a module with Angularjs
Use the service $interval. It is equivalent to API window.setInterval, but dedicated to using Angularjs (remember that Angular needs to update the view when the model is changed). The use of this…
-
3
votes3
answers1629
viewsA: Multiple connections with the Bank
Only one per database. Normally you will open the connection at the beginning of the request processing, and this will be reused until the end. Something like: Start the script execution; Calls the…
-
7
votes1
answer422
viewsA: Less should be compiled yet in development?
Compiling the Less file while in development is the programmer’s option. I prefer to compile (Grunt does it alone for me). Therefore, even in development, I use the CSS, not the Less files. In…
lessanswered Vinícius Gobbo A. de Oliveira 5,575 -
2
votes1
answer550
viewsA: How to access a directive through a controller?
Yes, it is possible to do, through the service $scope: Be your directive: app.directive("foo", function () { "use strict"; return { restrict: "E", template: "<div>{{ flag }}</div>",…
-
0
votes1
answer1714
viewsA: How to create a vector that displays the frequency of each element in a matrix?
Your vector with the frequencies you actually know the size: x + 1, being x the maximum value of the range used to fill the matrix. Then the vector freqs may be declared as: int [] freqs = new int[x…
-
0
votes3
answers1517
viewsA: What to do when I get a bad_alloc error?
In general, there is some critical procedure that may be being performed at the moment. The problem is that during shutdown more errors can be generated in the event that to close something, you…
c++answered Vinícius Gobbo A. de Oliveira 5,575 -
4
votes1
answer165
viewsA: Binary tree returning empty in search
Initialization First, the function of Inicializa(No) assigns the value null for the variable passed by parameter. However, this is an input-only argument, and therefore the value is not reflected…
-
4
votes1
answer284
viewsA: Is it possible to create a decision structure in a table in SQL?
You can use a trigger that in the events UPDATE and INSERT verify whether the data in the ENUM column is valid or not. If it is not, generate an exception to be dealt with in the application.…
-
3
votes1
answer118
viewsA: How do I save matrices on hard drive?
To save a variable (any one I know), in a file, just use the command save. This command has several options that control the format of variable writing, and format compatibility with other versions…
matlabanswered Vinícius Gobbo A. de Oliveira 5,575 -
2
votes2
answers343
viewsA: When to convert a 32-bit to 64-bit code in iOS
The big difference between 32-bit and 64-bit architectures is that the address space is much larger on 64-bit architectures. Therefore, the main difference in data types between these architectures…
-
2
votes1
answer62
viewsA: Memory Leak in Video Player
There are basically two reasons for addressing space to go only increasing: memory leakage and memory fragmentation. In the leak not much to do besides running tools like cppcheck and valgrind so…
-
2
votes1
answer157
viewsA: How do I use Openssl functions in VB.Net?
Take a look at the design Openssl.NET. I’ve never used, I don’t know what the completeness of the API etc, but it’s the only one I know that delivers a solution more or less ready. Another option…
-
4
votes1
answer331
viewsA: Double with a maximum accuracy of 40 digits
This accuracy cannot be achieved with double. Numbers in a floating point notation such as double are excellent for representing very small numbers or very large numbers, but not a mixture of the…
canswered Vinícius Gobbo A. de Oliveira 5,575 -
3
votes2
answers1841
viewsA: How to forecast values of a variable?
I see basically two more or less simple ways to solve this problem: method of least squares and maximum likelihood: Máxima Verossimilhança One approach to your problem is to consider temperature as…
-
1
votes1
answer155
viewsA: Showing the value of Readprocessmemory C++
When you do LPCWSTR(value) you are the variable value as a pointer, and therefore starts referencing a memory address. You have to convert value, which must be a 32-bit integer, for a string, for…
-
4
votes2
answers2180
viewsA: Delete item from Dynamic Array
Your code has some errors/inconsistencies: You save the variable size anArray in lg, and then calls the function again length. Your loop is not moving the vector’s last position, so you are missing…
delphianswered Vinícius Gobbo A. de Oliveira 5,575 -
1
votes1
answer1135
viewsA: Calling PHP function on page onload
It is not possible to do this directly. PHP is a server-side technology that is not directly accessible via HTML or Javascript. To make a PHP call from the event onload, the simplest is to put the…
-
4
votes1
answer785
viewsA: Angularjs with Socket.io and Mysql data
It is still somewhat inconclusive your question, but I believe it is already possible to approach so that you can draw your own conclusions. First, Socket.IO is a module of Nodejs. Therefore, if…