tag:blogger.com,1999:blog-20728967224823313152024-03-14T05:01:45.110+02:00RockeTier Development BlogRockeTier Develpment Teamhttp://www.blogger.com/profile/07929729625529511494noreply@blogger.comBlogger40125tag:blogger.com,1999:blog-2072896722482331315.post-60546072192809083102009-07-20T18:14:00.003+03:002009-07-20T18:23:12.439+03:00converting IP address to IP numberIp number is a numerical representation of the ip address we are all used to .<br />For instance 1.2.3.4 = 1690960 ;<div><br /></div><div>It is good for some reasons, like conveting the Ip address to geographical position, or rule manupulation like firewalls and network devices. </div><div><br /></div><div>How do you do that ? </div><div><br /></div><div>Here is a little method that shows how to do that in c # </div><div><br /></div><div> public static uint convertIP(string sIp)</div><div> {</div><div> string[] sOctecs;</div><div> char[] cSeperator = { '.' };</div><div> int[] iOctet = new int[4];</div><div> uint iReturnIPNumber = 0;</div><div> if (sIp != "")</div><div> {</div><div> bool bConvertOK;</div><div> sOctecs = sIp.Split(cSeperator, 4);//split the string to the octets</div><div> for (int i = 0; i <><div> {</div><div> bConvertOK = int.TryParse(sOctecs[i], out iOctet[i]);</div><div> if (!bConvertOK)</div><div> {</div><div> return 0;</div><div> }</div><div> }//end for</div><div> // iOctecs contain integers , lets do the magic</div><div><br /></div><div> //some math </div><div> iReturnIPNumber = (uint)iOctet[3];</div><div> iReturnIPNumber = iReturnIPNumber + ((uint)iOctet[2] * (uint)256);</div><div> iReturnIPNumber = iReturnIPNumber + ((uint)iOctet[1] * (uint)256 * (uint)256);</div><div> iReturnIPNumber = iReturnIPNumber + ((uint)iOctet[0] * (uint)256 * (uint)256 * (uint)256);</div><div><br /></div><div> }</div><div> return iReturnIPNumber;</div><div> }</div><div><br /></div><div><br /></div><div>If you need it in the database , then mySQL has a built in functions of converting </div><div><br /></div><div><div> mysql> SELECT INET_ATON('192.168.10.50');</div><div> +----------------------------+</div><div> | INET_ATON('192.168.10.50') |</div><div> +----------------------------+</div><div> | 3232238130 |</div><div> +----------------------------+</div><div> 1 row in set (0.00 sec)</div><div><br /></div><div> mysql> SELECT INET_NTOA(839559360);</div><div> +----------------------+</div><div> | INET_NTOA(839559360) |</div><div> +----------------------+</div><div> | 50.10.168.192 |</div><div> +----------------------+</div><div> 1 row in set (0.00 sec)</div></div></div>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com1tag:blogger.com,1999:blog-2072896722482331315.post-55933918940716305442009-07-16T11:31:00.003+03:002009-07-16T11:42:30.650+03:00Vista Speech Regognition APIThis will teach your program to read text from the voice it "hears" using .NET 3<div><br /></div><div>so this is how it goes :</div><div><ol><li>Go to the references of your project and add System.Speech.Recognition</li><li>Create a new instance of the SpeechRecognitionEngine<br />SpeechRecognitionEngine sre = new SpeechRecognitionEngine(new CultureInfo("en-US"));</li><li>Set a file to read from and a dictionary to use:<br />sre.SetInputToWaveFile("c:\\test.wav");<br />sre.LoadGrammar(new DictationGrammar());</li><li>Now read<br />RecognitionResult rr = sre.Recognize();</li><li>If something fails inside the Recognize() then it returns null , otherwise rr.Text will get you the text you are looking for ;</li></ol><div>now the problem is and it stays unsolved , that out of the box , the engine does not usually hit the correct text . Good luck and mail me if you have ideas</div><div><br /></div><div><br /></div><div><div> SpeechRecognitionEngine sre = new SpeechRecognitionEngine(new CultureInfo("en-US"));</div><div> </div><div> </div><div> sre.SetInputToWaveFile("c:\\test.wav");</div><div> </div><div> sre.LoadGrammar(new DictationGrammar());</div><div> RecognitionResult rr = sre.Recognize();</div><div> if (rr != null)</div><div> {</div><div> Console.WriteLine(rr.Text);</div><div> }</div><div> else</div><div> {</div><div> Console.WriteLine("Recognition failed");</div><div> }</div><div> Console.ReadKey();</div><div><br /></div></div><div><br /></div><div><br /></div></div>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-74681119701629548872009-07-12T11:44:00.002+03:002009-07-12T11:47:51.235+03:00Walkthrough: Creating a Windows Service Application in the Component DesignerThe full step-by-stem straightforward guide from MSDN to create a Windows Service, all with Eventlog registration, action handling, Setup Project, installation and testing.<br /><br /><a href="http://msdn.microsoft.com/en-us/library/zt39148a.aspx">http://msdn.microsoft.com/en-us/library/zt39148a.aspx</a><br /><br />For all your Visual Studio service-creation needs!Romi Kuntsmanhttp://www.blogger.com/profile/09058630477854707438noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-81952693336550920352009-07-08T22:27:00.002+03:002009-07-08T22:41:20.288+03:00Semicolon after the if statementToo frequent mistake to stay quiet about : the semicolon ";" after the if statement <div><br /></div><div>consider the code </div><div><br /></div><div><div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-family:arial;"> </span></span><span class="Apple-style-span" style="font-family:arial;">if (booleanMethod(s1,s2));</span></div><div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-family:arial;"> </span></span><span class="Apple-style-span" style="font-family:arial;">{</span></div><div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-family:arial;"> </span></span><span class="Apple-style-span" style="font-family:arial;">return true;<span class="Apple-style-span" style="color:#33CC00;"> // will be executed anyway</span></span></div><div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-family:arial;"> </span></span><span class="Apple-style-span" style="font-family:arial;">}</span></div><div><br /></div><div>The code will return true in every case , because there is a semicolon after the if statement. The problem lays in the definition of the semicolon in modern languages such as C# and JAVA semicolon defines the ending of the statement and since the If statement doen't have to be followed by any other statement the true meaning of the upper code is : </div><div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-family:arial;"> </span></span></div><div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-family:arial;"></span></span><span class="Apple-style-span" style="font-family:arial;"><span class="Apple-tab-span" style="white-space:pre"> </span>if booleanMethod is true</span></div><div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-family:arial;"> </span></span><span class="Apple-style-span" style="font-family:arial;">do - nothing;<br /></span></div><div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-family:arial;"> </span></span><span class="Apple-style-span" style="font-family:arial;">return true;</span><br /></div><div><br /></div><div>so if we want the code to return true only if booleanMethod is true the correct form would be without the semicolon after the if </div><div><div><br /></div><div><span class="Apple-tab-span" style="white-space: pre; "><span class="Apple-style-span" style="font-family:arial;"> </span></span><span class="Apple-style-span" style="font-family:arial;">if (booleanMethod(s1,s2))</span></div><div><span class="Apple-tab-span" style="white-space: pre; "><span class="Apple-style-span" style="font-family:arial;"> </span></span><span class="Apple-style-span" style="font-family:arial;">{</span></div><div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-family:arial;"> </span></span><span class="Apple-style-span" style="font-family:arial;">//<span class="Apple-style-span" style="color:#33CC00;"> only if the if is true</span><br /></span></div><div><span class="Apple-tab-span" style="white-space: pre; "><span class="Apple-style-span" style="font-family:arial;"> </span></span><span class="Apple-style-span" style="font-family:arial;">return true;</span></div><div><span class="Apple-tab-span" style="white-space: pre; "><span class="Apple-style-span" style="font-family:arial;"> </span></span><span class="Apple-style-span" style="font-family:arial;">}</span></div></div><div><br /></div></div>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-25102069411182663882009-07-07T16:13:00.003+03:002009-07-07T16:31:30.953+03:00Copying Microsoft SQL table to MySQL<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.kofler.cc/images/mssql2mysql-gui2-small.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 327px; height: 230px;" src="http://www.kofler.cc/images/mssql2mysql-gui2-small.png" border="0" alt="" /></a><br />Performing and Performing once again; today, we need much quicker database access than we currently have: we have some Windows servers contacting with the sql database using Microsoft's SQLClient driver for accessing it. <div><br /></div><div>The idea was to cache some frequently used data on the servers in the in memory databases. The problem was copying the tables' schema from the sql server to the mysql without doing in manually. So: </div><div><br /></div><div>I wanted to recommend the <span class="Apple-style-span" style=" white-space: pre-wrap; font-family:-webkit-monospace;font-size:13px;"><a href="http://www.kofler.cc/mysql/mssql2mysql.html">Michael Kofler</a> </span>software . I used the gui versions and had only one problem : they both require the correct MySQL ODBC driver. I used the last version located at <a href="http://dev.mysql.com/downloads/connector/odbc/3.51.html#winx64">http://dev.mysql.com/downloads/connector/odbc/3.51.html#winx64</a> and nothing worked , because the MySql server version installed was not 64 bit (what a pitty ) therefore, reinstalling the <span class="Apple-style-span" style=" color: rgb(32, 32, 32); line-height: 23px; font-family:verdana;font-size:13px;">Windows MSI Installer (x86) </span>version solved the issue and the table had been copyed in notime </div><div><br /></div><div>Thanks Micael</div>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-7539770666708017482009-07-07T15:21:00.003+03:002009-07-07T15:28:32.982+03:00MySQL Memory Table SizeIf you're doing some Real Time processing with MySQL, you probably better use a Memory table and only eventually commit the results to a disk table.<br /><br />But if you do that with the default setting, you'll soon run out of memory on a 16MB table!!<br /><br />Don't worry, it is configurable!<br /><a href="http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_max_heap_table_size">http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_max_heap_table_size</a><br />(Note: this refers to MySQL 5.1 version, you may have another version. Also see page for other system configuration options)<br /><br />And to make a long story short, open MySQL Administrator --> Health --> System Variables --> Memory --> max_heap_table_size<br />and set it to 268435456 (=256MB)Romi Kuntsmanhttp://www.blogger.com/profile/09058630477854707438noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-31816108708772113752009-06-29T15:30:00.002+03:002009-06-29T15:35:39.004+03:00Preventing Auto Postbacks<span style="font-family:arial;">Ever felt like ASP.NET web pages doing postback by themselves? Or better, someone click on Enter and instead clicking on the default button on the webpage, the page just "refreshing" itself.<br /><br />Well, try </span><a href="http://www.aspsnippets.com/post/2009/05/21/Disable-Enter-key-in-TextBox-to-avoid-postback-in-ASPNet.aspx"><span style="font-family:arial;">this great code snippets</span></a><span style="font-family:arial;"> in your body tag:<br />BODY onkeydown = "return (event.keyCode!=13)"<br />This code will prevent auto postback of your page when user clicks on Enter. More options are available in the mentioned webpage.<br /><br />Keep Performing!<br /><br /><br /></span>RockeTier Develpment Teamhttp://www.blogger.com/profile/07929729625529511494noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-550133932346546392009-06-21T14:22:00.001+03:002009-06-21T14:23:44.508+03:00How to choose a PHP IDE?Check out this great review of PHP IDE features, what you need, and which product has one.<br /><br /><a href="http://www.smashingmagazine.com/2009/02/11/the-big-php-ides-test-why-use-oneand-which-to-choose/">The Big PHP IDE Test: Why Use One And Which To Choose</a>Romi Kuntsmanhttp://www.blogger.com/profile/09058630477854707438noreply@blogger.com3tag:blogger.com,1999:blog-2072896722482331315.post-59993121823608546082009-06-16T15:46:00.004+03:002009-06-16T15:52:10.034+03:00Shrinking Your SQL Server Log File<span style="font-family:arial;">Well, did you ever found out that your MS SQL Server transaction log is just too large and its utilization is just too low (lets say 60GB size and only 100MB are used...) and SQL Server just don't let you shrink it?<br /><br />Well </span><a href="http://blog.nerdbank.net/2006/07/how-to-empty-sql-server-database.html"><span style="font-family:arial;">Andrew Arnott</span></a><span style="font-family:arial;"> found a great solution to get rid of this wasted space and truncate the log:<br /><br />backup log [dbname] with truncate_only<br />go<br />DBCC SHRINKDATABASE ([dbname], 10, TRUNCATEONLY)<br />go<br /><br /><br />Keep Performing<br /></span><a href="http://www.rocketier.com/"><span style="font-family:arial;">RockeTier 1 Billion Events per Day Development Team</span></a>RockeTier Develpment Teamhttp://www.blogger.com/profile/07929729625529511494noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-30828698025893546252009-06-10T11:34:00.002+03:002009-06-12T16:58:35.358+03:00Eclipse plugins<span style="font-family:arial;">Morning there </span><br /><span style="font-family:arial;">Yesterday I visited the <span class="Apple-style-span" style="WHITE-SPACE: pre"><span class="Apple-style-span" style="font-size:small;">Aluna's "how to buid development enviroment in the Java / JavaEE world"</span></span>; couple of words about it firstly: </span><br /><span style="font-family:arial;">On the other side of the Whale center there was a dentists congress of something, </span><br /><span style="font-family:arial;">and the most surreal thing there was an exhibition of the 3M tools for dentists right next to the ice cream and sweets... </span><br /><span style="font-family:arial;"><br /></span><br /><span style="font-family:arial;">Now to business: I would like to write about some interesting eclipse plugins </span><br /><span style="font-family:arial;"><strong>1. Tptp - Eclipse Test & Performance Tools Platform Project </strong></span><br /><span class="Apple-tab-span" style="WHITE-SPACE: pre"></span><span style="font-family:arial;">o Test and performance tools platform </span><br /><span class="Apple-tab-span" style="WHITE-SPACE: pre"></span><span style="font-family:arial;">o Does not work with java 6 out of the box </span><br /><span class="Apple-tab-span" style="WHITE-SPACE: pre"></span><span style="font-family:arial;">o For java 6 you need to download special agent. </span><br /><span class="Apple-tab-span" style="WHITE-SPACE: pre"></span><span style="font-family:arial;">o Supports unitests </span><br /><span class="Apple-tab-span" style="WHITE-SPACE: pre"></span><span style="font-family:arial;">o More info -</span><a href="http://www.eclipse.org/tptp/"><span style="font-family:arial;"> http://www.eclipse.org/tptp/ </span></a><br /><span style="font-family:arial;"><br /></span><br /><span style="font-family:arial;"><strong>2. EMF - Eclipse Modeling Framework </strong></span><br /><span class="Apple-tab-span" style="WHITE-SPACE: pre"></span><span style="font-family:arial;">o Provides the ability to create UML diagram \ class diagram and other design tools </span><br /><span class="Apple-tab-span" style="WHITE-SPACE: pre"></span><span style="font-family:arial;">o Provides simple modeling tools development framework </span><br /><span style="font-family:arial;"><br /></span><br /><span style="font-family:arial;"><strong>3. Bird</strong> </span><br /><span class="Apple-tab-span" style="WHITE-SPACE: pre"></span><span style="font-family:arial;">o Provides the ability to create reports </span><br /><span style="font-family:arial;"><br /></span><br /><span style="font-family:arial;"><strong>4. Log4e</strong></span><a href="http://log4e.jayefem.de/"><span style="font-family:arial;"><strong> </strong></span></a><br /><span class="Apple-tab-span" style="WHITE-SPACE: pre"></span><span style="font-family:arial;">o Enriches your environment with the ability to create logging mechanism in your code . </span><br />o More info - <a href="http://log4e.jayefem.de/">http://log4e.jayefem.de/</a><br /><span style="font-family:arial;"><br /><br /></span><span style="font-family:arial;">5. FileSync </span><br /><span style="font-family:arial;">o Automatically copy every change in the eclipse to the file path. </span><br />o More info -<a href="http://andrei.gmxhome.de/filesync/index.html">http://andrei.gmxhome.de/filesync/index.html</a>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-22860793108906809982009-06-07T16:22:00.002+03:002009-06-07T16:24:15.776+03:00Hibernate Mapping Cheat SheetEver been developing with Hibernate, and wished something would save your Time and Sanity? Here it is!<br /><br /><a href="http://ndpsoftware.com/HibernateMappingCheatSheet.html">http://ndpsoftware.com/HibernateMappingCheatSheet.html</a>Romi Kuntsmanhttp://www.blogger.com/profile/09058630477854707438noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-72762069923911447262009-06-04T16:36:00.003+03:002009-06-04T16:46:14.813+03:00Java Types and Annotations for Web ServicesSometimes you want to send data between different applications, different programming languages, different machines etc.<br /><br />One of the standard ways of doing so is using SOAP. Java has built in support for it, just define the following. And then call Endpoint.publish(url, new myClass()) and you're done.<br /><br /> @WebService()<br /> @SOAPBinding(parameterStyle=ParameterStyle.WRAPPED,style=Style.RPC)<br /> public class myClass {<br /> @WebMethod(action="myMethod")<br /> public myOutput myMethod(myInput p_input) {<br /> }<br /> }<br /><br />Then of course you want your input and output to have some structure, so the other application and/or programming language would understand the WSDL.<br />For that, see the following reference<br /><a href="http://download.oracle.com/docs/cd/B25221_04/web.1013/b25603/apptypemapping.htm">Mapping Java Types to XML and WSDL Types</a>Romi Kuntsmanhttp://www.blogger.com/profile/09058630477854707438noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-7180400603270076332009-06-03T15:13:00.002+03:002009-06-03T15:19:15.286+03:00Hibernate againThis time , i'm posting here something that did not work for me , however i have found a nice workaround. <div><br /></div><div>The hibernate projection will have to wait </div><div><br /></div><div><span class="Apple-style-span" style="font-family: Verdana; font-size: 11px; "><p><b><span style="font-family:Courier;">SELECT NAME FROM PRODUCT</span></b></p><p>Here, the Projection class comes into play. The above query can be rewritten into a Criteria query as:</p><p><b><span style="font-family:Courier;">List products=session.createCriteria(Product.class)<br /></span></b><span style="font-family:Courier;"><b> . setProjection(Projection.property(\"name\"))<br /></b><b> .list();</b></span></p><p><br /></p></span><div><br /></div><div><a href="http://www.devarticles.com/c/a/Java/Hibernate-Criteria-Queries-in-Depth/2/">http://www.devarticles.com/c/a/Java/Hibernate-Criteria-Queries-in-Depth/2/</a></div></div>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-46939450154337589952009-05-25T09:52:00.002+03:002009-05-25T10:01:26.730+03:00Working on two computers using SynergyI'm working on my laptop, and have another computer next to me which I'm using as an debug server, and sometimes as an extra screen.<br />The only physical connection between the two computer is being on the same LAN, but for me they are sitting together on the same desk.<br />So after working a few hours with two keyboards and two mice, I realized there must be a better solution, someone had to have thought of one already!<br /><br />And so I found <a href="http://synergy2.sourceforge.net/">Synergy</a>! :-)<br />Just a few minutes of configuration (inc. figuring out what all those ports, computer names, and screen edged mean), and I have my keyboard and mouse shared with the computer next to me.<br /><br />Like having multi-monitor configuration, just without ability to move windows between them, and with the processing power of both computer and physical separation between them!Romi Kuntsmanhttp://www.blogger.com/profile/09058630477854707438noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-20380535978539695992009-05-20T13:24:00.003+03:002009-05-20T14:33:30.722+03:00Date format<div style="text-align: center;"><br /></div>Recently we have had a problem in csv export, that showed the dates in a different format after exporting some rows. <div>The problem file looked ok, but Microsoft Excel did not show it as we expected ,as showed up , because of the reason that the dates where in the en-US format ,and since we are Israelis, our computers work in he-IL , which is actually almost en-UK</div><div><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6ZfBzT9XVO8PUfJXOCzz-va2lqtPPAUcFXBNb5GLrDO4MvbaUbi0basnx6CkQCbGI5AKvM2E5ev7rsQqQu1_sdR-y9nn3kul9e0RKALj9q3Ux4Lo_NEebd0QwYzfrXS0UAshj1n8b42SO/s320/orig.jpg" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 318px; height: 320px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5337864895612686482" /></div><div style="text-align: left;">When a date is 5/10 , excel assumes that it is fith of october (wich is still wrong but we don't care as long as it is a date) ;) , however when the date is 5/16 excel files to recognize the 16-th month (hextober, duh !) and shows the date as a string , wich driving our clients nuts </div><div style="text-align: left;"><br /></div><div style="text-align: left;">Great so far, because we know what is the problem but the solution was a little triky , because the whole application has culture preset to en-US and actually i was a little bit scarred to change it , therefore we used the dtColData.ToString("yyyy'-'MM'-'dd' 'HH':'mm':'ss") wich worked allright </div><div style="text-align: center;"><br /></div>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-76734907439603970252009-05-10T17:52:00.001+03:002009-05-10T17:55:14.996+03:00Hibernate - how to add a new table<div>hibernate creating new table</div><div><br /></div><div>checklist </div><div><br /></div><div>1. create the table in the database</div><div>2. create the class only members this time</div><div>3. create the hbm.xml file with mapping of the class members to the </div><div>4. update the hibernate.cfg.xml with the new hbm file you have created </div><div>5. create the test - and make it fail (c'mon in never works on the first time )</div><div><br /></div><div>more is comming </div><div><ul><li>foreign keys</li><li>pictures </li><li>more detailed how to</li></ul><div><br /></div></div>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-29790647731636003712009-04-16T13:20:00.003+03:002009-04-16T13:48:19.935+03:00How to cause 'div' to behave like a buttonOur graphics guys decided that is it a neat idea to use divs instead of normal html buttons at <a href="http://bugsondemand.com">bugsondemand.com</a>. Actually, I prefer buttons but hey.. I'm a stupid man , I would never appreciate a masterpice , a top of the design for me is <a href="http://google.com/">google.com</a> just boring input and two buttons.. <div><br /></div><div>Anyway if you want to let your divs to behave like buttons when the mouse passes over, you need to change the mouse cursor to the pointer </div><div><br /></div><div>This is how it is done :<br /><br /><br /><div id="BuyCredits2" style="this.style.cursor='pointer'"><br /> <label style="this.style.cursor='pointer'">Buy Credits</label><br /> </div></div><div><br /></div><div><br /></div><div>There are some more pointer options </div><div><br /></div><div><ul><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> default</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> auto</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> crosshair</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> hand</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> wait</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> help</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> text</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> move</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> n-resize</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> s-resize</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> e-resize</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> w-resize</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> ne-resize</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> nw-resize</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> se-resize</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> sw-resize</span></li><li><span class="Apple-style-span" style="font-family: tahoma; font-size: 13px; "> pointer</span></li></ul></div>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-55336514822077571802009-04-13T19:28:00.003+03:002009-04-13T19:46:59.987+03:00Apache Tomcat's Cache FushingWe have had a problem updating our <a href="http://www.bugsondemand.com/">site </a>content that at the end turned to be Tomcat cache.<div><br /></div><div>Apearently, Apache Tomcat web server hat it own's cache and doenst refresh it too often. we fund that out asking Shahar Zehavi , our new Development Team Leader. </div><div><br /></div><div>What was done :</div><div><br /></div><div><ol><li>Stop the Tomcat </li><li>Go to "/home/<i><b>USERNAME</b></i>/apache-tomcat-6.0.18/work/Catalina/localhost"<br />here are the files that will be deleted. </li><li>DELETE : \rm -rf * </li></ol><div>I belive that removing the file only will do the job as well , but hey .. when you are putting a new code you should let the old one go .. </div><div><br /></div><div>please note : </div><div><ul><li>you have to change the <span class="Apple-style-span" style="font-style: italic; font-weight: bold; ">USERNAME</span> to your coresponding username</li><li>be careful deleting </li></ul><div>Good luck </div></div></div>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-58043928202554104012009-03-31T14:09:00.004+03:002009-03-31T14:19:22.459+03:00Need a quick and cheap website design ?This is a site that gives lot's of nice designs (html and CSS ) for free<div><a href="http://www.opendesigns.org/view-designs/">http://www.opendesigns.org/view-designs/</a></div><div><br /></div><div>Please don't forget to check the license for the design: most of them are under </div><div><a href="http://creativecommons.org/licenses/">Creative Commons</a> :</div><div><span class="Apple-style-span" style="font-family: Arial; color: rgb(73, 73, 73); font-size: 12px; line-height: 22px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">You are free to copy, distribute, display, and perform the work, to make derivative works and to make commercial use of the work under the following conditions:</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">You must attribute the work in the manner specified by the author or licensor. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Georgia; font-size: 16px; line-height: normal; "><a href="http://creativecommons.org/licenses/publicdomain/">Public domain </a></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="Apple-style-span" style="font-family:Georgia;font-size:130%;color:#000000;"><span class="Apple-style-span" style="font-size: 16px; line-height: normal;"><span class="Apple-style-span" style="font-family: Arial; color: rgb(73, 73, 73); font-size: 12px; line-height: 22px; ">You are free to copy, distribute, display, and perform the work, to make derivative works and to make commercial use of the work.</span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="Apple-style-span" style="font-family:Georgia;font-size:130%;color:#000000;"><span class="Apple-style-span" style="font-size: 16px; line-height: normal;">Or GNU <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a></span></span></p></span></div>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-23366823515656036402009-03-30T08:22:00.004+03:002009-03-30T08:30:23.654+03:00Eclipse .classpath file relative pathsHello All.<br /><br />One of the most annoying aspects of eclipse is the fact that you have to add jar files to your project if you want to use external libraries.<br />Further more the configuration of these jar file is by default only using absolute paths, so when you try to move the project from one machine to another you need to delete pointers to old jars and add the new jar locations.<br /><br />We solved this problem by:<br />1. putting all the project external jar files in a single library called lib in the project top level folder (trunk).<br />2. Setup an eclipse classpath varible (see this link <a href="http://www.informit.com/articles/article.aspx?p=367962">http://www.informit.com/articles/article.aspx?p=367962</a> and look for figure 6-5<br /><br />In addition I added the .classpath file to the svn. We can now all use this file without modifications.Shachar Zehavihttp://www.blogger.com/profile/03819071017539917915noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-74178356398819555972009-03-29T16:37:00.003+03:002009-03-29T16:53:36.387+03:00From my security consulting daysIt seems that I'm getting rusty and forgetting the system structure of the mycrosoft database, however, my lazyness as my fame keeps me going<div><br /></div><div>This afretnoon, after the database has been changed once again due to the customers requirements (why oh why !?) and your servant had to update the webservice for supplying what the custommer wanted (remember the <a href="http://asiapac.com.au/images/THE_SOFTWARE_DEVELOPMENT_PROJECT.jpg">webcomic</a> right?) ... </div><div><br /></div><div>So here I sit and checking the the table that had to update .. it seems that it is [tblByyyyReeee] that has a new collumn but grrr : the CopyPaste does not work here . Romi offers clicking on the table's name in the Object Explorer , but hey , there is a nice way to that</div><div><br /></div><div>Scratching my old security consulting days memories back there in <a href="http://www.comsecglobal.com">Comsec </a> here is </div><div><div><br /></div><div>select * </div><div>from syscolumns </div><div>where id in(</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>select id </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>from sysobjects </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>where name = 'tblByyyyReeee'</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>)</div></div><div><br /></div><div>P.S. this is how you steal the database using the simple <a href="http://en.wikipedia.org/wiki/SQL_injection">SQL Injection Vulnerability </a></div>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-82540519196794849672009-03-18T17:38:00.002+02:002009-03-18T17:43:19.075+02:00Sun plans to make the cloud cumputing service avalible<a href="http://www.sun.com/solutions/cloudcomputing/index.jsp">http://www.sun.com/solutions/cloudcomputing/index.jsp</a><div><br /></div><div><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: Arial; font-size: 13px; font-weight: bold; -webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; ">At Sun, we envision a world of many clouds, both public and private, that are open and compatible. With our open cloud initiative, we plan to offer an extensive portfolio of products and services and to foster open communities and partner ecosystems, to make this vision a reality. It all starts with the delivery of the Sun Cloud, a public compute and storage cloud, which is due out later this year.</span> they say </div><div><br /></div><div>We will wait and see. Wish them a lot of luck</div>Ilya Chernyakovhttp://www.blogger.com/profile/08616781011666391577noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-60724289802130076862009-03-18T12:38:00.014+02:002009-03-18T12:49:06.626+02:00JavaScript Ad RotationWe just tried to implement a small mini ad rotation for a demo. There so many examples for doing it on client side using JavaScript, but so many are just not working. Therefore, please find attached how to implement it in 3 steps:<br /><br /><strong>1. Place the following code is jsRotate.js</strong><br />function init() { // Specify the image files window.Pic = new Array(); window.Pic[0] = './images/ulogo0.jpg'; window.Pic[1] = './images/ulogo1.jpg'; window.Pic[2] = './images/ulogo2.jpg'; window.Pic[3] = './images/ulogo3.jpg'; window.Pic[4] = './images/ulogo4.jpg'; // Set slideShowSpeed (milliseconds) window.slideShowSpeed = 3000; // Duration of crossfade (seconds) var crossFadeDuration = 3; // No need to edit var t; window.j = 0; window.p = window.Pic.length; } function runSlideShow(){ if (document.all){ document.images.SlideShow.style.filter="blendTrans(duration=2)"; document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"; document.images.SlideShow.filters.blendTrans.Apply(); } document.images.SlideShow.src = window.Pic[j];//./images/ulogo3.jpg';//; if (document.all) { document.images.SlideShow.filters.blendTrans.Play(); } window.j = window.j + 1; if (window.j > (window.Pic.length-1)) { window.j = 0; } t = setTimeout('runSlideShow()', window.slideShowSpeed); }<br /><br />2. <strong>Add a reference to js file inside the head tag using the script tag:</strong><br />...script language="javascript" src="./scripts/jsRotate.js"...<br /><br />3. <strong>Place the following code just before the /body tag</strong> (ya, where you can find the Google Analytics code...)<br /><br />script language="JavaScript" type="text/javascript"... init(); runSlideShow(); ...script...<br /><script language="JavaScript" type="text/javascript"><br />init(); runSlideShow();<br /></script><br /><strong>It's so simple as 1,2,3...</strong>RockeTier Develpment Teamhttp://www.blogger.com/profile/07929729625529511494noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-65918970522387797502009-03-18T12:23:00.003+02:002009-03-18T12:35:28.438+02:00Setup PHP Dev. environmnet with IIS 7Hello All.<br /><br />Here is what need to be done to setup php with eclipse IDE and run things with IIS<br />1. Download php latest version and install it in a pah without blanks <a href="http://www.php.net/downloads.php">http://www.php.net/downloads.php</a> make sure that you select the IIS ISAPI deployment method when promted in the installation<br />2. Setup the PHPRC environment variable to point to your installation<br />3. Make sure that the PHP executables are added to your PATH<br />4. update the php.ini in your php dir to allow short open tag (set short_open_tag = On)<br />5.follow the instructions in <a href="http://brh.numbera.com/blog/index.php/2008/03/09/setting-up-iis7-with-bonus-php-instructions/">http://brh.numbera.com/blog/index.php/2008/03/09/setting-up-iis7-with-bonus-php-instructions/</a><br /><br />Have funShachar Zehavihttp://www.blogger.com/profile/03819071017539917915noreply@blogger.com0tag:blogger.com,1999:blog-2072896722482331315.post-58052748120804850722009-03-18T12:06:00.003+02:002009-03-18T12:14:54.557+02:00How to setup Java Dev. Environmernt (Java, Eclipse, Tomcat)Hello All.<br /><br />You basically need two things:<br />1. The Java JDK that can be downloaded from <a href="http://java.sun.com/javase/downloads/index.jsp">http://java.sun.com/javase/downloads/index.jsp</a><br />2. Install JDK on your machine (in a path without blanks!!!).<br />3. Setup the environment var JAVA_HOME to point to your new installation.<br />3. download eclipse (choose the <a class="packageTitle" href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/SR2/eclipse-jee-ganymede-SR2-win32.zip">Eclipse IDE for Java EE Developers (163 MB)</a>) package and unzip it in some folder <a href="http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a><br />4. download tomcat from the apache site <a href="http://tomcat.apache.org/download-60.cgi">http://tomcat.apache.org/download-60.cgi</a><br />5. Follow the instructions here to setup your env <a href="http://www.ibm.com/developerworks/opensource/library/os-eclipse-tomcat/index.html">http://www.ibm.com/developerworks/opensource/library/os-eclipse-tomcat/index.html</a><br /><br />EnjoyShachar Zehavihttp://www.blogger.com/profile/03819071017539917915noreply@blogger.com0