This file contains hidden or 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
select | |
d.tablespace_name tn, | |
d.block_size bs, | |
d.extent_management lm, | |
d.segment_space_management assm, | |
d.status st, | |
to_char(f.bytes/1024,'999,999,999')||'K' bts, | |
to_char((f.bytes-s.free_bytes)/1024,'999,999,999')||'K' used, | |
to_char(round((f.bytes-s.free_bytes)/f.bytes*100),'990.9')||'%' pct, | |
case trunc(33*(f.bytes-s.free_bytes)/f.bytes) |
This file contains hidden or 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
use std::sync::arc::UnsafeArc; | |
use std::cast; | |
use std::comm::Chan; | |
pub struct ArcRefCell<T> { | |
priv inner: UnsafeArc<T> | |
} | |
impl<T: Send> ArcRefCell<T> { | |
pub fn new(value: T) -> ArcRefCell<T> { |
This file contains hidden or 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
//! rustc 0.10-pre (ee8f45e 2014-02-18 13:41:49 -0800) | |
//! | |
//! Before you bite my head off, this is NOT a recommend way of organizing code! | |
//! It is only a demonstration what you can do in Rust! (wish I put this comment in earlier) | |
//! My intention with this example is to show new people the features of the module system. | |
//! | |
//! The module system in Rust gives you precise control | |
//! over the interface when writing libraries. | |
//! You can write the layout independent of how you organize the code! | |
//! In this example two different conventions are explored. |
This file contains hidden or 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 javax.swing.*; | |
import java.awt.Color; | |
import java.awt.event.*; | |
import java.awt.geom.*; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.Rectangle; | |
public class Ball extends JComponent { |
This file contains hidden or 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
select | |
holders.*, | |
' IS BLOCKING ' is_blocking, | |
waiters.* | |
from | |
( | |
select | |
dw.holding_session, | |
hs.username, | |
do.object_name, |
This file contains hidden or 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
-- Shared Pool | |
select | |
event, | |
time_waited "time_waited(s)", | |
case when time_waited = 0 then | |
0 | |
else | |
round(time_waited*100 / sum(time_waited) Over(), 2) | |
end "percentage" | |
from |
This file contains hidden or 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 os, time | |
import glob | |
#Define Pictures Folder | |
folder = '/Users/admin/Dropbox/Camera Uploads/' | |
fileFormats = ['JPG','jpg', 'MOV', 'mov', 'PNG', 'png', 'mp4', 'MP4']; | |
months = ['January','February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] | |
picPath = [] | |
This file contains hidden or 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
pub trait RangedNum<T>: Num { | |
pub fn min() -> Self; | |
pub fn max() -> Self; | |
pub fn new(x: T) -> Self; | |
pub fn set(&mut self, x: T); | |
pub fn get(&self) -> T; | |
pub fn normalize(&self) -> Self; | |
pub fn normalize_self(&mut self); | |
} |
This file contains hidden or 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 groovy.swing.SwingBuilder | |
import java.awt.* | |
import javax.swing.* | |
import javax.swing.event.* | |
SwingBuilder swing = new SwingBuilder() | |
def panel = { |
This file contains hidden or 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.awt.Image | |
import java.awt.image.BufferedImage | |
import javax.imageio.ImageIO | |
def rootDir = new File(args[0]) | |
rootDir.eachFileRecurse { file -> | |
if(file.name ==~ /[^s].*\.jpg/) { // skip file starting with "s" | |
def srcFileName = file.name | |
def path = file.absoluteFile.parent | |
def dstFileName = 's' + srcFileName |