All Questions

2
answers

How to replace eval () with another expression

Reading some comments and especially comments from colleague TobyMosque, I try today to avoid using eval (). Well, now comes the next. In simple expressions, how do I replace it? See below a variable declaration that I got here on the system I w...
asked on 25.08.2015 / 15:43
3
answers

Script exchange image every reload

I have 5 banners at home, and I would like every upload from home to display one of the banners. Ex: I visited the site and displays the banner 1 , I browsed some page and came back home displays banner 2 I believe it would work every time I...
asked on 12.08.2015 / 19:20
2
answers

Error in JavaScript code

I have a code snippet that looks in a Json field called campo , and inserts it into an array, which can not have repeated values. My array always returned undefined and it took me a while to find the error. Why does JS and even IDE cons...
asked on 29.07.2015 / 16:41
1
answer

Save a JSON in the bank vs. Relationship?

When I did not know much about the question of database structure and relationship between tables, I used JSON or comma-separated data in a particular field in any table in the database. In fact, I remember a specific case where I needed to r...
asked on 19.08.2015 / 19:15
5
answers

String Format with JavaScript

Aiming for the String.Format of C #, which is very easy to use, I have searched for something similar to be used in my JavaScript codes. I found some implementations that are somewhat problematic, so I would like you to have someone wh...
asked on 27.08.2015 / 14:41
4
answers

How to concatenate two byte arrays in Java?

I have: byte mensagem[]; byte nonce[]; How do I concatenate the array nonce at the end of the array mensagem and store it in a third array?     
asked on 20.05.2015 / 23:09
2
answers

What is the best way to post this echo?

What is the best way to post this echo? I know it's missing some quotes, I just do not know where to put it. <?php echo '<a href="page.php"><em>' <?php echo $locale->translate('ID'); ?> '</em></a>'; ?>...
asked on 11.08.2015 / 20:43
2
answers

How to duplicate a MYSQL database?

Is there any way to duplicate a database in MYSQL by running some query ? I can copy a table with this code: CREATE TABLE table_2 AS SELECT * FROM table_1 But how do you copy to replicate a given database (on the same host)?...
asked on 11.08.2015 / 22:00
4
answers

Check if user is logged in

I would like to know how to block access when the user is not logged into the system, however, the only page that can be accessed is the Login page and when it tries to access any other page it redirects to the login page, user to log on to the...
asked on 25.08.2015 / 15:23
3
answers

Compile C in Sublime Text

I'm using Windows , and I need to know how to compile programs written in C in this editor. No ubuntu is easier, but in Windows 8.1 I do not know how to do it. I am using Sublime Text 2 because it is my preferre...
asked on 03.06.2015 / 19:24