En determinadas ocasiones se requiere el ultimo id que se tiene en una base de datos en MySQL. La forma más práctica de hacer esto es usar la instrucción:
1: SELECT MAX (id) as MaxId FROM Table
Ahora bien lograr esta instrucción en cakephp tiene su truco, algo que podemos hacer es usar la propiedad “query” de objeto model, pero el resultado es un poco difícil to access it throws an array of 3 dimensions. The easiest is to use the services of CakePHP and the model of access to managed data base, so there is a property find ('first') which will yield a single result, with the combination of parameters for order of the data we can find the last id:
1: $ maxid = $ this-> Model-> find ( 'first' , array ( 'order' => 'Model.id DESC' ));
2: $ this-> set ( 'maxid' , $ maxid [ 'Model' ] [ 'id' ]);
This place it within a controller.
Ready!
Before starting with the areas of programming, a rule of grammar: the case always, always, always accentuated.
That said, I came across in php if I had a list of options based on a select that I showed the accents correctly. MySQL and php by default use utf-8, so it is good practice to put our html utf-8:
1: \u0026lt;meta http-equiv= "Content-Type" content= "text/html; charset=utf-8" >
However, JavaScript is not used by default utf-8, so when you place a text through document.write, the screen will display the text emphasized as a special character in html (html entity):
1: changecities function ( formObj)
2: { 3: statesObj = eval ( "formObj.states" );
4: 5: state = statesObj[statesObj.selectedIndex].value; 6: citiesObj = eval( "formObj.elements['cities']" );
7: 8: // remove all entries
9: citiesNum = citiesObj.length; 10: for (i=(citiesNum-1); i >= 0; i--)
11: { 12: citiesObj.options[i] = null ;
13: } 14: // add entries based on area selected
15: switch (state){
16: case "3" :
17: citiesObj.options[0] = new Option( "Comondú" ,17);
18: citiesObj.options[1] = new Option ( "La Paz" , 18);
19: citiesObj.options [2] = new Option ( "Loreto" , 19);
20: citiesObj.options [3] = new Option ( "Los Cabos" , 20);
21: citiesObj.options [4] = new Option ( "Mulege" , 21);
22: citiesObj.options [0]. selected = true ;
23: break;
24: 25:} 26: } ... Php is an instruction to turn this character, its value to the character you want:
1: \u0026lt;? Php html_entity_decode ("& # 250" );? >
should result in "ú"
But as we see in the image, select does not display correctly because the instruction html_entity_decode actually results in a character set "ISO-8859- 1 ", so we can choose to do one of two things:
1: \u0026lt;? Php utf8_encode ( html_entity_decode ("& # 250" ));? >
1: \u0026lt; ;? Php html_entity_decode ( "&250;" , ENT_COMPAT mode, "UTF-8" )? >
Deployment is:
Ready!
I like to put tutorials are located in another web site, but in this case, the tutorial also solved the problem he had with the initial size of the disk of windows xp in virtualbox is so clear follow that lead had no problems with resizing virtual hard disk partition.
http://www.my-guides.net/en/content/view/122/26/
If anyone is interested in a translation anyway, just warning.
Ready!
Sometimes I start to make models of any site in Fireworks, even when I try to use Photoshop, the fact is that FW is fairly light and I'm not cans especially for the layout. I'm working on it for a site and I thought about finishing the site design.
But when starting with the creation of CSS files for the graphics I ran I did not know which was the size of the patterns that had been placed as fill in some of the funds, this is important for optimizing the size of the images.
So as I spent a while in the search, I put the exact folder used in Windows Vista:
C: \\ Program Files \\ Adobe \\ Adobe Fireworks CS3 \\ Configuration \\ Textures
Ready!
/ etc/X11/xorg.conf Section "Device"
Identifier "Trident Microsystems CyberBlade XPAi1"
Driver "trident"
BusID "PCI: 1:0:0"
EndSection
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
HorizSync 28-51
VertRefresh 43-60
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Generic Monitor"
Device "Trident Microsystems CyberBlade XPAi1"
SubSection "Display"
Depth 8
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 32
Modes "1024x768"
EndSubSection
EndSection
Generally
By: Ciro Palacios visual artist and professor at the University of Lima
The Art of Francis Bacon
Francis Bacon. After leaving the halls of the Tate Gallery in London, the stunning retrospective of Bacon, one of the most important artists of the twentieth century is on display now in the Museo del Prado, not far from the paintings of Velazquez, the British artist much admired .
When asked about the violence of his paintings, Francis Bacon often evoked tensions overwhelmed him in childhood and adolescence. Born in Dublin on October 28, 1909, he spent six years of his childhood in Ireland, where she faced early stage of social and political violence, the threat of snipers and hidden bombs that marked him forever. The idea of \u200b\u200binstant death in the middle of the night causes a strong impression on this child of great imagination.
The expulsion from school and home when he was 16 years led to a rebellious spirit and questioning minds aroused strong feelings, determined to uncover and develop their true instincts and follow them to their end. Berlin was in exile and there had contact with a strong cultural atmosphere, was drawn to the continental sophistication and met the vices of a bustling metropolis. In 1927 and 1928 moves between Paris and Berlin, working on decorating until the meeting with Picasso's work impels him to devote himself to painting. In 1929 he returned to London and begins as a self-taught oil painting.
In 1944, before his lack of success, destroyed almost all his works. That same year, the triptych "Three Studies for Figures next to a crucifixion" will mark the resumption of his career on a greenfield basis. In 1948 the Museum of Modern Art New York and buy one of his works in 1949, his first painting inspired by the "Innocent X" by Velázquez, finally made a series of solo exhibitions.
THE CREATOR
Francis Bacon never wanted to be classified and always shied away from the labels. Some experts called it a neo-expressionist figurative and others, but he suggests in interviews their displeasure with both views. Is heir to the fascination with the movement that characterizes the twentieth century, but his approach to the Muybridge photos away from kinship with the futuristic, unites more existential absurdity of a Beckett whose lonely people drag their bodies racked by time. Bacon shows in his work this time, without emotions surface, trying to prove the being-in-the-time that we all, that time is made flesh living matter is not fixed and, therefore, we must show its constant mutation. Dig your brutal act on the faces of their models to find, deep in his heart.
In his work, the act of painting gives participation at random and fortuitous that arises unexpectedly at any time by changing to the very subject of the picture. Makes marks, clean, scrub spots or areas, strip the paint under varying speeds and angles, suggesting that there is already on the canvas as in your head Figurative virtual data. These will be subject to the power of action gradually pulling away the marks original pictorial material, and with it, very suggestive and involuntary forms of movement will emerge.
mouth and openings that extend from one end to another of the body are an obsession: it is movement through which the body tends to leak. Thus emerges another world of irrational lines, inadvertent, accidental, of mixed feelings, strokes, unrepresentative, or illustrative, or narrative, manuals, almost blind attest to the intrusion of another world in the imagination.
THE BODY Y THE CRY
painter Francis Bacon was a paradigm for capturing the painful condition of man from the harshest singularity. The main reason stated in her scenes is the body, studying hard watching the classic painting and documentary photography and journalism, to collect forms from the empirical world that guide the search for traces of the invisible , those forces trying to capture and present in his paintings.
Bacon made an anatomy of the human self-destructiveness; tested catch the intensity of bodily experience in those moments of pain and ecstasy that foreshadow the disappearance and we face the physical body. In the disfigured, deformed, mutilated and faces on the edge of disappearance that make his work, we can not fail to evoke the Freudian uncanny, the uncanny that for Lacan is the plug indispensable for addressing anxiety as a phenomenon observable. The uncanny, as Freud said, is where are closer to the aesthetics and psychoanalysis, hence it has been argued that Freud treats it as an aesthetic category of the same draft that the sublime.
The "Saturn Devouring His Son" Goya is an important precedent Baconians characters. In this work the teacher English alters the normal configuration of the body of Saturn in their limbs and trunk to make a proper motion of the transformation of the character portrayed. There is something in these players Bacon endorses and becomes visible: the cry of their bodies. His painting will cry visible to us, the raging in the body to reach the mouth open, like an abyss, leading to our mind.
questions identity, values \u200b\u200band the control of the body in which man usually build their lives and just do it based its artistic production in the obsession distorted body man. His images respond to the idea that the body is no longer seen as the space, the shelter, which ensures the idea of \u200b\u200bself, but on the contrary, the domain where the self is answered, and even lost.
"Bacon lived at the time that fatally eludes me," says Kundera. The man believed to have control over their own bodies but their existence is based on permanent instability. Is the time that questions the identity and values \u200b\u200bwhich are regarded as the man and the body is rebuilt, transferred or exceeded its borders. In short, Bacon was not only one of the great painters of the human form, but also one of the great searchers of the human condition, and from the perspective of today, one of the greatest artists of the twentieth century. He left to mankind an art like no other reflecting the anguish of our time.
Article published in "Sunday" of the newspaper "El Comercio", Sunday February 22, 2009.
oculocentrismo