Skip to content

Instantly share code, notes, and snippets.

var letters = [];
var rword = "";
putstr("Enter a sentence: ");
var sentence = readline();
var sword = "";
for (var i = 0; i < sentence.length; i++) {
if (sentence[i] == " ") {
;
}
'afterAjaxUpdate'=>"function(){jQuery('#Presensi_waktu').datepicker({'showAnim':'fold','showOn':'focus','dateFormat':'dd-mm-yy','changeMonth':'true','changeYear':'true'})}",
array(
'name'=>'tanggal',
'value'=>'$data->tanggal."-".$data->bulan."-".$data->tahun',
'filter'=>$this->widget('zii.widgets.jui.CJuiDatePicker', array(
'name'=>'Presensi[waktu]',
'options'=>array(
'showAnim'=>'fold', // 'show' (the default), 'slideDown', 'fadeIn', 'fold'
<link rel="import" href="../notification-elements/notification-alert.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../paper-toast/paper-toast.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
' Specific Cell Contents to string - (row 0, cell 0)
Dim s As String = Me.DataGridView1.Rows(0).Cells(0).Value
' Selected Cell
Dim s As String = Me.DataGridView1.SelectedCells(0).Value
' A single string containing all selected cell values
Dim s As String = ""
Public Module Example
Public Sub Main()
' Create a one-dimensional integer array.
Dim integers() As Integer = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 }
' Get the upper and lower bound of the array.
Dim upper As Integer = integers.GetUpperBound(0)
Dim lower As Integer = integers.GetLowerBound(0)
Console.WriteLine("Elements from index {0} to {1}:", lower, upper)
' Iterate the array.
For ctr As Integer = lower To upper
Public Class ListPusher
Public Value As Object
Public Description As String
Public Sub New(ByVal NewValue As Object, ByVal NewDescription As String)
Value = NewValue
Description = NewDescription
End Sub
Public Overrides Function ToString() As String
Dim s As String = ""
Dim bound0 As Integer = penampunganNilaiHujan.GetUpperBound(0)
Dim bound1 As Integer = penampunganNilaiHujan.GetUpperBound(1)
' Loop over all elements.
For i As Integer = 0 To bound0
For x As Integer = 0 To bound1
' Get element.
Dim s1 As String = penampunganNilaiHujan(i, x)
function shorten_string($string, $wordsreturned)
/* Returns the first $wordsreturned out of $string. If string
contains fewer words than $wordsreturned, the entire string
is returned.
*/
{
$retval = $string; // Just in case of a problem
$array = explode(" ", $string);
if (count($array)<=$wordsreturned)
Edit index-test.php:
$boot=dirname(__FILE__).'/protected/tests/bootstrap.php';
require_once($boot);
- Run CMD as Administrator
- cd C:\xampp\htdocs\contest2\protected\tests
- pear config-set auto_discover 1
- pear install pear.symfony.com/Yaml
- pear install --alldeps pear.phpunit.de/PHPUnit
- pear install Testing_Selenium-beta
/* $sql = 'SELECT *
FROM pelanggan, (
SELECT id_pelanggan, COUNT( id ) AS total_promo, SUM( jumlah_resi ) AS jumlah_resi, SUM( total_nominal ) AS total_transaksi
FROM `promo`
GROUP BY id_pelanggan
) AS x
WHERE id = x.id_pelanggan'; */
$criteria = new CDbCriteria();
$criteria->compare('customer.nama',$this->nama,true);