This file contains 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 os | |
filepath_root1 = "C:\\Users\\rchen\\directory" | |
file_to_write = "./samplefile.txt" | |
with open(file_to_write, "w") as myfile: | |
for path, subdirs, files in os.walk(filepath_root1): | |
for name in files: | |
path = path.replace(filepath_root1, "") | |
myfile.write(os.path.join(path, name) + "\n") |
This file contains 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
select TABLE_NAME, COLUMN_NAME, IS_NULLABLE, DATA_TYPE | |
from Information_schema.columns | |
where Table_name in ( | |
SELECT name | |
AS SchemaTable | |
FROM sys.tables | |
) |
This file contains 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
SELECT | |
o1.name AS FK_table, | |
c1.name AS FK_column, | |
fk.name AS FK_name, | |
o2.name AS PK_table, | |
c2.name AS PK_column, | |
pk.name AS PK_name, | |
fk.delete_referential_action_desc AS Delete_Action, | |
fk.update_referential_action_desc AS Update_Action | |
FROM sys.objects o1 |
This file contains 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 re | |
import fileinput | |
def camelCase(st): | |
""" | |
filter nonAlpha and nonDigit char, and camelCase the output string | |
input: | |
USER_DEF1 | |
output: | |
userDef1 |
This file contains 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
## Test Class, JdbcTest.java | |
package test; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.jdbc.core.JdbcTemplate; | |
import org.springframework.jdbc.core.PreparedStatementCreator; | |
import org.springframework.jdbc.support.GeneratedKeyHolder; | |
import org.springframework.jdbc.support.KeyHolder; |
This file contains 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
## Jackson dependencies | |
jackson-databind | |
jackson-annotations | |
jackson-core | |
## | |
ObjectMapper mapper = new ObjectMapper(); | |
mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true); | |
## |
This file contains 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 the os module, for the os.walk function | |
import os | |
# Set the directory you want to start from | |
dirs = ['dir1', 'dir2'] | |
prefix = 'abc' | |
suffix = '_abc' | |
for dir in dirs: | |
for dirName, subdirList, fileList in os.walk(dir): | |
print('Found directory: %s' % dirName) |
This file contains 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
ldapsearch -H ldaps://xxx.harvard.edu:3131 -s base -D "cn=xxx" "(objectclass=*)" vendorversion objectClass isGlobalCatalogReady vendorname | |
# extended LDIF | |
# | |
# LDAPv3 | |
# base <> (default) with scope baseObject | |
# filter: (objectclass=*) | |
# requesting: vendorversion objectClass isGlobalCatalogReady vendorname | |
# | |
# |
This file contains 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
Full-stack | |
https://github.com/indy256/Full-stack-Developer-Interview-Questions-and-Answers | |
Frontend | |
https://github.com/h5bp/Front-end-Developer-Interview-Questions | |
A list of helpful front-end related questions you can use to interview potential candidates, test yourself or completely ignore. | |
https://github.com/khan4019/front-end-Interview-Questions | |
Help the front End community to rock interview http://www.thatjsdude.com/interview/index.html |
This file contains 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
logback.xml sample config |
OlderNewer