document.querySelector('form').submit();
using System;
using System.Diagnostics;
namespace stack
{
public class Program
{
static private int max = 100_000_000;
class Stack
{
private int[] sd = new int[max];
private int sp = -1;
public void Push(int data) => sd[++sp] = data;
public int Pop() => sd[sp--];
public void Rep(int sp, int data) => sd[sp] = data;
public void Inc(int sp, int data) => sd[sp] += data;
public void Dec(int sp, int data) => sd[sp] -= data;
public void Xor(int sp, int data) => sd[sp] %= data;
}
public static void StackTest()
{
var watch = new Stopwatch();
var stack = new Stack();
var count = max;
watch.Start();
for (int i = 0; i < count; i++)
stack.Push(i);
watch.Stop();
Console.WriteLine(watch.Elapsed);
watch.Restart();
for (int i = 0; i < count; i++)
stack.Xor(i, 2);
watch.Stop();
Console.WriteLine(watch.Elapsed);
watch.Restart();
for (int i = 0; i < count; i++)
stack.Pop();
watch.Stop();
Console.WriteLine(watch.Elapsed);
Console.ReadKey();
}
public static void Main() => StackTest();
}
}
bool empty() => sp < 0;
.. ну в смысле для данного прототипа )) [DllImport("USER32.DLL", CharSet = CharSet.Auto)]
internal static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
"Save Table".hWndByTitle().setTitle(csvDlg).waitForIdle().sendString(
new string[] {
"DUIViewWndClassName",
"DirectUIHWND",
"FloatNotifySink",
"ComboBox",
"Edit" },
csv);
internal static IntPtr sendString(this IntPtr hWnd, string[] classNames, string msg, bool verb = false)
{
var hCtrl = hWnd;
if (classNames != null && classNames.Count() > 0)
{
Thread.Sleep(to[toFileStdDlg]);
foreach (var c in classNames)
{
Thread.Sleep(to[toFileStdDlg]);
hCtrl = user32.FindWindowEx(hCtrl, IntPtr.Zero, c, null);
if (hCtrl.Equals(IntPtr.Zero))
{
$"\tERROR :: sendString not found class {c}".log();
return hWnd;
}
else
hCtrl.waitForIdle();
}
}
for (int i = 0; i < msg.Length; i++)
user32.PostMessage(hCtrl, WM_CHAR, msg[i], 0);
Thread.Sleep(to[toFileStdDlg]);
user32.PostMessage(hWnd, WM_KEYDOWN, user32.VkKeyScan('\r'), 0);
user32.PostMessage(hWnd, WM_KEYUP, user32.VkKeyScan('\r'), 0);
return hWnd;
}
jQuery( "input.wpcf7-form-control.wpcf7-submit" ).click(function() {
var link = document.createElement('a');
link.setAttribute('href','http://billgroup.kg/wp-content/uploads/pdf/DeluxeAntalya-Presentation.pdf');
link.setAttribute('download','download');
link.click();
}
from django.utils.timezone import now
from django.utils.timezone import now, pytz
user_timezone = pytz.timezone(user.timezone or settings.TIME_ZONE)
now().astimezone(user_timezone)
from datetime import datetime
from django.utils.timezone import pytz
user_timezone = pytz.timezone(user.timezone or settings.TIME_ZONE)
user_timezone.localize(now())
TIME_ZONE = 'Europe/Moscow'
USE_TZ = True