Replacement to another file.
cat DATA.TXT | % { $_ -replace "Mary","Susan" } > newfile.txtSame file.
cat DATA.TXT | % { $_ -replace "Mary","Susan" }
| import cv2 | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # Load the data, converters convert the letter to a number | |
| data= np.loadtxt("D:\OpenCV\opencv\sources\samples\data\letter-recognition.data", dtype= 'float32', delimiter = ',', | |
| converters= {0: lambda ch: ord(ch)-ord('A')}) | |
| # split the data to two, 10000 each for train and test | |
| train, test = np.vsplit(data,2) |
| #include <Arduino_FreeRTOS.h> | |
| #include <semphr.h> // add the FreeRTOS functions for Semaphores (or Flags). | |
| #include <LiquidCrystal.h> | |
| #include "pitches.h" | |
| LiquidCrystal lcd(12, 11, 5, 4, 3, 2); | |
| // Declare a mutex Semaphore Handle which we will use to manage the Serial Port. | |
| // It will be used to ensure only only one Task is accessing this resource at any time. | |
| SemaphoreHandle_t xSerialSemaphore; |
| sudo ln -s "/Applications/Visual Studio Code.app/Contents/MacOS/Electron" /usr/local/bin/code |
Replacement to another file.
cat DATA.TXT | % { $_ -replace "Mary","Susan" } > newfile.txtSame file.
cat DATA.TXT | % { $_ -replace "Mary","Susan" }
| /usr/local/mysql/support-files |
| // GET api/values | |
| [HttpGet, Route("branches")] | |
| public IActionResult Branches() | |
| { | |
| //_context.Regions.Where(u=>u.Business.BusinessId == ) | |
| var regions = _context.Regions | |
| .Include(x => x.Branches) | |
| .Include(x => x.Business) | |
| .ToList(); |
| // http://www.geodatasource.com/developers/c-sharp | |
| using System; | |
| namespace <your_namespace> | |
| { | |
| public class GeoCoordinate | |
| { | |
| public double Latitude { get; set; } |
| -- Creates the table | |
| CREATE TABLE geom_points ( | |
| id_pk INTEGER PRIMARY KEY | |
| ); | |
| -- Adds the columns | |
| SELECT AddGeometryColumn('geom_points','coordinates','4326','POINT',2); -- (long, lat) | |
| -- Inserts the Latitude and Longitude from Geography to Geometry. (long, lat) | |
| INSERT INTO geom_points(id_pk, coordinates) |
| DispatchQueue.global(qos: .background).async { | |
| var x:Int = 0 | |
| while (x < Int.max){ | |
| x+=1 | |
| var y:Int = 0 | |
| while (y < Int.max){ | |
| y+=1 | |
| if (y % 10000 == 0){ | |
| DispatchQueue.main.async { | |
| self.numbers.text = "value x:\(x) y:\(y)}" |