Skip to content

Instantly share code, notes, and snippets.

View sm-abdullah's full-sized avatar

sm.abdullah sm-abdullah

  • smsoft
  • lahore punjab
View GitHub Profile
-- Script needs to be executed in the same order
-- Update experiment status to Stop if targeting is not enabled
update experiment as exp
set status = "TargetingDisabled"
where exp.`targeting_enabled` = 0 ;
-- Update experiment status to Running where targetting is enabled. Note : Should always run before Analyzing Script
update experiment as exp
set status = "TargetingEnabled"
<Style x:Key="dialgoResisze" TargetType="{x:Type ContentControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContentControl}">
<Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
<ContentPresenter Content="{TemplateBinding Content}"/>
<Control x:Name="Top">
<Control.Style>
<Style TargetType="{x:Type Control}">
<Setter Property="Template">
@sm-abdullah
sm-abdullah / InfiniteScrollViewer.cs
Last active January 3, 2017 16:19
InfiniteScrollViewer lazy Data Loading Scrolling
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Markup;
[assembly: XmlnsDefinition("http://codingsack.com/wpf/InfiniteScrollViewer", "InfiniteScrollViewerControl")]
[assembly: XmlnsPrefix("http://codingsack.com/wpf/InfiniteScrollViewer", "cs")]
namespace InfiniteScrollViewerControl
{
@sm-abdullah
sm-abdullah / MainViewModel.cs
Last active November 30, 2016 08:18
How to use Choosen Control in MVVM ?
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
namespace WpfChoosenControlDemo
{
public class MainViewModel : ViewModelBase
{
private ObservableCollection<Student> _items;
private List<Student> _selectedItems;
public class PDFConverter
{
/// <summary>
/// it will Convert HTML Code into PDF
/// </summary>
/// <param name="htmlCode">HTML Code</param>
/// <param name="wkhtmlToPdfExePath">wkhtmlToPdf Exe file Path</param>
/// <returns></returns>
public byte[] Convert(string htmlCode, string wkhtmlToPdfExePath)
{
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Routing;