All Questions

3
answers

Can I POST a file automatically?

I'm using Cron to run a PHP script. I want to do a load upload test for my server and Cron takes charge of this (the server then sends it to the Amazon). I was thinking of using file-get-contents to upload files to the server but how...
asked on 30.10.2014 / 19:12
2
answers

"Floating" sidebar within an element when scrolling

I have a layout Bootstrap with a sidebar on the right and I need it to "rotate" (up / down) when doing scroll , but not on top of the header and footer. that just "floats" within div[role=main] My layout: Mycode:<headerclass="c...
asked on 15.12.2014 / 04:28
3
answers

Place button side by side

Hello I wanted to have a back button and another to go to the analysis, when I go to see the site they always appear in one down and another up. My code is: <a href="guardadorrebanhos.html"> <p align="center"><input ty...
asked on 02.03.2015 / 10:29
1
answer

How to convert a date to this format in PHP?

Can anyone tell me what kind of date is this format? 2013-09-17T05:59:00+01:00 I have in the database a field of type timestamp or date. How to convert the value of it to this format using PHP?     
asked on 22.04.2015 / 16:55
2
answers

Verify that a parameter has been supplied to the function

Assuming a JavaScript function with parameters: function minhaFuncao (param1, param2, param3) { // fazer algo ... } And then using it as follows: var param1 = "bubu"; minhaVariavel = minhaFuncao (param1); or var param1 = 30,...
asked on 06.04.2015 / 12:24
3
answers

Knowing the frequency of words

Hello, I would like to know if there is any function / command in R that I can find out what are the most frequent words in a text and how many times it appears. For example, I have a very large database, but it is a database where each row i...
asked on 20.02.2015 / 19:01
1
answer

How to put variables within vectors?

How do I create variables within a vector? Something like: int arr[] = {int x=1, int y = 2};     
asked on 17.12.2014 / 23:13
4
answers

Problem in checking prime numbers

I have to create a vector of random numbers in a range of 0 to 250, and show which cousins are. This is my code: #include <stdio.h> #include <stdlib.h> #include <time.h> int main(void) { int i,j,n[10]; srand(time(NU...
asked on 19.12.2014 / 01:01
2
answers

How and when to use exceptions in PHP?

In PHP, most native functions return a boolean false , integer 0 or NULL if some kind of inconsistency is found in the value passed to it. Example: $exemplo1 = explode("","tente me explodir"); // false //ou $exemplo2 = coun...
asked on 19.06.2014 / 23:18
3
answers

How to retrieve ID of the last record recorded with MySQLi

I am not able to retrieve the ID of the last record inserted in my DB, it is coming as Zero, the inclusion is working and at the moment of making an update the script fails. I have tried with mysql_insert_id() and mysqli_insert_id()...
asked on 13.05.2015 / 15:36