- install Guzzle HTTP library :
composer require guzzlehttp/guzzle
- [sign up to mailgun] (http://www.mailgun.com)
- Go to
Domains
tab and click on domains - You will find the necessary data for
.env
setup- MAIL_DRIVER=mailgun
- MAIL_HOST=smtp.mailgun.org
- MAIL_PORT=587
- MAIL_USERNAME=postmaster@sandbox------------------------------6f.mailgun.org
- MAIL_PASSWORD=502fd951f7------------------------
This file contains 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
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use App\Reward; | |
use Illuminate\Support\Facades\Auth; | |
use Illuminate\Support\Facades\Session; | |
class RewardMiddleware |
This file contains 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 java.util.Scanner; | |
public class Solution { | |
static boolean isAnagram(String a, String b) { | |
// // once you declare a.toUppercase you should assign it to a. you cannot define it as just a.toUppercase... | |
// //I solved it with the long way however I could put a and b in a character array and then use Arrays.sort(arrayname). after this steps convert them to string and check if they are equel. | |
a=a.toUpperCase(); | |
b=b.toUpperCase(); | |
boolean ret = false; | |
StringBuilder c= new StringBuilder(b); |
This file contains 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'; | |
/**************************************** | |
* Chapter 3 Exercises: Functions | |
***************************************** | |
#EXERCISE 1: Minimum | |
The previous chapter introduced the standard function Math.min that returns | |
its smallest argument. We can do that ourselves now. Write a function min that |
This file contains 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
/**************************** | |
Chapter 4: Reversing an Array | |
***************************** | |
Arrays have a method reverse, which changes the array by inverting the order in which its elements appear. | |
For this exercise, write two functions, reverseArray and reverseArrayInPlace. | |
The first, reverseArray, takes an array as argument and produces a new array that has the same elements in the inverse order. | |
The second, reverseArrayInPlace, does what the reverse method does: | |
it modifies the array given as argument in order to reverse its elements. Neither may use the standard reverse method. | |
*/ |
This file contains 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
/* | |
My answer for exercise 'Looping a triangle' | |
in Eloquent JavaScript Second Edition | |
Chapter 2 Program Structure | |
*/ | |
var note = ''; | |
for (var i = 0; i < 7; i++) { | |
console.log(note += '#'); | |
} |
This file contains 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
var Isogram = function(w){ | |
var word = w.toLowerCase().split(''); | |
this.isIsogram = function(){ | |
var letters = new Object(null); | |
for(var i = 0; i < word.length; i++){ | |
This file contains 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
/* | |
My answer for exercise 'Looping a triangle' | |
in Eloquent JavaScript Second Edition | |
Chapter 2 Program Structure | |
*/ | |
var note = ''; | |
for (var i = 0; i < 7; i++) { | |
console.log(note += '#'); | |
} |
I have following object:
var cities={10:'Tashkent', 14:'Karakalpakiya', 16:'Andijan'};
I want sort it by city names, so after sort it should be:
var cities={16:'Andijan', 14:'Karakalpakiya', 10:'Tashkent'};
But I can't sort object properties, instead can convert object into array, then sort items.
This file contains 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
// Example Pseudo-class | |
var Animal = (function() { | |
function Animal(name) { | |
this.name = name; | |
} | |
Animal.prototype.getName = function () { | |
return this.name; | |
}; |
NewerOlder