There is no + Strings Concatenator in Dart <font size=-2><a href=http://www.lifemichael.com/en/?page_id=73 target=_blank>PRO</a></font>
Dart doesn’t provide us with the + operator for concatenating strings. If we want to connect few strings into a new big one we can just place them side by side. void main() { var a = “hello”; var b = “students”; var str = “hello ” “students”; print(str); } The following video clips overviews […]
Ignoring String Interpolation in Dart <font size=-2><a href=http://www.lifemichael.com/en/?page_id=73 target=_blank>PRO</a></font>
Prefixing the string with ‘r’ will cancel any string interpolation within that string. The following code sample shows that. void main() { var numA = 3; var numB = 4; print(r”$numA + $numB = ${numA+numB}”); } The following video clip shows the execution of this code sample, overviews it and explains it.
Strings Interpolation in Dart <font size=-2><a href=http://www.lifemichael.com/en/?page_id=73 target=_blank>PRO</a></font>
Using the $ character or the ${ } expression within single or double quotes we can convert a non-string value or an expression into string. When converting a single variable into string we will just prefix that variable with the $ sign. When converting an expression we will write it within the curly braces of […]
Multiline Strings in Dart <font size=-2><a href=http://www.lifemichael.com/en/?page_id=73 target=_blank>PRO</a></font>
Using three double quotes we can create strings that span over more than one line. The following code sample shows how to do it. void main() { var str = “”” we all love coding… especially when using a great programming language! “””; print(str); } The following video clip shows the execution of this code […]
Hello World in Dart <font size=-2><a href=http://www.lifemichael.com/en/?page_id=73 target=_blank>PRO</a></font>
Dart is an open source class based, object oriented, optionally typed programming language that allows us to develop browser based one page web applications. We can execute the code that should run on the client side either by using a web browser that supports Dart or by compiling our code into JavaScript. Using the Dart […]
The Android Search Framework <font size=-2><a href=http://www.lifemichael.com/en/?page_id=73 target=_blank>PRO</a></font>
The android platform provides us with a search framework that helps us implementing search mechanism in our application. We can allow the user to enter the searched term either through a search dialogue shown on top of the screen or through a search view widget. When developing an application that includes a searching mechanism we […]
Comparing Arrays in PHP <font size=-2><a href=http://www.lifemichael.com/en/?page_id=73 target=_blank>PRO</a></font>
PHP allows us to compare two arrays using the == and the === operators. The following code sample together with the video clip that follows explain the way each one of these two operators work. <?php //$a = [‘a’=>’avodado’,’b’=>’bamba’,’c’=>’calco’]; //$b = [‘b’=>’bamba’,’a’=>’avodado’,’c’=>’calco’]; $a = [123,455,323]; $b = [323,123,455]; if($a==$b) { echo “a and b equal”; […]
The list Construct in PHP <font size=-2><a href=http://www.lifemichael.com/en/?page_id=73 target=_blank>PRO</a></font>
The list construct in PHP allows us an easy assignment of values that belong to array into variabels in our code. The list construct is highly useful when developing code that works with a relational database. The following code sample shows a simple usage for the list construct. <?php $vec = [2=>”dave”,1=>”ron”,0=>”chen”,3=>”ran”]; list($a,$b,$c) = $vec; […]
The usort Function in PHP <font size=-2><a href=http://www.lifemichael.com/en/?page_id=73 target=_blank>PRO</a></font>
The usort function allows us to specify the criteria by which the array will be sorted. The following code sample includes the definition of the class Student and the creation of an array that its values are references for objects instantiated from Student. Using the usort function we can sort the students according to their […]
PhoneGap Jump Start for iOS <font size=-2><a href=http://www.lifemichael.com/en/?page_id=73 target=_blank>PRO</a></font>
You can find a detailed jump start tutorial for doing the first steps at docs.phonegap.com. In order to assist developers when following this jump start tutorial I chose to create a short video clip in which I create a simple phone gap hybrid application for the iOS platform.