This is a sample script for transposing slice from (n x m) to (m x n) for golang.
package main
import "fmt"
func transpose(slice [][]string) [][]string {
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc.Testing; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.DependencyInjection.Extensions; | |
using Tweetbook.Contracts.V1; | |
using Tweetbook.Contracts.V1.Requests; | |
using Tweetbook.Contracts.V1.Responses; |
package com.sam016.vsflatomation.service.ble; | |
import java.util.HashMap; | |
import java.util.UUID; | |
public class AllGattCharacteristics { | |
private static HashMap<String, String> attributes = new HashMap(); | |
static { | |
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name"); |
# You Should be able to Copy and Paste this into a powershell terminal and it should just work. | |
# To end the loop you have to kill the powershell terminal. ctrl-c wont work :/ | |
# Http Server | |
$http = [System.Net.HttpListener]::new() | |
# Hostname and port to listen on | |
$http.Prefixes.Add("http://localhost:8080/") |
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
using System; | |
using System.Collections.Generic; | |
using Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.Graphics; | |
namespace C3.XNA | |
{ | |
/// <summary> | |
/// </summary> | |
public static class Primitives2D |
var raw = require("raw-socket"); | |
var ip = require('ip'); | |
var util = require('util'); | |
function send(src_ip, src_port, dst_ip, dst_port) { | |
var socket = raw.createSocket({ | |
protocol: raw.Protocol.TCP, // See http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml | |
addressFamily: raw.AddressFamily.IPv4 | |
}); |
(* | |
Calculator_implementation.fsx | |
Related blog post: http://fsharpforfunandprofit.com/posts/calculator-implementation/ | |
*) | |
// ================================================ | |
// Draft of Domain from previous file | |
// ================================================ | |
module CalculatorDomain_V3 = |