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 <syslog.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
int main() | |
{ | |
openlog("fig3-7", LOG_PERROR | LOG_PID | LOG_NDELAY, LOG_USER); | |
syslog(LOG_NOTICE, "Hello Syslog!"); | |
syslog(LOG_INFO, "Here's an informational message."); | |
syslog(LOG_WARNING, "Here's a warning."); |
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
--- lxc-centos 2014-12-07 13:23:40.000000000 -0500 | |
+++ lxc-centos-new 2015-07-28 15:58:57.110168646 -0400 | |
@@ -29,7 +29,7 @@ | |
#Configurations | |
default_path=/var/lib/lxc | |
-# Some combinations of the tunning knobs below do not exactly make sense. | |
+# Some combinations of the tuning knobs below do not exactly make sense. | |
# but that's ok. | |
# |
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
--- lxc-ubuntu 2014-12-07 13:23:40.000000000 -0500 | |
+++ lxc-ubuntu-new 2015-07-28 15:49:46.633633812 -0400 | |
@@ -46,6 +46,41 @@ | |
. /etc/default/lxc | |
fi | |
+# Check if given path is in a btrfs partition | |
+is_btrfs() | |
+{ | |
+ [ -e $1 -a $(stat -f -c '%T' $1) = "btrfs" ] |
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
CC=gcc | |
CFLAGS=-Wall -Werror -g -c | |
LFLAGS=-Wall -Werror -g | |
all: client1 client2 client3 server1 server2 server3 endian poll | |
client%: client%.o udp_sockets.o udp_client.o | |
$(CC) $(LFLAGS) -o $@ $^ | |
server%: server%.o udp_sockets.o udp_server.o |
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
CC=gcc | |
CFLAGS=-Wall -Werror -std=gnu11 -g -c | |
LFLAGS=-Wall -Werror -g | |
all: fig5-3 fig5-4 fig5-5 server client | |
fig5-3: fig5-3.o udp_sockets.o udp_server.o | |
$(CC) $(LFLAGS) -o $@ $^ | |
fig5-4: fig5-4.o udp_sockets.o udp_server.o |
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> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netdb.h> | |
struct addrinfo* get_sockaddr(const char* hostname, const char* port) | |
{ |
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> | |
#define NAME_LENGTH 20 | |
int main() | |
{ | |
char name[NAME_LENGTH]; | |
printf("Please enter your name: "); |
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
<%= form_for [@test, @attempt, @question, @response] do |f| %> | |
<label><%= @question.question_text %></label> | |
<%= f.text_area :response_text %> | |
<%= f.submit 'Next >' %> | |
<% end %> |
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
gem 'jquery-ace-rails' |
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 ca.uwo.csd.cs2212.USERNAME; | |
import javax.mail.*; | |
import javax.mail.internet.*; | |
import java.util.*; | |
public class App { | |
private final static String SENDER_NAME = "John Doe"; | |
private final static String SENDER_EMAIL = "[email protected]"; |
NewerOlder