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
SELECT order_id,product_name,qty FROM orders | |
INTO OUTFILE '/tmp/orders.csv' | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
LINES TERMINATED BY '\n' |
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 com.company; | |
import java.io.Reader; | |
import java.math.*; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner s = new Scanner(System.in); | |
long n = s.nextLong(); |
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
import smtplib | |
from email.mime.text import MIMEText | |
me = 'admin@mail.ru' | |
you = 'kot_smit@mail.ru' | |
smtp_server = 'smtp.mail.ru' | |
msg = MIMEText('Message e-mail') | |
msg['Subject'] = 'The contents of ' | |
msg['From'] = me | |
msg['To'] = you | |
s = smtplib.SMTP(smtp_server) |
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 libs.HtmlHelper; | |
import org.htmlcleaner.HtmlCleaner; | |
import org.htmlcleaner.TagNode; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class HtmlParser { |
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
String urlParameters = new StringBuilder().append("search_type=2&p_ser=&p_num=").toString(); | |
URLConnection connection = new URL(url).openConnection(); | |
connection.setDoInput(true); | |
connection.setDoOutput(true); | |
//write to connection | |
OutputStreamWriter wr = new OutputStreamWriter(connection.getOutputStream ()); | |
wr.write(urlParameters); | |
wr.flush(); | |
//read response | |
BufferedReader in = new BufferedReader( |
NewerOlder