Skip to content

Commit

Permalink
streams
Browse files Browse the repository at this point in the history
  • Loading branch information
sks40gb committed Mar 14, 2021
1 parent 84aabca commit 13dd01f
Show file tree
Hide file tree
Showing 21 changed files with 2,290 additions and 0 deletions.
20 changes: 20 additions & 0 deletions out/production/avi-1.0/avi-conf.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To change this template, choose Tools | Templates
# and open the template in the editor.

driver-class=com.mysql.jdbc.Driver
driver-type=jdbc
db-type=mysql
db-host=localhost
db-port=3306
db-schema=csit
db-user=root
db-password=root

table-class-1=com.csit.sql.table.model.AddressDetailModel
table-class-2=com.csit.sql.table.model.CommentModel
table-class-3=com.csit.sql.table.model.ContactDetailModel
table-class-4=com.csit.sql.table.model.CourseCategoryModel
table-class-5=com.csit.sql.table.model.CourseModel
table-class-6=com.csit.sql.table.model.FeeModel
table-class-7=com.csit.sql.table.model.StudentModel
table-class-8=com.csit.sql.table.model.UserModel
111 changes: 111 additions & 0 deletions out/production/core/all/material/JQuery.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
Ajax
------------------------------------
$.ajax({
url: "www.google.com" , data:{username:"sunil", password:"123"}, success:function(data){ alert(1)}
});

$(document).submit(function(){
$( "form" ).click(function( event ) {
console.log( $( this ).serializeArray() );
event.preventDefault();
});

Effect
--------------------------
.delay()
.dequeue()
.fadeIn()
.fadeOut()
.fadeTo()
.fadeToggle()
.finish()
.hide()
.show()
.toggle()
.slideDown()
.slideUp()
.slideToggle()
.stop()

$( "#go" ).click(function() {
$( "#block" ).animate({
width: "70%",
opacity: 0.4,
marginLeft: "0.6in",
fontSize: "3em",
borderWidth: "10px"
}, 1500 );
});


Form
-------------------------
.serialize() -Encode a set of form elements as a string for submission.
.serializeArray() - Encode a set of form elements as an array of names and values.
.focus()
.change()
.submit()

Category: Manipulation
-------------------------
.after()
.append()
.appendTo()
.before()
.attr()
.clone()
.css()
.detach()
.empty()
.hasClass()
.height()
.html()
.insertAfter()
.insertBefore()
.wrap() - $( "p" ).wrap( $( ".doublediv" ) );


Selector
------------------------
input[name*='man']
Attribute Contains Prefix Selector [name|="value"]
Attribute Contains Selector [name*="value"]
Attribute Contains Word Selector [name~="value"]
Attribute Ends With Selector [name$="value"]
div:contains('John')

:hidden
:input
:checkbox
:radio
:last
:first
:lt
:eq
:gt
:enabled
:focused
:contains
:button
Child Selector (“parent > child”)
:contains
:parent - This is the inverse of :empty.


Category: Traversing
------------------------------
.add()
.children()
.closest() $( "#child" ).closest( "li"
.each()
$( "span" ).click(function() {
$( "li" ).each(function() {
$( this ).toggleClass( "example" );
});
}); )
.eq()

.filter() - $( "li" ).filter( ":even" ).css( "background-color", "red" );
.parent()
.prev()
.siblings()
11 changes: 11 additions & 0 deletions out/production/core/all/material/JSP.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Object Class
-----------------------------------------------------
request javax.servlet.ServletRequest
response javax.servlet.ServletResponse
session javax.servlet.http.HttpSession
application javax.servlet.ServletContext
config javax.servlet.ServletConfig
page java.lang.Object
pageContext javax.servlet.jsp.PageContext
exception java.lang.Throwable
out javax.servlet.jsp.JspWriter
97 changes: 97 additions & 0 deletions out/production/core/all/material/Linux.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
kill Command Line Option
-------------------------------
$ ps aux | grep firefox

$ kill -9 3553


View growing log file in real time using tail command
-------------------------------------------------------
tail -f /var/log/syslog


Display first N lines of a file using head command
------------------------------------------------------
Syntax: head -n N FILENAME

$ head -n 15 /var/log/maillog



Ignore last N lines of a file using head command
-----------------------------------------------------
Syntax: head -n -N FILENAME

$ head -n -250 /var/log/secure


Search for the given string in a single file
-----------------------------------------------------
Syntax:
grep "literal_string" filename

or

grep "REGEX" filename


Counting the number of matches using grep -c
----------------------------------------------
Syntax:
grep -c "pattern" filename


Viewing compressed log files
=============================================
Display the first N lines of a compressed file.

$ zcat file.gz | head -250

Display the last N lines of a compressed file.

$ zcat file.gz | tail -250

Ignoring the last N lines of a compressed file.

$ zcat file.gz | head -n -250

Ignoring the first N lines of a compressed file.

$ zcat file.gz | tail -n +250


To check Mount size
---------------------------------------------------
df -h


search text in file
---------------------------------------
grep -i "indexingexception" info_ppe_store1_server.log

or

cat info_ppe_store1_server.log | grep IndexingException

grep -i "Duplicates in property values:" info_ppe_bcc-server.log


less comman - very useful if anything needs to be searched
---------------------------------------

less <File>


/<text> - for searching text



=======================================================================================================================
VI EDITOR
=======================================================================================================================
:q
:wq
:q! - force quite
:wq! - force write and quite
i - insert
G - go to end of file
107 changes: 107 additions & 0 deletions out/production/core/all/material/SQL_Query.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
QUERY
========================================================================================================================
http://www.techinterviews.com/31-more-mysql-questions



SELECT user_name, user_isp FROM users LEFT JOIN isps USING (user_id)
- It’s equivalent to saying
SELECT user_name, user_isp FROM users LEFT JOIN isps WHERE users.user_id=isps.user_id

------------------------------------------------------------------------------------------------------------------------
How do you find out which auto increment was assigned on the last insert? -
SELECT LAST_INSERT_ID()
will return the last value assigned by the auto_increment function. Note that you don’t have to specify the table name.

------------------------------------------------------------------------------------------------------------------------
When would you use ORDER BY in DELETE statement? -
When you’re not deleting by row ID. Such as in
DELETE FROM user ORDER BY timestamp LIMIT 1
This will delete the most recently posted question in the table

------------------------------------------------------------------------------------------------------------------------
SHOW INDEX FROM user - show all indexes

SHOW COLUMNS FROM user - show all columns from address table

SHOW TABLES; - show all tables from the selected schema
SHOW TABLES LIKE 'FCL%'; - show all tables which name starts with FCL

DESC address - describe table file

SHOW DATABASES LIKE '%in%'; - display all schema which contains the word in

SELECT CONCAT ('A', '-', 'B', '*', 'C') - concate string

SELECT SUBSTR(title, 1, 10) - SELECT SUBSTR(COLUMN_NAME, OFFSET STARTS FROM 1, LENGTH)


-----------------------------------------------------------------------------------------------------------------------
How do you convert a string to UTF-8?
SELECT (user_name USING utf8);


------------------------------------------------------------------------------------------------------------------------
What do % and _ mean inside LIKE statement?
% corresponds to 0 or more characters, _ is exactly one character.


------------------------------------------------------------------------------------------------------------------------
REGEXP
SELECT size FROM FILE WHERE size REGEXP '[1-9]'

http://dev.mysql.com/doc/refman/5.0/en/regexp.html

B[an]*s - Bananas, Baaaaas, Bs,

------------------------------------------------------------------------------------------------------------------------
How do you return the a hundred books starting from 25th? -

SELECT book_title FROM books LIMIT 25, 100

The first number in LIMIT is the offset, the second is the number.

------------------------------------------------------------------------------------------------------------------------

Find the second largest id from the table

SELECT * FROM USER ORDER BY id DESC LIMIT 1,1

------------------------------------------------------------------------------------------------------------------------

What are Aggregate and Scalar functions?

An aggregate function performs operations on a collection of values to return a single scalar value.

AVG() - Calculates the mean of a collection of values.
COUNT() - Counts the total number of records in a specific table or view.
MIN() - Calculates the minimum of a collection of values.
MAX() - Calculates the maximum of a collection of values.
SUM() - Calculates the sum of a collection of values.
FIRST() - Fetches the first element in a collection of values.
LAST() - Fetches the last element in a collection of values.

A scalar function returns a single value based on the input value.

LEN() - Calculates the total length of the given field (column).
UCASE() - Converts a collection of string values to uppercase characters.
LCASE() - Converts a collection of string values to lowercase characters.
MID() - Extracts substrings from a collection of string values in a table.
CONCAT() - Concatenates two or more strings.
RAND() - Generates a random collection of numbers of given length.
ROUND() - Calculates the round off integer value for a numeric field (or decimal point values).
NOW() - Returns the current data & time.
FORMAT() - Sets the format to display a collection of values.













Loading

0 comments on commit 13dd01f

Please sign in to comment.