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 cmath | |
| I = 1j | |
| data = [ cmath.sin(cmath.pi * 2 * x / 16.0) + 1 for x in xrange(16)] | |
| def dft_gen(data): | |
| return (_sum_xk(data, j) for j in xrange(len(data))) | |
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
| (defun my-window-resizer () | |
| "Control window size and position." | |
| (interactive) | |
| (let ((window-obj (selected-window)) | |
| (current-width (window-width)) | |
| (current-height (window-height)) | |
| (dx (if (= (nth 0 (window-coordinate)) 0) 1 | |
| -1)) | |
| (dy (if (= (nth 1 (window-coordinate)) 0) 1 | |
| -1)) |
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 itertools | |
| import math | |
| def defer(l, num_defer=1): | |
| """ | |
| >>> [x for x in defer([0, 1, 2, 3])] | |
| [[0, 1], [1, 2], [2, 3]] | |
| >>> [x for x in defer([0, 1, 2, 3], 2)] | |
| [[0, 2], [1, 3]] |
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
| [General] | |
| HintingMode=2 | |
| AntiAliasMode=1 | |
| NormalWeight=8 | |
| BoldWeight=0 | |
| ItalicSlant=0 | |
| EnableKerning=1 | |
| GammaMode=0 | |
| LcdFilter=1 | |
| BolderMode=0 |
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 itertools | |
| image = [[10,10,10,10,10,10,10,10,10], | |
| [10,10,10,10,10,10,10,10,10], | |
| [10,10,10,10,10,250,250,250,250], | |
| [10,10,10,10,10,250,250,250,250], | |
| [10,10,250,250,250,250,250,250,250], | |
| [10,10,10,250,250,250,250,250,250], | |
| [10,10,10,10,250,250,250,250,250], | |
| [10,10,10,10,250,250,250,250,250], |
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
| <phone:PhoneApplicationPage | |
| x:Class="SliderWithGestureService.MainPage" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" | |
| xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
| xmlns:tookit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" | |
| mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768" |
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
| using System.Windows.Input; | |
| using Microsoft.Phone.Controls; | |
| using Microsoft.Xna.Framework.Input.Touch; | |
| namespace SliderWithGestureService { | |
| public partial class MainPage : PhoneApplicationPage { | |
| // Constructor | |
| public MainPage() { | |
| InitializeComponent(); | |
| } |
NewerOlder