Dim margins As New RECT() Dim lParam As IntPtr = Marshal.AllocHGlobal(Marshal.SizeOf(margins)) SendMessage(Me.Handle, EM_GETMARGINS, IntPtr.Zero, lParam) margins = Marshal.PtrToStructure(lParam, GetType(RECT)) Marshal.FreeHGlobal(lParam) Dim leftMargin As Integer = margins.Left Dim rightMargin As Integer = margins.Right
Dim clientAreaWidth As Integer = Me.RichTextBox1.Width - leftMargin - rightMargin
Dim controlRect As New RECT() Dim rectParam As IntPtr = Marshal.AllocHGlobal(Marshal.SizeOf(controlRect)) SendMessage(Me.Handle, EM_GETRECT, 0, rectParam) controlRect = Marshal.PtrToStructure(rectParam, GetType(RECT)) Marshal.FreeHGlobal(rectParam) Dim controlWidth As Integer = controlRect.Right - controlRect.Left
Dim selectionBorderWidth As Integer = controlWidth - clientAreaWidth
#include <winrt/Windows.Foundation.Collections.h> struct SuggestionSource : winrt::implements<SuggestionSource, winrt::Windows::Foundation::IInspectable> { winrt::Windows::Foundation::Collections::IVector<winrt::hstring> Suggestions; SuggestionSource() { Suggestions = winrt::single_threaded_vector<winrt::hstring>(); } void AddSuggestion(winrt::hstring suggestion) { Suggestions.Append(suggestion); } };
MaterialId MaterialQuantity BOMGRP BOMCOUNT Mat_A 20 1 2 Mat_B 30 1 2 Mat_A 20 2 2 Mat_B 35 2 2 Mat_A 20 3 2 Mat_B 30 3 2 Mat_A 10 4 3 Mat_B 20 4 3 Mat_C 30 4 3 Mat_A 10 5 3 Mat_B 20 5 3 Mat_C 30 5 3
double currentPosition = videoPlayer.Position.TotalSeconds;
websocket_urlpatterns = [ re_path(r'ws/chat_app/(?P<room_name>\w+)/$', ChatConsumer.as_asgi()), ]
urlpatterns = [ path('admin/', admin.site.urls), ..., path('ws/', include(websocket_urlpatterns)), ]
public interface IExportData { string Titel { get; } string Auteur { get; } string Hugo { get; } string Nebula { get; } string Locus { get; } }
[HttpPost] public FileResult ExportToCSV(string? listToExport, string tableName) { //Initialize with header... string[] book = new string[] { "Titel", "Auteur", "Hugo", "Nebula", "Locus" }; //Initialize Data outside the switch statement List<IExportData> Data = new List<IExportData>(); switch (tableName) { case "NTK": //Customize the query for the "NTK" table... Data = _context.Boek .Include(b => b.Auteur) .Include(b => b.Categorie) .Where(b => b.CategorieID == 1 && b.ISBN == "0000000000" && (b.Hugo > 0 || b.Nebula > 0 || b.Locus > 0)) .Select(b => new ExportData { Titel = b.Titel, Auteur = b.Auteur!.DisplayName, Hugo = b.Hugo.ToString(), Nebula = b.Nebula.ToString(), Locus = b.Locus.ToString() }) .ToList<IExportData>(); break; //Add cases for other tables as needed... case "OtherTable1": Data = _context.OtherTable1 // Customize the query for "OtherTable1"... .Select(ot => new ExportData { //Map properties accordingly... }) .ToList<IExportData>(); break; case "OtherTable2": Data = _context.OtherTable2 //Customize the query for "OtherTable2"... .Select(ot => new ExportData { // Map properties accordingly... }) .ToList<IExportData>(); break; //Add more cases for additional tables... default: //Handle the case when tableName is not recognized... return File(Encoding.UTF8.GetBytes("Invalid table name"), "text/csv", "Boeken.csv"); } StringBuilder sb = new StringBuilder(); foreach (var item in Data) { //Customize how you extract data from different table types... book = new string[] { item.Titel, item.Auteur, item.Hugo, item.Nebula, item.Locus }; for (int j = 0; j < book.Length; j++) { //Append data with separator... sb.Append(book[j] + ','); } // Append new line character... sb.Append("\r\n"); } return File(Encoding.UTF8.GetBytes(sb.ToString()), "text/csv", "Boeken.csv"); }
ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
rngRow.Delete(XlDeleteShiftDirection.xlShiftUp);
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(25)); IList<IWebElement> spanElements = driver.FindElements(By.CssSelector("span[id^='c']")); foreach (IWebElement spanElement in spanElements) { try { wait.Until(ExpectedConditions.PresenceOfAllElementsLocatedBy(By.CssSelector("span[id^='c']"))); spanElement.Click(); wait.Until(ExpectedConditions.StalenessOf(spanElement)); htmlList.Add(driver.PageSource); } catch (Exception ex) { } }