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 <iostream> | |
#include <math.h> | |
using namespace std; | |
int main() { | |
//reads from input file, or takes user input. 1st is your total amount, and the second is how much you paid | |
double total; | |
//get change | |
cin >>total; | |
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
.data | |
str: .space 23 # buffer for input string | |
strNS: .space 23 # buffer for string w/o spaces | |
prompt: .asciiz "Enter a string up to 80 characters\n" | |
head1: .asciiz "\nOriginal String: " | |
head2: .asciiz "\nNumber of spaces: " | |
head3: .asciiz "\nWith spaces removed: " | |
head4: .asciiz "\nSeparated: " | |
endOfFileLine: .asciiz ".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
console.log("Updating Wifi to SSD: " + SSID); | |
var data = fs.readFileSync('/etc/wpa_supplicant/wpa_supplicant.conf', 'utf8'); | |
var result = data.replace(/ssid="(.*)"/g, 'ssid="'+ SSID + '"'); | |
var finalResult = result.replace(/psk="(.*)"/g, 'psk="'+ Password + '"'); | |
console.log("Will print: \n" + finalResult); //this prints out correctly, finalResult holds what I want it ot | |
//need to fix writing to file (only writes like a piece of it) | |
fs.writeFile('/etc/wpa_supplicant/wpa_supplicant.conf', finalResult, 'utf8', function (err) { |
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
void Handle_MessageChanged(object sender, TextChangedEventArgs e) | |
{ | |
Editor editor = sender as Editor; | |
string val = editor.Text; //Get Current Text | |
if (val.Length > 140)//If it is more than your character restriction | |
{ | |
val = val.Remove(val.Length - 1);// Remove Last character | |
editor.Text = val; //Set the Old value | |
} |
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; | |
namespace rgbConverter | |
{ | |
class MainClass | |
{ | |
public static void Main(string[] args) | |
{ | |
Console.WriteLine("Hello World!"); |
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
StringBuilder sb = new StringBuilder(); | |
Runtime rt = Runtime.getRuntime(); | |
//You need to use this! | |
String current = System.getProperty("java.class.path"); | |
System.out.println("Current dir:"+current); | |
//Make sure to use -classpath flag | |
Process proc = rt.exec("java -classpath " + current + " Memory"); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Sample.HelloWorldPage" | |
BackgroundColor= "Black"> | |
<ContentPage.Content> | |
<ScrollView> | |
<Grid RowSpacing="5"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="*" /> |
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.FileNotFoundException; | |
import java.io.FileReader; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Scanner; | |
public class Scheduler { | |
public static void main(String args[]) throws FileNotFoundException | |
{ |
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
public class Job { | |
public Job(String n, int e, int d) | |
{ | |
name = n; | |
entryTime = e; | |
duration = d; | |
serviceTime = duration; | |
} |
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
# Complete the function below. | |
def get_rock_index(quantity): | |
jamie = quantity | |
print jamie | |
ned = list(quantity) | |
ned.sort() | |
print ned | |
geoffrey = [] | |
OlderNewer