Posts by user5020 • 1,027 points
48 posts
-
3
votes6
answers1694
viewsA: Why not use a Boolean parameter?
Because the code is not very inductive, for example, if someone is going to maintain their code today, how is this person going to know why that Boolean parameter is there ? if true or false what…
-
0
votes1
answer651
viewsQ: How to implement an authentication service in a SOA project
I am developing a project using SOA where I have a web application made in Angular 2 and several micro services in Spring Boot, among the services there are authentication and notification services…
-
4
votes1
answer213
viewsQ: Why is this call automatically inserted into the HTML body?
In an app I’m using the Javascript libraries: jQuery, Angular, Angular Material and Moment. Totaling I have the following calls in my file: <script src="vendor/jquery/jquery-3.1.1.js"…
-
1
votes1
answer1978
viewsQ: How to upload a Spring Boot project to a Glassfish or Tomcat server
I can run the application normally by the main class with 'Tomcat Embedded' as dependency. However, when trying to run the application on some server the Eclipse IDE itself informs that the…
-
0
votes0
answers81
viewsQ: How to download and display a file without being copied
whereas I have files in the formats .epub, .mobi and .pdf hosted on a server. Is there any way to download these files internally in an Android app, so that the downloaded files cannot be copied by…
-
0
votes1
answer145
viewsQ: Is there any risk in using Django’s Token generator in different services?
Assuming I’m already using the library django.contrib.auth.tokens.default_token_generator generating tokens to reset a user’s password, and want to use the same method to activate the user, or for…
-
5
votes1
answer821
viewsQ: How does Django create and verify tokens to reset password?
Considering a model to reset password already implemented by Django, in the following views: Django.contrib.auth.password_reset Django.contrib.auth.password_reset_done…
-
1
votes1
answer2304
viewsA: How to access a local server from an Android device
I found out what was happening, I was only able to access through the host "localhost:8000" or "127.0.0.1:8000" because the Django server was only accepting local access, since I was amazed only…
-
1
votes1
answer2304
viewsQ: How to access a local server from an Android device
I have a server in Django running on my computer "localhost:8000/posts", and I am creating an Android client to access it. Debugging my application on a real device, I tried to access by my Ipv4…
-
2
votes1
answer111
viewsQ: Why doesn’t Entitymanager have the createQuery method with typed return?
I am following the project of the book Spring-MVC of Casa Do Código, using the latest version of Hibernate, a 4.0.3. But in a moment, when the book indicated the creation of a typed query through…
-
1
votes1
answer122
viewsQ: Use of STI(Single Table Inheritance) on Rails
Assuming a project in Rails with the models Livestock, Agriculture, Piscicultura e Benfeitoria. These inherit the properties of a model called Activity and are considered types of activity. Models…
-
2
votes1
answer303
viewsQ: How to make an ajax request that returns an html text?
Assuming the link making the request is: <%= link_to 'New Classroom', new_classroom_path,class: :remote_link, remote: true %> And may the treatment of the return of the same be:…
-
0
votes1
answer883
viewsA: How to call a method with named parameters using a hash
I found the error, in case I passed a hash that possessed keys no symbols, the same problem was solved in this issue :…
-
-1
votes1
answer883
viewsQ: How to call a method with named parameters using a hash
I wonder if you have how to pass parameters to a parameter method named via hash. It has to pass the parameters that remain for another function as in the following example? params = {key:…
-
1
votes1
answer82
viewsQ: Adding features to a Model that depend on the Controller or View
I would like to add the following methods to my Models when presented in the View, for example, can_be_showed, can_be_edited, can_be_destroyed, among others, but in some cases these methods may…
-
1
votes2
answers80
viewsQ: How to manually delegate an object to Ruby
To better understand the meta-programming in Ruby I would like to make an object, when instantiated, delegate all methods of an object passed as parameter. And your class will pass to delegate the…
-
0
votes1
answer60
viewsQ: How to create a new associated template in Rails
Assuming I own the user Admin, the Admin has a login_user, as system_user, and this relationship is polymorphic, because other types of users also have login_user. When creating the Admin, I must…
-
0
votes1
answer64
viewsQ: How to share methods between presenters in Ruby on Rails 4
I would like to add methods to my model through a Presenter, but some methods are shared among other presenters. Ex: os métodos 'pode_ser_mostrado?', 'pode_ser_editado?', 'pode_ser_excluido?' What…
-
0
votes3
answers262
viewsQ: How to instantiate a model and get its features by its name in Ruby on Rails
Since I have the abstract class User, and its sub-classes Client Employee and Admin, would like to render screens according to the chosen subclass. So: users/_form.html.erb : shall contain a…
-
0
votes1
answer543
viewsQ: How to perform actions at a given time using Ruby on Rails
In my project I would like to create alerts that run at each given interval or at a certain date, Some way to do, using as little memory as possible?
-
4
votes2
answers290
viewsQ: How to insert Entities, related to other existing ones, into the Entityframework?
In the case assuming an entity "Entidadea" that references an entity "Entidadeb", I want to save it, but referencing an entity B already existing ex: EntidadeA a = new EntidadeA(); EntidadeB b = new…
-
0
votes1
answer59
viewsQ: How to persist the value returned by a method?
In a class that has a collection, I need to persist the count of collection elements that follow a certain condition. Therefore, I need to save the result of a method that checks all elements of…
-
1
votes0
answers123
views -
0
votes1
answer166
viewsQ: Problem adding an element to a collection at runtime
In this my method I must fill a Collection, regardless of its type public void loadBeanCollectionItems(B bean, Collection collection, JSONArray collectionJson) { for(int index = 0; index <…
-
0
votes1
answer538
viewsQ: How to compose a Linear Layout in Activity using JAVA only
In my application has a vertical linear layout with id: @+id/items In this layout for each item contained in a list, I would like to create another horizontal Linear Layout called, Row containing 2…
-
0
votes1
answer62
viewsQ: Why is the escape parameter not recognized in the Cakephp Htmlhelper?
When trying to create an image as a link in cakephp using Htmlhelper, the HTML code is generated as String in the browser <?php echo $this -> html -> link( 'Visualizar' .$this -> html…
-
1
votes1
answer827
viewsQ: When converting an object to JSON, because it appears several characters " "
To perform the Bean to JSON conversion, vice and versa, I am using the library org.json for JAVA. But although an object is converted normally, others end up being loaded with characters \, when…
-
3
votes1
answer394
viewsQ: How to make object design control faster in a C#form
In a form, in C# for desktop, there are constant movements of certain controls. In this case I am using objects of type Picturebox, however its rendering is very time consuming. Is it recommended to…
-
3
votes1
answer195
viewsQ: What is the size and coordinate measurement difference in C#Forms
In my project I work with the distance of elements and their size. But on a screen, 600 by 600, when inserting an object, 100 by 100, it appears to be much smaller than 1/6 of the screen, and when…
-
2
votes2
answers264
viewsQ: How to instantiate a class with abstract methods in C#
In java we can implement abstract methods by instantiating a certain class Thread threadA = new Thread(new Runnable(){ public void run(){ for(int i =0; i<2; i++){ System.out.println("This is…
-
3
votes4
answers15143
viewsQ: How to create an Excel macro to delete duplicate lines
Have someone show an example of Macro in Excel that removes duplicate lines, but comparing all cells of the same, or selecting which compare, example para linha_atual em todas_as_linhas faça para…
-
11
votes6
answers57963
viewsQ: How to convert UTF-8 characters in PHP
In my web application, I am using a Mysql database that has the table EditableContent. This table has the field content, who’s kind text and has as input format utf8-bin. In the database the…
-
5
votes3
answers10379
viewsQ: How to create web payment system using PHP
I would like to create an e-commerce, but I do not have much knowledge about it. And I still have the following question. How to create a payment system via boleto or card, is there any framework or…
-
3
votes2
answers4463
viewsA: How to view a browser’s http request, and the server’s http response
I found these Extensions for Chrome https://chrome.google.com/webstore/detail/http-spy/agnoocojkneiphkobpcfoaenhpjnmifb…
-
4
votes2
answers4463
viewsQ: How to view a browser’s http request, and the server’s http response
I would like to get this information to study full examples of https protocols with Cookie and Sessions, either through Socket Java, PHP. If possible through the browser itself.
-
1
votes2
answers1630
viewsQ: In php how to run a function after past X days of last run
I’m designing changes and routines in a web application created in PHP and Cakephp, in which case one of the routines would be a Component run every 15 days , to update a file. html As in PHP I…
-
4
votes1
answer1827
views -
2
votes2
answers343
viewsQ: Using Flash Professional, how to import classes from an Actionscript file?
In my project I have the Listloader class, responsible for interpreting a list and uploading files described in it. My goal is to save, this and other classes, in a file extension ". as" and be able…
-
2
votes1
answer229
viewsQ: Doubt with Actionscript3 Classes and Objects
Description of the Project I’m developing a slide catalog, where there are photos and texts, which are dynamically loaded from urls provided in a list. Load list displaying this format: nome_do_item…
-
1
votes1
answer61
viewsQ: In Cakephp, why does the input method generate an empty selector?
In my application there are 2 related models and Shortcut and Role, where Role has several Shortcuts, the link between the two occurs normally, except when trying to create an input in the "save"…
-
3
votes1
answer2814
viewsQ: Via java reflection, set and take values of inherited variables
I have the following class hierarchy (POSTRequestHTTP extends ReqeustHTTP) (RequestHTTP extends ComunicationObjectHTTP ) Assuming that each object can have variables corresponding to an item in a…
-
0
votes1
answer58
viewsA: Pagescontroller Cakephp runs only the display action
What was occurring and that in the Routes configuration file was forcing any call to the Pages controller to call the dispay action and pass the page name as parameter.
-
0
votes1
answer240
viewsQ: Problem logging in using Cakephp on session_regenerate_id()
Testing at home, my Cakephp project works perfectly. But when running the same project on the site, with the appropriate changes, as expected it presents a slightly different behavior. But a problem…
-
5
votes2
answers993
viewsQ: Problem with uploading in PHP
In an input of type file, the tmp file is not being generated. this and the array generated by PHP Array ( [name] => desin3.jpg [type] => image/jpeg [tmp_name] => C:\xampp\tmp\phpE0D5.tmp…
-
0
votes1
answer142
viewsQ: Problems Relating Models in Cakephp
This and the Model User class User extends AppModel { public $name = 'User'; public $useTable = 'users'; public $displayField = 'name'; public $belongsTo = array( 'Role' => array( 'className'…
-
-1
votes1
answer58
viewsQ: Pagescontroller Cakephp runs only the display action
I created the home.ctp in the briefcase /Views/Page/, and it is working, I also created the home method, however, when accessing /pages/home/, the only method accessed is the display, someone can…
-
1
votes1
answer384
viewsQ: Using Cakephp, how to generate editable Pages?
I’m developing a site using Cakephp, but although basic I would like to know the correct way to create pages like : Home, Contact, About, simple user page(logged in with permission 1), administrator…
-
3
votes5
answers411
viewsQ: How to avoid a comparison by brute force?
Possessing a class of any kind ClassA which has an attribute value and that, depending on the type of value i need to perform an operation differently, as I would avoid a gross comparison, as in the…