function myExplode($str, $divider) {
$strs = explode($divider, $str);
for($i=1 ; $i<count($strs) ; $i++) {
$strs[$i] = $strs[$i-1].$divider.$strs[$i];
}
return $arr;
}
$s = "test.tests.testst.tesrtcefdg.teestcvxv";
$a = myExplode($s, ".");
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/MyLayout"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="0.33">
</RelativeLayout>
<RelativeLayout
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="0.33">
</RelativeLayout>
<RelativeLayout
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="0.33">
</RelativeLayout>
</LinearLayout>
<script type="text/javascript" src="//vk.com/js/api/openapi.js?116"></script>
<!-- VK Widget -->
<div id="vk_groups"></div>
<script type="text/javascript">
VK.Widgets.Group("vk_groups", {mode: 0, width: "220", height: "400", color1: 'FFFFFF', color2: '2B587A', color3: '5B7FA6'}, 0000000);
</script>
span {color: red;}
media (min-width: 1200px) {
.my-class{background-color: black;}
span {color: green;}
}
media (max-width: 767px) {
.my-class{background-color: green;}
span {color: black;}
}
public Test () {
String a = "";
try {
a = bytesToHex(mAES.encrypt("test"));
} catch (Exception e) {
e.printStackTrace();
}
try {
a = mAES.decrypt(hexToBytes(a));
} catch (Exception e) {
e.printStackTrace();
}
}
public static String bytesToHex(byte[] data) {
if (data==null)
{
return null;
}
int len = data.length;
String str = "";
for (int i=0; i<len; i++) {
if ((data[i]&0xFF)<16)
str = str + "0" + java.lang.Integer.toHexString(data[i]&0xFF);
else
str = str + java.lang.Integer.toHexString(data[i]&0xFF);
}
return str;
}
public static byte[] hexToBytes(String str) {
if (str==null) {
return null;
} else if (str.length() < 2) {
return null;
} else {
int len = str.length() / 2;
byte[] buffer = new byte[len];
for (int i=0; i<len; i++) {
buffer[i] = (byte) Integer.parseInt(str.substring(i*2,i*2+2),16);
}
return buffer;
}
}