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
# | |
# Author: Nitin Reddy | |
# | |
# Requires user authentication, hard-coded in: "post '/login' " | |
# Saves the form data that is posted to /save-form | |
# | |
require 'sinatra' | |
require 'sinatra/base' | |
require 'mongo' |
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
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/flexboxgrid/6.3.1/flexboxgrid.min.css" type="text/css" /> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css" /> | |
<style> | |
.red-bg { background-color: red; } | |
.green-bg { background-color: green; } |
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
import com.google.gson.Gson; | |
import com.katkam.entity.Organization; | |
import com.katkam.entity.Part; | |
/** | |
* Created by Developer on 6/12/17. | |
*/ | |
public class Initial { | |
public static void main(String args[]) { | |
Gson gson = new Gson(); |
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
--Flex for R5HOME PostInsert | |
declare @dupcnt int; | |
declare @homcod nvarchar(30), @hommax numeric(24,6), @homfunc nvarchar(30), @homkpityp nvarchar(30), @typ nvarchar(30); | |
select @homcod=hom_code, @hommax=HOM_MAX, @homfunc=hom_ewsfunction, @homkpityp=hom_kpitype, @typ=hom_type from r5home where hom_sqlidentity=:rowid; | |
--Note: Right now, we're only doing this for the requisition screen | |
if @homfunc<>'SSREQU' or @homkpityp not in ('D', 'SB') or @typ<>'+' or @hommax<4 | |
return; |
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
create procedure uspAddKpiToUser( | |
@usrcod nvarchar(30), | |
@kpicod nvarchar(30) | |
) | |
as | |
begin | |
declare @dupcnt int; | |
select @dupcnt=count(1) from r5homeusers where hmu_user=@usrcod and hmu_homcode=@kpicod and hmu_homtype='+'; | |
if @dupcnt=0 and exists(select 1 from r5home where hom_code=@kpicod and hom_type='+') and exists(select 1 from r5users where usr_code=@usrcod) | |
begin |
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
--exec dbo.uspCreateStoreForOrg 'UAE-DXB-RED'; --precondition is it must be be a 3 part org code | |
create procedure uspCreateStoreForOrg( | |
@orgcod nvarchar(30) | |
) as | |
begin | |
declare @dashval_orgcod_loc int; | |
declare @cod nvarchar(30); | |
declare @dupcnt int; | |
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
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %> | |
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> | |
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %> | |
This is a JSP test<br /> | |
<c:out value="This is JSTL" /> | |
<br /> |
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
import com.fasterxml.classmate.AnnotationConfiguration; | |
import org.hibernate.HibernateException; | |
import org.hibernate.Session; | |
import org.hibernate.SessionFactory; | |
import java.util.Properties; | |
/** | |
* Created by Developer on 1/7/17. | |
*/ |
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
<!doctype html><html> | |
<head> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | |
<!-- Optional theme --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> | |
<!-- Latest compiled and minified JavaScript --> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> |
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
$newuserpass=ConvertTo-SecureString "ablublah" -AsPlainText -Force | |
New-ADUser -Name "fname.lname" -GivenName "fname" -Surname "lname" -DisplayName "fname lname" -AccountPassword $newuserpass -Path "OU=subgroup,DC=dcname,DC=dcupname" -Enabled 1 | |
#On Exchange Server | |
Enable-Mailbox -Identity fname.lname -Database MBOX01 |
NewerOlder