Verona: donna uccisa, ferito gravemente il figlio
-
Il fatto a Vago di Lavagno, in provincia di Verona
Canali: Veneto, Verona, Cronaca, Omicidi, Lavagno
2 ore fa
Software engineering, programmazione, intelligenza artificiale, open source, e non solo...
<imageexpression class="java.lang.String"></imageexpression>
UPDATE updatefrom p, updateto pp
SET pp.last_name = p.last_name
WHERE pp.visid = p.id
($F{field1} == null ? "" : $F{field1} ) +" "+ ($F{field2} == null ? "" : $F{field2} ) +" "+ ($F{field3} == null ? "" : $F{field3} )
ALTER TABLE nome_tabella AUTO_INCREMENT=0
//Popup state to prevent feedback
boolean stateCmb = false;
//Extend JComboBox's length and reset it
public void popupMenuWillBecomeVisible(PopupMenuEvent e)
{
JComboBox cmb = (JComboBox)e.getSource();
//Extend JComboBox
cmb.setSize(NEW_LENGTH, cmb.getHeight());
//If it pops up now JPopupMenu will still be short
//Fire popupMenuCanceled...
if(!stateCmb)
cmb.firePopupMenuCanceled();
//Reset JComboBox and state
stateCmb = false;
cmb.setSize(OLD_LENGTH, cmb.getHeight());
}
//Show extended JPopupMenu
public void popupMenuCanceled(PopupMenuEvent e)
{
JComboBox cmb = (JComboBox)e.getSource();
stateCmb = true;
//JPopupMenu is long now, so repop
cmb.showPopup();
}public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
stateCmb = false;
}
<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct
Access to '.basename(__FILE__).' is not allowed.' );
/** This template is used for the quantity box arrangement of products, within
the add-to-cart form */
extract( $quantity_options );
$html = '';
if(!$child && $display_type != 'hide') {
$html = '<label for="quantity'.$prod_id.'" class="quantity_box">'.$VM_LANG->_('PHPSHOP_CART_QUANTITY').': </label>';
}
switch($display_type) {
case "radio" : //Radio Box
$html .= '<input type="hidden" id="quantity'.$prod_id.'" name="quantity[]"
value="'.$quantity.'" />';
$html .= '<input type="radio" class="quantitycheckbox" id="selItem'.$prod_id.'"
name="selItem" value="0" ';
if ($quantity > 0 ) {
$html .= 'checked="checked" ';
}
$html .= 'onclick="alterQuantity(this.form)" />';
break;
case "hide" : // Hide box - but set quantity to 1!
$html .= '<input type="hidden" id="quantity'.$prod_id.'" name="quantity[]"
value="1" />';
break;
case "check" :
$html .= '<input type="hidden" id="quantity'.$prod_id.'" name="quantity[]"
value="'.$quantity.'" style="vertical-align: middle;"/>
<input type="checkbox" class="quantitycheckbox" id ="selItem'.$id.'" name="check[]"
';
if ($quantity > 0 ) {
$html .= 'checked="checked"';
}
$html .= ' value="1" onclick="javascript: if(this.checked==true)
document.getElementById(\'quantity'.$prod_id.'\').value = 1; else {document.getElementById(\'quantity'.$prod_id.'\').value=0;}
"/> ';
break;
case "drop" :
$code = '<select class="inputboxquantity" id="quantity'.$prod_id.'" name="quantity[]">';
for($i=$quantity_start;$i<$quantity_end+1;$i += $quantity_step) {
$code .= ' <option value="'.$i.'"';
if ($i == $quantity) {
$code .= ' selected="selected"';
}
$code .= '>'.$i."</option>\n";
}
$code .= "</select>\n";
$html .= $code;
break;
case "none" :
default:
$html .= '<input type="text" class="inputboxquantity" size="4" id="quantity'.$prod_id.'"
name="quantity[]" value="'.$quantity.'" />
<input type="button" class="quantity_box_button quantity_box_button_up" onclick="var
qty_el = document.getElementById(\'quantity'.$prod_id.'\'); var qty =
qty_el.value; if( !isNaN( qty )) qty_el.value++;return false;" value="+" />
<input type="button" class="quantity_box_button quantity_box_button_down"
onclick="var qty_el = document.getElementById(\'quantity'.$prod_id.'\'); var qty
= qty_el.value; if( !isNaN( qty ) && qty > 0 ) qty_el.value--;return false;"
value="-" />
';
break;
}
echo $html;
?>
SELECT MAX(LENGTH(campo)) FROM tabella
(new SimpleDateFormat("dd/MM/yyyy")).format($F{Date_field})
stmt.executeUpdate(query,Statement.RETURN_GENERATED_KEYS);
keys = stmt.getGeneratedKeys();
if (keys.next())
{ id = keys.getString(1);
}
<script type="text/javascript">Buon utilizzo!
var answer = confirm ("Scegli OK o Annulla...")
if (answer)
alert ("Hai scelto OK.")
else
alert ("Hai scelto Annulla.")
</script>
tabbedPane.setSelectedComponent(panel);
<html>Buon utilizzo!
<head>
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{
alert(alerttxt);return false;
}
else
{
return true;
}
}
}
function validate_form(thisform)
{
with (thisform)
{
if (validate_required(email,"Email must be filled out!")==false)
{email.focus();return false;}
}
}
</script>
</head>
<body>
<form action="submit.htm" onSubmit="return validate_form(this)" method="post">
Email: <input type="text" name="email" size="30">
<input type="submit" value="Submit">
</form>
</body>
</html>
@Action
public Task refresh() {
return new RefreshTask(MyApp.getApplication());
}
private class RefreshTask extends Task {
RefreshTask(org.jdesktop.application.Application app) {
super(app);
}
@SuppressWarnings("unchecked")
@Override
protected Void doInBackground() {
setProgress(0, 0, 4);
setMessage("Rolling back the current changes...");
setProgress(1, 0, 4);
entityManager.getTransaction().rollback();
setProgress(2, 0, 4);
setMessage("Starting a new transaction...");
entityManager.getTransaction().begin();
setProgress(3, 0, 4);
setMessage("Fetching new data...");
java.util.Collection data = query.getResultList();
for (Object entity : data) {
entityManager.refresh(entity);
}
setProgress(4, 0, 4);
*masterTable.setVisible(false);
list.clear();
list.addAll(data);
return null;
}
@Override
protected void finished() {
setMessage("Done.");
setSaveNeeded(false);
masterTable.setVisible(true);
masterTable.revalidate();
masterTable.repaint();
}
}
escape("It's me!") // result: It%27s%20me%21
@Overrideprotected void startup() {//Exit ListeneraddExitListener(new ExitListener() {public boolean canExit(EventObject event) {System.out.println("canExit event occur");getApplication().getMainFrame().setVisible(false);return false;}public void willExit(EventObject event) {System.out.println("willExit event occur");}});show(new MyApp(this));}
EntityManagerFactory emf = Persistence.createEntityManagerFactory(
"JPATutorialPU" );
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();try {Query query = em.createQuery("SELECT i FROM Item i WHERE i.name LIKE :keyword");
query.setParameter("keyword","%"keyword"%");
Item item = (Item)query.getResultList();String myitem = item.getItem();} catch (Exception e) {
System.out.println( e.getMessage() );
em.getTransaction().rollback();
} finally {
em.close();
}
JFrame frame = main.getFrame();
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
Properties properties = new Properties();
try {
properties.setProperty("nome_chiave", "valore");
properties.store(new FileOutputStream("config.properties"),null);
} catch (IOException ex) {
System.err.println(ex);
}
super.windowClosing(e);
}
});
FrameView main = new FrameView(this);
final JFrame frame = main.getFrame();
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowOpened(WindowEvent e) {
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
}
});
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setMinimumSize(new Dimension(800, 600));
show(main);
@echo offLe variabili da impostare sono:
rem --- Variables ---------------------------------
set VMWAREINSTALLPATH=C:\Programmi\VMware\VMware Server
set VMPATH=D:\VirtualMachines\Windows XP Professional
set VMVMX=Windows XP Professional.vmx
set BACKUPDESTINATION=c:\Virtual Machines
set LOGFILE=c:\Virtual Machines\log.txt
rem ---------------------------------------------------
setlocal
set PATH=%PATH%;%VMWAREINSTALLPATH%
set VAR="%VMWAREINSTALLPATH%\perl.exe" "%VMWAREINSTALLPATH%\vmware-cmd" "%VMPATH%\%VMVMX%" getstate
echo Starting Backup Procedure on %date% at %time%... > "%LOGFILE%"
:checkvmstatus
echo Checking %VMVMX% VM status... >> "%LOGFILE%"
FOR /F "tokens=3 delims= " %%R IN ('"%VAR%"') DO SET RESULT=%%R
echo %VMVMX% VM status is "%RESULT%"... >> "%LOGFILE%"
if "%RESULT%" EQU "on" goto poweroffvm
if "%RESULT%" EQU "off" goto copyandrestartvm
goto quit
:poweroffvm
echo Stopping %VMVMX% VM... >> "%LOGFILE%"
"%VMWAREINSTALLPATH%\perl.exe" "%VMWAREINSTALLPATH%\vmware-cmd" "%VMPATH%\%VMVMX%" stop >> "%LOGFILE%"
rem echo Waiting 60 seconds... >> "%LOGFILE%"
rem sleep -m 60000
goto checkvmstatus
:copyandrestartvm
echo Starting %VMVMX% VM Backup... >> "%LOGFILE%"
xcopy "%VMPATH%"\*.* "%BACKUPDESTINATION%"\*.* /E /C /I /F /H /Y >> "%LOGFILE%"
echo %VMVMX% VM Backup finished... restarting %VMVMX% VM... >> "%LOGFILE%"
"%VMWAREINSTALLPATH%\perl.exe" "%VMWAREINSTALLPATH%\vmware-cmd" "%VMPATH%\%VMVMX%" start >> "%LOGFILE%"
FOR /F "tokens=3 delims= " %%R IN ('"%VAR%"') DO SET RESULT=%%R
echo %VMVMX% VM status is now "%RESULT%"... >> "%LOGFILE%"
goto quit
:quit
echo Quitting Backup Procedure on %date% at %time% ... >> "%LOGFILE%"
exit