Tested with angular@5.
npm i @angular/platform-server @nguniversal/express-engine @nguniversal/module-map-ngfactory-loader express @types/express ts-loader@3 rimraf --save-dev
| package main | |
| import ( | |
| "strings" | |
| "path/filepath" | |
| ) | |
| func fileNameWithoutExtension(fileName string) string { | |
| return strings.TrimSuffix(fileName, filepath.Ext(fileName)) | |
| } |
| pm.sendRequest({ | |
| url: '{{your url}}', | |
| method: 'POST', | |
| header: { | |
| 'Content-Type': 'multipart/form-data', | |
| }, | |
| body: { | |
| mode: 'formdata', | |
| formdata: [ |
| const validate = require('jsonschema').validate; | |
| let schema = { | |
| "type": "object", | |
| "properties": { | |
| "x": { | |
| "display": "X Coordinate", // This is some extra field that we give for our purpose | |
| "type": "number", | |
| "required": true // error says like 'is required' | |
| }, |
| <?php | |
| /** | |
| * AES for PHP AES/ECB/PKCS5Padding | |
| * @author kevin(email: [email protected], qq: 841694874) | |
| * @date 2016年10月25日22:27:21 | |
| * @charset utf-8 | |
| */ | |
| class Security { | |
| private $key = null; |
| import org.apache.http.client.HttpClient; | |
| import org.apache.http.client.config.CookieSpecs; | |
| import org.apache.http.client.config.RequestConfig; | |
| import org.apache.http.impl.client.CloseableHttpClient; | |
| import org.apache.http.impl.client.HttpClients; | |
| import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | |
| import org.springframework.boot.context.properties.EnableConfigurationProperties; | |
| import org.springframework.boot.web.client.RestTemplateCustomizer; |
| // Don't forget to import AVKit | |
| func encodeVideo(at videoURL: URL, completionHandler: ((URL?, Error?) -> Void)?) { | |
| let avAsset = AVURLAsset(url: videoURL, options: nil) | |
| let startDate = Date() | |
| //Create Export session | |
| guard let exportSession = AVAssetExportSession(asset: avAsset, presetName: AVAssetExportPresetPassthrough) else { | |
| completionHandler?(nil, nil) | |
| return |
| $ cat test.json | |
| json='{ "timestamp" : 1484825894873, "test" : "test"}' | |
| ab -c 10 -n 1000 -p test.json -T application/x-www-form-urlencoded https://example.com/test | |
| #https://prabuddha.me/apache-bench-ab-post-json-api/ |
| SELECT table, | |
| formatReadableSize(sum(bytes)) as size, | |
| min(min_date) as min_date, | |
| max(max_date) as max_date | |
| FROM system.parts | |
| WHERE active | |
| GROUP BY table |
| import android.support.annotation.Nullable; | |
| import android.util.Base64; | |
| import java.nio.ByteBuffer; | |
| import java.security.SecureRandom; | |
| import javax.crypto.Cipher; | |
| import javax.crypto.spec.IvParameterSpec; | |
| import javax.crypto.spec.SecretKeySpec; |