All Questions

2
answers

Block javascript and sql-injection attack on the same string

I'm receiving data from a form in php via get. I am handling the information as follows: $search = mysql_real_escape_string(htmlspecialchars($_GET["t"], ENT_QUOTES, 'UTF-8')); With this I intend to block attacks by javascript and sql-inj...
asked on 12.04.2014 / 18:13
2
answers

How to replicate elements dynamically?

I'm trying to create a series of repeating elements without knowing the amount of repetitions that will be needed. I have an input in which the user will report a numerical value equal to or greater than 1 that will reflect the amount of repetit...
asked on 05.05.2014 / 20:56
1
answer

EWMA volatility in a data.frame

I have a data.frame base_retorno_diario , 3560 observations in 110 actions (daily returns), I want to create another data.frame from that with Volatility ewma with decay_factor = 0.97 Data.frame example Data IBOV...
asked on 21.05.2014 / 20:47
1
answer

How to apply / search for global / local transformations in OpenGL

I'm programming a simple Game Engine using the OpenGL graphics API. But I have a problem that I can not solve. The problem is that the transformations in the world (world) do not work correctly. The scale transformations are normal, but the...
asked on 20.04.2014 / 15:00
3
answers

WPF - DataGrid - Deletion

How can I get the index of a selected item in my DataGrid in WPF? I know that in WEB Forms I can get it like this: MainGrid.Rows[e.RowIndex].Cells[0].Text     
asked on 14.04.2014 / 20:09
3
answers

Side banner that accompanies the scroll

I wanted to add a side banner, which depending on the scroll, the banner accompanying the page. The image shows what I want to do: Butthebannercanneverpassafewlimits,thatis,itcannotgooverheadernorfooterandkeepinginmindthatpagesizeisnotalwaysthes...
asked on 02.04.2014 / 10:36
1
answer

Android Performance Comparison: Canvas vs OpenGL ES

Is there a benchmark for performance, or some listing with rules / guidelines, to tell me which time to use OpenGL ES on Android instead of the Canvas + Activity pair configured as hardwareAccelerated="true" to make constant drawings , fo...
asked on 03.05.2014 / 22:30
1
answer

How to create immutable objects in Python?

Based on this question , is it possible to create your own immutable objects / classes in Python, in the sense that, by default, this my object will be copied when passed as an argument to a function? If possible, how?     
asked on 25.09.2014 / 16:36
1
answer

How to check SQL backup integrity

I'm using MySQL , and to back up the banks, I'm using mysqldump . My question is if and how can I check if the file generated by the dump is intact automatically, without having to "upload" the dump into the bank?     
asked on 28.08.2014 / 19:20
1
answer

Rotate custom functions in the browser console

It's a bit tiring to have to be writing console.log() all the time. I know that in my code I can set the log function that does just that. But outside of the application environment, I would like to have this always available in th...
asked on 16.10.2014 / 00:32