Posts by novic • 35,673 points
1,265 posts
-
1
votes2
answers254
viewsA: How to split a link into "multiple parts"?
Utilize parse_url and then parse_str as follows: <?php $url = "https://steamcommunity.com/tradeoffer/new/?partner=377361903&token=9Q0WYuq0"; $result = parse_url($url);…
-
0
votes1
answer61
viewsA: Relationship Doubt - Laravel?
Example I would use it that way with model Votacao Migrations Projects <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use…
-
3
votes1
answer231
viewsA: How can I convert datetime to data string?
Do it in the Select that will not have the message of error: var fullEntries = dbContext.tbl_EntryPoint .Join( dbContext.tbl_Title, combinedEntry => combinedEntry.entry.TID, title =>…
-
2
votes1
answer429
viewsA: What is Asyncpostbacktrigger Class?
Sets an optional control and control event as a control trigger postback assíncrono that makes the control UpdatePanel be updated. Reference Microsoft Developer Network - Asyncpostbacktrigger Class.…
-
1
votes1
answer182
viewsA: Redirect via private method in Laravel
Is a erro conceptual where methods should return (return): public function register(Request $request) { $this->register=true; return $this->requestOAuth($request); } public function…
-
2
votes1
answer62
viewsA: Laravel Queries SQL Doubt?
You can do it like this: DB::table('contas') ->where('id_contrato', $options['id_contrato']) ->where('data_vencimento', $options['data_vencimento']) ->update(['valor_titulo' =>…
-
0
votes1
answer1006
viewsA: How to pass data from two tables in one View?
Do so: Instead of using the classe DB use the classe Produtos: <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use DB; use App\Produtos; use App\ProdutosDescricao; class…
-
3
votes1
answer1366
viewsA: Laravel 5 - How to connect multiple Bases at the same time?
You are using it wrong so the configuration is the same in the 3 connections, where the helper (function) env is searching in the same key the database settings, user and password. Corrections:…
-
3
votes2
answers454
viewsA: Search for birthdays of the month varchar
You have to turn it into a date (str_to_date) and then check by the month (MONTH) that takes only the month of a certain date, although the correct one was to write this data in the format date or…
-
1
votes1
answer478
viewsA: Read Tags with the same name in XML
Basically that would be it, if the layout of xml is the same as the question: XmlDocument doc = new XmlDocument(); string ArquivoXML = txtCaminhoXML.Text; doc.Load(ArquivoXML); XmlNode root =…
-
0
votes2
answers1974
viewsA: Read specific XML tags?
He owns the namespace (xmlns) contained in the file, then to solve this problem would: private void btnLerTag_Click(object sender, EventArgs e) { //declaração do namespace XmlNamespaceManager nsmgr…
-
2
votes2
answers312
viewsA: Replace list() by placing value in each index of an array
The command list offspring of a particular array a list of variables in a simple and unique operation, is a facilitator when programming, but, nothing prevents using each position of the array to…
-
4
votes3
answers287
viewsA: Do you need to use the third bind* parameter?
The default of the 3 parameter that is optional is PDO::PARAM_STR in the case of your question, it is not necessary to pass, because, email is already a given string (text) . Code syntax: public…
-
0
votes2
answers993
viewsA: Count total of arrays in Javascript:
var app = angular.module("app", []); app.controller("ctrl", ["$scope", function($scope) { $scope.count = 0; $scope.countItems = function() …
-
7
votes1
answer7792
viewsA: PDF Generator with Laravel Framework?
Minimal example: Package installation barryvdh/Laravel-dompdf composer require barryvdh/laravel-dompdf After the installation is completed, enter the file app/config.php and add the following…
-
1
votes1
answer173
viewsA: Migration in several tables with the same prefix
There’s nothing ready in the Larable for that purpose, but nothing prevents the coding of a Migration with the following code: <?php use Illuminate\Support\Facades\Schema; use…
-
10
votes1
answer4876
viewsA: Customizing a user model Laravel 5.4 - Login problem
Observing: You don’t need to change anything that comes in framework Larable of the briefcase vendor which is the core, if there have been changes back to what was. Step by step: Bench mysql 1)…
-
0
votes2
answers2424
viewsA: Trying to get Property of non-object?
If your relationships are correct, do so: With with: public function verPessoas() { $pessoas = Pessoa::with('cidade')->get() return view('verPessoas', compact('pessoas')); } One reason this is…
-
2
votes2
answers850
viewsA: How to load a value in select
In your solution it would be so: var app = angular.module("app", []); app.controller("ctrl", ["$scope", "$http", function($scope, $http) { $scope.init = function() { $scope.modelo = {}; $scope.marca…
-
2
votes1
answer649
viewsA: How to use LIKE in bindValue?
Your SQL would be: $sql = 'SELECT * FROM nfe WHERE (cliente LIKE :cliente OR cliente IS NULL)'; I might realize there’s a mistake. Examples: Starting with the informed term:…
-
0
votes1
answer366
viewsA: How to loop with jquery without duplicates
So you only need to do it once, and take the dice to bring the dice to second. Example: var cor = ["branco", "preto"]; var exa = ["#FFF" ,"#000"]; $.each(cor, function(index, value){…
-
1
votes3
answers1104
viewsA: How to create a property of an object dynamically?
To create something dynamic can be solved with eval: var app = angular.module('app', []); app.controller('ctrl', ['$scope', function($scope) { var vm = $scope; vm.filters = []; vm.AddSelectOption =…
-
3
votes1
answer359
viewsA: How to reset the Datasource property of a Datagridview and not delete the Header columns?
Well you can make an empty list so he doesn’t disassemble yours controle and remains the same layout private void LimparCampos() { dgvControle.DataSource = new List<Class>();…
-
3
votes1
answer962
viewsA: Magnific-Popup with Bootstrap Modal Image Display Problem
You have to create a css body div.mfp-wrap { z-index: 999999 !important; } so that the element is on the modal. $(document).ready(function() { $('.test-popup-link') .magnificPopup({ type: 'image'…
-
2
votes1
answer201
viewsA: How to find values and apply attributes using Angularjs?
The data brought by ajax I set as an example, the routine would include two settings in the css and search with index of javascript if it is the sign of + if it’s not the least -. Minimal example 1)…
-
4
votes2
answers924
viewsA: Is it possible to insert a select into a td when double-clicking?
In addition to the object to be loaded, it has the encoding of the select and the value selected to be the last value chosen. A var items with 3 fixed items what can be done is to bring the…
-
4
votes2
answers2451
viewsA: Change storage location in Laravel 5.4
Create another configuration, example pictures, in your key root use the function public_path() indicating the directory public of your project: <?php return [ /*…
-
0
votes3
answers2508
viewsA: How to take a variable that is in the controller and put inside a view (Adjustable)
In your View just put it like this: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Bem Vindo </title> </head> <body> {{$nome}}…
-
5
votes2
answers644
viewsA: Arc tangent function in C#
Still need to catch the result of the operation (Math.Atan) and multiply for division of 180 and the constant PI, example, to obtain the value in Degrees: int t = 50; int p = 10; double r = t / p;…
-
1
votes1
answer970
viewsA: Doubt about how to implement a C# Dependency Injection using Ninject
Minimal Example: Install the package by Nuget or Package Manager Console Install-Package Ninject Create a class that is responsible for solving dependencies: FormModule using Ninject.Modules; public…
-
5
votes3
answers1037
viewsA: How to dynamize a numerical sequence of 3 in 3 numbers following the order?
It has several forms, for example, storing the items in a Array() and then printing them all into one div. Example: var items = Array(); var div1 = document.getElementById("div1"); function…
javascriptanswered novic 35,673 -
3
votes2
answers1028
viewsA: How to perform an Insert or update of a JSON object
Do as follows, with Object Orientation: Class database <?php class database extends PDO { public function __construct($dsn='mysql:host=127.0.0.1;dbname=new_schema', $user='root', $pass='senha') {…
-
5
votes1
answer122
viewsA: Error formatting string with number
If linha.Quant be the type int remove the ToString() is not necessary: System.Console.WriteLine(string.Format("{0:000000}", 1.ToString())); //1 - não formata…
-
1
votes2
answers58
viewsA: Are there any components that replace Windows Forms Spinedit in WPF?
Install the package via nuget Extended.Wpf.Toolkit that it offers a component SingleUpDown. After it has been installed configure as follows: Add the configuration:…
-
0
votes1
answer445
viewsA: Angularjs - remove items selected according to checkbox
angular.module("app", []) .controller("ctrl", ["$scope", function($scope) { $scope.allEntries = [{ 'value': 1, 'type':…
-
1
votes1
answer93
viewsA: Validate List of Radium Buttons with Angular.JS
Need to make some changes to your HTML where the group of <input type="radio" /> must bear the same name, the logic is in the angular to have an application control. angular.module("app", [])…
-
2
votes2
answers938
viewsA: Push in JSON Object Angularjs
A simple example with angular is to access the object and create a new item with those that already exist: var app = angular.module('app', []); app.controller('ctrl', ['$scope', function($scope) {…
-
0
votes2
answers1382
views -
6
votes2
answers531
viewsA: Mysql Auto increment even number
First check if you are incrementing from 1 in 1 with the following command: SHOW VARIABLES LIKE 'auto_inc%' if it achieves this result: is doing the increment process correctly, if the value of the…
-
6
votes4
answers2773
viewsA: How to mount buttons with Angular?
I understood that you want to select and be marked the item: Minimal example: var app = angular.module("app", []); app.controller("ctrl", ["$scope", function($scope) { $scope.btns = [{ name: "btn1",…
-
5
votes3
answers304
viewsA: How to get the highest numerical value supported by php?
With the constant PHP_INT_MAX, which is the largest integer supported in that interpreter, which is available from the version 5.0.5. Online Example Reference: Predefined Constants…
-
1
votes1
answer1147
viewsA: Clear fields with Angularjs
A proposal, to clear the fields at the time of choosing the flap. angular.module("app", []) .controller("ctrl", ["$scope", function($scope) { //da primeira aba $scope.t1 = ''; $scope.t2 = ''; //da…
-
3
votes1
answer418
viewsA: Laravel Blade prints unknown values
You’re using it wrong, in the code {{ }} is replaced for: <?php echo e($horario_livre); ?> then the correct code would be: @foreach($horarios_livres as $horario_livre) {{$horario_livre}}…
-
2
votes2
answers616
viewsA: Delete placeholder value in input by clicking Angularjs
With angular, just remembering that the normal behavior input concealed the placeholder when there is value, but, this is a way to remove placeholder on receiving the focus and when it loses focus…
-
2
votes1
answer443
viewsA: Take select values and add their data
If there is such a pattern it can be done so: $('#select1').on('change', function(e) { var n1 = parseInt($(this).val()); var n2 = parseInt($(this).text().split("=")[1].trim()); $('#result').val(n1 +…
-
2
votes1
answer324
viewsA: Required_if with more than one field in Laravel 5.3
The test for this guy is with required_without_all, where translation says: The field under validation must be present and not empty only when all other specified fields are not present. Validation:…
-
4
votes3
answers793
viewsA: Check in Javascript if String has string x numbers
Can use with match var str0 = 'abc123de45' console.log((str0.match(/[0-9]{5}/) != null)); var str1 = 'abc12345de'; console.log((str1.match(/[0-9]{5}/) != null));…
-
2
votes1
answer390
viewsA: How to Add Mask in ajax input via jquery?
Utilize jquery-maskmoney and jquery-Mask and ask a question before adding the element by the attribute title that was clicked: Example $(document).ready(function() { $('#tblEditavel tbody…
-
1
votes4
answers111
viewsA: Get content between tags [x] and [/x] with Regular Expression
<?php $texto = "[pt-br] Qual é Lorem Ipsum? Lorem Ipsum é simplesmente texto manequim da impressão e composição indústria. Lorem Ipsum tem sido o texto padrão do manequim da indústria desde os…
-
1
votes1
answer440
views