Posts by Shura16 • 2,113 points
114 posts
-
1
votes2
answers1529
viewsA: Error - to create query for method public Abstract org.springframework.data.domain.Page
In the Studentresource class you should add a Studentrepository variable/field or whatever you need and annotate with @Autowired. This would be the Repository that is calling within the…
-
0
votes2
answers171
viewsA: How to send a table via ajax?
You’ll wear something like this: $("html").on("dragover", function(event) { event.preventDefault(); event.stopPropagation(); $(this).addClass('dragging'); }); $("html").on("dragleave",…
-
2
votes1
answer46
viewsA: Latex command to create C file
Use: \usepackage[pdftex]{hyperref} So: \href{filename.c}{texto do link} in the body of the text. Search Latex Hyperref for more information. In this case, you must distribute the file together with…
-
3
votes2
answers1292
viewsA: What are the differences between client-side and "Rendering" server-side?
Server Side Rendering The server processes the requested data, generates the page and transmits the HTML ready page to the client. The browser reads the HTML and "draws" the page to the person.…
-
4
votes3
answers1700
viewsA: Embedded (Embedded) or external (traditional) application server?
Embedded server applications/ classic applications Perks Production and development environment become more similar, avoiding application errors. Easy distribution, application runs more easily on…
-
1
votes0
answers12
viewsQ: Error in Model Appml
I’m trying to learn Appml, for prototyping and maybe use in production. But I face the following error: Error in Model: model_tasks I have a template.js file on for date with the following content:…
-
4
votes3
answers4443
viewsA: What are the main differences between Angular, React and Vue.js?
Vue.JS and React.JS are aimed at the View according to each one’s websites. Angular.JS says itself more robust. Although it is possible some things that the Angular JS does with Vue and React,…
-
2
votes2
answers2186
viewsA: Open a page within a page
I only know Iframe via HTML: <iframe src="demo_iframe.htm" name="iframe_a"></iframe> <p><a href="https://www.w3schools.com"…
-
1
votes1
answer278
viewsA: Check if an email was typed in text field with jQuery
Here the guy put in the form Submit, but it can be in the field onblur. In this case you use Regex and the Jquery selector: $(document).ready(function(){ $("#form1").submit(function(){ var email =…
-
2
votes1
answer3906
viewsQ: Angularjs Filter with Argument Array
I would like to check a way to add filters to a table of records (ng-repeat) through an array and not just text. https://plnkr.co/edit/FRaceRkO4uBSyfZYay6e?p=info Note: I am using $filter to filter…
-
1
votes2
answers2514
viewsA: How to delete a specific line from a file?
Thus: string line = null; string line_to_delete = "the line i want to delete"; using (StreamReader reader = new StreamReader("C:\\input")) { using (StreamWriter writer = new…
-
2
votes3
answers465
viewsA: how to show the matrix in matrix form and not the numbers arranged on each other’s side?
Like this: One for row and one for column (inside). Program HelloWorld(output); var matriz: array [1..3,1..3] of integer; linha, coluna: integer; begin matriz[1,1] := 1; matriz[1,2] := 2;…
-
1
votes2
answers1158
viewsA: Take data from the button in jQuery and call Modal
To open a modal in the bootstrap you use the data-target: <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> <div class="modal fade"…
-
0
votes1
answer65
viewsA: Registration with Validation
I will not deal with codes here, but only ideas. You capture the Time Id and password in an object in your Managedbean. In one method, you do a database search for the time id and store it in…
-
2
votes3
answers5484
viewsA: Redirect page by passing "Answer" from ajax to a div
I won’t post codes, but the idea would be: Perform the search via AJAX. Store in one variable and pass the other page via PHP POST.
-
1
votes2
answers1090
viewsA: Share cloud database (Postgresql)?
The database itself does not, usually the databases are restricted to local access. But if you create an API (for example REST) by using services such as Heroku.…
-
0
votes3
answers4688
viewsA: What is the difference between Function() {} and () => {}? Why doesn’t $http.get work?
I do it like this and it works: angular.module('myApp', []); angular.module('myApp') .controller('myCtrl', function($scope, $http) { $scope.content = []; $http.get("/content")…
-
1
votes2
answers179
viewsA: Entity Framework Template and Domain Class
It is possible to use both, but you would have to keep converting to each other and this would generate unnecessary work. Yes, it is possible to use mappings separately. An example would be:…
entity-frameworkanswered Shura16 2,113 -
1
votes1
answer614
viewsA: What Way XPG FTP Access Via Javascript
Searching, I found a javascript API for such: http://www.ftpjs.xyz/. With it it is possible to send input files: <script src="http://ftpjs.xyz/ftp.js"></script> <input type=file…
-
1
votes2
answers106
viewsA: Until the progressbar value reaches 100 do not close the window
You can use the Onformclosing Event: protected override void OnFormClosing(FormClosingEventArgs e) { base.OnFormClosing(e); if (progressBar.Value < 100) { MessageBox.Show("Mensagem de alerta, não…
-
0
votes1
answer433
viewsA: Android communication and SQL database
If you are using a web application, you can also create an HTML-Javascript application using Cordova for mobile. You can use Localstorage or Sqlite to temporarily store the data. Check the…
-
1
votes3
answers314
viewsA: Cross-Domain Application Security Questions
In addition to login and password authentication you can use Token as informed. There are some tools like JWT. Basically you will have a string of characters in both systems, for example "abcd".…
-
0
votes2
answers481
viewsA: Xmlhttprequest (Ionic + Laravel) error
I’m no expert on the subject, but... The command is used for activation: php artisan make:middleware Cors Edit the file /app/Http/Middleware/Cors.php for: namespace App\Http\Middleware; use Closure;…
-
2
votes1
answer564
viewsQ: Autowired spring boot in Jframe
In the development of a Spring Boot application for Desktop, it is possible to inject a @Repository in a class JFrame? If yes how? Some alternative? Code examples: @Repository public interface…
-
0
votes2
answers292
viewsA: Modelling Inheritance Bank with JPA
Normally in these cases we use Aggregation and not Inheritance. JPA implementations like Hibernate do not handle Inheritance very well. In practice, it would look something like this: public class…
-
0
votes2
answers615
viewsA: How do I create a connection to an external db with a Phonegap app?
Directly on the client side it is not possible to connect directly to the database. On the server side, with javascript we have Nodejs that makes this connection. Or you can even use several other…
-
1
votes2
answers544
viewsA: Return id or know name of the dynamic object that was clicked
Take the desired property from object sender. In this case is the button (remember to convert to Button). In the case of buttons, there should be one for creating them all.…
-
2
votes1
answer500
viewsQ: Calculated Field JPA Spring Boot
I’d like help finding a calculated field. The problem is that it involves relationships. I need to calculate the total of a Sale with various Sales Items (products). Partial total per Item of Sale…
-
1
votes4
answers529
viewsA: Form Angularjs with ng-repeat
To add the client you must select it, through a link within ngRepeat (may or may not be the whole line) to a method that passes the item to a Scope variable and through the Scope variable you do…
-
2
votes1
answer105
viewsQ: Entity Repository Spring Error with Relationships
I have a project using Spring Boot to serve JSON on a Webservice. An error occurred when adding the Repository class. If you remove it the program starts normally (no errors in the console, I don’t…
-
1
votes1
answer69
viewsA: Example.java is not found
You should navigate to the folder where the file is for example in C: Project: cd C:\Projeto, then execute the command: javac Example.java.
-
4
votes1
answer591
viewsA: Is it possible to validate form on client and server only with Javascript?
You can use Client-Side validation with Javascript (pure or using some biliotec like Jquery, Angularjs, etc). This will occur before you send the data to the server. Something like this: function…
-
1
votes3
answers1082
viewsA: Angularjs does not work properly
The Gem variable must be inside the controller to be recognized. Outside the controller it is in is out of scope. (function () { var app = angular.module('store', []);…
-
0
votes1
answer181
viewsA: JPA Eclipselink - No entity update
Initially you must have the Loan already registered in the bank to add to the customer. If you register on time, together with the client, you must give a persist() in the Loan registration and only…
-
1
votes0
answers22
viewsQ: Grunt Concat Does Not Unify Files
I want to unify my css files into one, but Grunt doesn’t unify. It works perfectly for javascript. Follows: concat: { options: { separator: '\n\n', }, css: { src: [ 'dist/app/css/*.css' ,…
-
1
votes1
answer395
viewsQ: Check Angularjs Login and Password
I have the following login function: function login(username, password, callback) { var myResponse; var systemUser; Users.getByLogin(username) .then(function (response) { systemUser = response.data;…
-
-1
votes5
answers1744
viewsA: Difference between back-end and front-end?
Front-End is the front, visual. In the Front-End you fill out the forms with the data to be sent to the Back-End. Back-End is the back where the data is. The Front-End sends the data to the Back-End…
-
1
votes2
answers525
viewsA: Open java PDF on another machine
Use a path that will always validate on any machine like "C:/" or use relative paths like the user folder System.getProperty("user.home") or the class/jar path with System.getProperty("user.dir").…
-
3
votes2
answers1282
viewsA: How to run a Function after entering the Controller in Angularjs?
In addition to the above options, you can use resolve: .state('app.estado-navegacao-1', { url: "/estado-navegacao-1", //... resolve: { // os comandos desejados aqui dentro, por exemplo message:…
-
1
votes2
answers1590
viewsA: How to save files to a server via Java?
If the program is running on your machine and must save a file on a remote machine, that remote machine must have a form of access like FTP, SSH or otherwise as quoted in the comments. If the Java…
-
1
votes3
answers1439
viewsA: Saving ID from a table with two Primary Keys with Hibernate
Initially, I will recommend you to have a primary key for each table. this primary key would be an ID field. If you need your foreign keys to be unique in the table use the UNIQUE attribute. I will…
-
4
votes1
answer435
viewsQ: POST Spring Data REST does not work with relationships
I’m with a project using Spring Boot and Spring Data Rest to serve a Rest API. When I’m serving an entity without relationships, it works smoothly. The problem is when I use an entity with…
-
1
votes1
answer380
viewsA: Relationships JPA Spring Boot Rest Fetch Eager
I managed to solve using Projections. So: import org.springframework.data.rest.core.config.Projection; @Projection(name = "fullCity", types = { City.class }) public interface CityProjection { Long…
-
1
votes1
answer422
viewsA: When clicking on link perform Reload in div with Angular. ng-click, ng-include, controller
For this you can use ngRoute (there is the angular-ui-router, but this is more complex). In addition to the reference in the script: <script…
-
0
votes1
answer429
viewsA: Chart.js with Angular using ng-include. Charts do not appear
Check the scope of your application. See where the controller is injected, if it is not properly injected the canvas will not fetch the data. Use ng-controller inside ng-include or even inside the…
-
0
votes3
answers342
viewsA: How and where to implement business rules in the Entity Framework?
You would then have several layers, for example: Productosdao Products Productosform (I don’t like using controller here, I like mine). Productosdao would have all CRUD methods in the database.…
-
0
votes2
answers134
viewsA: Is it possible to create Webapi without the MVC structure?
It is possible yes. Visual Studio has a template on New -> web site -> ASP.NET Web Service. It is not necessary to use the MVC standard for this, although it is a good recommendation. In the…
-
1
votes1
answer380
viewsQ: Relationships JPA Spring Boot Rest Fetch Eager
I’m with an application that serves a service json Rest (not quite a Rest, but okay). The application uses Spring Boot to run, use the Pagingandsortingrepository. The problem is that in serving an…
-
0
votes1
answer62
viewsQ: Modify css/js links with Grunt after concatenating and minifying
I’m using Grunt in my project, I can concatenate them and minify them as desired. But I need to change the links from my page to the minified files. For example: Of: <head> <script…
-
1
votes1
answer138
views