Posts by adventistaam • 3,354 points
330 posts
-
1
votes1
answer54
viewsQ: Thread independent from the result
I have a query where returns a list of results; Example: 192.168.1.2 192.168.1.3 192.168.1.4 192.168.1.5 I would like from that list to create a thread for each one independent. For each to do their…
-
0
votes0
answers26
viewsQ: Set value in Database session
I’m trying to use a database session SESSION_DRIVER=database I would like to know how to set the session in the specific column also I’m trying like this Session::put([ 'login' => $login ]); But…
-
0
votes0
answers70
viewsQ: Node return page
I have the following code pad server.get('/energy', (req, res, next) => { { const getScript = (url) => { return new Promise((resolve, reject) => { const http = require('http'), https =…
-
0
votes3
answers92
viewsA: Insert summary when there is a change in a PHP Array
My suggestion is that you create an if before the group to compare the values Example: $qtde = 0; $grupo = 0; $soma = 0; foreach($grupo_arr $k => $v){ ?> <tr> <td><?php echo…
-
6
votes4
answers2249
viewsQ: Create Virtualhost on port 81
I have two apaches installed for two versions of PHP (5 and 7), on port 80 and 81 respectively. I would like to create virtualhost for apache port 81 In the host file there is this line: Host…
-
0
votes0
answers29
viewsQ: Invalid Http Response
I have the following block of code public void read( String url ){ try{ urlNormal = new URL("http://"+url+"/sistema.cgi?lermc=0,33"); URLConnection conn = urlNormal.openConnection(); BufferedReader…
-
1
votes1
answer72
viewsA: AUTO_INCREMENT customized
You can use Trigger to do this using Trigger which would leave your insert small Then when you enter the field doc you insert as null DROP TRIGGER IF EXISTS `trg_atualiza_doc`; DELIMITER $$ CREATE…
-
0
votes1
answer78
viewsQ: Show data from one ajax function, in another ajax function
I have an ajax function that looks for the code of all companies and goes in the other ajax function looking for employees. So that the page does not stop when doing this search I am using the…
-
1
votes3
answers163
viewsA: Clear campo select
I did with vector but you adapt to your code Follow the suggestion var clinico = [ {id : 1, descricao: 'Antonio'}, {id : 2, descricao: 'Maria'}, {id : 3, descricao: 'Ana'}, ] var ortopedista = [ {id…
-
0
votes2
answers48
viewsA: Separates result within each
As the data is dynamic you can filter only from the chart column as in the example: var original = [ {pergunta: "pergunta1", resposta: "item1", grafico: "Column", qt: "3"}, {pergunta: "pergunta1",…
jqueryanswered adventistaam 3,354 -
0
votes0
answers62
viewsQ: Laravel shares session
I have a system A where I store a session $login = $request->input( 'login' ); $request->$session()->put('login', $login ); And a system B which stores the session:…
-
0
votes1
answer50
viewsQ: Key keys in session
I would like to save and recover an array session in Laravel type in PHP Example: in the PHP: $_SESSION['dado']['dado1'] = $valor; Recovering echo $_SESSION['dado']['dado1']; In the Laravel I’m…
-
1
votes1
answer34
viewsQ: Code reduced to Insert
Say you have the following fields in the users table: ID,NOME,USUARIO,LOGIN and SENHA For me to enter a record in the table I do the following $usuario = new Usuario(); $usuario->nome = 'Carlos…
-
0
votes2
answers430
viewsA: Allow Submit to appear only when CERTAIN fields are filled in PHP
You can make the button immediately invisible, and only show after validating the conditions Below is an example. $('#tipoproblemas').on('change', function(){ valida() maquinas() })…
-
1
votes1
answer2046
viewsQ: Create bat to finish Service
I’m trying to create a . bat file to finish and start a service on Windows. To do this I first finish the process then restart the service But the command inside the batch file (.bat) does not find…
-
0
votes2
answers34
viewsA: answer in`json` received from a file `php`
You have to define the type of return. The example would be the dataType: json $('#bloqDesbloq').on('click', function(){ var idAdmin = $(this).attr('idAdmin'); var bloq = $(this).attr('bloq');…
-
0
votes2
answers549
viewsA: I cannot extract the information from Json on Laravel
For what you’re showing on your return…
-
0
votes1
answer86
viewsA: html and css, link selector through anchors, with next and Prev arrows
The bootstrap has some ready-made examples, as follows: <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"…
-
0
votes2
answers30
viewsA: PHP split a variable separated by "|" and bring all results that are not empty
Another way is to check if the values were all received and only then put in the vector <?php $unit = $_GET['unit']; $unidades = explode("|", $unit); $units = array(); foreach ($unidades as $key…
phpanswered adventistaam 3,354 -
0
votes1
answer90
viewsQ: Set time (minute:second) on Flot chart
I’m trying to put on the x-axis the seconds, because the update is every 3 seconds. I have found that to define the interval, I just put this data xaxis : { minTickSize : [ 3, "second" ], min : 0,…
-
0
votes2
answers100
viewsQ: Install Composer in Windows 2012
My operating system has two Apaches running two phps (5 and 7.1 respectively). I am trying to install Composer for PHP7, but it is giving the following message: The PHP exe file you specified Did…
-
0
votes0
answers37
viewsQ: Call complete() within Success()
Consider my code ajax below function update(){ $.ajax({ url : 'my.hrl', type : 'get', dataType : 'json', success : funcion(data){ if(data.id == null){ //chamar. complete ou error } }, complete :…
-
-1
votes1
answer182
viewsQ: How to insert values in the chart gauge
I am with widget Gauger (type Velocimetro) and would like to enter my own value For example, the maximum value would be 200 and minimum 0 The set value would be 175 How do I insert values into the…
-
4
votes1
answer211
viewsQ: Ajax locks the computer
Analyze the code below function update(){ $.ajax({ url : 'http://localhost/sistema', type : 'get', dataType : 'json', success : function( data ){ console.log('Mostrar dados: '+.data.dado); } }) }…
-
1
votes1
answer29
viewsA: How to insert data into related tables using PDO
See an example of how to enter a neighborhood: public function insert (Bairro $bairro){ $this->connection = null; $teste = 0; $this->connection = new ConnectionFactory();…
-
1
votes1
answer472
viewsQ: Environment variables will remain
I’m following this tutorial, on Linux, but every time I restart I have to set all the variables again What I have to do to make the settings remain and globally? I’m using Linux Mint Cinamon…
-
2
votes1
answer619
viewsQ: Send data via post
I have the following method namespace App\Http\Controllers; use Illuminate\Http\Request; use Validator; use App\Pessoa; class PessoaController extends Controller { public function lista( Request…
-
1
votes0
answers18
viewsQ: Send csfr_token from a client
I wonder if you have how to send a csrf_token from a client application to my webservice Or do I have to disable Laravel TOKEN check? If you can send it, how is it? That I want to test from Postman…
-
1
votes1
answer197
viewsQ: Error Access Restriction: The type is not accessible
I’m trying to develop a simple java screen using JFrame but in my eclipse is showing a message on JFrame. Access Restriction: The Construction Jframe(String) is not accessible due to Restriction on…
javaasked adventistaam 3,354 -
1
votes2
answers526
viewsA: Sent String in PHP page to another HTML page
Taking advantage of the block you reported can do two ways $uploaddir = 'tempArq/'; $uploadfile = $uploaddir . $_FILES['Arquivo']['name']; if (move_uploaded_file($_FILES['Arquivo']['tmp_name'],…
phpanswered adventistaam 3,354 -
0
votes2
answers91
viewsA: How to create a form where it stores the data in a table and at the end you can register the data in the table in the Database?
You can use the tabletojson.js to add all your table to the database. To insert values into a table before saving, follow the suggestion below, for you to analyze $('.btn-default').on('click',…
-
1
votes0
answers34
viewsQ: Radio Button back with old value
Hello! I have the following code: <div class="resposta"> <label class="radio-inline" style="padding-right: 20px;"> <input type="radio" name="1" value="S" {{ old('resposta1') == "S" ?…
-
1
votes2
answers40
viewsA: Send array to PHP via Ajax
According to your javascript: info = []; info[0] = 'thiago'; info[1] = 'carlos'; alert(info[0]); $.ajax({ type: "GET", data: {info:info}, dataType : 'json', url: "buscar.php", success:…
-
1
votes1
answer200
viewsQ: How to enter values in Laravel
I am trying to use the following command to insert: $sql = "INSERT INTO tabela (campo1, campo2, campo2, campo4) values(:campo1, :campo2, :campo3,'S')"; $campos = array( ':campo1' => $nome,…
-
1
votes1
answer1531
viewsQ: Validate password using Laravel
I have the following form My password fields are like this: <div class="form-group {{ $errors->has('senha') ? ' has-error' : '' }}"> <label for="senha">Senha</label> <input…
-
0
votes2
answers2965
viewsQ: Combobox appearance on bootstrap
Hello! I’m trying to use the Chosen + Bootstrap in Laravel. But I would like the appearance using the choosen to look like the bootstrap itself. Analyze the image above: Option 1 without using…
-
0
votes1
answer457
viewsQ: Deploy in Laravel Projects
Hello! After a project is done in Laravel, which folders and files are really useful for uploading to the server? Actually I use everything and I think it’s kind of heavy.
-
1
votes2
answers242
viewsQ: Split date format
I have the following value 14/02/2018 13:53:12 in excel. Cell with value is in text format. When having concatenate the value the date above is like this: 43145,57861111111 Does anyone know how to…
-
1
votes2
answers87
viewsQ: Replace the second repeated character
I have the following value in an Oracle query. SELECT '3.0.' FROM DUAL I’d like you to return only 3.0 and remove the Last Point (.) I tried to use the REGEXP_REPLACE thus: SELECT…
-
6
votes6
answers2555
viewsA: How to change the title element text?
You can add spam within H2 $('.btn').on('click', function(){ console.log('clique') $('span.valor').text('R$ 20,00'); }); <link…
-
1
votes1
answer393
viewsQ: Error when connecting oracle
I’m trying to perform operation Insert on the oracle by Laravel (5.6), but is giving error: The method I do the Insert is this: public function salvar( Request $request ){ $agenda = new Agenda();…
-
0
votes1
answer111
viewsA: Phpstorm terminal does not recognize php from xampp
I figured out how to fix. In case anyone needs it, I did so: I believe the sequence was meant to be: Install the XAMPP; Installing Phpstorm; I did it backwards and so it didn’t work. I removed…
-
0
votes1
answer111
viewsQ: Phpstorm terminal does not recognize php from xampp
Does anyone know why the Phpstorm terminal does not recognize php from xampp? Because Windows terminal works normal Composer, php used with Laravel, but phpstorm terminal does not work…
-
0
votes1
answer1505
viewsQ: Insert image in Ireport
I’m trying to insert an image into Ireport 3.7.5. When I drag the Image field to the page and place the static url with the image address, it works, but when I put it on Image Expression that way :…
-
0
votes1
answer877
viewsQ: redirect()->back() return with variable
I have this form here <form action="{{ route('usuario.update') }}" method="post"> <input id="token" type="hidden" value="{{ csrf_token() }}" name="_token"/> <input type="hidden"…
-
2
votes2
answers2956
viewsA: How to change the color of a radio button?
In your case you could use the btn own Bootstrap, but not all, or even customize using inline css <link rel="stylesheet"…
-
1
votes1
answer55
viewsA: Class to create json
Your array can be like this: <?php class Uteis { public static function criarjson($mensagem,$value){ $json_str = array( "autenticado" => $value, "mensagem" => $mensagem ); echo…
phpanswered adventistaam 3,354 -
1
votes1
answer31
viewsA: Nested middleware
According to the help of colleagues and the key comment of the friend Virgilio Novic The route where the page was to change the password was inside the password middleware as well, so I guess that’s…
-
-2
votes3
answers52
viewsA: For JS code to scan the console
Can change the <button> for <a href=""></a> $('.btn-enviar').on('click', function(){ var nomeGrupo = document.getElementById('nomeGrupo'); var prcGrupo =…
-
1
votes1
answer31
viewsQ: Nested middleware
I would like to allow access to some pages only if user is logged in. I did so: Route::group( ['middleware' => 'usuario'], function (){ /* Minhas páginas */ }); So far so good, but I would like…