Skip to content

Instantly share code, notes, and snippets.

View moenk's full-sized avatar

Thomas "moenk" Meier moenk

View GitHub Profile
@moenk
moenk / gist:8b4453ef69d87a4f412452d2027b653d
Last active March 7, 2021 20:14
UiPath convert data table column to string join
str_column = String.Join(", ",dt.AsEnumerable().Select(Function(a) a.Field(Of String)(“my_col_name”)).ToArray())
@moenk
moenk / gist:f0b91f7d412442be19413d9097f95c66
Created March 7, 2021 20:10
UiPath remove special json encoding character from queue item specific content
str_name = System.Text.RegularExpressions.Regex.Unescape(in_TransactionItem.SpecificContent("name").ToString)
@moenk
moenk / gist:6af1dc9f592bfd60487c8b3b7b5273e3
Created March 9, 2021 12:50
UiPath add Reference column to data table with concat attributes string
dt.columns.Add("REFERENCE", System.Type.GetType("System.String"), "Name + ID")
@moenk
moenk / gist:6bb8cc7b5eadf0be34ea75a1b398085f
Created March 10, 2021 09:53
UiPath secure password to plain string
str_password = new System.Net.NetworkCredential("", sec_password).Password
@moenk
moenk / tg_bulk_msg.py
Created April 4, 2021 09:06
Python telegram send bulk messages to all contacts
from telethon.sync import TelegramClient
from telethon.tl.types import InputPeerUser
from telethon import functions
from time import sleep
api_id = 359***
api_hash = 'fe0b***'
with TelegramClient("moenk", api_id, api_hash) as client:
contacts = client(functions.contacts.GetContactsRequest(hash=0))
for u in contacts.users:
@moenk
moenk / gist:8f3a58b3b2c13d35b38630d9541df8fe
Last active January 30, 2023 02:54
UiPath set date time parser culture info globalization
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("de-DE")
' Quelle definieren
Dim wks1, wks2, wks3 As Worksheet
Set wks1 = ThisWorkbook.Sheets("Report")
Dim tableRange As Range
Set tableRange = wks1.UsedRange
wks1.ListObjects.Add(SourceType:=xlSrcRange, Source:=tableRange, xlListObjectHasHeaders:=xlYes).Name = "ReportDaten"
' Pivot erstellen
Dim pc1, pc2 As PivotCache
Dim pv1, pv2 As PivotTable
@moenk
moenk / gist:da2248d42ec47dab91113f1dddd7079f
Created August 12, 2021 09:56
UiPath VB .net convert string array to double array
array_double_values = Array.ConvertAll(array_string_values, Function(input As String) Double.Parse(input))
ExtractDataTable = ExtractDataTable.AsEnumerable().GroupBy(Function(i) i.Field(Of String)(“Mobiltelefon”)).Select(Function(g) g.First).CopyToDataTable
@moenk
moenk / gist:6b7a6b327d7b8c67d98220bd7052dd51
Created September 20, 2021 07:54
UiPath VB .net Assign String To Int in DataTable
dt = dt.asenumerable.tolist.foreach(sub(row) row(“Yourcolumnname”)= cint(row(“Yourcolumnname”)))