Posts by LeandroLuk • 4,989 points
276 posts
-
-2
votes2
answers83
viewsA: How do SQL sort and randomize at the same time?
Hello what you have to do is separate this into 2 queries, generate a single random element and then use this element to do the order by but without selecting it. Thus: CREATE TABLE Foo ( id BIGINT…
sqlanswered LeandroLuk 4,989 -
2
votes1
answer55
viewsQ: Use the values of the anonymous object within the constructor when instantiating the class in VB.NET
Hello, I am creating a solution to generate the Fiscal SPED files where I make all the validation rules of each class soon in the construction of the same. This is necessary because for each Field,…
vb.netasked LeandroLuk 4,989 -
0
votes2
answers641
viewsA: List and sum selected items
Good first of all, it would be interesting for you to define if you are using any Javascript framework for this type of question so that we can answer you properly. As not defined I believe you are…
-
0
votes1
answer824
viewsA: How to create a CONSTRAINT CHECK in Sqlserver to validate versions with Regex
I found the solution right after posting (rsrs), here it is: CREATE TABLE Versao ( id INT NOT NULL IDENTITY(1,1), codigo NVARCHAR(100) NOT NULL, -- CONSTRAINT [PK_Versao] PRIMARY KEY (id),…
-
0
votes1
answer824
viewsQ: How to create a CONSTRAINT CHECK in Sqlserver to validate versions with Regex
Hello I am creating a table in Sqlserver where I want to validate a field to only accept the correct version mask, like this: CREATE TABLE Versao ( id INT NOT NULL IDENTITY(1,1), codigo…
-
0
votes1
answer694
viewsA: Is it possible to consume data from a webservice within a Sqlserver directly?
I found the solution at that link. Sqlserver (mine in version 2016) has the feature to consume data from a webservice and based on it to capture the data. The end result of my job was this way: IF…
-
1
votes1
answer694
viewsQ: Is it possible to consume data from a webservice within a Sqlserver directly?
I have to migrate from one Mysql database to another in Sqlserver. In this migration, I have the following problem: not all address records are complete but I have the zip code of most of them. My…
-
0
votes1
answer196
viewsQ: How to Overload a constructor and also call the base class constructor in C#?
I am creating a C# error that should extend the class Exception but, should also add an extra property, thus: public class CampoVazioErro: Exception { public string campo { get; } public…
-
1
votes1
answer166
viewsQ: Error creating an animation between routes using Angular 5
I’m making an application that uses the most current structure of Angular (v5). I had already made the implementation of BrowserAnimationsModule in previous versions and I had no problems but…
angularasked LeandroLuk 4,989 -
2
votes2
answers130
viewsQ: The Binding inside a Compositecollection does not work
I am using a Combobox in a WPF application and when a function is activated, it loads a List<string> coming from a webservice to a property on the screen. My problem is that I can’t get…
-
-1
votes1
answer183
viewsQ: How to do a while without locking the application in Java
I’m building an application in college that I need to run a code for 2 minutes and minute to minute to do an evaluation of the system and the variables that are in it. I’ve looked on the Internet,…
-
0
votes1
answer66
viewsQ: How to play the "overflow: Hidden" effect of CSS in WPF?
Hello, I’m new to Windows Presentation Forms (WPF) and need to know how to make the effect of "overflow: Hidden" that we have in CSS. I have the following code snippet: <Border…
wpfasked LeandroLuk 4,989 -
1
votes2
answers141
viewsQ: How to make a multiple variable definition in VB.net
Hello, normally I program on the web I am venturing into VB.net (by free and spontaneous pressure...) and both in Typescript and Javascript and even in PHP, I have the habit of making a multiple…
vb.netasked LeandroLuk 4,989 -
-1
votes2
answers1299
viewsQ: How to format a Double by swapping a semicolon and keeping 2 decimal places in VB.NET
I need to transform the result of a value of As Double for the Brazilian numerical standard that uses comma instead of dot (and also maintain only 2 decimal places), thus: ' variaveis de teste '…
-
-3
votes1
answer138
viewsQ: How to loop ("FOR" or "WHILE" or "DO WHILE") in a row in VB.NET?
How can I make a loop of a line using VB.NET? In other languages I can do it without any problem as in the examples below: I have set as an example only for the for but in all languages as much…
vb.netasked LeandroLuk 4,989 -
0
votes1
answer99
viewsQ: How to get all public properties of a class in the order that were declared in VB.NET
I am creating a library to validate the Fiscal SPED in VB.NET and to streamline the process of creating lines, each class already has its pre-defined attributes and in the order according to the…
-
1
votes1
answer122
viewsQ: How to instantiate a part of a class with Entityframework working with CRUD only on these data
I am creating a solution for the web in the Singlepageaplication (SPA) type made with Aspnetcore and I use the Entity Framework to make my CRUD in the SQL Server database. I am sure that the Entity…
-
1
votes0
answers15
viewsQ: How to popular an array of an object based on its Index using Rethinkdb
Hello, I’m starting to "understand" how Rethinkdb works and I’m seeing that it is for sure the Nosql database that comes closest to the logic of an SQL database without losing the optimization and…
nosqlasked LeandroLuk 4,989 -
1
votes1
answer389
viewsA: How to perform a crud with firebase?
Hello, first of all, you should forget the logic of working in SQL databases and go on to interpret the instances of the classes in which it works directly, this is the logic of nonrelational…
firebaseanswered LeandroLuk 4,989 -
0
votes1
answer198
viewsQ: Use variables external to Route do Laravel 5 to send to view
Hi, I’m working with Laravel, and in my Routes file, I would like to leave created a variable that I want to use in all routes, like this: /Routes/web.php $foo = "ola mundo"; Route::get('/',…
-
0
votes2
answers1474
viewsA: Redirect a route from a "childModule" to another "childModule" with Angular 2 ( 4.0)
Since there was no kind of response and I also did not find a plausible solution on the internet, my solution was to create a service that is related to the AppComponent and listening to a custom…
-
0
votes1
answer108
viewsA: Parallelism with Angular 2
I believe that the best way to do this structure is to send these records in smaller quantities, since when you force the execution of this insertion of 30,000, you allocate all this content in…
-
0
votes2
answers1474
viewsQ: Redirect a route from a "childModule" to another "childModule" with Angular 2 ( 4.0)
Hello, I’m working with Angular where I have a structure like this: |-app |-fooModule (fooPage1, fooPage2) |-barModule (barPage1, barPage2) These two modules are being loaded using lazyLoad in the…
-
0
votes1
answer934
viewsA: How to send a post to an Aspnetcore API without converting the data using Json.Stringify
Just as Thiago Silva said, I really needed to create a class with the methods that would be appropriate to be able to relate the content that will be posted. As I came from Javascript where we can…
asp.net-coreanswered LeandroLuk 4,989 -
0
votes1
answer156
viewsA: Creating multiple error paths in Angular 2
I found the solution when I decided to read more deeply the Angular 2 documentation itself (here): [...] The order of the Routes in the Configuration Matters and this is by design. The router uses a…
angularanswered LeandroLuk 4,989 -
0
votes1
answer156
viewsQ: Creating multiple error paths in Angular 2
Hello, I’m working with Angular 2(v4+), where my application has the following structure containing 2 modules that are dynamically loaded (via loadChildren): Directory structure app |-foo | |-…
angularasked LeandroLuk 4,989 -
2
votes1
answer233
viewsQ: How to use the reference of a Barrel file in the same folder with Typescript
I’m having trouble referencing files that are in the same folder when working with a Barrel type file in my project is in Angular (version: 4.0.0). My problem is this, see the file and directory…
-
0
votes1
answer83
viewsQ: Change document after post-save middleware in Mongoose
I’m working with the Mongoose.js And I’m going to need, after I save the document to the database, to be able to change an attribute of that document. From what I understood in the Mongoose…
-
0
votes1
answer934
viewsQ: How to send a post to an Aspnetcore API without converting the data using Json.Stringify
Hello, I’m starting to work with ASPNET Core and there’s a problem in working logic that I can’t accept (I understand as a really dumb thought). Let’s go to the examples: NOTE: in all tests I am…
asp.net-coreasked LeandroLuk 4,989 -
2
votes0
answers437
viewsQ: How to handle errors in Mongoose optimally
I am starting to work with Mongodb + Mongoose and I am having problems dealing with the mistakes that Mongoose generates. One of the same is when there is a duplicate key for a parameter that should…
-
1
votes1
answer3148
viewsQ: How to use components exported from other modules at Angular 2
I’m starting to use Angular 2 and I’m having trouble accessing an existing component in a module I created. When opening the application, route root should be directed to the module IndexModule…
-
0
votes2
answers135
viewsQ: Return all constructor parameters of a function in Javascript
Imagine the following situation: I have several "classes" built from javascript functions where their properties are defined within the constructor. So: var Pessoa = function(data) { this.nome =…
-
1
votes1
answer193
viewsA: Setting default values for variable with Pug Template Engine
I have found some solutions that depend on the form of development in which it is being applied: Solution 1: Using a conditioner if else to check whether or not the element exists: html head title=…
-
1
votes1
answer193
viewsQ: Setting default values for variable with Pug Template Engine
I am starting to work with MEAN and use as template engine Pug. I know that the same was Jade before and that there were updates on how to work with the same. My problem is that, in Jade, and in…
-
1
votes0
answers139
viewsQ: Use the same Schema inside a daughter key with Mongoose
I’m working with Nodejs, Mongodb and Mongoose where I’m creating a system of access permissions that work with infinite sublevels. Permissions have the same Schema: //app/models/PermissaoModel.js…
-
3
votes1
answer102
viewsQ: Importing files without naming with Nodejs
I am creating a file structure in an application where each directory contains an "index" file. This index file takes the name of my directory to improve readability. Ex: foo |--foo.js // <-…
-
4
votes1
answer232
viewsQ: How to define a directive with Vue 2.0 that always does Binding as string
I’m starting now with Vue 2.0 and I’m creating directives so that I can manipulate the style of an element based on the content of that directive, so: Vue.directive('margin', function (el, binding)…
vue.jsasked LeandroLuk 4,989 -
1
votes3
answers670
viewsA: Apply style in child element according to parent element in SASS With declaration in child
I found the solution to my problem. SASS lets me declare a full expression within the class and after it I define the wildcard character of composite selector (&) like this: .foo {…
-
2
votes3
answers670
viewsQ: Apply style in child element according to parent element in SASS With declaration in child
Hello, I am building a SASS style structure that changes will depend on a class set in my body. This class dictates which browser the user is using, example: <body class="chrome"> <!--…
-
0
votes1
answer865
viewsQ: Access methods through a parent component in a child with Angular 1
Hello, I’m having a hard time getting information between 2 components working with Angular 1. This is my example: angular.module("parent",["child"]).component("parent",{ template : "<p>…
-
0
votes1
answer155
viewsQ: Set MONGO_URL in a Meteor project within the file Settings.json
I’m starting to work with the Meteor and I’m having a hard time with something that should be simple: changing the connection string with a mongodb itself. I’ve searched the internet, also for…
-
6
votes0
answers252
viewsQ: Creating a multi-level structure for components in Angularjs + ES6
I am creating a robust application using Angularjs on ES6 and I need to assemble a structure so that the logic of the application components is organized. Basically, my application works with…
-
2
votes2
answers117
viewsA: How to call different modals, without using database
Well there are numerous ways to do this as you want. Let’s go to the simplest that I could imagine at the moment: NOTE: understanding that you do not use any "database" as it says, like a txt file…
-
1
votes1
answer178
viewsQ: Changing the default mongodb database of a Meteor application
Hello, I’m starting to work with the Meteor and I am having difficulties to define where the database will be located along with the authenticated access user. Looking on the internet, I found some…
-
1
votes2
answers45
viewsA: Error in image gallery, return random button
I believe there is a simpler solution than that. if you create the elements that symbolize each slideshow item, (which is lighter after processing), you probably have a structure like this:…
-
1
votes0
answers87
viewsQ: Run a Migration by passing parameters on Laravel 5
I am creating a robust application where I will define which commands will be executed within a database according to the subdomain (which is also the name of the client’s database). How can I pass…
-
1
votes1
answer201
viewsA: How to use Artisan make:Migration in a subdirectory with Laravel 5
I found a solution directly in the documentation. I must use the method --path saying which directory will be saved to the Migrations. So: php artisan make:migration create_table_foo…
-
1
votes1
answer201
viewsQ: How to use Artisan make:Migration in a subdirectory with Laravel 5
I am starting to build an extremely robust application using Laravel 5 and need to organize all my table migration codes. My solution was to structure subfolders to facilitate the understanding and…
-
4
votes2
answers2530
viewsQ: How to remove all "/" occurrences from a string using Javascript
Hello, I’m having trouble applying a simple regex with Javascript. So: var str = "/Date(1421287200000-0200)/"; console.log(str.replace('/\//g','')); //não funciona, mesmo estando certo…
-
2
votes1
answer264
viewsQ: Convert C# Generated Date to ISO format in Javascript
Hello, I’m making a website where I use an API built in C#. My problem is that when I get a date from the server, it sends me in this format: [{ "dataLiberacao":"\/Date(928160400000-0300)\/",…