This file contains hidden or 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
| package main | |
| import ( | |
| "bytes" | |
| "encoding/gob" | |
| "io" | |
| ) | |
| type Data struct { | |
| A int |
This file contains hidden or 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
| // http://grokbase.com/p/gg/golang-nuts/12a9xcadca/go-nuts-disable-directory-listing-with-http-fileserver | |
| package main | |
| import ( | |
| "net/http" | |
| "os" | |
| ) | |
| type NoListFile struct { |
This file contains hidden or 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/perl | |
| use strict; | |
| use Fcntl ':mode'; | |
| use File::stat 'stat'; | |
| use Net::SFTP::Foreign; | |
| my $HOST = 'user@example.com'; | |
| my $PASS = '********'; | |
| my $MORE = [ -o => 'StrictHostKeyChecking no' ]; |
This file contains hidden or 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
| var express = require('express'); | |
| var cgi = require('./cgi'); | |
| app = express(); | |
| var script = __dirname + '/hello.cgi'; | |
| app.get('/', cgi(script, function (req, options) { | |
| options.env.USERNAME = 'Mr. User'; | |
| })); | |
| app.use(function (err, req, res, next) { |
This file contains hidden or 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 androidx.compose.foundation.background | |
| import androidx.compose.foundation.clickable | |
| import androidx.compose.foundation.interaction.MutableInteractionSource | |
| import androidx.compose.foundation.layout.Arrangement | |
| import androidx.compose.foundation.layout.Box | |
| import androidx.compose.foundation.layout.Column | |
| import androidx.compose.foundation.layout.Row | |
| import androidx.compose.foundation.layout.Spacer | |
| import androidx.compose.foundation.layout.fillMaxSize | |
| import androidx.compose.foundation.layout.height |
This file contains hidden or 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 androidx.compose.foundation.layout.Arrangement | |
| import androidx.compose.foundation.layout.Column | |
| import androidx.compose.foundation.layout.Spacer | |
| import androidx.compose.foundation.layout.fillMaxSize | |
| import androidx.compose.foundation.layout.height | |
| import androidx.compose.material.AlertDialog | |
| import androidx.compose.material.Button | |
| import androidx.compose.material.Text | |
| import androidx.compose.material.TextField | |
| import androidx.compose.runtime.Composable |
This file contains hidden or 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
| package com.example.multitouch; | |
| import android.content.Context; | |
| import android.graphics.PointF; | |
| import android.util.AttributeSet; | |
| import android.view.MotionEvent; | |
| import android.view.View; | |
| import java.util.HashMap; | |
| import java.util.Map; |
This file contains hidden or 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 <UIKit/UIKit.h> | |
| @interface MyTextView : UITextView | |
| - (void)replaceSelectionWithAttributedText:(NSAttributedString *)text; | |
| - (void)replaceRange:(NSRange)range withAttributedText:(NSAttributedString *)text; | |
| @end |
This file contains hidden or 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 Person { | |
| let name: String | |
| init(name: String) { self.name = name } | |
| func printName() { print("name = \(name)") } | |
| deinit { print("\(name) is being deinited") } | |
| } | |
| var p: Person? = Person(name: "Hoshi") | |
| p?.printName() // name = Hoshi |
This file contains hidden or 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_NAME = MyObject | |
| OBJS = main.o $(CLASS_NAME).o $(CLASS_NAME)Tests.o | |
| PROGRAM = a.out | |
| CFLAGS = -Wall -F$(FWPATH) | |
| LIBS = -F$(FWPATH) -framework XCTest -framework Foundation | |
| FWPATH = /Applications/Xcode.app/Contents/Developer/Library/Frameworks | |
| XCTEST = /Applications/Xcode.app/Contents/Developer/usr/bin/xctest |
NewerOlder