1. Filter by an assistance of an array element in a document:
$and:[{assessmentPeriods:{$ne:null, $exists:true, $ne: []}} ]
2.
2.
select CASE When (table.field1 = '01') THEN CASE When (SUBSTRING_INDEX(table.field1, ' ', 1) = 'abc') THEN '01abc' ELSE 'abc' END WHEN (table.field1 = '02') THEN CASE When ((SUBSTRING_INDEX(table.field1, ' ', 1)) = 'def') THEN '02def' ELSE 'def' END When (table.field1 = '03') THEN CASE When ((SUBSTRING_INDEX(table.field1, ' ', 1)) = 'efg') THEN '03efg' ELSE 'efg' END WHEN (table.field1 = '04') THEN CASE When ((SUBSTRING_INDEX(table.field1, ' ', 1)) = 'pqr') THEN '04pqr' ELSE 'pqr' END END from table ;
git reset --hard origin/yourbranch
git push -f origin last_good_commit_hash:yourbranch
example : git push -f origin 4d875f7e3e8:develop
package com.mytech.today; public class PalindromeClient { public static boolean isPalendrome (String s) { if(s== null) { throw new RuntimeException("null value passed"); } int n = s.length(); if(n==1) return true; else { for (int i=0; i < n/2 ; i++) { if(s.charAt(i)!=s.charAt(n-i-1)) { return false; } } } return true; } public static boolean isPalendromeRecurrsive (String s) { if (s.length()<2) { return true;} else if (s.charAt(0)==s.charAt(s.length()-1)) { return isPalendrome(s.substring(1, s.length()-1)); } else return false; } public static void main(String[] args) { System.out.println(isPalendrome("levvel")); System.out.println(isPalendrome("manaplanacanalpanama"));
System.out.println(isPalendrome("a")); System.out.println(isPalendrome("jptt aefa afdaf")); System.out.println(isPalendromeRecurrsive("levvel")); System.out.println(isPalendromeRecurrsive("manaplanacanalpanama"));
System.out.println(isPalendromeRecurrsive("a")); System.out.println(isPalendromeRecurrsive("jptt aefa afdaf")); } }
function replaceLineBreaksAndSpaces(textValue) {
textValue = replaceSpaceCharacter(replaceLineBreak(textValue));
return textValue;
}
function replaceLineBreak(textValue) {
textValue = textValue.replace(/\r?\n/g, '
<br /
>');
return textValue;
}
function replaceSpaceCharacter(textValue) {
textValue = textValue.replace(/ /g, ' ');
return textValue;
}
function convertToUTCFormat(date){
var year = "" + date.getUTCFullYear();
var month = "" + (date.getUTCMonth() + 1);
if (month.length == 1) { month = "0" + month; } //months range is [0-11]
var day = "" + date.getUTCDate();
if (day.length == 1) { day = "0" + day; }
var hour = "" + date.getUTCHours();
if (hour.length == 1) { hour = "0" + hour; }
var minute = "" + date.getUTCMinutes(); if (minute.length == 1) minute = "0" + minute; } var second = "" + date.getUTCSeconds(); if (second.length == 1) { second = "0" + second; }
return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second+":000"; }
java.lang.IllegalStateException: Imbalanced frame stack! (exit() called too many times)
com.springsource.insight.intercept.trace.ThreadLocalFrameBuilder.exit(ThreadLocalFrameBuilder.java:61)
com.springsource.insight.collection.DefaultOperationCollector.exit(DefaultOperationCollector.java:111)
com.springsource.insight.collection.DefaultOperationCollector.exitAbnormal(DefaultOperationCollector.java:85)
com.springsource.insight.plugin.annotation.InsightOperationAnnotationCollectionAspect.ajc$afterThrowing$com_springsource_insight_plugin_annotation_InsightOperationAnnotationCollectionAspect$3$5840edd2(InsightOperationAnnotationCollectionAspect.aj:50)
com.concur.midtier.webservices.xmlhttp.servlets.ReqRespMessageListener.service(ReqRespMessageListener.java:165)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
var currentValue= Ext.getCmp('expName').value;
var loadedValue=
Ext.getCmp('expName').getValue();
{xtype:'label',
id:'duplicate_warning_msg',
html:''Duplicate value detected !',
hidden:true
}
Ext.getCmp('duplicate_warning_msg').setVisible(true);
DATEDIFF ( datepart , startdate , enddate )
DECLARE @startdate datetime ='2011-11-14 02:00:06.957';
DECLARE @enddate datetime = '2011-11-16 05:00:15.490';
SELECT DATEDIFF(day, @startdate, @enddate) as dayDifference,DATEDIFF(HOUR, @startdate, @enddate)as hourDifference
OutputdayDifference hourDifference
2 51
datepart
Options on the DateDiff()
Function.
year(or yy or yyyy)
quarter(or qq or q)
month (or mm or m )
dayofyear(or dy or y )
day (or dd, d )
week(or wk or ww)
hour(or hh)
minute(or mi or n)
second(or ss or s )
millisecond(or ms)
microsecond(or mcs)
nanosecond(or ns)
TZoffset(or tz)
ISO_WEEK(or isowk or isoww)
©mytechtoday.com 2006-2010