Não respondam assim, gente. É feio.
Nem joguem merda nos outros porque também é.
Gato hardcore, dá mortal, joga a ração, dirige os carro, pega as vadia, bebe red leibo…
UA DOS DEFOX SEI?
DIN DIN DIN DIN DIN DIN DIN DIN
Alguém por favor promova este entregador.
“Não se preocupa amor, eu coloco você numa praia depois no photoshop” DELA, Marido.
Edison GustavoSpring....uma abdominação!
To populate a temporary database table, most of us would write something like this:
-- Assume table TempData exists Truncate table TempData; Insert Into TempData Select ... From ... Where id = 1234 and Flag Is Not NULL;
Trevor A.'s cohort decided to use Spring to help do it better:
SpringStuff.xml: <bean id="ourReader" class="org.springframework.batch.item.database. JdbcCursorItemReader" scope="step"> <property name="saveState" value="false" /> <property name="dataSource" ref="ourDataSource" /> <property name="rowMapper" ref="filterRowMapper" /> <property name="fetchSize" value="5000" /> <property name="prepatedStatementSetter" > <bean class="org.springframework, batch.core.resource. listPreparedStatementSetter"> <property name='parameters"> <list> <value>1234</value> </list> </property> </bean> </property> </bean> <bean id="ourValidator" class="org.springframework. batch.core.job. DefaultJobParametersValidator" > <property name="requiredKeys"> <array value-type="java.lang.int"> <value>id</value> </array> </property> </bean> <bean id="filterRowMapper" class="x.y.z.FilterRowMapper" /> <bean id="theDao" class="x.y.z.TheDao"> <constructor-arg ref="ourDataSource" /> <constructor-arg value="Truncate Table TempData" /> </bean> <bean id="truncateTemptTable" class="x.y.z. TruncateTempTable"> <constructor-arg ref="theDao"/> </bean> <bean id="ourProcessor" class="x.y.z.OurProcessor"/> <bean id="ourWriter" class="x.y.z.OurWriter" scope="step"> <constructor-arg ref="theJdbcTemplate"/> <constructor-arg value="insert into tempdata values(?,?, ..., ?)"/> </bean> <batch:job id="loadTempTable"> <batch-description>Load the temp table for id: 1234</batch:description> <batch:validate ref="ourValidator"/> <batch:step id="step1" next="step2"> <batch:tasklet ref="truncateTempTable"/> </batch:step> <batch:step id="step2"> <batch:tasklet> <batch:chunk reader="ourReader" processor="ourProcessor" writer="ourWriter" commit-interval="5000"/> </batch:tasklet> </batch:step> </batch:job> public class FilterRowMapper implements RowMapper<MyRecord> { public final static String COL_1 = "ColName-1"; // ... public final static String COL_N = "ColName-n"; public MyRecord mapRow(ResultSet rs, int rowNum) throws SQLException { MyRecord r = new MyRecord(); r.setField1(rs.getString(COL_1 ) ); // ... r.setFieldN(rs.getInt(COL_N)); return r; } } public class TruncateTempTable implements Tasklet { private TheDao dao; public TruncateTempTable(TheDao dao) { this.dao = dao; } public RepeatStatus execute(StepContribution sc, ChunkContext cc) throws Exception { dao.truncateTempTable(); return RepeatStatus.FINISHED; } } public class TheDao extends NamedParametersJdbcDaoSupport { private String truncateTempTableSql; public TheDao(DataSource ds, String sql) { super(); setDataSource(ds); truncateTempTableSql = sql; } public void truncateTempTable() { getJdbcTemplate().execute(truncateTempTableSql); } } public class OurProcessor implements ItemProcessor<MyRecord, MyRecord> { public MyRecord process(MyRecord in) throws Exception { MyRecord out = in; return out; } } public class OurWriter implements ItemWriter<MyRecord> { private JdbcTemplate jt; private String sql; public OurWriter(JdbcTempalte jt; String sql) { this.jt = jt; this.sql = sql; } public void write(List<? extends MyRecord> list) throws Exception { for (MyRecord r : list) { if (r.getFlag() != null) { jt.batchUpdate(sql, new BatchPreparedStatementSetter() { public void setValues(PreparedStatement ps, int rowNum) throws Exception { ps.setString(1,r.getField1()); // ... ps.setInt(n,r.getFieldN()); } public int getBatchSize() { return list.size(); } }); } } } }
Don't get me wrong, I'm all for utilizing tools to help get things done, but when the tool obfuscates what you're trying to accomplish, perhaps it's not helping as much as you think it's helping.
Axiom: 95% of the cost of software is in maintenance and upgrades: if the next person can't figure out what you did without your help, you didn't do as good a job as you might think!
Essas Fischer-Price da vida cada vez mais próximas da bruxaria.
Sempre me perguntam por que eu falo que Noruega é sinônimo de Heavy Metal. Vejam o gráfico:
Acho que agora está tudo esclarecido.
If Batman ever tried getting a driver's license...well, according to this video by Animation Domination High-Def, he probably shouldn't, cause he'd be crap at taking the test. But it's okay. His failed attempts would make for hilarious stories.
The Game of Life
Select the difficulty level: Easy (Fácil) / Normal / Hard (Difícil)
The post Apartment Hunting: Pick Two appeared first on Programming Fun Hub.
Edison Gustavocute :P
The post Love Never Ends Special Delivery appeared first on Programming Fun Hub.
BÔNUS:
Quando sair o novo GTA, eu serei assim. Afinal, pra chegar perto dos 100% no GTA é preciso abdicar de fornicações na piroca.
Marc Maron is a comedian and the host of my favourite podcast, WTF with Marc Maron, which is a comedy podcast where Maron interviews not only comedians, but musicians, actors, chefs and artists. His conversations are always engaging, funny, raw and honest. I recommend it especially to those who are pursuing a creative field, as most of his interview subjects have insightful and unique stories about how they became successful. (As you can tell from its title, WTF contains explicit language and is for mature listeners … you’ve been warned!)
Maron’s own success story is worth mentioning. In his 40s, having lived a life of anger, resentment, addiction, failed relationships and burnt bridges, Maron had just gotten fired from a radio gig when he started the WTF podcast as a last, desperate attempt to stay in the comedy game. The podcast not only became incredibly successful, leading to a resurgence in his stand-up career and a television series, but it’s also proven to be his salvation.
I can’t believe it’s taken me so long to do a Maron quote, as I must have listened to hundreds of hours of his voice while working on Zen Pencils. This quote is taken from his latest memoir, Attempting Normal.
RELATED COMICS: Bill Hicks It’s just a ride, Louis C.K. We don’t think about how we talk, George Carlin On assassination (explicit), Henry Rollins Who’s the crazier man?.
- Since my last comic about social media, I think it’s fair to say I’m still totally dependent and addicted to my phone. Who checks their phone as soon as they wake up and while still in bed? I do. Who takes their phone into the toilet with them? Me. It’s gross, but I bet you do it too … don’t lie. Who can’t be alone in public without looking at their phone every five minutes? Yep, me again. While I love social media (it has obviously helped Zen Pencils enormously and it’s incredible how easy I can interact with readers from all over the world), we should also remember some of its negative side effects, as this article points out.
- What are your favourite podcasts? Some of my other recommendations: Hardcore History, The Bugle, The Smartest Man in the World, The Nerdist, Stuff You Should Know, StarTalk Radio and The BS Report.
Edison GustavoHDF!
/* by undokbeka */
The post Counter Strike Zoom Logic appeared first on Programming Fun Hub.
Vast reservoirs of heat are locked in the earth's interior, untapped. The ground underneath our feet holds so much heat that tapping only 2 percent of it could satisfy current annual U.S. energy use 2,000-fold for each and every year of the foreseeable future, according to an analysis from the Massachusetts Institute of Technology. Fracking, the same technology used to drill for natural gas, may provide an economical way to get at that geothermal energy.
The idea is simple: Pump water or other fluids down deep beneath the surface. Hot rocks at depth boil the water into steam, which rises back to the surface to spin a turbine and generate electricity. In regions with hot rocks and plentiful water near the surface, building massive power plants is straightforward. But such optimal sites are few and far between. Fracking, which is the technique of fracturing passages in subterranean rock, can help. The same fractures that send natural gas streaming out from deep wells also allow geothermal heat to be tapped from practically anywhere on earth.
[More]