Posts by novic • 35,673 points
1,265 posts
-
1
votes1
answer1253
viewsA: Upload with ASP.NET Core json vs formdata
I can illustrate with Minimal Example, because, it does not have so many details specific in the question and about the question of action be responsible for both types to receive the information…
-
1
votes2
answers356
viewsA: ASP.Net - Browse Radiobuttonlist?
You need to search for the above element until you reach the innermost, example: RadioButtonList radio = Page .FindControl("panelQuestionarios") .FindControl("rblResp01") as RadioButtonList; with…
-
3
votes2
answers1127
viewsA: Multiple downloads with PHP and mPDF
Actually, this code will only be executed once, because, the default is one request at a time and in the command of mpdf->Output has the output of a download. To do something like this you need…
-
3
votes2
answers980
viewsA: Remove an item from an array in Laravel’s Session
First recover the Cart, exclude the array by the key and then destroy and build again the Cart. Method: public function exclusao($chave) { $carts = session()->get('cart'); unset($carts[$chave]);…
-
3
votes1
answer1091
viewsA: Orange Sum and Subtraction Update?
There are two ways that can be implemented that one of them is by eloquent ORM Model and the other Database: Query Builder Eloquent ORM Model Create a class to represent your table as follows:…
-
2
votes1
answer1190
viewsA: Log variable in Laravel
On the part of controller is all right to store an item in the session() That’s the way it is, but in your View, is being called as if it were a common variable, but needs to be accessed to…
-
1
votes1
answer148
viewsA: First directive at the angle
To configure the variables have to be with @ linking an attribute to the property of Scope of the Directive, example: var app = angular.module('app', []) .controller('appController', ['$scope',…
-
2
votes1
answer3056
viewsA: Save inputs with PHP/Laravel arrays
There really is a simple way is by using the method create passing the array to store the data, and remembering that its Product class must be configured its fillable as follows: use…
-
2
votes1
answer303
viewsA: Pick JSON value returned from Laravel
For a simple detail, we missed passing the room Paramento that means the type of return that in the case is a json, as specified in the documentation, example: jQuery.post( url [, data ] [, success…
-
3
votes2
answers4863
viewsA: Reading XML in C#
The archive xml is badly formatted, needs to have a tag root and so I arranged to answer the question by adding the element root for reading. Modified file: <?xml version="1.0" encoding="utf-8"…
-
2
votes2
answers2942
viewsA: How to read the json below with the GSON library
With the response of question Read json with GSON library the user wants the solution of this is in a strongly typed object, what is missing is to continue with this solution and then pass the data…
-
1
votes1
answer675
viewsA: Read json with GSON library
Using Hasmap with collection of String can work with data json who has the layout of key and value, basic example: Code: import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import…
-
0
votes1
answer283
viewsA: Difficulty in using timepicker
To make this addition was used the Moment js. to calculate the maximum time and changed the options of the duration box with the Timepicker as follows: Minimal example: moment.locale('pt-br');…
-
2
votes1
answer681
viewsA: Get data from multiple codeigniter tables (Multidimensional Array)?
Even the information being related, I’d make a class Model for each table and then a class Model to manage the others as follows: Minimal Example: Observing: in this simple example were placed two…
-
1
votes2
answers501
views -
1
votes1
answer234
viewsA: 2 action on a Ubmit button?
By the comments it would be, basically it would be this: <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('#ajax_form').submit(function() { var dados = jQuery( this…
javascriptanswered novic 35,673 -
1
votes1
answer481
viewsA: Sort rows and columns replicated with angular
With table, the proposal would be another, divide this array into two parts or as many parts as needed (I will follow the line of the question) with the command Slice and put the ng-repeat us button…
-
5
votes1
answer557
viewsA: Validate composite key with Laravel?
Try it like this: return [ 'name' => 'required|string', 'email' => ['required','email','max:255', Rule::unique('employees') ->where(function($query) { $query->where('user_id',…
-
3
votes1
answer26
viewsA: Larval Relationsships 5.4 accessing search data with?
Thus: $albuns = Album::with('imagemAlbums') ->where('departamento_id', $id)->get(); foreach($albuns as $album) { $album-> ... ; // campos foreach($album->imagemAlbum as $imagem) {…
-
2
votes1
answer1898
viewsA: Read txt file
To load text from a file .txt with angular create a directive that when changing the input file will display the text content in a div, example: var app = angular.module("app", []);…
-
2
votes2
answers263
viewsA: How to enter data with JSON and MVC5
To make this code, you must build several functions javascript one to add the input, one to save and send the information Server-Side, one to replace the input by a span and another to disappear…
-
0
votes2
answers84
viewsA: Grouping of the Array?
I made a reduced example: <?php $ar = array( array(), array('cor', 'azul'), array('peso', '192kg'), array('espessura', '10cm'), array(), array('cor', 'azul'), array(), array('cor', 'adg'),…
-
3
votes1
answer2482
viewsA: Laravel: route with parameters
As simple as possible, example: Route::get('chamadas/{turma}/{data}', "ChamadasController@index"); in your class controller class ChamadasController { public function index($turma, $data) { // ...…
-
1
votes1
answer49
viewsA: Form value does not return in the Collective
You have enough problems doing it like this, you better create a array in his controller and move on to the View example: public function edit($id) { $departamentos[''] = 'Escolha uma Opção';…
-
1
votes2
answers684
viewsA: Generate the days of the current week?
The function below works like this: if it is informed some date is generated the week of the given date, if it is not informed anything is generated by the current date of the system, example:…
-
7
votes4
answers6294
viewsA: Mask with Jquery changing from fixed to mobile or vice versa
Examples: jQuery Mask Plugin $(document).ready(function(){ var SPMaskBehavior = function (val) { return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009'; }, spOptions = {…
-
1
votes1
answer160
viewsA: ASP.NET route does not receive the parameter in Action after being set
You were calling wrong on your first doubt, the url correct for the created route: Payment/123 Payment/abc and the other way I was trying to do was wrong and fall into the standard route Default…
-
0
votes1
answer82
views -
8
votes1
answer672
viewsA: .Net Core, Dapper and Visual Studio Code?
To install the Dapper or any package is to use only the part intended for NETCLI, as shown in the image below: and when you have the Visual Studio Code open, goes into terminal and enter what is…
-
1
votes2
answers82
viewsA: Filling Label with Linq using Tolist()?
If you don’t need to make one foreach just use String.Join with the return of that expression Linnum, example: var garantias = (from p in db.T_GarantiasLocaticias where p.imovelID == 5 select…
-
2
votes1
answer819
viewsA: Date validation in the Asp Net Core model?
Version prior to ASPNET CORE A Custom class that inherits from the abstract class should be created Validationattribute for server validation and the Interface Iclientvalidatable for client…
-
2
votes1
answer552
viewsA: Calculate the sum of repeated elements in Angular-JS using ng-repeat
There are some practical ways to summarize angular, example: 1): Calculating within the ng-repeat var app = angular.module('app', []); app.controller('ctrl', function($scope){ $scope.despesas = […
-
3
votes1
answer1445
viewsA: Select model methods in the Laravel controller index method?
You can use the following in your index put a parameter with a value pattern, example: public function index($filter = null) { if (is_null($filter)) { $events = Event::all(); } else { $events =…
-
2
votes1
answer1751
viewsA: Validation in the Laravel
In the method of controller, do not use with FormRequest, because in your case it won’t work, so do as an example below: Add the namespace below that is op FACADE responsible for Validator: use…
-
1
votes2
answers1954
viewsA: Relationship with 3 tables in Standard
There are problems in your relationships through settings on Model of their classes, then, I will propose a minimum model so that I can do in your project, example: Diagram: Classes eloquent…
-
1
votes2
answers1516
viewsA: Deserialize json string array to string array
I will propose a solution by following the loading of this information into class types, example: Json: { "data": { "listPermissoes": [ { "dadosPermissao": [ { "name": "usuario", "value":…
-
0
votes1
answer74
viewsA: Problem with angular selection
(function(angular) { var app = angular.module('staticSelect', []); app.controller('ExampleController', ['$scope', function($scope) { …
-
4
votes1
answer344
viewsA: How to return the value of a select to an ng-repeat at the angle
A very simple example would be to make a range of the numbers creating a filter for that purpose and in accordance with the choices made by select, change a variable of $scope to load the div,…
-
1
votes1
answer880
viewsA: Treeview with checkbox and Angularjs?
Using the library Angular IVH Treeview var app = angular.module('app', ['ivh.treeview']); app.config(function(ivhTreeviewOptionsProvider) { ivhTreeviewOptionsProvider.set({ twistieCollapsedTpl:…
-
3
votes2
answers2149
viewsA: include with parameter?
There is no include with Paramento, but, I could notice in his question that it is easy this, a example to illustrate: Create the file that will be including in the other: File name: _id.php…
-
0
votes1
answer319
viewsA: Filling arrays using a recursive function?
Just take the generated values and insert in a array in the case a variable was created $ret of the kind array and the generated values added to that array and at the end of that function, gives a…
-
3
votes1
answer37
viewsA: C# helps error with sqlite
Your SQL is wrong, example: UPDATE PESSOAS SET NOME = @NOME, ADDRESS = @ADDRESS WHERE ID = @CODIGO Reference SQL UPDATE Statement…
-
2
votes1
answer1565
viewsA: Laravel/Eloquent: How to create a primary key composed of two foreign keys?
The key in yellow in the phpmyadmin means primary key of your table, the key in gray means a index, example: to know if the relationships were created correctly and to know if it was really created…
-
1
votes1
answer127
viewsA: How do I resolve the error: Method getClientOrinalExtension does not exist, no upload de imagem com o Laravel 5.4?
In the error message itself already discovers the problem: Method getClientOrinalExtension does not exist. there really is no such method, because your name is wrong, the correct is:…
-
1
votes2
answers1666
viewsA: How to turn array into string with php
Is a array which has positions and within each position another array, example $dezenas = array("2", "4", "5", "6", "7", "9", "10", "12", "15", "16", "18", "20", "21", "22", "23", "24", "25");…
-
0
votes1
answer276
viewsA: Relation Many to Many with id type UUID Laravel 5.4 Eloquent ORM
There really is no such thing: ForcaVendas\Models\belongsToMany() at least in the package of eloquent just put this->belongsToMany and check the settings if they are correct, example: Model…
-
1
votes1
answer85
viewsA: Recover Data from Json Return
In that array in particular, there is a key 1 This must be your doubt, so follow the example down below: <?php $array = array( "message" => 'ssssssss', "report" => array( array( 1 =>…
-
1
votes2
answers263
viewsA: How to select the whole object, Lambda C#
If your relationship is 1 to 1 amid Printers and PrinterCounter do so: Classes: public class Printer { public int PrinterId { get; set; } public string Name { get; set; } public virtual…
-
2
votes2
answers1429
viewsA: Laravel 5.4: List information from 4 tables related to the WITH clause
To illustrate, I will create a minimum example only with the relationship that needs to navigate between entities, note: <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class…
-
5
votes2
answers117
viewsA: Streamwriter class
Use the second parameter setting to do this and remove, then, Filestream, example: using (var streamWriter = new StreamWriter(@"C:\Temp\funcionarios.txt", true)) { } or add Filemode.Append in the…