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
package com.clearframe.cas; | |
import java.security.GeneralSecurityException; | |
import java.util.Map; | |
import javax.security.auth.login.FailedLoginException; | |
import javax.validation.constraints.NotNull; | |
import org.jasig.cas.adaptors.jdbc.AbstractJdbcUsernamePasswordAuthenticationHandler; | |
import org.jasig.cas.authentication.UsernamePasswordCredential; | |
import org.jasig.cas.authentication.HandlerResult; | |
import org.jasig.cas.authentication.PreventedException; |
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
var hwndSource = HwndSource.FromHwnd(handle); | |
if (hwndSource != null) | |
{ | |
hwndSource.AddHook(WindowProc); | |
} | |
WinAPI.ShowWindowAsync(new WindowInteropHelper(OverlayForm).Handle, 0); | |
private IntPtr WindowProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) | |
{ |
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
using Lexico.DataModel; | |
using Lexico.DataModel.Questionnaire; | |
using Lexico.Search.NETStandard; | |
using Lexico.Web.Multitenancy.NET461; | |
using Lexico.Web.Multitenancy.NET461.User; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; |
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
import urllib | |
from bs4 import BeautifulSoup | |
save_folder = "/home/hydroxide/data/legal/docracy/" | |
base_url = "http://www.docracy.com" | |
doc_urls = [] | |
for i in range(1,110): | |
tag = "lease" | |
#list_page_url = base_url + "/doc/showalltagged?page=" + str(i) + "&tag=" + tag | |
#search_term = "\"consulting+services\"" |
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
Powershell: | |
([system.reflection.assembly]::loadfile({filename})).FullName |
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
let L2Norm:Func<double[],double[],float> = Func<double[],double[],float>(fun (x:double[]) (y:double[]) -> | |
let mutable dist = 0. | |
for i in 0..x.Length-1 do | |
dist <- (x.[i] - y.[i]) * (x.[i] - y.[i]); | |
dist) |
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
final dynamic obj = new JsonObjectLite(); | |
obj.foo = JsonObjectLite.fromJsonString("[1,2,3]"); | |
print(obj); |
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
private static void unzipLibs(AssetManager am, String nativeLibraryDir) { | |
try { | |
File complete = Paths.get(appDir, "mono_libs_complete").toFile(); | |
if(complete.exists() && !BuildConfig.DEBUG) { | |
Log.e(TAG, "Libs have already been unzipped to data directory, skipping unzip..."); | |
return; | |
} |
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
import 'dart:typed_data'; | |
import 'dart:io'; | |
class Half { | |
static Float32List ToFloat32(ByteData buffer) { | |
var f32Buffer = ByteData(buffer.lengthInBytes * 2); | |
for(int i = 0; i < buffer.lengthInBytes; i+=2) { |
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
import 'package:flutter/material.dart'; | |
import 'package:flutter/widgets.dart'; | |
class NotchedContainer extends StatelessWidget { | |
final Widget child; | |
final Widget notchContent; | |
final double notchPadding; | |
final double notchOffsetRight; | |
final EdgeInsets contentPadding; | |
final Alignment notchPosition; |
OlderNewer