Skip to content

Instantly share code, notes, and snippets.

View ramannanda9's full-sized avatar

Ramandeep Singh ramannanda9

View GitHub Profile
@ramannanda9
ramannanda9 / gist:1200854
Created September 7, 2011 15:23
adf master detail
<af:panelBox id="pb5" text="#{vleadministrationuiBundle.DEMAND_DRAFT}" rendered="#{pageFlowScope.RecordVleDetailsBacking.isDemandDraftEnabled}"
>
<af:panelGroupLayout id="pgl21" layout="vertical" >
<af:panelCollection id="pc12" inlineStyle="width:630px">
<f:facet name="toolbar">
public static void resetAttributes(UIComponent rootComponent,AdfFacesContext adfFacesContext){
List<UIComponent> items = rootComponent.getChildren();
for ( UIComponent item : items ) {
resetAttributes(item,adfFacesContext);
if ( item instanceof RichInputText ) {
RichInputText input = (RichInputText)item;
if ( !input.isDisabled() &&!input.isReadOnly() ) {
@ramannanda9
ramannanda9 / Oracle account unlock utility
Created January 30, 2012 21:16
Account unlock utility
CREATE OR REPLACE PROCEDURE "SYS"."ACCOUNT_UNLOCKER" ( p_user in varchar2 )
is
temp_password varchar2(255);
begin
select password into temp_password from sys.user$ where upper(name)=upper(p_user
);
execute immediate 'alter user '||p_user||' account unlock ' ;
execute immediate 'alter user '||p_user|| ' identified by values '''||temp_passw
ord||'''';
end;
@ramannanda9
ramannanda9 / good wsdl
Created October 15, 2012 18:16
Good WSDL ? Good Schema ?
<wsdl:definitions
name="OMTAutomationService"
targetNamespace="http://ramannanda.blogspot.co.in/OMTAutomationService/"
xmlns:tns="http://ramannanda.blogspot.co.in/OMTAutomationService/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
<wsdl:types>
@ramannanda9
ramannanda9 / RateLimitedFetch.java
Created December 11, 2015 01:15
Rate Limiting requests
public static List<Movie> invokeRateLimitedFetch(List<SearchedMovie> searchedMovies,boolean saveFile, File file){
List<Movie> movies=new ArrayList<>();
Observable.zip(Observable.from(searchedMovies),
Observable.interval(2, TimeUnit.SECONDS), (obs,timer)->obs)
.doOnNext(item -> {
Movie movie = movieUtil.getMovieDetails(item.getId());
movies.add(movie);
if(saveFile) {
writeRecordToFile(file, movie);
@ramannanda9
ramannanda9 / mysql_geoplanet.sql
Last active December 17, 2015 22:09
MySql GeoPlanet data and data loading script
CREATE TABLE `places` (
`woeid` int(15) NOT NULL,
`iso` varchar(6) NOT NULL,
`name` text NOT NULL,
`language` varchar(6) NOT NULL,
`type` varchar(30) NOT NULL,
`parent` int(15) NOT NULL,
PRIMARY KEY (`woeid`)
) ENGINE=INNODB DEFAULT CHARSET=utf8;
package sahaj.apps.vleadministration.view.bean;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
import oracle.adf.model.RegionBinding;
@ramannanda9
ramannanda9 / 0_reuse_code.js
Created September 28, 2013 14:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ramannanda9
ramannanda9 / gist:7344308
Created November 6, 2013 21:21
AMimpl test and OIDOperations class
package model;
import java.util.Map;
import java.util.logging.Level;
import model.common.AppModule;
import oracle.adf.share.logging.ADFLogger;
@ramannanda9
ramannanda9 / gist:8147672
Last active January 1, 2016 12:58
Recursive delete organization, Its users or permissions, remove inheritance and itself.
/**
* This method recursively deletes and organization and its permission objects/users
* Its descendants if any are there before deleting the organization
* @param orgUnit The orgUnit name
* @param delAdmMgr A delegated Admin Manager instance
* @param revMgr A Delegated review manager instance
* @param rvMgr A review manager instance
* @param admMgr A admin manager instance
* @return
*/