echo -e "\033[X;YYmFORMATTED TEXT HERE!\033[0;0m"
Where:
X
is the Format,YY
is the colour code, and\033[0;0m
clears the formatting
ForEach ($file in $args) | |
{ | |
Write-Host "Converting: $file" | |
((Get-Content $file) -join "`n") + "`n" | Set-Content -NoNewline $file | |
} |
#include <stdio.h> | |
void print_matrix(int m, int n, int matrix[m][n]); | |
void multiply(int n, int m, int p, int a[n][m], int b[m][p], int c[n][p]); | |
int main() { | |
int x[3][2] = { | |
{1, 2}, | |
{3, 4}, |
#include <stdio.h> | |
#include <string.h> | |
#include <termios.h> | |
#include <unistd.h> | |
int getch(); | |
const char ENTER_KEY = '\n'; | |
const char BACKSPACE_KEY = (char) 127; |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct node { | |
int value; | |
int height; | |
struct node *left; | |
struct node *right; | |
} Node; |
using System.Diagnostics; | |
public sealed class TimedAction | |
{ | |
private TimedAction() { } | |
public delegate void Action(); | |
public static long Run(Action action) | |
{ |
import java.util.Arrays; | |
import java.util.stream.Stream; | |
public class Fibo { | |
public static void main(String[] args) { | |
Arrays | |
.stream(args) | |
.findFirst() | |
.map(Long::parseLong) | |
.map(Fibo::computeFiboSum) |
#!/bin/sh | |
# Sources: http://unix.stackexchange.com/questions/35282/convert-ogv-video-to-gif-animation | |
# http://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality/556031#556031 | |
if [ "$#" -gt 0 ]; then | |
input=$1 | |
output=${input/.ogv/-ogv.gif} | |
if [ -f $output ]; then |
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
public class ApplePen extends JApplet { | |
public void init() { | |
this.setLayout(new GridLayout(3, 1)); |
using System; | |
using System.IO; | |
string downloads = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\Downloads\"; | |
string[] files = Directory.GetFiles(downloads); | |
foreach (string file in files) | |
{ | |
AddToGridView(file); | |
} |