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
// https://fastcpp.blogspot.com/2011/06/bilinear-pixel-interpolation-using-sse.html | |
inline Pixel GetPixelSSE3(const Image<Pixel>* img, float x, float y) | |
{ | |
const int stride = img->width; | |
const Pixel* p0 = img->data + (int)x + (int)y * stride; // pointer to first pixel | |
// Load the data (2 pixels in one load) | |
__m128i p12 = _mm_loadl_epi64((const __m128i*)&p0[0 * stride]); | |
__m128i p34 = _mm_loadl_epi64((const __m128i*)&p0[1 * stride]); |
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
//#LINQPad optimize+ | |
public class Bench1 | |
{ | |
private double[] data1; | |
private double[] data2; | |
[Params(1_024, 2_048, 4_096)] | |
public int N; | |
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
Series<Interval, double> srsNoda = Enumerable | |
.Range(0, 100) | |
.Select( idx => { | |
Instant instant1 = SystemClock.Instance.GetCurrentInstant(); | |
return KeyValue.Create( | |
new Interval(instant1, instant1.Plus( Duration.FromHours(idx) ) ) | |
, (double)idx ); | |
}) | |
.ToSeries(); | |
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 Microsoft.OData; | |
using Microsoft.OData.Edm; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
namespace ConsoleApp1 | |
{ |
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
lsblk | |
sudo growpart /dev/nvme0n1 1 | |
sudo resize2fs /dev/nvme0n1p1 |
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
with points as ( | |
select * from ( | |
select st_makepoint(1799,2397,53) as point3d | |
union | |
select st_makepoint(1804,2395,53) as point3d | |
union | |
select st_makepoint(1807,2397,53) as point3d | |
union | |
select st_makepoint(1780,2402,53) as point3d | |
) as seed |
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
var VisMan = Symbol.for("VisMan") | |
var cesiumViewer = () => { | |
return window[VisMan].cesiumViewer | |
} | |
var initCesiumViewer = () => { | |
if(window.viewer && window.viewer.state && window.viewer.state.viewer) { | |
window[VisMan].cesiumViewer = window.viewer.state.viewer | |
} else { |
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
from imutils import paths | |
import argparse | |
import cv2 | |
from multiprocessing import Pool, TimeoutError | |
def ResizeWithAspectRatio(image, width=None, height=None, inter=cv2.INTER_AREA): | |
dim = None | |
(h, w) = image.shape[:2] |
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
try { | |
// get a list of files and directories in the main bundle | |
RNFS.readDir(NativeModules.RNFetchBlob.DownloadDir) // On Android, use "RNFS.DocumentDirectoryPath" (MainBundlePath is not defined) | |
.then((result) => { | |
console.log('GOT RESULT', result); | |
var promises = [] | |
result.forEach(async (path) => { | |
console.log("path", path) |
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 getX3d( ST_GeomFromText( | |
'POLYHEDRALSURFACE Z ( | |
((12 0 10, 8 8 10, 8 10 20, 12 2 20, 12 0 10)), | |
((8 8 10, 0 12 10, 0 14 20, 8 10 20, 8 8 10)), | |
((0 12 10, -8 8 10, -8 10 20, 0 14 20, 0 12 10)) | |
)' | |
), ST_GeomFromText( | |
'POLYHEDRALSURFACE Z ( | |
((12 0 10, 8 8 10, 8 10 20, 12 2 20, 12 0 10)), | |
((8 8 10, 0 12 10, 0 14 20, 8 10 20, 8 8 10)), |