Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 bool EasyRest(long sortingDataId, out string error, out int error_code, out bool fatal) | |
{ | |
var httpWebRequest = (HttpWebRequest)WebRequest.Create(Api.ApiOptions.LightSortingConfirmationURL); | |
httpWebRequest.ContentType = "application/json"; | |
httpWebRequest.Method = "POST"; | |
httpWebRequest.Headers.Add("Authorization", $"{ApiOptions.TokenType} {ApiOptions.Token}"); | |
error_code = 0; | |
fatal = false; |
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 class Cultures | |
{ | |
// Call this method to initialize Persian Hijri culture | |
public static void InitPersian() | |
{ | |
InitCulture("fa-ir", new[] { "ی", "د", "س", "چ", "پ", "ج", "ش" }, | |
new[] { "یکشنبه", "دوشنبه", "سه شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" }, | |
new[] | |
{ | |
"فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", |
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
sudo ntfsfix /dev/sdxX # where x is HDD and X is drive number, in my case it was /dev/sda1 | |
# remove any logfile created by windows. |
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 cv2 | |
import numpy as np | |
cap = cv2.VideoCapture('vtest.avi') | |
frame_width = int( cap.get(cv2.CAP_PROP_FRAME_WIDTH)) | |
frame_height =int( cap.get( cv2.CAP_PROP_FRAME_HEIGHT)) | |
fourcc = cv2.VideoWriter_fourcc('X','V','I','D') |
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 static string ToShamsi(this DateTime value) | |
{ | |
PersianCalendar pc=new PersianCalendar(); | |
return pc.GetYear(value) + "/" + pc.GetMonth(value).ToString("00") + "/" + | |
pc.GetDayOfMonth(value).ToString("00"); | |
} |
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 x = document.querySelectorAll("[aria-label^='Accept']"); | |
for (var i = 0; i < x.length; i++) { | |
x[i].click(); | |
} |
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 ParcelsRepository _parcelsRepository; | |
static void Main(string[] args) | |
{ | |
var configuration = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build(); | |
var cn = configuration.GetConnectionString("CrossbeltDataContext"); | |
var options = new DbContextOptionsBuilder<CrossbeltDataContext>(); | |
options.UseSqlServer(cn); |
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
# uncomment for a colored prompt, if the terminal has the capability; turned | |
# off by default to not distract the user: the focus in a terminal window | |
# should be on the output of commands, not on the prompt | |
force_color_prompt=yes | |
if [ -n "$force_color_prompt" ]; then | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
# We have color support; assume it's compliant with Ecma-48 | |
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such | |
# a case would tend to support setf rather than setaf.) |