All Questions

1
answer

How to pass an ArrayList from one class to a method within another Class?

I need to use a ArrayList object object that I have in a class, in one method that I have in another. The files within the project are separate and I have inside one, a function that works on the attributes of the objects within the Ar...
asked on 16.05.2018 / 15:02
1
answer

The server requested authentication method unknown to the client [caching_sha2_password]

I have installed MySQL 8 and Laravel 5.6.18; when I try to execute the migrations with: php artisan migrate An example of my migrations is: Schema::create('categories', function (Blueprint $table) { $table->increments(...
asked on 15.05.2018 / 14:06
1
answer

How to add the elements of Array?

Hi, I am trying to create a program that adds the multiples of 3 and 5 that are between 0 and 10. Well, I do not know what I'm doing wrong that the sum gives me 33, when it should be 23. Do you see the error in my code ...? Thanks. funct...
asked on 13.05.2018 / 22:43
1
answer

json php query with duplicate results

The result of my php query is shown as follows: the data is repeated in each query. <?php header('Content-type: text/html; charset=UTF-8'); include('functions.php'); $sql = "SELECT * FRO...
asked on 25.09.2018 / 16:54
1
answer

How to walk a Json with Array

Good I am having problems to travel a json with array or that I think, I leave you the code json: { "username": "Pepiko", "platform": "pc", "stats": { "kills_solo": 1, "placetop1_solo": 0, "placetop10_solo"...
asked on 29.09.2018 / 19:24
2
answers

javascript replace regex

I need to make a replace in a whole string with a format similar to the following: var miRegExp = "^[0-9]+$"; var miString = $("input").val(); miString = miString.replace(new RegExp(miRegExp)+ /g, ''); The objective is to replace all the ch...
asked on 11.05.2018 / 15:15
2
answers

Sort object by its indices in JavaScript

How can I sort an object by its indexes in JavaScript, with an object similar to the following {ave:2,gato:3,burro:7,caballo:3,hipopotamo:5,elefante:8} How can I make the object look like this? {ave:2,burro:7,caballo:3,elefante:8,gato:7,h...
asked on 30.09.2018 / 17:03
2
answers

I want to get only the date of my BD record from the column 'created_at'

How can I format the 'created_at' ('Y-m-d') column in the laravel driver? Since it shows me "2018-02-10 00:00:00" I have this query BD::select('created_at') shows me "2018-02-10 00:00:00"     
asked on 02.10.2018 / 22:55
1
answer

Problem checking if there is a directory with PHP

I'm trying to check if a directory exists and if not create it, but the page does not work for me when I use the functions "file_exists" or "is_dir". I've tried it this way: if(!file_exists( $path ) mkdir($path); And so: if(!i...
asked on 06.10.2018 / 18:00
1
answer

How to select several elements whose ID contains a word

Hello with javascript I'm doing a function where I want to hide several elements, the problem is that if I use getElementById I can only select a single element, and I would like to hide several that have a similar ID; example, 'checkbox1', 'che...
asked on 27.04.2018 / 15:33