Posts by Tafarel Chicotti • 2,715 points
83 posts
-
0
votes1
answer38
viewsA: Typescript function, bring the user response to the screen after clicking
In your code, you are missing the interpolation of the variable in your answer. <li *ngFor="let sequencia of sequencia;"> <button (click)="loadSequencia(sequencia)" style="background-color:…
-
3
votes1
answer192
viewsA: Array mask
You are using id (#) of the field to insert the mask and this will make it as if it is only applied to the field that has that specific id. Instead, choose to use the mask in a class assigned to the…
-
0
votes1
answer909
viewsQ: How to use Emit and computed/watch
I am new to Vuejs and started to develop a project to study a spreadsheet launching hours and calculation of hours worked. I am using in the Laravel 5.5 project with Vuejs 2 and Momentjs to…
-
1
votes3
answers1872
viewsA: Error running Composer update while trying to install package scafold in Laravel 5.1
Try to change your composer.json in the following passage "require": { "php": ">=5.5.9", "laravel/framework": "5.1.*", "bestmomo/scafold": "dev-master" // estava como 0.0.1 }, and then update…
-
2
votes3
answers2556
viewsA: How to know how many objects were instantiated?
First of all you must understand that a Fábrica de Conexões is nothing more than a class that will perform the creation of the objects for you, so you can use the adopted strategy in almost 100% of…
-
1
votes1
answer213
viewsA: Get-Childitem -Recurse does not recursively return
Get-ChildItem -Path $source -Recurse -Filter * | Where-Object { -not $_.PSIsContainer } | ForEach-Object { # Get the current date $date = (Get-Date).ToString(); # Add to log file Add-Content -Path…
powershellanswered Tafarel Chicotti 2,715 -
1
votes1
answer213
viewsQ: Get-Childitem -Recurse does not recursively return
I am trying to create a powershell script to manipulate the files in a directory, but when using the parameter -Recurse I haven’t been getting the sub-folders items # onde $source = C:\Files # e…
powershellasked Tafarel Chicotti 2,715 -
3
votes3
answers1461
viewsA: Problems with PHP encoding in UTF-8
Make sure the file is converted to UTF-8 without BOM / UTF-8 sem BOM. Check that the Mysql database is as UTF_8. If both are correct, do the following with your pages in php header('Content-Type:…
-
6
votes3
answers3474
viewsA: Why is it sometimes necessary to setTimeout with a value of 0 (zero)?
This happens because you are performing many tasks. The browser has to do a lot of things, all at once and running javascript is just one of those things. Hence it is understood that it should be…
-
1
votes1
answer39
viewsA: abstract methods of the same signature
If both class and trait need the same method, the error is in designing the modeling, since the trait is a horizontal inheritance. You need to evaluate your model and define where it will stay and…
-
3
votes2
answers204
viewsA: get_called_class or new Static?
It is worth noting that the function get_called_class came into existence from the version 5.3 of PHP. In addition to the difference of performances as cited by Rafael class Foo { public static…
-
1
votes2
answers1165
viewsA: bring data from the database with Javascript
What you’re looking for is an ajax call. You need to send a request to the server and treat it in codeigniter to bring your data and then vc recovers the return from ajax and displays the content.…
-
0
votes2
answers292
viewsA: Cakephp: Paging with manual query
Here’s an example of code that might be useful to you if in other situations you can’t use the gildonei example. //Verifica a quantidade de itens a ser exibido na tela if…
-
0
votes1
answer203
viewsA: how to do . append() on the right card, according to the right array element
Nuno Gonçalves what you are trying to do is called CAROUSEL and there are several plugins who already do that. Below is an example using the plugin jCarousel jCarousel jquery: #jquery $(function() {…
-
0
votes1
answer569
viewsQ: How to free access to Public folder
Hello, I am trying to use htaccess to redirect a project, but I have encountered a problem regarding access to my Public folder, where my Assets are located. Below follows my .htaccess <IfModule…
-
2
votes2
answers167
viewsA: Problem with the magic method __call
I decided to do it this way: $objCriado->{'_'.$metodo}(); //FullObject public function __call($name, $arguments = null) { $realName = substr($name, 1); if(method_exists($this, $realName)) {…
-
7
votes2
answers167
viewsQ: Problem with the magic method __call
I’m trying to use the magic method __call and the function call_user_func_array to recover the method name to be able to upload a file. I am doing it as follows //Classe que importa os objetos $obj…
-
1
votes1
answer283
viewsA: SELECT in an XML Field
Here in the company they passed me the solution. It was necessary to define a namespace for the search. Then the query was like this: SELECT P.Id, P.DtNascimento, P.Xml_Detalhes, d.n.value('declare…
-
1
votes1
answer283
viewsQ: SELECT in an XML Field
I’m having trouble retrieving the value of an xml node from a field and need help... The structure of the table is: --Table Pessoa Id int Nome varchar(max) DtNascimento date Xml_Detalhes XML my xml…
-
1
votes1
answer177
viewsA: DISTINCT WITH UNION AND COUNT
In the SOEN (Link to the reply) solved my problem (I needed some modifications to meet me, but it was bullet. Using two CTE - Common Table Expression and OVER PARTITION BY WITH CTE_AGENDA AS (…
-
1
votes1
answer177
viewsQ: DISTINCT WITH UNION AND COUNT
I’m performing a query in the database to return 6 results from a table Agenda which has several schedules available per day (ex: 08:10:00:000 | 08:30:00:000) and for periods (ex: T (representing…
-
1
votes1
answer298
viewsA: Keep gridview data source in post-back
To ViewState would really be the first option to try, the second would be to try to work with the Session. Another recommended option would be for you to do the Cache and use it where necessary.…
-
3
votes1
answer34
viewsA: Difference between repeater_itemdatabound and repeater_itemcommand
There’s quite a difference, and understand why: Repeater_itemdatabound This event is associated with linking the data when rendering the page, that is, it occurs during the construction of the…
-
1
votes3
answers506
viewsA: Apply "datepicker" to element after angular call
@helderburato Try to do it this way: $(document).on('click','.datepicker',function() { $(this).datepicker(); } and see if it solves your problems :)
-
1
votes1
answer320
viewsA: Repeating infowindow on bookmarks
The problem is in the following section: google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infowindow.setContent('Tag n°:' + data[item].tag);…
-
0
votes1
answer320
viewsQ: Repeating infowindow on bookmarks
I am working with the Google Map API and after adding the infowindow on the markers, I noticed that they are repeating, but I could not solve. Can someone take a look at the code below and tell me…
-
2
votes4
answers671
viewsA: Can I use Repository to do the BLL part?
The Repository not only can you stay in BLL(Business Logic Layer), as it is his place, he will serve basically as the intermediary of your application for your DAL (Data Access Layer) where his DAO.…
-
0
votes3
answers335
viewsA: Repeater Onitemcommand event does not work
Change as follows your LinkButton that is to work <asp:LinkButton ID="lbExcluir" runat="server" CommandName="excluir" CommandArgument="<%# ((String)Container.DataItem) %>"…
-
0
votes1
answer92
viewsA: Kendo MVVM - Viewmodel inside Another
I found the solution. When to try to do Nested Binds, shall be followed in the following manner:. //.... <div id="nested" data-bind="source: ViewModel_Child1/> // Contexto referente ao filho 1…
-
1
votes2
answers722
viewsA: How to update a table by ID?
You have to in your file change_01.php make the database change via a command SQL update mysql_query("UPDATE sua_tabela SET campo_atualizado = ".$_POST["estado_campo"]." WHERE idsocial =…
-
9
votes3
answers2113
viewsA: Application that does not need to load full page
You should use something as follows In his controller you must define an action that will return what you need public class HomeController : Controller public ActionResult Index() { return View(); }…
-
5
votes3
answers216
viewsA: Is it wiser to use client-side validations in Rails?
Perform a validation on both sides. If client validation fails for some reason, you’ll still have it on the server to revalidate and make sure it’s okay. If the first validation passes, in theory,…
-
8
votes2
answers2568
viewsA: OWIN and Katana - How does it really work and how to use it?
In this post of Eduardo Pires in The Future of ASP.NET vNext - MVC 6 it explains in a very simple way. In short in his words you can understand in the following way: OWIN defines a standard…
-
0
votes3
answers1328
viewsA: Returns Json of object in C# with Entity Framework
You can take two steps to resolve this, one of them is to detach(detach) the context object, but this case is recommended when it is an object. db.Entry(entity).State = EntityState.Detached; In the…
-
5
votes2
answers267
viewsA: How to use cookies or other local storage in Flash?
You need to first create your object var myObj:SharedObject = SharedObject.getLocal("cookie"); Then assign the data myObj.data.firstName = "John"; myObj.data.lastName = "Doe"; And finally save the…
-
1
votes1
answer72
viewsA: Timeout Httpwebrequest Second time
Try to use your GetResponse within a block usign something like that: using (WebResponse response = rq.GetResponse()) { using (Stream responseStream = response.GetResponseStream()) { XmlTextReader…
-
1
votes2
answers329
viewsA: Change Href with jQuery
See if that’s what you want. function updateQueryStringParameter(uri, key, value) { var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); var separator = uri.indexOf('?') !== -1 ? "&"…
jqueryanswered Tafarel Chicotti 2,715 -
3
votes3
answers394
viewsA: How to fill an Object value automatically in php?
Adding the lost answer, you can still no fetchAll force to play inside your VO as follows: $arr = $stmt->fetchAll(PDO::FETCH_CLASS, "Pessoa"); Ref: PHP manual - FETCHALL…
-
3
votes1
answer952
viewsA: Adding Referenced DLL to a C#Executable
Before giving the batch of the application, go to its reference and do the following: Right click on it and go into properties, after that change the Copy Local for TRUE Make your batch and you will…
-
3
votes1
answer1353
viewsA: Validation jquery validate is not deleted when I close the modal bootstrap
You can do it this way: first Solution var validator = $("#myform").validate( ... ... ); $(".cancel").click(function() { validator.resetForm(); }); Answer found in SO-EN Second Solution…
-
12
votes5
answers2269
viewsA: Is Nosql as troublesome as it seems?
First of all just understand one thing, in any situation, at any time, at any point in human history, there has always been and will be people against and in favor of change. Many technologies that…
-
5
votes2
answers661
viewsA: Why does the month numbering of the Date object start at zero?
This is because all/Enum/counters/arrays by convention start at 0 So, as it turns out... understand that they continue to be 12 months, only q they will go from 0 to 11, January to December. If you…
-
2
votes1
answer169
viewsQ: Updater of a web application Asp.net mvc
I was here thinking of a framework for automatic updating of my web systems in clients, so I thought of using the ClickOnce with some gambetas(technical adaptations). It did not work, it works only…
-
2
votes1
answer297
viewsA: Redirect system with PHP
You can do something like in the example below: <?php var $campo = $_POST["campo"]; switch($campo) { case "teste1": header("Location: teste1.php"); // mais casos case "testeN": header("Location:…
phpanswered Tafarel Chicotti 2,715 -
0
votes1
answer92
viewsQ: Kendo MVVM - Viewmodel inside Another
Is it possible to bind one Viewmodel within another? If yes, how? I need to create a context more or less like this: <div data-bind="visible: ViewModel_1.isVisible" /> //.... <div…
-
1
votes1
answer1027
viewsA: How to return the value of an Entity Framework field c#
Using the Leave event, you search through the code, save in a variable the returned object and assign it to the controls. Sort of like this: private void txtCodigo_Leave(object sender,…
-
1
votes1
answer104
viewsA: Resources on app_globalresource
Luciano you can add the Resource path to your masterpage You can make your re-source público and then use it as follows @MyResources = Projeto.DiretorioDeResx.Resources.Strings…
-
1
votes1
answer208
viewsQ: Controller and View Structure
A help not to do something much more laborious than it can be right away. I have the following classes in my Model: public Pessoa { public int Id { get; set; } public int TipoPessoaId { get; set; }…
-
1
votes1
answer119
viewsQ: Recover Text and Value from Select with KENDO MVVM
I need the help of you, who have knowledge in KnockoutJS I have something like that: var viewModelPessoa = kendo.observable({ Contatos: [], FormContato: { TipoContato: -1, //Aqui vai o indice/value…
-
3
votes2
answers360
viewsA: Theoretical doubt - Interface, unique responsibility
This is correct, but you should also create the methods in the interface, not only the properties. public enum _CamerasFabricante { Canon=0, Nikon = 1, Sony = 2 }; public interface IFotografia { int…