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 HandleSearchEntryActivated (object sender, EventArgs e) | |
{ | |
var pattern = SearchPopupSearchPattern.ParsePattern (ToolbarView.SearchText); | |
if (pattern.Pattern == null && pattern.LineNumber > 0) { | |
DestroyPopup (); | |
var doc = IdeApp.Workbench.ActiveDocument; | |
if (doc != null && doc.Editor != null) { | |
doc.Select (); | |
doc.Editor.Caret.Location = new Mono.TextEditor.DocumentLocation (pattern.LineNumber, pattern.Column > 0 ? pattern.Column : 1); | |
doc.Editor.CenterToCaret (); |
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
F# Interactive for F# 3.1 (Open Source Edition) | |
Freely distributed under the Apache 2.0 Open Source License | |
For help type #help;; | |
> let scale1 = seq { -0.5 .. 0.1 .. 0.5 } ;; | |
val scale1 : seq<float> | |
> scale1 |> Seq.toArray ;; |
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
#!/bin/sh | |
while true | |
do | |
if [ -d confdir-14B---/confdir-14B--- ] | |
then | |
mv confdir-14B---/confdir-14B--- a | |
fi | |
if [[ $? -ne 0 ]] |
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 <stdlib.h> | |
#include <unistd.h> | |
#include <limits.h> | |
#include <string.h> | |
#include <sys/stat.h> | |
#include <stdio.h> | |
/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ | |
#undef mkdir |
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
--- a/src/win32/cairo-win32-font.c | |
+++ b/src/win32/cairo-win32-font.c | |
@@ -379,6 +379,8 @@ _win32_scaled_font_create (LOGFONTW *logfont, | |
/* don't delete the hfont if we're using the one passed in to us */ | |
f->delete_scaled_hfont = !f->scaled_hfont; | |
+ cairo_matrix_scale (font_matrix, 1.0 / device_scale, 1.0 / device_scale); | |
+ cairo_matrix_scale (ctm, device_scale, device_scale); | |
cairo_matrix_multiply (&scale, font_matrix, ctm); | |
status = _compute_transform (f, &scale); |
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
# lib/mix/tasks/musikr.seed.ex | |
defmodule Mix.Tasks.Musikr.Seed do | |
use Mix.Task | |
@shortdoc "Seeds the database" | |
@moduledoc """ | |
Seed the database using the file 'priv/repo/seeds.exs' | |
""" |
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 void SetSortFunc(int sort_column_id, Gtk.TreeIterCompareFunc sort_func) { | |
GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper (sort_func); | |
IntPtr user_data; | |
GLib.DestroyNotify destroy; | |
if (sort_func == null) { | |
user_data = IntPtr.Zero; | |
destroy = null; | |
} else { | |
user_data = (IntPtr) GCHandle.Alloc (sort_func_wrapper); | |
destroy = GLib.DestroyHelper.NotifyHandler; |
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
module Main (..) where | |
import Effects exposing (Effects, Never, none) | |
import Json.Decode as Json | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
import String | |
import StartApp | |
import Signal exposing (Address) |
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
defmodule Foo.SessionController do | |
use Foo.Web, :controller | |
def create(conn, %{"session" => session_params}) do | |
case Foo.Session.authenticate(session_params) do | |
{:ok, user} -> | |
{:ok, jwt, _full_claims} = Guardian.encode_and_sign(user, :token) | |
conn | |
|> put_status(:created) |
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
git ls-files | while read -r line; do | |
s=$(git status -s "$line"); | |
if [ -n "$s" ]; then | |
echo "$s"; | |
else | |
echo " $line"; | |
fi; | |
done |