working on it ...

Filters

Explore Public Snippets

Sort by

Found 893 snippets matching: "_ _"

    public by JKCPR  2305  0  5  0

    Relational Operators

    These are primarily used to compare numeric and date/time types.
    // < less than
    // <= less than or equal to
    // > greater than
    // >= greater than or equal to
    
    SELECT <columns> FROM <table> WHERE <column name> < <value>;
    
    SELECT <columns> FROM <table> WHERE <column name> <= <value>;
    
    SELECT <columns> FROM <table> WHERE <column name> > <value>;
    
    SELECT <columns> FROM <table> WHERE <column name> >= <value>;

    public by lbottaro @ Amazon_AWS_Python_API  4144  0  8  1

    Amazon S3 Aws - Adding a file to a bucket using boto API

    This python example shows how to add some content to an existing bucket to Amazon S3. You need to add a new key, named as the filename and then invoke the set\_contents\_from\_string method to add a new file. Prerequisites: You need an existing bucket.
    # This creates a file hello.txt with the string "Hello World!"
    key = bucket.new_key('hello.txt')
    key.set_contents_from_string('Hello World!')

    public by lbottaro @ Amazon_AWS_Python_API  3620  4  7  0

    Amazon S3 Aws - Listing Owned Buckets using boto api

    This code returns a list of Buckets that you own, invoking get\_all\_buckets() method. For each bucket you can get name and creation date.
    import boto
    import boto.s3.connection
    access_key = 'put your access key here!'
    secret_key = 'put your secret key here!'
    
    # Setup Amazon S3 connection
    conn = boto.connect_s3(
            aws_access_key_id = access_key,
            aws_secret_access_key = secret_key)
    
    # Iteration on all buckets get from get_all_buckets() method
    # For each bucket object the name and creation date is shown
    for bucket in conn.get_all_buckets():
            print "{name}\t{created}".format(
                    name = bucket.name,
                    created = bucket.creation_date,
            )

    public by micurs  3436  1  7  0

    Connecting to S3 using boto

    In this example we assume you set your Amazon credentials ( WS\_ACCESS\_KEY\_ID and AWS\_SECRET\_ACCESS\_KEY ) as environment variables or in the [boto config file](https://code.google.com/p/boto/wiki/BotoConfig)
    # Method 1
    import boto
    conn = boto.connect_s3()
    
    # Method 2
    from boto.s3.connection import S3Connection
    conn = S3Connection()
    

    public by lbottaro @ Amazon_AWS_Python_API  2642  1  7  0

    Amazon S3 Aws - connect_s3 method

    This snippet is about the connect\_s3 method provided by python boto package. The connect_s3 method can be invoked with or without aws secret and access keys. If param missing, default value None will be used. **kwargs is used to pass a variable number of arguments to a function. Path: [boto/\_\_init\_\_.py] Focus on: [S3Connecti
    def connect_s3(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):
        """
       :type aws_access_key_id: string
       :param aws_access_key_id: Your AWS Access Key ID
    
       :type aws_secret_access_key: string
       :param aws_secret_access_key: Your AWS Secret Access Key
    
       :rtype: :class:`boto.s3.connection.S3Connection`
       :return: A connection to Amazon's S3
       """
        from boto.s3.connection import S3Connection
        return S3Connection(aws_access_key_id, aws_secret_access_key, **kwargs)
    

    public by Geometry  1327  1  5  0

    _controlfp_s

    // P/Invoke declare for the FPU control helper in the C runtime // errno_t __cdecl _controlfp_s(_Out_opt_ unsigned int *_CurrentState, _In_ unsigned int _NewValue, _In_ unsigned int _Mask);
    using System;
    using System.ComponentModel;
    using System.Runtime.InteropServices;
    
    // P/Invoke declare for the FPU control helper in the C runtime
    // errno_t __cdecl _controlfp_s(_Out_opt_ unsigned int *_CurrentState, _In_ unsigned int _NewValue, _In_ unsigned int _Mask);
    [DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl, PreserveSig = true)]
    static extern int _controlfp_s(out uint currentState, uint newValue, uint mask);

    external by ZerglingGo  34  0  1  0

    동물귀를 좋아하는 엘포님을 위해 바칩니다 _(_ _)_

    동물귀를 좋아하는 엘포님을 위해 바칩니다 _(_ _)_: elpo.php
    <?php
    $date['now']   = time();
    $date['start'] = strtotime('2016-08-22 14:00:00') - $date['now'];
    $date['end']   = strtotime('2018-08-21 14:00:00') - $date['now'];
    
    if($date['start'] > 0) {
        $left['type'] = "입대일";
        $tmp = $date['start'] / 86400;
    } else {
        $left['type'] = "전역일";
        $tmp = $date['end'] / 86400;
    }
    
    $left['day'] = floor($tmp);
    
    $tmp = 24 * ($tmp - $left['day']);
    $left['hour'] = floor($tmp);
    
    $tmp = 60 * ($tmp - $left['hour']);
    $left['minute'] = floor($tmp);
    
    $tmp = 60 * ($tmp - $left['minute']);
    $left['second'] = floor($tmp);
    
    echo "{$left['type']}까지 {$left['day']}일 {$left['hour']}시 {$left['minute']}분 {$left['second']}초 남았습니다\n";
    
    

    external by kalki2013  3  0  1  0

    Weavebox for "BITS, Pilani - Goa Campus" has been created by an user, the box can be viewed at BITS,_Pilani_-_Goa_Campus (http://weavebox.in/BITS,_Pilani_-_Goa_Campus), fork it, or create your own at http://weavebox.in

    Weavebox for "BITS, Pilani - Goa Campus" has been created by an user, the box can be viewed at BITS,_Pilani_-_Goa_Campus (http://weavebox.in/BITS,_Pilani_-_Goa_Campus), fork it, or create your own at http://weavebox.in: 0964c5bd434bb1a98ff15d9bd2e023a5.json
    {"tags":"","properties":{"wikiPageRedirects":"Birla_Institute_of_Technology_and_Science,_Pilani_\u2013_Goa_Campus","wikiPageRevisionID":"576640898","wikiPageID":"24418554"},"categories":"","":{"":["BITS,_Pilani_-_Goa_Campus"]},"featured_image":""}
    
    

    external by kalki2013  3  0  1  0

    Weavebox for "BITS , Pilani - Goa" has been created by an user, the box can be viewed at BITS_,_Pilani_-_Goa (http://weavebox.in/BITS_,_Pilani_-_Goa), fork it, or create your own at http://weavebox.in

    Weavebox for "BITS , Pilani - Goa" has been created by an user, the box can be viewed at BITS_,_Pilani_-_Goa (http://weavebox.in/BITS_,_Pilani_-_Goa), fork it, or create your own at http://weavebox.in: ad0cc75ce266f9212475c59eeb9f382d.json
    {"tags":"","properties":{"wikiPageRedirects":"Birla_Institute_of_Technology_and_Science,_Pilani_\u2013_Goa_Campus","wikiPageRevisionID":"576641098","wikiPageID":"24418581"},"categories":"","":{"":["BITS_,_Pilani_-_Goa"]},"featured_image":""}
    
    

    external by kalki2013  2  0  1  0

    Weavebox for "At Play in the USA, Vol. 1" has been created by an user, the box can be viewed at At_Play_in_the_USA,_Vol._1 (http://weavebox.in/At_Play_in_the_USA,_Vol._1), fork it, or create your own at http://weavebox.in

    Weavebox for "At Play in the USA, Vol. 1" has been created by an user, the box can be viewed at At_Play_in_the_USA,_Vol._1 (http://weavebox.in/At_Play_in_the_USA,_Vol._1), fork it, or create your own at http://weavebox.in: 9d18bc1b5982c1abacc502ea52de011d.json
    {"tags":["2013_compilation_albums","Deadmau5_albums"],"properties":{"genre":"Tech_house","artist":"Deadmau5","extra":"deadmau5","wikiPageExternalLink":"https:\/\/www.discogs.com\/deadmau5-At-Play-In-The-USA-Vol-1\/master\/574895","recorded":"2005","label":"Play Records","previousWork":"At_Play_Vol._4","releaseDate":"2013-04-29","subsequentWork":"At_Play_Vol._5","extraColumn":"Artist","totalLength":"4096.0","abstract":"At Play in the USA, Vol. 1 is a compilation album from the progressive house musician deadmau5 and the first in the At Play in the USA series. This installment includes tracks previously released on the 2006 album Vexillology and the 2008 album Random Album Title. The album also contains tracks featuring Billy Newton-Davis, Melleefresh, and Steve Duda.","wikiPageRevisionID":"724420868","wikiPageID":"50405420","type":"Compilation","Work\/runtime":"68.26666666666667","producer":"Melleefresh","runtime":"4096","cover":"At Play in the USA, Vol. 1.jpg","length":"409.0","thisAlbum":"At Play in the USA Vol. 1","title":"Cocktail Queen"},"categories":["CreativeWork","MusicAlbum"],"ontology":{"previousWork":["At_Play_Vol._5","At_Play_in_the_USA,_Vol._1"],"subsequentWork":["At_Play_Vol._4"]},"featured_image":""}
    
    
    • Public Snippets
    • Channels Snippets