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 | |
function filterFile($path) | |
{ | |
// Read file as array | |
$content = file($path); | |
// Remove anything before 'Best rules found:' line | |
$filtered = array_slice($content, array_search("Best rules found:\n", $content)); |
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 HelloWorld | |
{ | |
public static void main(String[] args) | |
{ | |
int numbers[] = new int[100]; | |
int i = 0; | |
int sum = 0; | |
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
private func filterUser(for searchText: String) { | |
if searchText.isEmpty { | |
return | |
} | |
let parameters: Parameters = ["q": searchText.lowercased()] | |
Alamofire.request("https://api.github.com/search/users", method: .get, parameters: parameters) | |
.validate() | |
.responseJSON(completionHandler: { [weak self] response in |
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 Foundation | |
import Moya | |
enum GithubService { | |
case searchUsers(query: String) | |
} | |
extension GithubService: TargetType { | |
var baseURL: URL { | |
return URL(string: "https://api.github.com")! |
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
private func filterUser(for searchText: String) { | |
if searchText.isEmpty { | |
return | |
} | |
let githubServiceProvider = MoyaProvider<GithubService>() | |
githubServiceProvider.request(.searchUsers(query: searchText), completion: { [weak self] result in | |
switch result { | |
case .success(let response): |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Learn Vue</title> | |
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> | |
</head> | |
<body> |
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 { HostListener, ElementRef, ViewChild } from '@angular/core'; | |
export abstract class CanProcessBarCode { | |
/** | |
* Key to press in combination with `Alt` key to focus on the input. | |
* For example: `KeyD` for `Alt + D` combination. | |
*/ | |
altShortCutCode: string; | |
/** |
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
export default class App { | |
constructor() { | |
console.log('hello todo!'); | |
} | |
} |
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
class App { | |
constructor() { | |
console.log('hello todo!'); | |
} | |
} | |
document.addEventListener('DOMContentLoaded', () => { | |
const app = new App(); | |
}); |
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
export default class App { | |
constructor() { | |
console.log('hello todo!'); | |
} | |
} |
OlderNewer