This file contains hidden or 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 Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MyPage.aspx.cs" Inherits="MyProject.Pages.MyPage" %> | |
| <%@ Register TagPrefix="uc" TagName="StartDateRequired" Src="~/WebUserControl/StartDateRequired.ascx" %> | |
| <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"> | |
| </asp:Content> | |
| <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> | |
| <uc:StartDateRequired ID="TextBoxStartDate" runat="server" /> | |
| </asp:Content> |
This file contains hidden or 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.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Web.UI; | |
| using System.Web.UI.WebControls; | |
| using System.Web.Security; | |
| using MyProject.DAO.TableAdapters; | |
| namespace MyProject.Pages |
This file contains hidden or 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
| delete from TEST_DATA c where exists | |
| (select rowid from TEST_DATA a | |
| left outer join( | |
| select min (rowid) as min_row, MSG_ID, MSG_ID2 | |
| FROM TEST_DATA | |
| GROUP BY MSG_ID, MSG_ID2 | |
| ) x on a.rowid = x.min_row | |
| where x.min_row is null and a.rowid = c.rowid); |
This file contains hidden or 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
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| Page.Form.Attributes.Add("enctype", "multipart/form-data"); | |
| } |
This file contains hidden or 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
| keytool -keystore /path_to_studio_jre/lib/security/cacerts -importcert -alias jasperca -file /path_to_cer/public.cer |
This file contains hidden or 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
| begin | |
| auth_token = SecureRandom.uuid.gsub(/\-/,'') | |
| end while User.exists?(auth_token: auth_token) |
This file contains hidden or 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
| def self.soap_method(input) | |
| c = Savon.client(wsdl: 'http://0.0.0.0/path_of_wsdl.wsdl', ssl_verify_mode: :none) | |
| r = c.call(:soap_method, xml: | |
| "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:com='http://www.company.com'> | |
| <soapenv:Header/> | |
| <soapenv:Body> | |
| <com:SoapMethod> | |
| <com:input> | |
| <!--Soap Body--> | |
| </com:input> |
This file contains hidden or 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
| private | |
| def self.get_response | |
| c = Savon.client(wsdl: 'local_wsdl.wsdl', ssl_verify_mode: :none) | |
| r = c.call(:login, message: { "String_1" => "xxxx", "String_2" => Rails.application.secrets.SECRET }, response_parser: :rexml) | |
| result_xml = Nokogiri::XML(r.body[:response][:result]) | |
| response = Hash.from_xml(result_xml.to_s) | |
| response["Response"] | |
| end |
This file contains hidden or 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
| class RestApi | |
| include HTTParty | |
| base_uri 'http://url/api/v1' | |
| def self.get_info(id) | |
| response = get("/info/#{id}") | |
| response["count"] > 0 ? response["results"]["info"] : "Not Found" | |
| end | |
| end |
This file contains hidden or 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
| class StoredProcedure | |
| def self.return_value name, *args | |
| ActiveRecord::Base.connection_pool.with_connection do |connection| | |
| args = args.map{|e| connection.quote e} | |
| output = connection.select_all("Declare @status int;" + | |
| "EXEC @status = #{name} #{args.join(',')};" + | |
| "select @status as status;") | |
| return_value = Hash[*output] | |
| return_value["status"] | |
| end |
OlderNewer