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
/* | |
Makefile: | |
CC = g++ | |
CFLAGS = -Wall | |
PROG = basicshapes | |
SRCS = main.cpp |
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
package main | |
import ( | |
"github.com/tarm/goserial" | |
"log" | |
"flag" | |
"math/rand" | |
. "time" | |
) |
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
package main | |
import ( | |
"bufio" | |
"flag" | |
"fmt" | |
"github.com/tarm/goserial" | |
"log" | |
"os" | |
) |
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 <stdbool.h> | |
#include <stdint.h> | |
#include "inc/hw_types.h" | |
#include "driverlib/debug.h" | |
#include "driverlib/usb.h" | |
#include "usblib/usblib.h" | |
#include "usblib/usblibpriv.h" | |
#include "usblib/device/usbdevice.h" | |
#include "usblib/usbhid.h" |
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
#ifndef __USBDHIDGENERIC_H__ | |
#define __USBDHIDGENERIC_H__ | |
//***************************************************************************** | |
// | |
// If building with a C++ compiler, make all of the definitions in this header | |
// have a C binding. | |
// | |
//***************************************************************************** |
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
class Indexer(sentences : List[String]) { | |
// Let's pre-process the words for thousands of calls | |
val sentenceList = sentences.map(words(_)) | |
def find(key: String) { | |
for { | |
sentence <- sentenceList | |
count = sentence.count{ _.equalsIgnoreCase(key) } if count > 0 | |
debug = sentence.mkString(" ") |
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 java.io.ByteArrayInputStream | |
import javax.xml.parsers.DocumentBuilderFactory | |
import org.w3c.dom._ | |
val factory = DocumentBuilderFactory.newInstance() | |
val builder = factory.newDocumentBuilder(); | |
val content = """<start> | |
<div id="header_nav"> | |
<div class="avatar"> | |
<img width="40" /> |
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
function createHeaders(sheet) { | |
// The SpreadSheet headers | |
var headers = ["Subject", "First Message From", "First Message Date", | |
"Message Count", "Last Message Date", "Have we replied?"]; | |
// Let's give the columns some info | |
sheet.appendRow(headers); | |
// Bold the first row for the headers |
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 java.util.Enumeration | |
class Merge(a:Enumeration[Integer], b:Enumeration[Integer]) extends Enumeration[Integer] | |
{ | |
/** | |
* Checks to see if either Enumeration has any elements | |
* @return true if either input Enumeration has an element | |
* false if both Enumerations have no elements | |
*/ | |
override def hasMoreElements: Boolean = { |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
using System.Runtime.InteropServices; | |
namespace MyAPI | |
{ |
OlderNewer