Category: "Opinions"
There is no "Contains" in Javascript string
I used "Contains" method in C# whether the strings contains a keyword.
For example:
Code
string str = "string"; | |
if(str.Contains("str")) | |
{ | |
Console.Write("OK"); | |
} |
There is no such method, but you can "indexOf".
Code
var str = "string"; | |
if(str.indexOf("str")!= -1) | |
{ | |
alert("OK"); | |
} |
Go To Java World Again
I wish to an android application. Although that is a small personal project, it still requires some server operations. Thus, I need to find a web host. I already have a web host in PHP. That is possible to write some php scripts for the communications with my android application. But Programming in PHP is not very fun. Then my next option is C#. I am a C# programmer for a few years. Writing some server logic in C# is a easy task for me. Moreover, C# is a good programming language. .Net Environment needs a lot of resource. I think that needs a VPS with 2GB of RAM to install .net and MS SQL server. That kind of VPS needs around $40 or more per month. Then Java seems to be my best option. a Glassfish and MySQL only needs 1GB RAM VPS. I can find some VPS with that kind of configurations under $30 per month. Java is a good programming language too. This option is the most feasible.
I am learning Google Web Tools.
I am learning Google Web Tools. I can use Java in the webpage rather than just Javascript.
http://code.google.com/webtoolkit/
Moreover, that is support Google App Engine.
Glassfish Server for NetBeans
I tried to add a Glassfish Server to NetBeans. It needs the actual path where the server is siting in. I used "apt-get" to install my glassfish instance. I have totally no ideas where the server installed. I found that is in "/usr/share/glassfishv2". If you have the same problem, that is very easy to find the server path. Just these two steps:
1. sudo updatedb
- Update the database with the file paths.
2. locate asenv.conf
- That is a config file under {glassfish server}/Config.
I am a hardcore Java man.
Until this moment, I believe I did more jobs in C# rather than Java (included professional job and other hobby kind things), but I am still a hardcore Java man. Using C#, because Windows is a key OS in the area of general public. This is very hard to persuade my friends installing JRE. In contrast, this is easier to say, "Yeah, let's install .Net, that looks like a plug-in for your OS." That is the major reason I did a lot of things in C#.
For Java, I think more comfortable with Java and my programs can be use my Linux and Windows boxes. Moreover, that is more opensource framework in Java than C#.
P.S. I love Joomla 1.5 so much, that is coding style looks like Java too.