Posts

Linked List Implementation in Java

public class LinkedListImplementation { Node head ; // create head object of class Node class Node { int data ; Node next ; // create next object of class Node Node ( int d ){ this . data = d ; this . next = null ; // assign next to null for all new Node } } public void addFirst ( int d ){ Node newNode = new Node ( d ); if ( head == null ){ head = newNode ; return ; } newNode . next = head ; head = newNode ; } public void addLast ( int d ){ Node newNode = new Node ( d ); if ( head == null ){ head = newNode ; return ; } Node currentNode = head ; while ( currentNode . next != null ){ currentNode = currentNode . next ; } currentNode . next = newNode ;

Simplest Todo APP in React

HTML Code <div id= "root" ></div> React Code class TodoApp extends React . Component { constructor ( props ){ super ( props ); this . state = { input : '' , list : [], error : false } this . handleInput = this . handleInput . bind ( this ); this . submit = this . submit . bind ( this ); } handleInput ( event ){ this . setState ({ input : event . target . value }); } submit (){ this . setState ( state => { if ( this . state . list . indexOf ( this . state . input ) != - 1 ){ return { error : true } } return { list : this . state . list . concat ( this . state . input ), error : false } }) } render (){ return ( < div > < input type = 'text' value = { this . state . input } onChange = { this . handleInput } /> < button onClick = { this . submit } > Subm

How to get and set a sublist in netsuite suitlet suitescript 2.0

Some Times we often need to create sublist to our suitelet here we are going to learn how create a sublist to suilet and then add data to the newly created sublist: To create a new sublist use this: var sublist = form.addSublist({          id : 'custpage_sublist',          type : ui.SublistType.LIST, label : 'people' }); var name = sublist.addField({ id : 'custpage_name', label : 'Name', type : ui.FieldType.TEXT }); To set data to newly created sublist use this:          var sublist = form.getSublist({ id : 'custpage_sublist' });          sublist.setSublistValue({ id : 'custpage_name', line : 0, // loop the line for all line number value : 'your name' });

How to read current record in a custom module in SuiteScript 2.0

/**  * @NApiVersion 2.0  */ define(['N/currentRecord'], function(currentRecord) {  return({ alertBox: function(){ var record = currentRecord.get(); var name = record.getValue({ fieldId: 'custpage_name', }) alert(name); }  }); } This simple module can be attached to suitelet or user event script and can be used by calling alertBox function directly.

How to update sublist data using client script in netsuite Suitescript 2.0

First select the line that you want to update using var records = context.currentRecord; var lineNum = records .selectLine({ sublistId: 'yoursublist_id',   line: 0 // your line number }); after selecting we can insert data using  records.setCurrentSublistValue({ sublistId: 'yoursublist_id', fieldId: 'yourfield_id', value: true, ignoreFieldChange: true }); then commit line  records.commitLine({ sublistId: 'custpage_sublist' });

Rules of writing viral Articles

Rules Of Article writing write about awesome people write about targeted audience write about what is already famous write about future events write about future predictions Long form content gets more social shares than short form content. Invoke awe, laughter, or amusement. Appeal to people’s narcissistic side People tend to share content that looks trustworthy People love to share lists and infographics 10 is the magic number for lists website gets more traffic on weekdays then it does on weekends. People are less likely to be on the computer at weekends and holiday periods. Inspire awe, laughter, or amusement. Appeal to people’s narcissistic side (think BuzzFeed quizzes) Long-form content has less competition, and more shares on average. List posts and infographics are more likely to be shared. Make sure your article inspires trust. Have a byline, and bio. Make sure you have a professional logo and design as well. Mix text with visually appealing el

Netsuite Permission and Access Levels

Permission and Access Levels  View - Only allows you to view Create - allow you to only create new one and view Edit - allow you to create new one, edit existing, view Full - allow you create, edit, view and delete Standar centers Classic Center Finance Center Shipping Center Sales Center All users can access classic interface by checking use classic interface at user preferences Pages common to All centers Home Activities Documents Setup