Posts by LeandroLuk • 4,989 points
276 posts
-
4
votes1
answer756
viewsQ: Remove "public" directory from Laravel 5 by IIS web.config
I have an IIS server where a site built in Laravel 5.3 will be hosted and I need to remove the public folder from the url. NOTE: I am aware that if I enter the IIS manager and change the destination…
-
1
votes2
answers53
viewsQ: How to prevent loading a Javascript library more than once
Hello, I have a question regarding the loading of a Javascript library. I am to build an application that builds components with reuse practicality, and for that the structure of each component…
-
0
votes1
answer157
viewsQ: Using Multiple Schemas with Entity Framework 6
I am starting to work with the Entity Framework, and I need some example of how I can define for my tables the Schema’s that each one is contained. My database was created as in the example:…
-
0
votes1
answer50
viewsQ: Print the absolute url in an Aspnetcore view
I’m starting to work with Aspnetcore, and I’m having a hard time printing the absolute url of my project. I come from PHP and look for something similar to the code below, written in PHP: <?php…
asp.net-coreasked LeandroLuk 4,989 -
1
votes3
answers7867
viewsA: Instantiate a Python class using an object as argument
My solution, after some headaches was to define all the attributes I could have within this class directly in the method __init__. What I realized was that, unlike Java, Python does not depend on a…
-
0
votes2
answers205
viewsQ: Restrict __setattr__ when the attribute does not exist within the Python instance
Hello, I need to know how to assemble a class that cannot have attributes implemented after the instance. Ex: class Foo(object) def __init__(self, a='hello', b='world') self.a = a self.b = b…
-
1
votes3
answers7867
viewsQ: Instantiate a Python class using an object as argument
I am starting to work with Python and saw that there is no way to create multiple constructors in the same class. With that I thought I’d move on to the constructor __init__ an object containing…
-
1
votes1
answer602
viewsQ: Exchange accented characters for accented characters
There’s some kind of method of me making a replace in characters based on CASE? I’m looking for something like this: UPDATE foo SET bar = SUBSTRING(bar, "Ã","ã"); -- se o caracter for LOWER -> ã…
-
1
votes1
answer1133
viewsQ: Setting a middleware for a controller, except a function in Laravel 5
I’m starting to work now with Laravel and realized that setting the routes directly to the controls where I can set the type of HTTP request is more feasible for my application. Today I have…
-
0
votes1
answer450
viewsQ: Force angled to reanalize ngClass when screen width changes
I’m building an application where I rely on ngClass to change the class of elements. The problem is that I’m not able to do with ngClass interpret a change in screen width (concept of…
angularjsasked LeandroLuk 4,989 -
1
votes1
answer44
viewsQ: Convert treat null variable using the length property in Javascript
I’m creating an app where I have a question. In this application there may be at some point a variable where its value should be an empty string ("") but, as I am obliged to work with another team…
javascriptasked LeandroLuk 4,989 -
1
votes1
answer155
viewsQ: Ignore error validation in Netbeans file directory
I am creating an Laravel application and I like to use Netbeans for it. The problem is that Laravel has a number of libraries that it implements itself and that use testing resources that make my…
-
4
votes2
answers2008
viewsQ: Save multiple instances of a class to a List in Java
I have a college job that I need to create several instances of an object Pessoa and save these instances in a listing to show the user when needed (this will work as a database). Since we haven’t…
-
1
votes1
answer186
viewsQ: Problem styling a placeholder based on a CSS class
I’m trying to make sure I can have several types of placeholder based on a class defined like this: .red, .red::-webkit-input-placeholder, .red:-moz-placeholder, .red::-moz-placeholder,…
-
3
votes3
answers1140
viewsQ: Methods with the same name but with a number of different parameters
In C# or Java in a class I can define methods with the same name but with different variables, like this: //em C# public class Classe { public String teste(String hello, String world){ return hello…
-
2
votes1
answer99
viewsQ: Creating libraries with multiple runs like Jquery
I am now starting to develop my own Javascript libraries. I already understand a little how the prototype but I still don’t understand how I can perform in the same request more of a method just…
-
1
votes1
answer155
viewsQ: Function to return levels of an object in Javascript
I am creating an app with Angularjs where I need to do a "mapping" of the system folder structure, so when it is necessary to make some change in the structure I just change this file and not the…
-
1
votes1
answer98
viewsQ: Manipulating multiple-level object parameters in Javascript
I’m creating a service inside an angular application where I use a Value to generate a kind of session. thinking of the scenario: angular.module("app.values", []) .value("a", { b : { c : { d: "joao"…
javascriptasked LeandroLuk 4,989 -
0
votes0
answers341
viewsQ: import a variable from a _partial.scss file and use it within SASS method
I’m starting to work with SASS and I’m having problems with the partial file structure. By my understanding, I did something like this: _Colors.scss $red: red; $blue: blue _Buttons.scss @import…
sassasked LeandroLuk 4,989 -
2
votes1
answer236
viewsQ: Set specific ports for each database in Sqlserver
Here at the company, we have a dedicated server hosted in a datacenter that maintains numerous databases using Sqlserver. These databases by default are working from port 1433 where it is already…
sql-serverasked LeandroLuk 4,989 -
0
votes0
answers178
viewsQ: Angular bind in directive to run after "change" event
I am working with a framework that uses Jquery to make your animations, and for data processing I use Angularjs. So I can update my $Scope, I created a directive that will give a bind to the element…
-
1
votes2
answers193
viewsQ: Function for handling all date type parameters in a Multilevel object with Javascript
I need to create a function that works over all parameters of a JSON object to search for data fields and manipulate them. Basically the object I can receive is something like: { idPedido:1,…
javascriptasked LeandroLuk 4,989 -
1
votes1
answer117
viewsQ: Define multiple styles for a Usercontrol via Staticresource’s in WPF
I’m starting to work with WPF because of its resemblance to HTML. I realized through my research that when I use an expression like this Style="{StaticResource MeuStyle}" looks a lot like a class…
-
6
votes1
answer12988
viewsQ: Get the $index of an ng-repeat that contains an ng-controller in $Scope in Angularjs
I have an app that uses a ng-repeat to list information. Like this: HTML <div ng-controller="listaCtrl"> <div ng-repeat="item in lista" ng-controller="itemCtrl">…
-
1
votes2
answers6143
viewsQ: Display float field in currency format using Filters in Angularjs
I am working with Angularjs and to show the user a field using a comma, I am unfortunately obliged to do a replace at the point. I wonder if there are any filter or directive to solve my case. In my…
-
0
votes2
answers97
viewsA: Display a DIV when you see that it has a background color
CSS allows you to apply a style when a specific class exists, so it would be possible to display it. So: body{margin:0;padding:0;} section{ width:100%; display:flex; justify-content:space-around;…
-
1
votes2
answers1101
viewsA: getJSON Ajax for JSON with multiple objects
The way you work will not change, what you should pay attention to is the treatment that will be done on each part of the JSON that returns. See: $.getJSON(dados, function(json) { //para cada…
-
2
votes1
answer1108
viewsA: CSS selector to modify TAG before or after inside the div
As Felipe Assunção reported, there is no method to modify a property in a parentElement from the childElement still, this will only be present in CSS4... you can do this with both jQuery and pure…
-
-1
votes3
answers604
viewsA: Working with tags in Mysql
First of all I believe that the way you are working is not functional because logically you do not use a reference as the user state in a tag. For better treatment use a new column so it makes it…
-
2
votes1
answer62
viewsA: Doubt SQL query
Just to supplement and close your question I am reinserting your answer here: Solution SELECT COUNT(*) as total_de_likes, likes_anuncios.* FROM likes_anuncios GROUP BY anuncio_id ORDER BY…
-
0
votes2
answers1059
viewsA: Position of DIV relative to another with dynamic content
I believe that if you used the flexbox it would be better in that case, it would look something like: HTML <div class="main"> <div class="content">content</div> <div…
-
2
votes3
answers1026
viewsA: How to make an element with position Fixed stop "cutting" its contents when resizing?
What you are missing is the structure of the tags you are using and also the tag is missing overflow-x:auto to be stated in your content. I took your example and corrected it, see how it turned out…
-
2
votes3
answers2208
viewsA: Aligns navbar bootstrap text vertically
For the site you went through, I think it would be interesting to review the structure of your header because the bootstrap framework was not made to keep 2 navbar inside each other. From what I saw…
cssanswered LeandroLuk 4,989 -
9
votes1
answer1886
viewsA: SQL: How to Count Values in Different Columns
To make this select you need first you will have to merge the two columns. You can use the command UNION ALL summing the results (as well as duplicates) by 2 or more. After that, you need to count…
-
7
votes1
answer2234
viewsQ: Manipulating an open window from the parent window with Javascript
I’m thinking of using the native resource window.open() to create a small web system that is similar to desktop systems (made with windows Forms). My problem is in relation to communication and…
-
1
votes6
answers22035
viewsA: Compute the rest of a decimal division in Javascript
My solution was to do the treatment of each set of double characters, and after that adding them up. so: var restoDivisao = parseInt(total % parcelas) + (((total * 100) % parcelas) / 100); EDIT: The…
-
3
votes6
answers22035
viewsQ: Compute the rest of a decimal division in Javascript
I’m working with values (decimal(18,2)) a sale where the sum of the price of the products is to be converted into a number of parcels. So that I can divide the total of the products exactly for the…
-
2
votes2
answers355
viewsQ: Tokenmismatchexception after any ajax error on Laravel 5.1
I have been working with Laravel for a short time and am having a problem when using ajax requests. When my application returns any error and I try to send another request, Laravel sends me this…
-
2
votes1
answer788
viewsQ: Creating and using Libraries in Laravel 5.1
I am new to Laravel 5.1 (I come from Codeigniter) and I have my own libraries that I would like to implement in it. In Codeigniter, we have the folder libraries where I can play all my libraries…
-
1
votes1
answer511
viewsQ: Set name for a Foreign Key created from a Migration in Laravel
I am building an application using Laravel 5.1 and in my ER Diagram it is very deep and detailed (even with index nomenclature). I need to know how to create a Foreign Key using the Migration…
laravelasked LeandroLuk 4,989 -
1
votes3
answers480
viewsQ: How to load an ng-controller through ajax and inject it into the DOM
I am creating an application where I would like to load my modules through ajax. This application uses Angularjs to do the treatment of each module and these are injected into my DOM using Jquery,…
-
1
votes2
answers516
viewsA: How to return a part of a string (an html element) in php?
Come on, guys, I got my problem solved. Below is the script that takes the page that shows the availability of the electronic invoice sending webservices and transforms the content into a json.…
-
3
votes2
answers516
viewsQ: How to return a part of a string (an html element) in php?
I am making a "technical resource" to be able to return the status of the SEFAZ servers of issuing tax notes using PHP. For this, I have until now the code below: function get_content($URL){ $ch =…
-
6
votes2
answers982
viewsQ: Calling function from its name in a PHP class
I am creating an application where I need to call the function based on its name within the class. the intention to use this way is that I can call these functions through ajax and the server will…
-
4
votes3
answers3833
viewsA: Return in hours the difference between two dates in JAVASCRIPT
People to solve my problem, I ended up creating a function like this: function timeDiff(d1, d2) { var d1 = new Date(d1).getTime(); var d2 = d2 || new Date().getTime(); var df = Math.abs(d1 - d2);…
javascriptanswered LeandroLuk 4,989 -
4
votes3
answers3833
viewsQ: Return in hours the difference between two dates in JAVASCRIPT
I just saw this question here in Stack Overflow which shows how to solve my problem but in PHP. I would like to know how to calculate the difference between 2 dates and show this in hours. ex: var…
javascriptasked LeandroLuk 4,989 -
0
votes1
answer102
viewsQ: Calling function in a controller from a parameter sent by the user in PHP
I am building an application that from the information the user sends me on a GET I will run a function. EX: //classe class Page extends CI_Controller { public class index($param){ //aqui estou…
phpasked LeandroLuk 4,989 -
3
votes2
answers880
viewsQ: Run command for each file in a directory in MS-DOS
I’m making a small bat to break a branch over an application I’m mounting, where it should run sql scripts within the Mysql database. The problem is that I have to edit this bat every time I insert…
ms-ofasked LeandroLuk 4,989 -
1
votes0
answers74
viewsQ: Manipulating views within an abstract route in Angularjs
I am creating an application that uses as backend o Code Igniter and for the frontend I intend to use the Angularjs. My problem is that I am not able to understand how I will insert new modules…
-
0
votes2
answers6305
viewsA: How to insert an image using Laravel Blade 5.1
Thanks @gmsantos but as amazing as it sounds Alavel didn’t accept that I use the tag public_path and for Laravel 5.1 it worked perfectly as a simple reference so: <img src="{!!…