Skip to content

Instantly share code, notes, and snippets.

View raushankrjha's full-sized avatar
👨‍💻
Contributing to open-source

Raushan Jha raushankrjha

👨‍💻
Contributing to open-source
View GitHub Profile
main()
var name="Raushan";
print(name);
//concatenate the string
var firstname="Raushan";
var lastname="Jha";
print(firstname+" kumar "+lastname);
}
main()
{
//Boolean example
var value="";
print(value.isEmpty);
var number=20;
print(number>=30);
main()
{
//list(array) example
var citylist=["jaipur","delhi","mumbai","madhubani"];
print(citylist);
print(citylist.length);
print(citylist.removeLast());
main()
{
//maps examples
var markdetails={
//key :value
"English":"99",
"Math":"89",
"Science":"92"
main()
{
// String to int
var one = int.parse('1');
print(one);
// String to double
var onePointOne = double.parse('1.1');
print(onePointOne);
main()
{
print("Operators Example");
var a=13;
var b=25;
//perform operations
print(a+b);
print(a-b);
print(a*b);
main()
{
/*A leap year is exactly divisible by 4 except for century years (years ending with 00).
The century year is a leap year only if it is perfectly divisible by 400.*/
var year=2019;
if(year%4==0)
{
if(year%100==0)
import 'dart:io';
main()
{
//WA Program to Swap Numbers Using Temporary Variable
var num1,num2,temp;
stdout.write("Enter first Number: ");
num1=int.parse(stdin.readLineSync());
stdout.write("Enter Second Number: ");
num2=int.parse(stdin.readLineSync());
import "dart:io";
main()
{
var num,factorial=1;
stdout.write("Enter a number");
num=int.parse(stdin.readLineSync());
for(int i=1;i<=num;i++)
{
factorial=factorial*i;
Future<List> senddata() async {
final response = await http.post("http://raushanjha.in/insertdata.php", body: {
"name": user.text,
"email": pass.text,
"mobile":mobile.text,
});
var datauser = json.decode(response.body);