Skip to content

Instantly share code, notes, and snippets.

namespace System.Web.Mvc
{
#region Using
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc.Html;
using System.ComponentModel;
using System.Linq.Expressions;
/**
* Show or hide the button depending on the scroll position.
*/
function animateButton() {
var button = $('#back-to-top');
var scrollPosition = $(window).scrollTop();
if (scrollPosition > 400) {
button.fadeIn();
} else {
button.fadeOut();
//** jQuery Scroll to Top Control script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com.
//** Available/ usage terms at http://www.dynamicdrive.com (March 30th, 09')
//** v1.1 (April 7th, 09'):
//** 1) Adds ability to scroll to an absolute position (from top of page) or specific element on the page instead.
//** 2) Fixes scroll animation not working in Opera.
var scrolltotop={
//startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control
//scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top).
@rqx110
rqx110 / CssRewriteUrlTransformFixed.cs
Created December 5, 2014 01:18
CssRewriteUrlTransformFixed.cs
namespace System.Web.Optimization
{
using System.Text.RegularExpressions;
/// <summary>
/// Fix for the standard System.Web.Optimization.CssRewriteUrlTransform which doesn't play nice with data URIs.
/// I've logged the bug on codeplex, but this will have to do for now: https://aspnetoptimization.codeplex.com/workitem/88
/// </summary>
public class CssRewriteUrlTransformFixed : IItemTransform
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Threading;
using System.Runtime.InteropServices;
namespace SimpleConsole
{
/// <summary>
/// Gets the console secure password.
/// </summary>
/// <returns></returns>
private static SecureString GetConsoleSecurePassword( )
{
SecureString pwd = new SecureString( );
while ( true )
{
@rqx110
rqx110 / batchupdatenuget
Last active June 26, 2017 03:34
vs中批量更新nuget包
Get-Package | Where Id -like "Contoso.*" | Sort-Object -Property Id -Unique | foreach { Update-Package $_.Id }
OR
ForEach($project in get-project -all) { ForEach($package in Get-Package -ProjectName $project.ProjectName | ?{ $_.Id -like 'Abp*'}) { Update-Package -ProjectName $project.ProjectName -Id $package.Id;} }
using System;
using System.IO;
using System.Linq;
using System.Text;
namespace AbpWebSite.Templates
{
/// <summary>
/// Used to rename a solution
/// </summary>
@rqx110
rqx110 / browser-not-supported.js
Last active July 8, 2020 10:14
js提示浏览器不支持
window._browserIsNotSupported = true;
if (window.attachEvent) {
window.attachEvent('onload', function() {
var lowestSupportedIEVersion = 8;
var userAgent = navigator.userAgent.toLowerCase(),
s, o = {};
var browser = {
version: (userAgent.match(/(?:firefox|opera|safari|chrome|msie)[\/: ]([\d.]+)/))[1],
safari: /version.+safari/.test(userAgent),
@rqx110
rqx110 / ModifyInMemory.cs
Created September 19, 2016 05:20
aspose for .net total 破解
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using System.Xml;
namespace LicenseHelper