for i in `find $WORKDIR/*Alarm* -mtime 1 -type f` do some task done
After I changed to use below script, it worked as expected.
for i in `find $WORKDIR -name ‘*Alarm*’ -mtime 1 -type f` do some task done
for i in `find $WORKDIR/*Alarm* -mtime 1 -type f` do some task done
for i in `find $WORKDIR -name ‘*Alarm*’ -mtime 1 -type f` do some task done
SELECT a.index_name, a.column_name, b.column_expression FROM all_ind_columns a LEFT JOIN all_ind_expressions b ON A.index_name = b.index_name AND A.column_position = b.column_position WHERE a.index_name='table_name$unique_index_name';
table_name$unique_index_name SYS_NC00031$ TRUNC("UPDATE_DATE")
void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e) { if (e.Column.HeaderText == "Status") { RadComboBoxEditor editor = this.radGridView1.ActiveEditor as RadComboBoxEditor; RadComboBoxEditorElement element = editor.EditorElement as RadComboBoxEditorElement; element.DataSource = new string[] { "UP", "DOWN" }; element.SelectedValue = null; element.SelectedValue = this.radGridView1.CurrentCell.Value; } }
private String getJidFromPresencePacket(Presence p) { Collection<PacketExtension> extensions = p.getExtensions(); if (extensions instanceof List && !extensions.isEmpty()) { Object obj = ((List<?>)extensions).get(0); if (obj instanceof MUCUser) { MUCUser.Item item = ((MUCUser)obj).getItem(); if (item != null) { return item.getJid(); } } } return p.getFrom(); }
private String getJidFromPresencePacket(Presence p) { MUCUser mucUser = (MUCUser)p.getExtension("x", "http://jabber.org/protocol/muc#user"); if (mucUser != null) { MUCUser.Item item = mucUser.getItem(); if (item != null) { return item.getJid(); } } return p.getFrom(); }
StringUtils.parseBareAddress(JID)
<subsystem xmlns="urn:jboss:domain:logging:1.1">
<console-handler name="CONSOLE">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
</console-handler>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<root-logger>
<level name="WARN"/>
<handlers>
<handler name="CONSOLE"/>
</handlers>
</root-logger>
</subsystem>
<subsystem xmlns="urn:jboss:domain:logging:1.1">
<periodic-rotating-file-handler name="FILE">
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<root-logger>
<level name="WARN"/>
<handlers>
<handler name="CONSOLE"/>
</handlers>
</root-logger>
</subsystem>
<subsystem xmlns="urn:jboss:domain:logging:1.1">
<size-rotating-file-handler name="FILE">
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<append value="true"/>
<!-- size of a log file -->
<rotate-size value="20M"/>
<!-- no of log files to keep -->
<max-backup-index value="50"/>
</size-rotating-file-handl
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<root-logger>
<level name="WARN"/>
<handlers>
<handler name="CONSOLE"/>
</handlers>
</root-logger>
</subsystem>
exec://sh?args=-c+%22./someexec%22It's pretty easy.
someexec: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
It means that your executable is 64 bits but you're running it on a 32-bit OS.ifconfig eth0:1.1.4.21 1.1.4.21 netmask 255.255.255.0
On the other hand, if you want to disable IP aliasing, you can execute a command like:ifconfig eth0:1.1.4.21 down
exec://sh?args=-c+%22ifconfig+eth2%3A1.1.3.21+1.1.3.21+netmask+255.255.255.0%22&timeout=60000
And to disable it, use the following URL:exec://sh?args=-c+%22ifconfig+eth2%3A1.1.4.21+down%22&timeout=60000
If alias was already set and you want to enable it again, or the alias is disabled and you want to disable it again, you'll get some error message, like Cannot assign requested address
public delegate void UpdateStatusDelegate(StatusData data); public void UpdateStatus(StatusData data) { if (!this.radGridView1.InvokeRequired) { UpdateStatus0(data); } else { UpdateStatusDelegate del = new UpdateStatusDelegate(UpdateStatusRowStatus); this.radGridView1.Invoke(del, new object[] { data }); } } private void UpdateStatus0(StatusData data) {//do actual update thing }
ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS';
select * from all_indexes where index_name='table_name$unique_index_name';
select * from all_ind_columns where index_name='table_name$unique_index_name';
SELECT FROM_TIMESTAMP, TO_TIMESTAMP, ( to_number(TO_CHAR(FROM_TIMESTAMP, 'J') * 86400 + TO_CHAR(FROM_TIMESTAMP, 'SSSSS')) - to_number(TO_CHAR(TO_TIMESTAMP, 'J') * 86400 + TO_CHAR(TO_TIMESTAMP, 'SSSSS')) ) TIME_DIFF FROM SOME_TABLE;
String rootDir = System.getProperty("rootDir"); StringBuffer path = new StringBuffer(); path.append(rootDir); path.append("/spring-context.xml"); ApplicationContext ctx = new FileSystemXmlApplicationContext(path.toString());
<system-properties> <property name="rootDir" value="/opt/jboss-as-7.1.1.Final/modules/someproject/main/conf"/> </system-properties>
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/root/opt/jboss-as-7.1.1.Final/modules/com/someproject/main/conf/spring-context.xml]; nested exception is java.io.FileNotFoundException: opt/jboss-as-7.1.1.Final/modules/com/someproject/main/conf/spring-context.xml (The system cannot find the path specified)
protected Resource getResourceByPath(String path) { if (path != null && path.startsWith("/")) { path = path.substring(1); } return new FileSystemResource(path); }
<b>NOTE:</b> Plain paths will always be interpreted as relative * to the current VM working directory, even if they start with a slash. * (This is consistent with the semantics in a Servlet container.) * <b>Use an explicit "file:" prefix to enforce an absolute file path.</b>
<system-properties> <property name="rootDir" value="//opt/jboss-as-7.1.1.Final/modules/someproject/main/conf"/> </system-properties>
<system-properties> <property name="rootDir" value="file:/opt/jboss-as-7.1.1.Final/modules/someproject/main/conf"/> </system-properties>
FINE [org.hornetq.core.asyncio.impl.AsynchronousFileImpl] HornetQAIO -> error loading the native library java.lang.UnsatisfiedLinkError: no HornetQAIO in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source)
<?xml version="1.0" encoding="UTF-8"?> <project> <modelVersion>4.0.0</modelVersion>
<!-- The Basics --> <groupId>...</groupId> <artifactId>...</artifactId> <version>...</version> <packaging>...</packaging> <dependencies>...</dependencies> <parent>...</parent> <dependencyManagement>...</dependencyManagement> <modules>...</modules> <properties>...</properties>
<!-- Build Settings --> <build>...</build> <reporting>...</reporting> <!-- Project Meta Data --> <name>...</name> <description>...</description> <url>...</url> <inceptionYear>...</inceptionYear> <licenses>...</licenses> <organization>...</organization> <developers>...</developers> <contributors>...</contributors>
<!-- Environment --> <issueManagement>...</issueManagement> <ciManagement>...</ciManagement> <mailingLists>...</mailingLists> <scm>...</scm> <prerequisites>...</prerequisites> <repositories>...</repositories> <pluginRepositories>...</pluginRepositories> <distributionManagement>...</distributionManagement> <profiles>...</profiles> </project>
<title><data:blog.pageTitle/></title>
<b:if cond='data:blog.pageType == "item"'> <title><data:blog.pageName/> - <data:blog.title/></title> <b:else/> <title><data:blog.pageTitle/></title> </b:if>
<meta name="author" content="Zhang Hao"/>
pre {
white-space:pre-wrap;
}
import org.hibernate.cfg.reveng.dialet.JDBCMetaDataDialect ; public class PostgreSQLMetaDialect extends JDBCMetaDataDialect { public boolean needQuote(String name) { if(null != name && 0 != name.compareTo(name.toLowerCase())) { return true; } else { return super.needQuote(name); } } }
hibernatetool.metadatadialect=somepackage.PostgreSQLMetaDialect
<module xmlns="urn:jboss:module:1.1" name="sun.jdk"> <resources> <resource-root path="service-loader-resources"/> </resources> <dependencies> <system export="true"> <paths> <path name="com/sun/crypto/provider"/> <path name="com/sun/script/javascript"/> <path name="com/sun/jndi/dns"/> <path name="com/sun/jndi/ldap"/> <path name="com/sun/jndi/url"/> <path name="com/sun/jndi/url/dns"/> <path name="com/sun/security/auth"/> <path name="com/sun/security/auth/login"/> <path name="com/sun/security/auth/module"/> <path name="sun/misc"/> <path name="sun/io"/> <path name="sun/nio"/> <path name="sun/nio/ch"/> <path name="sun/security"/> <path name="sun/security/krb5"/> <path name="sun/util"/> <path name="sun/util/calendar"/> <path name="sun/util/locale"/> <path name="sun/security/provider"/> <path name="META-INF/services"/> </paths> <exports> <include-set> <path name="META-INF/services"/> </include-set> </exports> </system> </dependencies>
void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { AnimatedPropertySetting setting = new AnimatedPropertySetting(); setting.Property = GridCellElement.BackColorProperty; setting.StartValue = oldColor; setting.EndValue = newColor; setting.Interval = 100; setting.NumFrames = 50; setting.AnimatorStyle = AnimatorStyles.AnimateAlways; setting.ApplyEasingType = RadEasingType.Default; setting.UnapplyEasingType = RadEasingType.OutCircular; setting.ApplyValue(e.CellElement.RowElement); }
void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { e.cellElement.ForeColor = Color.Blue; }
void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { e.CellElement.BackColor = Color.Yellow }
void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { e.CellElement.RowElement.BackColor = Color.Yellow }
void radGridView_CellClick(object sender, GridViewCellEventArgs e) { if (sender is Telerik.WinControls.UI.GridGroupExpanderCellElement) return; GridViewGroupRowInfo rowInfo = e.Row as GridViewGroupRowInfo; if (rowInfo == null) return; rowInfo.IsExpanded = !rowInfo.IsExpanded; }
void radGridView_GroupSumaryEvaluate(object sender, GroupSummaryEvaluationEventArgs e) { if (e.SummaryItem.FieldName == "Name") { e.FormatString = String.Format("Name: {0}", e.Value); } }
radGridView.ContextMenuOpening += new ContextMenuOpeningEventHandler(radGridView_ContextMenuOpening);
void radGridView_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e) { if (e.ContextMenu == null || e.ContextMenu.Items == null) return; RadGridView radGridView = sender as RadGridView; if (radGridView == null) return; for (int i = 0; i < e.ContextMenu.Items.Count; i++) { if (e.ContextMenu.Items[i].Text == "Column Chooser" || e.ContextMenu.Items[i].Text == "Hide Column") { e.ContextMenu.Items[i].Visibility = Telerik.WinControls.ElementVisibility.Collapsed; } } RadMenuItem hideColumnsMenuItem = new RadMenuItem(); hideColumnsMenuItem.Text = "Show/Hide Columns"; int noOfColumnVisible = 0; foreach (GridViewColumn col in radGridView.Columns) { if (col.IsVisible) { noOfColumnVisible++; } } foreach (GridViewColumn column in radGridView.Columns) { GridViewDataColumn col = column as GridViewDataColumn; if (col == null || col.IsGrouped) continue; CheckBoxTag checkBoxTag = new CheckBoxTag(); checkBoxTag.ColumnName = col.UniqueName; checkBoxTag.ColumnWidth = col.Width; checkBoxTag.RadGridView = radGridView; checkBoxTag.RadMenuItem = hideColumnsMenuItem; RadCheckBoxElement columnVisibilityCheckBox = new RadCheckBoxElement(); columnVisibilityCheckBox.MouseDown += new MouseEventHandler(columnVisibilityCheckBox_MouseDown); columnVisibilityCheckBox.Text = col.HeaderText; columnVisibilityCheckBox.Tag = checkBoxTag; if (column.IsVisible) { columnVisibilityCheckBox.ToggleState = ToggleState.On; if (noOfColumnVisible <= 1) { columnVisibilityCheckBox.Enabled = false; } } else { columnVisibilityCheckBox.ToggleState = ToggleState.Off; } hideColumnsMenuItem.Items.Add(columnVisibilityCheckBox); } e.ContextMenu.Items.Add(hideColumnsMenuItem); } void columnVisibilityCheckBox_MouseDown(object sender, MouseEventArgs e) { RadCheckBoxElement checkBox = sender as RadCheckBoxElement; CheckBoxTag checkBoxTag = checkBox.Tag as CheckBoxTag; string name = checkBoxTag.ColumnName; RadGridView radGridView = checkBoxTag.RadGridView; RadMenuItem radMenuItem = checkBoxTag.RadMenuItem; GridViewDataColumn column = radGridView.Columns[name] as GridViewDataColumn; if (column == null) return; int noOfColumnVisible = 0; foreach (GridViewColumn col in radGridView.Columns) { if (col.IsVisible) { noOfColumnVisible++; } } if (noOfColumnVisible <= 1) { if (checkBox.ToggleState != ToggleState.On) { column.IsVisible = true; foreach (Object obj in radMenuItem.Items) { RadCheckBoxElement checkBox2 = obj as RadCheckBoxElement; if (checkBox2 == null) continue; checkBox2.Enabled = true; } } } else { if (checkBox.ToggleState == ToggleState.On) { column.IsVisible = false; noOfColumnVisible--; if (noOfColumnVisible == 1) { foreach (Object obj in radMenuItem.Items) { RadCheckBoxElement checkBox2 = obj as RadCheckBoxElement; if (checkBox2 == null) continue; CheckBoxTag checkBoxTag2 = checkBox2.Tag as CheckBoxTag; if (checkBoxTag2 == null) continue; string name2 = checkBoxTag2.ColumnName; RadGridView radGridView2 = checkBoxTag2.RadGridView; GridViewColumn column2 = radGridView2.Columns[name2] as GridViewColumn; if (column2 == null) continue; if (column2.IsVisible) { checkBox2.Enabled = false; break; } } } } else { column.IsVisible = true; } } }
class CheckBoxTag { public int ColumnWidth { set; get; } public string ColumnName { set; get; } public RadGridView RadGridView { set; get; } public RadMenuItem RadMenuItem { set; get; } }
<subsystem xmlns="urn:jboss:domain:remoting:1.1"> <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/> </subsystem>
<subsystem xmlns="urn:jboss:domain:messaging:1.1"> <hornetq-server> <security-enabled>false</security-enabled> ...... </hornetq-server> </subsystem>
<server> <extensions> </extensions> <system-properties> <property name="propertyName" value="property value"/> </system-properties> </server>
<bean id="jmsTopicTemplate" class="org.springframework.jms.core.JmsTemplate"> <constructor-arg ref="connectionFactory" /> <property name="pubSubDomain" value="true"/> </bean>
<ul class="clearfix"> <li><a href="#bg1">content1</a></li> <li><a href="#bg2">content2</a></li> <li><a href="#bg3">content3</a></li> </ul>
li:nth-of-type(1) a::after{ background: url(sbg1.jpg) no-repeat center; } li:nth-of-type(2) a::after{ background: url(sbg2.jpg) no-repeat center; } li:nth-of-type(3) a::after{ background: url(sbg3.jpg) no-repeat center; }
a:nth-of-type(1)::after{ background: url(sbg1.jpg) no-repeat center; } a:nth-of-type(2)::after{ background: url(sbg2.jpg) no-repeat center; } a:nth-of-type(3)::after{ background: url(sbg3.jpg) no-repeat center; }
<p:gmap center="41.381542, 2.122893" zoom="15" type="HYBRID" style="width:600px;height:400px" />
<exec executable="cmd" argument="RAW(/c c:/batch1.bat;&c:/batch2.bat)"/>
<exec executable="sh" argument="-c "cd /product;./executable1;cd /customer;./executable2""/>
<exec executable="cmd" argument="/c c:/batch1.bat;c:/batch2.bat"/>
<exec executable="cmd" argument="/c c:/batch1.bat;&c:/batch2.bat"/>
<exec executable="cmd" argument="RAW(/c c:/batch1.bat;&c:/batch2.bat)"/>
<exec executable="cmd" argument="/c RAW(c:/batch1.bat;&c:/batch2.bat)"/>
<c:choose> <c:when test="${status == 1}"> <p:graphicImage value="green.png" /> </c:when> <c:when test="${status == 2}"> <p:graphicImage value="red.png" /> </c:when> <c:otherwise> <p:graphicImage value="blue.png" /> </c:otherwise> </c:choose>
<p:graphicImage value="green.png" rendered="#{status == 1}/> <p:graphicImage value="red.png" rendered="#{status == 2}/> <p:graphicImage value="blue.png" rendered="#{status != 1 and status != 2}/>
<p:graphicImage id="statusImage" value="green.png" rendered="#{status == 1}/> <p:graphicImage id="statusImage" value="red.png" rendered="#{status == 2}/> <p:graphicImage id="statusImage" value="blue.png" rendered="#{status != 1 and status != 2}/>
function updateStatusImage(status) { var image; if (status == 1) image = 'green.png'; else if (status == 2) image = 'red.png'; else image = 'blue.png'; $('#form img').attr('src', image); }Check more details here.