Diode and resistor without silicons