Posts by Tuyoshi Vinicius • 4,046 points
60 posts
-
0
votes1
answer111
viewsA: Calculate user age by registered birth date
A good alternative to solve your problem is to use the diff method of the class Datetime, it receives a Datetime object and returns another object containing the difference, in the example below you…
phpanswered Tuyoshi Vinicius 4,046 -
3
votes1
answer100
viewsQ: Multiple App Laravel using the same App table
I have in my scenario 3 servers http running the same application Laravel and sharing the same database, where the first server LoadBalance using nginx, basically with the same load weight. The…
-
2
votes2
answers188
viewsA: Add email with copy when sending the form
Add to function headers mail the attribute Cc: assigning the email from which you want to send the copy. $headers = 'From: '.$user_Email.'' . "\r\n" . 'Cc: [email-copia]'. "\r\n" . 'Reply-To:…
-
1
votes2
answers97
viewsA: Laravel 5 Querybuilder, simplified collection results
Querybuilder is a framework that has an interface for constructing sql queries and its main feature is the abstraction of database platforms. I believe it doesn’t have collection handling tools, but…
-
1
votes1
answer162
viewsA: How to use Jquery Sortable?
You need to reference the object responsible for the sortable call, use the attribute handle of the plugin. $("#conteudo").sortable({handle: ".ico"}); Where .ico is the selector of your object.…
-
2
votes2
answers677
viewsA: how to use the Jquery sortable update method?
To get the attributes of the DIV is very simple, because the DOM instance of each DIV is recovered by the object ui.item which comes as an event parameter, which in turn is a jQuery object so its…
-
0
votes2
answers664
viewsQ: HTML5 Video Autoplay in mobile browsers
The autoplay attribute on the tag VIDEO does not seem to work in mobile browsers, I searched and it seems that this concerns a policy of permissions between the browser and the end user, I tried to…
-
3
votes1
answer477
viewsA: IF condition is true but does not execute related code
Modify for this implementation String srt =input.getText().toString(); if(!srt.equals("")) The method getEditableText() class EditText returns an object of type Editable, to pick up the text you…
-
2
votes4
answers444
viewsA: Mark contacts/hashtag in typing text with javascript
I wrote the javascript code base with the logic you will need to search the server using AJAX, I used the jQuery library to abstract some things. (function($) { $.fn.hashtag = function(options) {…
-
6
votes4
answers1152
viewsA: Is it possible to build an HTML5 app for Android with Material Design?
Yes, you can do. Today we have plenty of options for this, you can develop your application using some responsive CSS framework like Bootstrap and others, but I recommend you take a look at Polymer…
-
2
votes2
answers194
viewsQ: Retrieve jQuery instance within an iframe
I need to recover jQuery instance embedded in my iframe, as we know there are several ways to recover jQuery instance, with references $, jQuery, window["$"], window["jQuery"]. The problem is that…
-
1
votes3
answers54
viewsA: Adding Current class to the menu
Great solutions have already been cited, yet below is my contribution. An interesting way to solve this would be to use a Attribute Contains Selector A Selector a little more specific. $("#navlist…
-
13
votes4
answers1574
viewsQ: Database and transaction control in value transactions
In my project I need to develop a system of transactions where the user will put credit and the services he hired will consume these credits. I built the following structure but I don’t know if it’s…
-
2
votes3
answers1170
viewsA: How do I count the amount of products per category?
You can use a subQuerie for this, as in the example below. SELECT ( SELECT count(id) FROM produtos WHERE categoria_id = categorias.id ) as quantidade FROM categorias WHERE [sua condição para…
-
2
votes1
answer372
viewsQ: Problems with RBAC permissions modeling
I’m developing a system where your user permissions will be based on the RBAC model, a user could be in several permissions rules that would give or not privileges to the system, when registering a…
-
13
votes1
answer8955
viewsQ: Inheritance in relational database
one of the great challenges in developing object-oriented software is to abstract the data from its base to power-like objects better manipulate them, today the available ORM frameworks make this…
-
6
votes2
answers10604
viewsA: Add and Remove Fields with Javascript
I modified your implementation a little to set the event to remove the div as soon as the line is created. $(function() { var divContent = $('#formulario'); var botaoAdicionar = $('a[data-id="1"]');…
-
15
votes2
answers3291
viewsA: Crop image with Javascript
To crop the photo you need to use an extension PHP that manipulates images, the best known are GD and Imagemagick. Simple implementation for PHP 5 >=5.5 using GD $ini_filename =…
-
5
votes1
answer1810
viewsQ: Laravel Results of a Query Builder for eloquent model
I am making a query using Query Builder $users = DB::select( DB::raw(" SELECT users.* from users, permissions_customers WHERE permissions_customers.customer_id in ( SELECT…
-
0
votes4
answers2802
viewsA: How to import classes from your subclasses in PHP?
The only way to load files that contain php classes is with include, require etc.. you can use the standard PSR-0 which defines how files will be loaded from an autoloader. You can find a good…
-
2
votes1
answer48
viewsQ: Time redirection
I have an application that I need to change domain app.com.br need to change to app2.com.br however while I do not change the dns I need a temporary redirect I need that when someone enters any path…
-
1
votes2
answers408
viewsA: Loop json with PHP
What you want is to loop the object fields you can do by following the following implementation. $objeto = json_decode('{ "nome": "Alisson", "idade":"19", "profissao":"programador" }', true);…
-
6
votes1
answer1314
viewsQ: Software for obfuscating APK
I do not know this question is valid to raise here according to the policies of questions but if it is not I will remove it, a short search on the internet found several tools including sites that…
-
4
votes4
answers1559
viewsA: Jquery does not work in PHP
In case you are running this page on a SERVIDOR you should reference javascript like this <script src="/cadastro/javascript/jquery-1.5.2.min.js"></script> <script…
-
1
votes1
answer692
viewsQ: Java Android Merging Projects
Sometimes I need to use one project in another like a UI framework in my application or something like that and most of them are available in repositories like github etc, I usually download and…
-
13
votes6
answers1170
viewsQ: Why is it not possible to define an interface with static methods?
I would like to force some of my classes to be implemented in Singleton, but I came across the following situation. interface ICharacterSingleton{ static Characters getInstancia(); } public static…
-
4
votes1
answer897
viewsQ: How to get the publishing version of an application console
I’m having a problem trying to get the publishing version of my application, I searched and found the following answer on SOEN how to show Publish version in a textbox? I followed exactly the…
c#asked Tuyoshi Vinicius 4,046 -
1
votes5
answers1054
viewsA: Contains in Class List
You can search by name or Id in the example below I am looking for the name var ProfEsp = lista.SingleOrDefault(x => x.Especialidade.Nome == "Programador" ); if(ProfEsp!=null){ // achou…
c#answered Tuyoshi Vinicius 4,046 -
4
votes2
answers325
viewsA: Menu that moves by coordinates
You can do both using Pure Javascript and jQuery for what I’ve seen in your project you’re already using jQuery so I set an example for you using jQuery because the code is simpler. HTML <div…
-
3
votes1
answer1345
viewsQ: CSS responsive layout in columns
I am making a layout that will have two columns, the first on the left will compose a menu the second will occupy all the remaining space on the screen on the right side and in it will be the…
-
5
votes1
answer303
viewsQ: Multiple types of authentication
In my system I need to have two types of authentication one for common user who will register and etc.. and another for the administrator my question is how I differentiate the two authentication…
-
6
votes3
answers33562
viewsA: Update records from one table using values from another table
I believe whatever you want is this UPDATE Campeonato SET Nome =(SELECT Nome FROM Time WHERE Campeonato_Id= Campeonato.Id AND Position = '1') WHERE Ano ='2013' In the above example I am updating the…
mysqlanswered Tuyoshi Vinicius 4,046 -
41
votes4
answers4635
viewsQ: To what extent is it not advisable to use an ORM?
I am working on a very large system using . NET (ASP.NET MVC) the application requires a critical level of performance. How worthwhile or not to use a ORM? Is there a tool that I can compare in…
-
9
votes1
answer348
viewsA: Collapse Menu after page refresh with localStorage
There are a few ways you can do this I will quote 2 that come into mind and are very simple methods. HTML5 LOCAL STORAGE API You can access the object localStorage and work with their methods…
-
12
votes2
answers4878
viewsA: Javascript function does not wait for another to start
Its function buscando_dados performs the method POST of jQuery which makes an asynchronous request in AJAX you need to proceed with the execution after the callback of the função POST. A solution…
-
8
votes3
answers637
viewsQ: Deploying queues for Websocket
I’m developing a server WebSocket which will control multi client connections, will basically function as a chat, will be a kind of game multiplayer, after many researches and some tests I realized…
-
2
votes2
answers141
viewsA: Uninstall browser by console
Since @Diegolopeslima said delete serves to remove variables and objects, you can even overwrite the Navigator reference but not delete the object associated with it. I suggest you take a look at:…
-
66
votes3
answers2309
viewsQ: Is it right to prefer composition to inheritance?
I’ve read several articles and books of Designer Patterns the expression Prefira composição em vez de herança. I believe it is a rather controversial subject due to the views discussed. In my view,…
-
3
votes1
answer599
viewsQ: Standard Java design for code reuse
I am developing a simple program in Java Desktop using SqLite to store local data, I would like to know which design pattern I can use to reuse the codes Java to develop the same application for…
-
2
votes2
answers11882
viewsA: Calling function with onclick
To dynamically implement an Onclick event you need to add this event to the DOM object with the addEventListener as in the @Silvioandorinha response, however this implementation is different in…
-
1
votes2
answers932
viewsA: Calculations in PHP
You’ll have to do something like this. <?php /* aqui esta a parte server-side do seu codigo esta será executada no servidor cada vez que o usuário submeter a pagina. */ // abra sua conexão…
phpanswered Tuyoshi Vinicius 4,046 -
6
votes1
answer2281
viewsQ: Modeling for user permissions
I think this question is more of modeling analysis actually do not know if it fits the pattern of questions discussed by meta.pt.stackoverflow.com. I need to make my system in a way that almost…
-
2
votes6
answers5717
viewsA: Disable Chrome Password Save in Javascript
put the autocomplete="off" attribute I believe is not all browsers that support. Documentation http://msdn.microsoft.com/en-us/library/ms533486(VS.85). aspx…
-
10
votes3
answers9148
viewsQ: Query in two tables without INNER JOIN
I would like to know, is there a difference in the performance of these two queries? in Mysql SELECT employee.*, company.name FROM company, employee WHERE employee.company_id = company.id AND…
-
3
votes3
answers2284
viewsQ: Doubts binary search
Assuming that the binary search works only with array of ordered integers, if I had to search for an integer in an ordered vector the speed of the search would be much faster than a sequential…
-
1
votes4
answers1506
viewsQ: Direct method call in instance
I came across something that doesn’t seem to make sense, when I try to make the method call from a direct object in its instance it doesn’t seem to work. class Pessoa{ private $Nome; private $Idade;…
-
4
votes2
answers1050
viewsA: Event that identifies when the browser is resized.
There is yes. Javascript var addEvent = function(elem, type, eventHandle) { if (elem == null || typeof(elem) == 'undefined') return; if ( elem.addEventListener ) { elem.addEventListener( type,…
-
1
votes1
answer161
viewsQ: Activex Axvlcplugin2 no event works
I possess in my form a VLC Player. In it, I need to get basic information like video duration and current position. but no event works. Am I doing something wrong? Follow code: public Form1() {…
-
3
votes2
answers181
viewsQ: Confusing encapsulation in c#
I was creating a model that in his construtor i defined the attribute Nome. however this attribute will only have the get, as different from java c# has the resource for getters and setters I…
-
4
votes3
answers5368
viewsA: How to add an onBlur event without overwriting the original?
You can use the library jQuery that already has this type of cross-browser implementation if you do not use, the code below can be useful. function listen(evnt, elem, func) { if…
javascriptanswered Tuyoshi Vinicius 4,046