let v: Vec<&str> = v.iter().map(AsRef::as_ref).collect();
- chars.iter().collect::()
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:util="http://www.springframework.org/schema/util" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"> | |
<bean id="systemProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> | |
<property name="targetObject" value="#{@systemProperties}" /> | |
<property name="targetMethod" value="putAll" /> |
var mongoObjectId = function () { | |
var timestamp = (new Date().getTime() / 1000 | 0).toString(16); | |
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() { | |
return (Math.random() * 16 | 0).toString(16); | |
}).toLowerCase(); | |
}; |
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param Number r The red color value | |
* @param Number g The green color value | |
* @param Number b The blue color value | |
* @return Array The HSL representation |
#!/bin/bash | |
# | |
# Convert diff output to colorized HTML. | |
# (C) Mitch Frazier, 2008-08-27 | |
# http://www.linuxjournal.com/content/convert-diff-output-colorized-html | |
# Modified by stopyoukid | |
# | |
html="<html><head><meta charset=\"utf-8\"><title>Pretty Diff</title><style>body {text-align: center;}#wrapper {display: inline-block;margin-top: 1em;min-width: 800px;text-align: left;}h2 {background: #fafafa;background: -moz-linear-gradient(#fafafa, #eaeaea);background: -webkit-linear-gradient(#fafafa, #eaeaea);-ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa',endColorstr='#eaeaea')\";border: 1px solid #d8d8d8;border-bottom: 0;color: #555;font: 14px sans-serif;overflow: hidden;padding: 10px 6px;text-shadow: 0 1px 0 white;margin: 0;}.file-diff {border: 1px solid #d8d8d8;margin-bottom: 1em;overflow: auto;padding: 0.5em 0;}.file-diff > div {width: 100%:}pre {margin: 0;font-family: \"Bitstream Vera Sans Mono\", Courier, monospace;font-size: 12px;line-height: 1.4em;text-indent: 0.5em;}.file {color: |
SHOW ENGINE INNODB STATUS \G
Look for the Section -
TRANSACTIONS
Notes for chrono
use chrono::{DateTime, NaiveDate, NaiveDateTime, NaiveTime, Utc};
fn main() {
// ************************************************
// RFC2822 = Date + Time + TimeZone
// ************************************************
let date_str = "Tue, 1 Jul 2003 10:52:37 +0200";
https://github.com/lettre/lettre is a library to send emails over SMTP from our Rust applications.
lettre = "0.9.2"
lettre_email = "0.9.2"
native-tls = "0.2"
export PGPASSWORD=xxxx
psql -h xxx_host -U xxx_user -p xxx_port -d xxx_db -q -A -F ',' -f xxx_query.sql > xxx_output.csv