This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def starts_with_uppercase(word): | |
| return word and 'A' <= word[0] <= 'Z' | |
| def abbr_words(s: str): | |
| words = s.split(' ') | |
| print(words) | |
| flag_map = [False] * len(words) | |
| # loop until second last since are checking current and next item | |
| for i in range(len(words) - 1): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:async'; | |
| import 'dart:convert'; | |
| import 'dart:io'; | |
| var STORE = new List<Profile>(); | |
| var DB = new List<Profile>(); | |
| Future<void> main() async { | |
| var things = await getThings(); | |
| STORE.addAll(things); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //taking the input array | |
| var myNumbers = [14, 13, 11, 71, 7, 34, 48, 5, 44, 99, 23, 4, 29, 27, 62]; | |
| //starting number separator with the parameter | |
| function numSeparator(numbers) { | |
| //declaring two arrays | |
| var evenNums = []; | |
| var oddNums = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .blueBox { | |
| margin: 0 auto; | |
| } | |
| .container { | |
| position: absolute; | |
| top: 50%; | |
| margin-top: -50px; | |
| left: 0; | |
| width: 100%; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Code goes here | |
| var asyncMethod = function (message){ | |
| return new Promise(function (fulfill, reject){ | |
| setTimeout(function (){ | |
| console.log(message); | |
| fulfill(); | |
| }, 1000); | |
| }); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var obj = { | |
| val : 'Hi there', | |
| printVal: function (){ | |
| console.log(this); | |
| } | |
| }; | |
| var obj2 = { | |
| val : 'What up?' | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var obj = { | |
| a: { | |
| b: { | |
| c: 'Hello World' | |
| } | |
| } | |
| }; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Toast.makeText(getApplicationContext(), names.get(position),Toast.LENGTH_LONG).show(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package ghimire.com.listview; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| import android.view.View; | |
| import android.widget.AdapterView; | |
| import android.widget.ArrayAdapter; | |
| import android.widget.ListView; | |
| import android.widget.Toast; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @author Prashant Ghimire | |
| */ | |
| import java.util.Random; | |
| public class RandomVoice { | |
| public static void main(String[] args) { | |
| System.out.println(randomVoice()); | |
| } |
NewerOlder