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
/** * helpers.c * * Computer Science 50 * Problem Set 3 * * Helper functions for Problem Set 3. */ | |
#include <cs50.h> | |
#include <math.h> | |
#include "helpers.h" | |
/** * Returns true if value is in array of n values, else false. */ | |
bool search(int value, int array[], int n) { | |
// TODO: implement a searching algorithm | |
int high, low, i; |
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
/** | |
* SOS.c by Iliyan Stankov | |
* Runs on TM4C123 LaunchPad | |
* Input from PF4(SW1),PF0(SW2), output to PF3 (Green LED) | |
* Pressing SW1 starts SOS (Green LED flashes SOS). | |
* Pressing SW2 stops SOS | |
*/ | |
// Constant declarations to access port registers using | |
// symbolic names instead of addresses |
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
loop A: loop over old_file_height // looping over each scan line in original file | |
loop B: | |
read each rgb-triple into an array // Read each pixel value in a complete scanline into an array | |
end loop B | |
skip over padding at end of scanline | |
loop C: loop n times // Set up a loop. loop resize times. Write the complete scan line n times. | |
loop D: loop trough pixel array // read each pixel from the array we just read. | |
Write pixel resize times.// Write the pixel out resize times. | |
end of loop D | |
write end of line padding // write new padding required for this scan line |
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
<?php | |
// File name:- server_config.php | |
// Configuration settings for Mail server | |
define('SMTP_SERVER', 'smtp.gmail.com'); | |
define('SMTP_PORT', 587); | |
define('SMTP_USERNAME', 'your_gmail_user_name'); | |
define('SMTP_PASSWORD', 'your_gmail_password'); | |
define('SMTP_AUTH', true); | |
define('SMTP_AUTH_TYPE', 'tls'); |
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
<?php | |
// Include PHPMailer library | |
require("PHPMailer/class.phpmailer.php"); | |
// Include server settings | |
require("server_config.php"); | |
// Create email object | |
$mail = new PHPMailer(); | |
// Set email object options |
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
/**************************************************************************** | |
* odd_func.c | |
* | |
* Strange function definition test | |
* | |
* Can you define one function inside another and have it compile ? | |
* Apparently you can. | |
* We can have local functions....... | |
* Neither of these local function can be called from outside their scope. | |
* |
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
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<uk.ac.reading.sis05kol.mooc.GameView | |
android:id="@+id/gamearea" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"/> | |
<RelativeLayout |
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 uk.ac.reading.sis05kol.mooc; | |
import android.content.Context; | |
import android.content.res.Resources; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.hardware.Sensor; | |
import android.hardware.SensorEvent; | |
import android.os.Bundle; |
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 uk.ac.reading.sis05kol.mooc; | |
//Other parts of the android libraries that we use | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.media.AudioManager; | |
import android.media.SoundPool; |
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 uk.ac.reading.sis05kol.mooc; | |
//Other parts of the android libraries that we use | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.media.MediaPlayer; | |
public class TheGame extends GameThread{ | |
//Will store the image of a ball | |
private Bitmap mBall; | |
//The X and Y position of the ball on the screen (middle of ball) |
NewerOlder