Недавний контент iDnx

  1. iDnx

    [C#] Форматированный вывод DateTime из UnixTime

    int timestamp = 1439306595; DateTime date = new DateTime(1970, 1, 1).AddSeconds(timestamp); return date.ToString("d.M.y H:mm:ss");
  2. iDnx

    Релиз ZennoPoster 5 новый билд 5.8.0.2 (04.06.2015)

    Та же ошибка вылезла. На одном пк работал ПМ, на втором (активированном в админке) ЗП.
  3. iDnx

    сравнение дат

    // Конвертируем время System.Globalization.CultureInfo culture =System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); DateTime date = DateTime.Parse(project.Variables["time"].Value, culture); var date2 = DateTime.Now; // Текущее время TimeSpan span = date2 - date; double seconds =...
  4. iDnx

    Текущая дата в переменную

    return DateTime.Now.AddDays(14);
  5. iDnx

    Сортировка по времени C#?

    DateTime now = DateTime.Today; int year1 = Convert.ToInt32(project.Variables["year"].Value); int month1 = Convert.ToInt32(project.Variables["month"].Value); int day1 = Convert.ToInt32(project.Variables["day"].Value); DateTime check = new DateTime(year1, month1, day1); TimeSpan interval = now -...
  6. iDnx

    Вычисление даты и времени (формула) C#?

    Преобразует дату в местное время.
  7. iDnx

    Вычисление даты и времени (формула) C#?

    Это не код не работает, а ..... int timenow = (int)(DateTime.Parse(project.Variables["TimeNow"].Value) - new DateTime(1970, 1, 1)).TotalSeconds; int deadline = (int)(DateTime.Parse(project.Variables["deadline"].Value) - new DateTime(1970, 1, 1)).TotalSeconds; int lastpost =...
  8. iDnx

    Вычисление даты и времени (формула) C#?

    99% int unixTime = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; int timenow = (int)(DateTime.Parse(project.Variables["timenow"].Value) - new DateTime(1970, 1, 1)).TotalSeconds; int deadline = (int)(DateTime.Parse(project.Variables["deadline"].Value) - new DateTime(1970, 1...
  9. iDnx

    C# записать 2 разные ячейки, разными переменными

    Вот рабочий: var table = project.Tables["Таблица"]; table.SetCell("A", System.Convert.ToInt32(project.Variables["НомерСтроки"].Value), project.Variables["Данные"].Value);
  10. iDnx

    C# записать 2 разные ячейки, разными переменными

    var table = project.Tables["Таблица"]; table.SetCell("A", System.Convert.ToInt32(project.Variables["НомерСтроки"].Value), project.Variables["Данные"].Value); "A" - ячейка.
  11. iDnx

    Дописать в каждую строку текст в списке

    var list = project.Lists["Список"]; for(int i = 0; i < list.Count; i++) { if (!list[i].StartsWith("http://vk.com/")) list[i] = "http://vk.com/" + list[i]; }
  12. iDnx

    Помогите смастерить php код (1WMZ)

    <?php $file = file_get_contents(urldecode($_GET['f'])); header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=' . basename($file)); header('Content-Transfer-Encoding: binary'); header('Expires: 0')...
  13. iDnx

    перегон картинки в цифру

    byte[] imageArray = System.IO.File.ReadAllBytes(@project.Variables["path"].Value); return Convert.ToBase64String(imageArray); в переменную path положить путь к картинке