Posts by Erlon Charles • 5,352 points
161 posts
-
0
votes3
answers9393
viewsA: Set CSS according to browser
According to the W3C The rule '@document' a group rule whose condition depends on the URL of the document being formatted. This allows style sheets, especially user style sheets, to have styles that…
cssanswered Erlon Charles 5,352 -
3
votes1
answer191
viewsA: Interpreting XML with Jquery
You can use the $.parseXML() Html <div id="id">id: </div> <div id="texto">Texto: </div> jQuery var xml = "<result id='0 ou 1'>erro caso exista ou fica…
-
5
votes1
answer4835
viewsA: How to make a pie chart (pie) with database?
So that your pie chart of the hightcharts work well you need your json is being generated correctly according to the model series: [{ type: 'pie', name: 'Browser share', data: [ ['Fulano', 27],…
-
4
votes1
answer330
viewsA: PHP class - How to use
Observing your code I could notice the following error in line 3 of this code <?php $meuObjeto = new Torrent(); $meuObjeto->scrape("udp://fopen.demonii.com",…
-
1
votes1
answer209
viewsA: Scroll down a level in the array
If you’re just reformatting the array I think the simplest solution is this $fatura = array( "Fatura" => ( "id" => 821 "numero" => 5014 "vencimento" => 22122014 "emissao" => 22122013…
-
1
votes1
answer142
viewsA: Problems Relating Models in Cakephp
Let me give you an example of two Models that work perfectly for this purpose Model User.php <?php App::uses('AppModel', 'Model'); /** * User Model * * @property Group $Group */ class User…
-
2
votes1
answer122
viewsA: App:Uses does not work on the server
windows and linux have a basic difference for file nomenclature, Windows is not Case Sensitive and Linux yes where according to wikipedia Case sensitive is an English language term that means size…
-
3
votes5
answers35057
viewsA: How to define the border color of a table without CSS?
You can use the attribute bordercolor This is the color of the border (if you have the border turned on - that is if you use the border attribute in your TABLE tag). That in free translation: This…
htmlanswered Erlon Charles 5,352 -
2
votes2
answers299
viewsA: Display data in the table
Ideal for these cases is to use html and css your View would look like this: <?php foreach( $showbills as $showbill ):?> <div class="events"> <div class="title"> <?php echo…
-
1
votes1
answer343
viewsA: How to save a HABTM after save to controller?
To save associations_users just use if($solicitationId = $this->Solicitation->save($this->request->data)){ $data = array( "user_id" => $this->data['User']['id'], "solicitation_id"…
-
1
votes1
answer263
viewsA: Configure Cake Bake for Cake Version 2.x
Try calling by the following command /var/www/<caminho do seu cake>/app/Console/cake or cd /var/www/<caminho do seu cake>/app/Console/ php cake.php These are two possibilities to call…
-
11
votes4
answers3280
viewsA: Integer with 0 to the left is printed as another number
As told by @Lost O php manual mentions this behavior $a = 0123; // octal number (equivalent to 83 to the decimal) So the best way to print the value of integers that have 0 on the left is:…
-
7
votes4
answers24621
viewsA: Program to manage Mysql database on Windows?
There is a broad list of software that can be used for this purpose, both possible to be installed on the machine and installed on the server enabling the management of your database from any only.…
-
2
votes1
answer436
viewsA: Problem with ajax loading with Cakephp 2.x
You are using the version 1.11.0 of jquery and in your code I realized the following excerpt $(".ajax-link").bind('click', function(ev){ and according to the documentation of the method this .bind()…
-
2
votes3
answers267
viewsA: Have some problem playing the function for variable
There is no problem as this is a very common practice. In the article Javascript: variable as function and object you can see in detail how it works.…
-
0
votes2
answers330
viewsA: Line break problem and subster in php
I believe that what you need is solved easily with css <!DOCTYPE html> <html> <head> <style> div.test { white-space:nowrap; width:12em; overflow:hidden; border:1px solid…
phpanswered Erlon Charles 5,352 -
1
votes5
answers3441
viewsA: Show text when typing in textarea
Besides using a .stop() i inserted the setTimeOut() to control the "disappear" of the text $(function(){ $('#myTextarea').on('keyup',function(){ $('#showedText').text('Just a…
-
31
votes4
answers127987
viewsA: How to make the date() function format a date in English?
By changing the PHP location you can acquire the properties of a particular country. To change these properties we will use the function setlocale(). On servers configured in Brazilian format, that…
-
4
votes2
answers1644
viewsA: Configure Cakephp to send emails via gmail
In your file app/Config/email.php you will need to create the class EmailConfig. The archive app/Config/email.php.default is an example of how it should look. You must create a new configuration…
-
1
votes3
answers931
viewsA: Login Cakephp 2.0 does not work
I noticed 2 errors in your code 1 - If the table that stores your users is called "users" you must create the Form to the Model "User": 2 - If the table you want is really "records" then the Form…
-
1
votes3
answers469
viewsA: jQuery . toggleClass() is not working as expected
Basically what was missing was just to put !important in the css of .adminPvisible thus it forces the opacity to be 1 while the class is in the element. In the example you posted the .toggleClass()…
-
1
votes2
answers687
viewsA: Set <option> in edit - CAKEPHP
Your view code should be: echo $this->Form->input('cidade', array('label' => 'Cidade', '', 'empty' => 'Selecione', 'type' => 'select', 'options' => $cidades, 'default' =>…
-
2
votes2
answers166
viewsA: Customizing the Scroll of a div
The ideal is that you make use of some library, developing some would not be so complicated, however, there are already numerous available in the market. My tip for you would be to use the vertical…
-
0
votes4
answers3372
viewsA: Generate random numbers that result in a fixed sum
Seeing at w3schools I saw that to set a range for Random and javascript you need to use: Math.floor((Math.random()*100)+1); So you can create a function to do this using the maximum and minimum…
-
0
votes8
answers5526
viewsA: How to make a DIV fill all available width
Do you want to make a responsive layout? If yes take a look at bootstrap grid template, this way you will be able to easily responsive layouts.…
-
0
votes2
answers2621
viewsA: Javascript activating form action
If what you need is to cancel sending the form ideally add the code below to your javascript document.getElementById('id-do-form').onsubmit = function() { return false; }…
-
1
votes1
answer382
viewsA: Cakephp - Recover option value
Reading your code seems to me that it is an error in formatting the data. You need your ajax return a json so you will have more facility to manipulate the return by javascript and generate a html…
-
2
votes5
answers10769
viewsA: How to mark and unmark a row from a table by clicking on it?
You will have to add a class named on the first click active à tr and from there to each click check whether the tr possesses the class, if you own you remove, if you do not add. Example:…
-
0
votes2
answers447
viewsA: jQuery who changes div background specifies
According to the jQuery-ui accordion API there is an event called beforeActivate. This event has two parameters event and ui where: event - It represents the type of event being called, in which…
-
3
votes5
answers213
viewsA: CSS Child selectors on IE8?
As we can see in this article of Microsoft the ie8 is not fully compatible with some properties of css3: Windows Internet Explorer 8 is fully compatible with CSS specification, Level 2 Revision 1…
-
1
votes4
answers3403
viewsA: Check data in the database according to the date
In the mysql dates are by default saved in format YYYY-MM-DD, so much for DATE, DATETIME or TIMESTAMP as can be seen in mysql documentation In this case try the following code: $condicaoData =…
-
0
votes3
answers6699
viewsA: Conversion of JSON string to Java object
The Quick-json Parser is very simple, flexible, very fast and customizable. Try Characteristics: Compatible with JSON specification (RFC4627) JSON parser for High Performance Supports flexible…
-
7
votes9
answers30430
viewsA: How to debug code in PHP?
In php we have the var_dump() which returns the element to be debugged and all its properties. Mentioning the php documentation the var_dump() Dve be used like this: Examples Example #1 Example from…
-
2
votes2
answers2867
viewsA: Assign selected item in a <select>
Try to use .val() Remove this code snippet $("select#cidade option").each(function() { this.selected = (this.text === cidade); console.log(this.selected); }); And insert this…
-
2
votes1
answer243
viewsA: How to make the clip:rect(...) property not occupy space (width)
Tries to insert overflow-x:hidden; in the elements .chat and/or ul.messages so regardless of the element exceed or not the limit the horizontal scrollbar will not be shown. .char, .chat ul.messages…
-
6
votes2
answers14385
viewsA: Payment in installments via Pagseguro
I believe you have to configure your system to generate a monthly billet and send it to the buyer, since the pay-off does not parcel in billet. I can installment payment of a purchase through Boleto…
phpanswered Erlon Charles 5,352 -
8
votes1
answer682
viewsA: How to produce JSON in the format that Highcharts expects?
Try something like that, I’m not good at .net but I think it will generate the way you need it /* [{ name: 'Huguinho', data: [7.0, 6.9, 9.5, 14.5, 18.2] }, { name: 'Zezinho', data: [24.1, 20.1,…
-
0
votes3
answers1069
viewsA: jQuery multiline highcharts
Observing the responses and comments I noticed that in setting the renderTo is for the container. This really is the id of the element to be Chart? You can also set your Chart using jquery:…
-
2
votes7
answers3042
viewsA: Hide input value
Use the attribute placeholder in the input. This attribute only shows the text you choose while the value input is empty. Example: <div class="caixa-pesquisa"> <div…
-
1
votes1
answer766
viewsA: Error in Wordpress installation with PG4WP plugin on server
I did some research and ended up getting the following result. You have not enabled the Postgresql module on your server. If you have it, enable php.ini by removing the ';' Windows: Edit php.ini:…
-
0
votes4
answers27486
viewsA: How to change the background with javascript?
You can use the .style to define the properties css of the element Example: document.getElementById(id).style.color="blue"; This way you can add any attributes css in its element…
-
3
votes3
answers232
viewsA: Why CSS properties change in browsers
This started when these properties began to be developed, thus the w3c had not yet made the definitions on the properties. So the producers of each browser started using names that related the…
cssanswered Erlon Charles 5,352 -
2
votes3
answers162
viewsA: Use . on() instead of . bind() in Cakephp’s Jshelper
Observing the native code of cakephp I believe you will need to create your custom helper. Basically you will copy all the dependencies of jshelper and make a change to line 183 of the archive…
-
6
votes5
answers462
viewsA: Internet Explorer, should I still be worried about him?
Yes and no. It really depends on the scope of the project, whether your client requires it to work on ie8 or higher YES, you will have to worry about leaving the site completely compatible with the…
-
6
votes1
answer1179
viewsA: Recognize Aria-Selected="false" with jQuery
The .accordion() has two events called beforeActivate and create I used both events to manipulate the header and to remove the icons I used the option icons. In the beforeActive the headers are…
-
-2
votes4
answers15127
viewsA: Uncaught Syntaxerror: Unexpected end of input
Here’s your corrected code var Padrao = { /** * Init */ init : function(){ //Exibe Tela de Login/Minha Conta $('.login').click(Padrao.abreLogin); //Exibe Carrinho de Compras…
javascriptanswered Erlon Charles 5,352 -
2
votes3
answers204
viewsA: Plugins or tools to create blog posts?
You are looking for a text editor WYSIWYG, there are several recommendations from editors, in various languages and different formatting, I recommend that you search for html wysiwyg in the google…
-
-1
votes2
answers1856
viewsA: How to select/deselect an input select Multiple at each mouse click? (without Ctrl)
John Paul, by default a <select multiple> can have multiple elements selected or deselected using Ctrl + click, and also dragging the mouse click.
-
3
votes7
answers39327
viewsA: How to create input masks with Javascript?
Using this regex ^(\(11\) [9][0-9]{4}-[0-9]{4})|(\(1[2-9]\) [5-9][0-9]{3}-[0-9]{4})|(\([2-9][1-9]\) [5-9][0-9]{3}-[0-9]{4})$ This regex accepts two phone formats Format of telephone accepted: (99)…
javascriptanswered Erlon Charles 5,352 -
4
votes4
answers4814
viewsA: Get value from external HTML TAG "<link>"
You could use the class PHP Simple HTML DOM Parser has good documentation