By Chris on June 10, 2021
We had at work a piece of code that was using mongorepository and updating the arrays of the object on a collection instead of using mongodb method directly.The way it was coded had a big issues with concurrency and we were losing update because of it.The problem we had with the way it was updating […]
Posted in java, mongodb, prog, tips | Tagged java, mongodb, MongoRepository, MongoTemplate |
By Chris on September 16, 2013
I’ve stumbled upon that problem recently and couldn’t remember how to do it. Has you except it’s trivial to do and like most of what can be done in programming there more than one way to do it. 1- Good old jdk String 🙂 Since Java 1.5 you have the new String format method do […]
Posted in java, tips | Tagged Apache, format, Guava, java, String, StringUtils |
By Chris on September 9, 2013
For some reason the pc at work didn’t had the run command in the start menu. I write it here so I won’t forget it again and to help you too 🙂 Click on start menu. Select “Control Panel”. Click on “Personalization”. Click on “Taskbar and start menu”. Click on “Customize”. Now select the “Run […]
Posted in prog, tips, tips | Tagged run, run command, start menu, windows 7 |
By Chris on September 5, 2013
They’re always a question that comeback either in interview or when you are playing old code. Why the hell are they using Vector over arrayList ? Vector is a class that exists since the beginning of java (aka Java 1.0) it’s implement List. It seems to pollute old code and still use programmer that don’t […]
Posted in prog, tips | Tagged arraylist, collections, java, java.util.List, List, synchronization, synchronizedList, vector |
By Chris on September 2, 2013
http://blog.foundersnetwork.com/2013/01/how-quora-sent-us-82-10-of-our-visitors/ Story of a startup and how quora helped them bring visitors to the site. http://slant.co/topics/what-is-the-best-architecture-for-building-a-web-service/ soap vs rest… basicly every new provider use rest now a day… http://antjanus.com/blog/seo/running-a-blog-what-i-did-wrong-and-right-in-2012/ incredible journey from 0 to 20k visitor/month. What really interesting is how he self-evaluate himself, that really important. Many point are really good to […]
Posted in link, prog, tips | Tagged blog, quora, rest, seo, soap, star, startup, webservice |
By Chris on August 29, 2013
Microsoft study: Linux migration cost Munich €60.7 million (h-online.com) This article really caught my attention, because a government agency (Munich city administration’s) want to get rid of Microsoft and they’re not replacing it with the bloated IBM or Oracle solution and because Microsoft did a study to show how much it cost them (that stink […]
Posted in link, prog, tips | Tagged brain, focus, lifehack, linux, meditation, Microsoft, motivation, munich |
By Chris on August 26, 2013
I had a problem setting up my styleclass in struts, here how I fixed it. I hope the code come nicely in that theme. In struts class is not recognized but styleClass is : http://struts.apache.org/1.x/struts-taglib/tlddoc/html/checkbox.html you can check the source the styleClass is generated class. <script language=”JavaScript”> $(function () { $(‘#checkall’).toggle( function() { $(‘#resultTable .tf’).prop(‘checked’, […]
Posted in error, prog, tips | Tagged struts, struts tag, styleClass, tags |
By Chris on August 13, 2013
That one is easy, on linux use netstat : netstat -tlnp | grep 9998 replace 9998 with the port you want to check. More on net stats here : http://www.thegeekstuff.com/2010/03/netstat-command-examples/ On windows : netstat -an |find /i “9998” replace 9998 with the port you want to check. More info on netstat on Microsoft site or […]
Posted in prog, tips | Tagged linux, netstat, port, windows |
Recent Comments