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 svgEl = drawdiv.children[1]; | |
//Если черный квадрат, то убрать прозрачность на none | |
svg2pdf(svgEl, pdf, { | |
xOffset: this.pdfPageDefaultOffsetX, | |
yOffset: pdfOffsetY, | |
scale: divToPdfRatio | |
}); | |
let prevFontSize = pdf.internal.getFontSize(); |
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 ofn = new NativeMethods.OpenFileName(); | |
ofn.lStructSize = Marshal.SizeOf(ofn); | |
if (Filter != null) | |
ofn.lpstrFilter = Filter.Replace('|', '\0') + "\0\0"; | |
var maxFilePathLength = 250; | |
var maxFilesForMultiselect = 100; | |
ofn.nMaxFile = 1 * maxFilePathLength; | |
if (AllowMultiSelect) | |
{ | |
ofn.Flags |= ( |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<location path="ForDownload" allowOverride="false" inheritInChildApplications="false"> | |
<system.webServer> | |
<security> | |
<authorization> | |
<!-- Allow all users access to the Public folder --> | |
<remove users="*" roles="" verbs="" /> | |
<add accessType="Allow" users="*" roles="" /> | |
</authorization> |
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 System; | |
using System.Text; | |
using System.Net.Mail; | |
using System.IO; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Net; | |
using System.Threading; | |
using System.Net.Mime; | |
using System.Diagnostics; |
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 logSW = new StreamWriter("output.txt", false); | |
logSW.AutoFlush = true; | |
Trace.Listeners.Add(new TextWriterTraceListener(logSW)); | |
Trace.Listeners.Add(new ConsoleTraceListener(true)); | |
<system.diagnostics> | |
<trace autoflush="true" indentsize="4"> | |
<listeners> |
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
команды adb: | |
- вкл режим OTG | |
выключаешь, пишешь команду чтобы она висела в консоли, включаешь (потому что там маленький промежуток когда команда работает, потом он ставит себе режим host и уже не прокатит) | |
adb wait-for-device && adb shell setprop monitor.otg.mode force_device | |
adb devices - проверить подключено ли устройство | |
adb logcat - Лог |
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 System; | |
using System.Net; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Calibration { | |
public static class Server { | |
public delegate void ProgressDelegate(int percents, long bytesReceived, long totalBytesToReceive); |
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 GetSettings(string key) | |
{ | |
return ConfigurationManager.AppSettings[key] ?? ""; | |
} | |
public static void SetSetting(string key, string value) | |
{ | |
Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); | |
configuration.AppSettings.Settings[key].Value = value; | |
configuration.Save(); |
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
namespace AutogrammaLauncher | |
{ | |
using System; | |
using System.Net; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
public static class Server |
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 | |
pathB=/data/pgbackup | |
dbUser=postgres | |
database=aerodb | |
mkdir -p $pathB | |
chmod 775 -R $pathB | |
find $pathB -mtime +61 -delete | |
su $dbUser -c "/usr/bin/pg_dumpall --database=$database | gzip > $pathB/pgsql_$(date -u "+%Y-%m-%d").sql.gz" |