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
package routines; | |
import java.io.File; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.Base64; | |
public class ConvertToBase64 { |
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
function callbackExample() { | |
setTimeout(_callback, 1000); | |
console.log('This appears instantaneously'); | |
} | |
function promiseExample() { | |
_longRunningOperation() | |
.then(() => { | |
console.log('This appears later'); |
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
getFilteredStates(country_code){ | |
let _countryIndex = this.states_list.controllerValues[country_code]; | |
let filterStates = this.states_list.values.filter( val => { | |
return val.validFor.includes(_countryIndex); | |
}); | |
return filterStates | |
} |
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
"\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\" style=\"visibility: visible;\" lang=en-us xml:lang=en-us><head><meta name=\"viewport\" content=\"initial-scale=1.0\"/><meta name=\"description\" content=\"Salesforce Customer Secure Login Page. Login to your Salesforce Customer Account.\" /><title>Login | Salesforce</title><meta name=\"format-detection\" content=\"telephone=no\" /><link rel=\"stylesheet\" type=\"text/css\" href=\"/css/sfdc_210.css\" /><style type=\"text/css\">html{visibility: hidden;}a{color:#0070d2;}body{background-color:#000;}#content,.container{background-color:#ffffff;}#header{color:#16325c;}#header,#footer{color:#FFFFFF;}#signup{color:#FFFFFF;}#use_new_identity{color:#FFFFFF;text-decoration:underline;}#use_new_identity:hover,#use_new_identity:active{color:#FFFFFF;}#or_use_idp{color:#FFFFFF;}#cancel_idp,#cancel_idp_hint{color:#FFFFFF;text-decoration:underline;}#cance |
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-break { | |
width:200mm; | |
height:280mm; | |
overflow:hidden; | |
display: block; | |
clear: both; | |
page-break-after: always; | |
} |
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
date_time_obj = Time.now | |
date_time_obj.strftime("%d#{ordinalize[date_time_obj.day]} %b %Y") |
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
in action---------- | |
Mail.defaults do | |
retriever_method :imap, | |
:address => "imap.gmail.com", | |
:port => 993, | |
:user_name => 'email_id', | |
:password => '*******', | |
:enable_ssl => true | |
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
ActionDispatch::Session::SessionRestoreError | |
Session contains objects whose class definition isn't available. | |
Remember to require the classes for all objects kept in the session. | |
(Original exception: uninitialized constant ActionController::Flash::FlashHash [NameError]) | |
Rails.root: /home/sahildave/NetBeansProjects/ProjectManagement | |
Application Trace | Framework Trace | Full Trace | |
actionpack (3.0.0) lib/action_dispatch/middleware/session/abstract_store.rb:230:in `rescue in rescue in stale_session_check!' |
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 new_cart_item | |
@customer = Customer.new | |
end | |
def create_new_cart_item | |
@customer = Customer.new(params[:customer]) | |
if @customer.save | |
flash[:notice] = "Successfully created" | |
redirect_to show_next_item_url(:id => @product) |