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 <REGX52.H> | |
//Kod obslugi wyswietlacza z zajec | |
sbit LCD_D7 = P2^3; | |
sbit LCD_D6 = P2^2; | |
sbit LCD_D5 = P2^1; | |
sbit LCD_D4 = P2^0; | |
sbit LCD_RS = P2^4; | |
sbit LCD_RW = P2^5; | |
sbit LCD_E = P2^6; |
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 <unistd.h> | |
#include <signal.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/ipc.h> | |
#define SIZE 128 | |
#define KEY 1234 |
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
//Hold execution | |
void usr1() | |
{ | |
printf("Received SIGUSR1 at PID %d\n", getpid()); | |
if (pid_parent == getpid()) | |
{ | |
//Parent process | |
kill(pid_processor, SIGCONT); | |
kill(pid_output, SIGCONT); | |
} |
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 <unistd.h> | |
#include <sys/types.h> | |
short ok = 1; | |
//String buffer | |
char buffer[128]; |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <pthread.h> | |
pthread_mutex_t mutex; | |
char buffer[32]; //32bit = 4 bytes; 4 bytes * 32 integers = 128 bytes long integer array | |
char source_filename[32]; | |
char destination_filename[32]; | |
FILE* working_copy; | |
FILE* destination_copy; |
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 rysowanie; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import javax.swing.JComponent; | |
import javax.swing.JFrame; | |
class MyCanvas extends JComponent { |
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 <pthread.h> | |
#include <unistd.h> | |
#include <string.h> | |
char text[32]; | |
void* wyswietl(void* w) | |
{ | |
if (w == 0) //Odwrotna kolejność |
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 <pthread.h> | |
#include <unistd.h> | |
#include <string.h> | |
char text[32]; | |
void* wyswietl(void* w) | |
{ | |
if (w == 0) //Odwrotna kolejność |
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 <pthread.h> | |
#include <unistd.h> | |
void* wyswietl(void* w) | |
{ | |
int z; | |
printf("W przekazany do wąkku %d", (int)w); | |
z = (int)w + 10; | |
pthread_exit((void*)z); |
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
$("#submit").click(function () { | |
var ids = ""; | |
$(":checkbox").each(function () { | |
if ($(this).is(':checked')) { | |
ids = ids + $(this).val() + ";"; | |
} | |
}); | |
$("#mainform").append("<input type='hidden' value='" + ids + "' name='participant_ids' />"); | |
}); |