Skip to content

Instantly share code, notes, and snippets.

View MainPage.xaml.cs
using System;
using System.Linq;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Shapes;
using Windows.UI;
using Windows.Foundation;
namespace ManyLinesTestCs
{
View Tests.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Symbolism;
using Physics;
using Utils;
namespace Tests
View servo_render_context_draw_push_clip.rs
pub fn draw_push_clip(&self, bounds: &Rect<Au>) {
let rect = bounds.to_azure_rect();
let path_builder = self.draw_target.create_path_builder();
let left_top = Point2D(rect.origin.x, rect.origin.y);
let right_top = Point2D(rect.origin.x + rect.size.width, rect.origin.y);
let left_bottom = Point2D(rect.origin.x, rect.origin.y + rect.size.height);
let right_bottom = Point2D(rect.origin.x + rect.size.width, rect.origin.y + rect.size.height);
path_builder.move_to(left_top);
View servo_render_context_draw_push_clip_cascades.rs
pub fn draw_push_clip(&self, bounds: &Rect<Au>) {
let rect = bounds.to_azure_rect();
let left_top = Point2D(rect.origin.x, rect.origin.y);
let right_top = Point2D(rect.origin.x + rect.size.width, rect.origin.y);
let left_bottom = Point2D(rect.origin.x, rect.origin.y + rect.size.height);
let right_bottom = Point2D(rect.origin.x + rect.size.width, rect.origin.y + rect.size.height);
let path = self.draw_target.create_path_builder()
View rust-http-handle_request.rs
fn handle_request(&self, _r: &Request, w: &mut ResponseWriter) {
w.headers.date = Some(time::now_utc());
w.headers.content_length = Some(14);
w.headers.content_type = Some(MediaType {
type_: StrBuf::from_str("text"),
subtype: StrBuf::from_str("plain"),
parameters: vec!((StrBuf::from_str("charset"), StrBuf::from_str("UTF-8")))
});
w.headers.server = Some(StrBuf::from_str("Example"));
View rust-http-handle_request-method-cascades.rs
fn handle_request(&self, _r: &Request, w: &mut ResponseWriter) {
w.headers
.. date = Some(time::now_utc())
.. content_length = Some(14)
.. content_type = Some(MediaType {
type_: StrBuf::from_str("text"),
subtype: StrBuf::from_str("plain"),
parameters: vec!((StrBuf::from_str("charset"), StrBuf::from_str("UTF-8")))
})
View q3-render-method-cascades.rs
fn render(&mut self) -> bool
{
let renderer = ui::Renderer::get();
renderer.begin();
if self.position.y < -self.tex_left.size.y as f32
{
renderer.end();
return false;
View EntityFrameworkGraph-In-Out.cs
static IEnumerable<Node> Out(this Node node, Label label)
{ return node.Outgoing.Where(rel => rel.Label == label).Select(rel => rel.B); }
static IEnumerable<Node> In(this Node node, Label label)
{ return node.Incoming.Where(rel => rel.Label == label).Select(rel => rel.A); }
var admin = Ben;
View test-readme.md

Library that implements automatic simplification of algebraic expressions in C#.

To get an idea of the kinds of expressions it handles, see the tests in this file.

The automatic simplification algorithm comes from the book "Computer Algebra and Symbolic Computation: Mathematical Methods" by Joel S. Cohen.

GiNaC and SymbolicC++ are of course very inspirational.

The projects "PSE 5E ..." are examples and problems from the textbook "Physics for Scientists and Engineers, 5th Edition" by Serway and Jewett.

View README.md

Symbolism

Library that implements automatic simplification of algebraic expressions in C#.

To get an idea of the kinds of expressions it handles, see the tests in this file.

The automatic simplification algorithm comes from the book "Computer Algebra and Symbolic Computation: Mathematical Methods" by Joel S. Cohen.

GiNaC and SymbolicC++ are of course very inspirational.