Posts by Guilherme Portela • 564 points
21 posts
-
1
votes2
answers154
viewsA: Do IF to give Slideup on an element
You can use the selector :visited to check whether the item is visible or not (which is what the slideUp() and the slideDown() do: they modify the visibility of the element). For performance…
jqueryanswered Guilherme Portela 564 -
1
votes1
answer94
viewsA: Float:left and float:right in smaller resolutions
This question is due to the fact that the sum of the size of the two elements is too big to fit in the width of the screen, and so there is this space break. Since your problem is on display on a…
cssanswered Guilherme Portela 564 -
2
votes1
answer167
viewsA: How to search for the record when the table has a composite primary key?
Lambda expressions can have more than one Boolean expression. In your case, just use the conditional operator E (&&), leaving the expression as follows: Entities db = new Entities();…
-
1
votes1
answer67
viewsA: Change div background on visited
You must use .menu:visited, because such a selector is used for links that have been visited, using the hyperlink address. In your example, you are using the element class div.…
-
0
votes2
answers488
viewsA: jQuery.preventDefault(), jQuery.stopPropagation() and jquery.Stopimmediatepropagation()... no jQuery!
The methods event.preventDefault() and event.stopPropagation() are not present in Internet Explorer 8 or lower versions. If you want to make your site compatible with these versions, you will need…
-
4
votes1
answer1030
viewsA: Node.js and PHP on the same server
Apparently you want to build an architecture with SSO (Single Sign-on). SSO is defined as a single entry point, meaning you need to authenticate only once. This allows automatic access to several…
-
1
votes2
answers218
viewsA: Is there a way to not fill HTML with directives?
The ng-click is different from onclick. The Angular Directive uses expressions of the framework itself, that is, they are in the context of the scope of the Angular (which is not directly accessible…
-
2
votes3
answers1715
viewsA: Create a Trigger that runs whenever a product is deleted
The referential action ON DELETE CASCADE serves for your case, with no need to create a Trigger. When we delete a record in the table produto, we want the records in the table loteproduto, which are…
-
1
votes1
answer795
viewsA: Convert PHP time
Prefer to use the methods and classes provided by PHP to use the interpretation of temporal data. There are two main solutions: Object Oriented (>= PHP 5.2) $hourStart =…
phpanswered Guilherme Portela 564 -
2
votes2
answers670
viewsA: What is the difference of loading javascript in <script> or external file?
In terms of performance, there is, because the browser needs to request another (s) file(s). As for using one or the other, it’s a value judgment you need to make: will you care about performance…
javascriptanswered Guilherme Portela 564 -
3
votes3
answers98
viewsA: How to consult and return all product information?
The following query returns all product information, with its colors and category. SELECT * FROM tbl_produto AS produtos, tbl_categ AS categorias, tbl_cor AS cores WHERE produtos.cat_prod =…
-
3
votes2
answers69
viewsA: Error while using methods to generate hash and catch MAC address
Cause The key variable is declared at class level, and therefore is a field. Fields cannot initialize (declared and defined at the same time) with a non-static value, method or property. You need to…
-
2
votes1
answer2301
viewsA: How to get the current date with Angularjs with refresh on date?
The $interval¹ implements the window.setInterval², that runs a block of code repeatedly, within a specific range. I implemented the code below taking as reference the example implemented using…
-
1
votes1
answer423
viewsA: Transition with single page anchors Applications
There is this addition to jQuery that does exactly what you want: https://github.com/flesler/jquery.scrollTo Demo version: http://demos.flesler.com/jquery/scrollTo/…
-
2
votes1
answer362
viewsA: Reference to styles and scripts in Master.Page using Resolveurl
The tags <%# %> are used to data linkage, and therefore it is necessary that the code execute the binding (DataBind()) in case it is not done automatically (as in the data binding controls).…
-
12
votes4
answers58476
viewsA: IF, ELSE IF, ELSE or IF IF IF. When to use, what’s the difference?
There is a functional effect: in a conditional structure, when a block is executed, the others are ignored. That is, in the first example, there are three conditional structures, while in the…
-
1
votes2
answers124
viewsA: Problems with html select
I suggest you later try to put this sequence of commands into a repeat structure. As for the use of select, you can do this using the DOM interface provided in Javascript. /** * Created by Erick on…
-
0
votes1
answer79
viewsA: FTP alias of /home for /www
Set the user home directory to be the path you prefer. usermod -d /www/$DOMAIN $USER If you want, you can also set that the user only has access to your home directory by editing the file…
-
0
votes2
answers3120
viewsA: Single Page Application with jQuery
In pure jQuery is complicated to be done, but as you are in a hurry to accomplish, you may need not to use Angularjs itself, but to look for some simpler and faster alternative:…
-
1
votes1
answer333
viewsA: How do I get Phpmailer to send from my own server?
Yes, yes, you can (and it’s interesting) reuse the code. You will only need to edit the parts pertaining to setting up the mailing server, as you described in your post.
-
2
votes1
answer894
viewsA: How to insert image in Mysql using Hibernate?
Assuming you have a "Image" column of type blob in a table, you will need to define the data type in the model class as an array of bytes (byte[]): private byte[] imagem; ... public byte[]…