Skip to content

Instantly share code, notes, and snippets.

Sergey Abakumoff sAbakumoff

Block or report user

Report or block sAbakumoff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:4950514
private void SelectAllClickHandler(object sender, EventArgs agrs)
{
designer1.ExecuteAction(DesignerAction.SelectAll);
}
private void DesignerForm_Load(object sender, EventArgs e)
{
View gist:5088530
PageReport pagereport = new PageReport(new System.IO.FileInfo("Invoice2.rdlx"));
pagedoc = new PageDocument(pagereport);
pagedoc.LocateDataSource += new LocateDataSourceEventHandler(runtime_LocateDataSource);
pagedoc.PageReport.Document.LocateDataSource += new LocateDataSourceEventHandler(runtime_LocateDataSource);
pagedoc.Print();
View gist:5351370
private void DisableChartWizard()
{
var regSubkey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"SOFTWARE\GrapeCity\ActiveReports 6\Windows");
if (regSubkey!=null)
{
regSubkey.SetValue("AutoRunWizard", 0);
}
}
View gist:5479541
private SizeF MeasureText(string text, Font font)
{
using(var bitmap = new Bitmap(1,1))
using(var graphics = Graphics.FromImage(bitmap))
{
var size = graphics.MeasureString(text, font);
return new SizeF(size.Width / bitmap.HorizontalResolution, size.Height / bitmap.VerticalResolution);
}
}
View gist:5617110
Dim val1 As GrapeCity.ActiveReports.Expressions.ExpressionObjectModel.ParameterValue = New Expressions.ExpressionObjectModel.ParameterValue
Dim val2 As GrapeCity.ActiveReports.Expressions.ExpressionObjectModel.ParameterValue = New Expressions.ExpressionObjectModel.ParameterValue
Dim val3 As GrapeCity.ActiveReports.Expressions.ExpressionObjectModel.ParameterValue = New Expressions.ExpressionObjectModel.ParameterValue
val2.Value = "TEST12"
val3.Value = "TEST13"
val1.Value = "TEST"
Runtime.Parameters(1).ValidValues.Add(val1)
Runtime.Parameters(1).ValidValues.Add(val2)
View gist:6375668
<link rel="stylesheet" href="GrapeCity.ActiveReports.Viewer.Html.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="GrapeCity.ActiveReports.Viewer.Html.js"></script>
View whatthefuck.js
/***
Copyright (c) 2016, Alexander Choporov aka CoolCmd
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDE
View select_keywords.js
function select_keywords(r, emit) {
try{
var package=JSON.parse(r.content);
(package.keywords || []).forEach(function(keyword){
emit({keyword : keyword});
});
}
catch(ex){
}
View package.json
{
"name": "pokemon",
"version": "0.7.0",
"description": "Get Pokémon names",
"license": "MIT",
"repository": "sindresorhus/pokemon",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
View select_duplicates.js
function extract_package_name(r, emit) {
var output = Object.assign(r);
try{
var package=JSON.parse(r.content);
emit(Object.assign({}, r, {name : package.name}));
}
catch(ex){
emit(Object.assign({}, r, {name : 'JSON_ERROR'}));
}
}
You can’t perform that action at this time.