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/bin/python | |
import sys | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
import urllib2 | |
class Form( QDialog ): | |
def __init__( self, parent = None ): | |
super( Form, self ).__init__( parent ) |
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 function load_cat_names() { | |
return dispatch => { | |
return fetch( '/?token=' + vitals.token, { | |
method : 'POST', | |
headers : { | |
'X-Requested-With' : 'XMLHttpRequest' | |
}, | |
body : JSON.stringify({ action : 'cat_names' }), | |
credentials : 'same-origin' | |
}) |
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 | |
$you = 1; | |
$p = 2; | |
$f = [ $you, $p ]; | |
// Random conversation | |
$conv = mt_rand( 0, 3 ); | |
// At the beginning set the last date of conversation | |
$cur_date = '2017-02-06'; | |
$x[ $p ][ $you ] = [ $cur_date => $conv ]; |
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 | |
require_once( __DIR__ . '/aws/aws-autoloader.php' ); | |
use Aws\S3\S3Client; | |
define( 'AWS_S3', [ | |
'key' => '', | |
'secret' => '', | |
'bucket' => '' | |
]); |
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 React, { Component } from "react"; | |
import { withScriptjs, withGoogleMap, GoogleMap, Marker } from "react-google-maps"; | |
import Datamap from 'datamaps' | |
import API from '../../../../api/MapKey'; | |
class Map extends Component { | |
constructor( props ) { | |
super( props ) | |
this.state = { |
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
<html> | |
<body> | |
<stream src="84d67cc5b2639fcbdc25cbc78b5f1268" controls preload autoplay loop mute></stream> | |
<script data-cfasync="false" defer type="text/javascript" src="https://embed.videodelivery.net/embed/r4xu.fla9.latest.js?video=84d67cc5b2639fcbdc25cbc78b5f1268"></script> | |
<script> | |
var firstStreamElement = document.getElementsByTagName('stream')[0]; | |
firstStreamElement.addEventListener( 'play', function( e ) { | |
e.target.currentTime = 3; | |
}) |
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 | |
$numbers = [ 3,3,2,2,56,4,4 ]; | |
$checked = []; | |
foreach( $numbers as $number ) { | |
$checked[ $number ] = !empty( $checked[ $number ] ) ? $checked[ $number ] + 1 : 1; | |
} | |
asort( $checked ); | |
echo current( array_keys( $checked ) ); |
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 <stdlib.h> | |
_Bool in_array(); | |
int *pop_array(); | |
void main() { | |
int numbers[] = { 1, 2, 2, 4, 4, 1, 5, 6, 5 }; | |
int length = sizeof( numbers ) / sizeof( numbers[ 0 ] ); | |
int lucky = 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
char *file_get_contents(); | |
int main() { | |
char *str = file_get_contents( "test.txt" ); | |
printf( "%s", str ); | |
free( str ); |
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 <sys/stat.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <dirent.h> | |
#include <string.h> | |
void list_files(); | |
void main( int argc, char * argv[] ) { | |
list_files( argv[1], 0 ); |
OlderNewer