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
#include <stdio.h> | |
#include <cs50.h> | |
int main(void) | |
{ | |
// declaring your variables | |
int height; | |
int all_row; | |
int space; |
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
#include <stdio.h> | |
#include <cs50.h> | |
int main(void) | |
{ | |
// Declare and intialize variables | |
int pyramid_height = 0; | |
// Grab user input, check it and ask for retry if not within bounds | |
do { |
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
#include <memory> | |
#include <map> | |
template<typename Key, typename Value> | |
class WeakCache { | |
public: | |
template<typename... Args> | |
WeakCache(Args&&... args) | |
: cache_(std::forward<Args>(args)...) {} |
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
#!/usr/local/bin/php | |
<?php | |
$address = "mail@example.com"; // Email | |
$password = "password"; // Password | |
$server = "imap.gmail.com"; | |
$port = 993; | |
$ssl = true; | |
$results = 5; | |
$hostname = sprintf("{%s:%s/imap/ssl/novalidate-cert}[Gmail]/All Mail", $server, $port); |
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
session_start(); | |
$this->load->library('google'); | |
$client = new Google_Client(); | |
$client->setApplicationName('API Project'); | |
$client->setScopes(implode(' ', array(Google_Service_Gmail::GMAIL_READONLY))); | |
//Web Applicaion (json) | |
$client->setAuthConfigFile('key/client_secret_105219sfdf2456244-bi3lasgl0qbgu5hgedg9adsdfvqmds5c0rkll.apps.googleusercontent.com.json'); | |
$client->setAccessType('offline'); |
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
function decodeBody($body) { | |
$rawData = $body; | |
$sanitizedData = strtr($rawData,'-_', '+/'); | |
$decodedMessage = base64_decode($sanitizedData); | |
if(!$decodedMessage){ | |
$decodedMessage = FALSE; | |
} | |
return $decodedMessage; | |
} |
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
Both Refactoring and Refactoring to Patterns have approaches to resolve this. | |
If your (pseudo) code looks like: | |
class RequestHandler { | |
public void handleRequest(int action) { | |
switch(action) { | |
case LOGIN: | |
doLogin(); |
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
.carousel-inner > .item { | |
position: relative; | |
display: none; | |
-webkit-transition: 0.6s ease-in-out left; | |
-moz-transition: 0.6s ease-in-out left; | |
-o-transition: 0.6s ease-in-out left; | |
transition: 0.6s ease-in-out left; | |
} |
OlderNewer