All Questions

2
answers

Recognize aria-selected="false" with jQuery

How do I make a jQuery that recognizes if aria-selected="false" and if true change the background of the "arrow-btn-sub" div to another image (arrow img). This is part of an accordion and I want to change the img of the arrow when the par...
asked on 13.02.2014 / 12:01
1
answer

How to use methods contracts and why?

Reading a book on .NET development, I saw a brief description of methods contracts and tried to find out a bit more on the internet.    It uses an imperative syntax that is costly and has low tool support. To use the contract in the library...
asked on 05.12.2018 / 11:03
2
answers

How to write a string in a stream using physical files?

When you insert characters from a string into a text file into C, white space is ignored. How do I make long sentences within a string separate from words? Follow the code: #include <stdio.h> #include <stdlib.h> #include...
asked on 17.02.2014 / 21:48
3
answers

Is it possible to import variables in JavaScript (Node.js)?

I have variables in app.js : var G = {}; module.exports = G; var DATA = G.DATA = 'DATA'; var F1 = G.F1 = function(val) { return val; }; In this way, I can export variables under the object G , and at the same time, I can acce...
asked on 05.02.2014 / 00:40
2
answers

How to open a unicode file inside a zip?

I've tried with zipfile.ZipFile("5.csv.zip", "r") as zfile: for name in zfile.namelist(): with zfile.open(name, 'rU') as readFile: line = readFile.readline() print(line) split = line....
asked on 16.12.2013 / 01:45
1
answer

How to plot the estimated logistic regression model

Suppose I have the data below, apply a logistic regression on them and want to see the estimated function that returns the probability. #Simula os dados nobs<-100 beta0=-10 beta1=0.006 saldo=runif(nobs,1300,2300) p_x <- exp(beta0 + beta1...
asked on 19.02.2014 / 13:29
4
answers

How to use AJAX with Laravel?

I have a select that when I change the value it should reorder a list, eg by id, name, etc. without Laravel I would use a onchange function and pass the sort order to a PHP page that would print this list sorted for me ... But how to d...
asked on 06.02.2014 / 11:35
4
answers

Why CakePHP arrows _method equal to PUT instead of POST?

I recently updated my CakePHP project to version 2.4.5. Since then, some of my forms have input hidden _method set to PUT automatically. The only way around this is to set 'type' => 'POST' . But that was not necessary in th...
asked on 20.01.2014 / 17:08
2
answers

Remove input from an array by its value

To remove an entry from an array, we can use the unset () function: / p> <?php $arr = array(1, 2); unset($arr[0]); var_dump($arr); /* Resultado: array(1) { [1]=&gt; int(2) } */ ?> Question How to remove an entry from an...
asked on 28.01.2014 / 00:45
3
answers

Command to replace characters recursively

I need a command that replaces a specific pattern in each line of a file as many times as necessary until the pattern is no longer found. For example, in a CSV file, the fields are separated by a semicolon ; . Null fields do not have a...
asked on 16.12.2013 / 16:25