This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Data.SqlTypes; | |
public partial class NetClient | |
{ | |
/* | |
ALTER DATABASE db-name SET TRUSTWORTHY ON | |
ALTER ASSEMBLY [assembly-name] WITH PERMISSION_SET = external_Access |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IServiceProvider service = (IServiceProvider)this.Context; | |
HttpWorkerRequest request = (HttpWorkerRequest)service.GetService(typeof(HttpWorkerRequest)); | |
var identity = new System.Security.Principal.WindowsIdentity(request.GetUserToken()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. authorize on http.sys: from cmd as admin: | |
netsh http add urlacl url=http://*:8080/ user=everyone listen=yes | |
2. open fw port/IISexpress | |
3. change applicationhost.config: | |
... | |
<binding protocol="http" bindingInformation="*:8080:" /> | |
... | |
4. Run IISExpress | |
"c:\Program Files (x86)\IIS Express\iisexpress.exe" /config:applicationhost.config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// requires prototype.js | |
function setBodyFiller(resizableBody,footer){ | |
var body = $(resizableBody); | |
var footer = $(footer); | |
if (!body) return; | |
function resizeMethod(){ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)log:(NSString *)text, ... | |
{ | |
va_list args; | |
va_start(args, text); | |
id logText = [[NSString alloc] initWithFormat:text arguments:args]; | |
va_end(args); | |
NSLog(@"%@",logText); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) syncRequest{ | |
id urlString = @"http://www.google.com"; | |
NSURL * url = [NSURL URLWithString:urlString]; | |
NSURLRequest * request = [NSURLRequest requestWithURL:url]; | |
NSURLResponse * response = nil; | |
NSError * error = nil; | |
NSLog(@"loading: %@",url); | |
NSData * responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXEC master.dbo.sp_addlinkedserver | |
@server = N'LINKEDSERVERNAME', -- name of the linked server to create | |
@srvproduct=N'ORA9', -- descriptive | |
@provider=N'OraOLEDB.Oracle', -- Driver | |
@datasrc=N'DBTEST' -- TNS name | |
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'LINKEDSERVERNAME' -- name of the linked server just created | |
,@useself=N'False',@locallogin=NULL, | |
@rmtuser='USERNAME', -- username |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
t.TABLE_NAME AS '@name', | |
--sv.docID AS 'docID' | |
(SELECT | |
cols.COLUMN_NAME AS '@field', | |
case when exists(select 1 from INFORMATION_SCHEMA.KEY_COLUMN_USAGE ku | |
where ku.TABLE_NAME = t.TABLE_NAME | |
and ku.TABLE_SCHEMA = t.TABLE_SCHEMA | |
and ku.COLUMN_NAME = cols.COLUMN_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportingServicePage.aspx.cs" Inherits="ReportingServicePage" %> | |
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" | |
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rs" %> | |
<html> | |
</head> | |
<body> | |
<form id="form1" runat="server"> | |
<asp:ScriptManager ID="ScriptManager1" runat="server"> | |
</asp:ScriptManager> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using Microsoft.SPOT; | |
using Gadgeteer.Modules.Seeed; | |
using Gadgeteer; | |
// GHI.OSHW.Hardware // on OSHW | |
using GHI.Premium.System; // on Premium | |
namespace Common.Libs | |
{ |