I want to implement readmore/less feature. i.e I will be having html content and I am going to show first few characters from that content and there will be a read more link in front of it. I am …
Tag: c#
Why do you not use C for your web apps? [closed]
I was having a look at a few different web servers this morning when I came across G-WAN. As I understand, its a web server written in C and you have to make use of it by writing your websites/webapps …
Is there an online code coloring service? [closed]
I would like to know if there is an online service where we paste the code and it generates back the colored HTML source code for that code. It could be PHP, HTML, CSS, JavaScript, C, and Java. The …
C# String.Format() Equivalent in PHP?
I’m building a rather large Lucene.NET search expression. Is there a best practices way to do the string replacement in PHP? It doesn’t have to be this way, but I’m hoping for something similar to the C# String.Format method. Here’s what the logic would look like in C#. Is there a PHP5 equivalent? Answer You could use the sprintf function:
Can PHP decompress a file compressed with the .NET GZipStream class?
I have a C# application that communicates with a PHP-based SOAP web service for updates and licensing. I am now working on a feedback system for users to submit errors and tracelogs automatically through the software. Based on a previous question I posted, I felt that a web service would be the best way to do it (most likely to
ASP.Net (C#) & SQL Server -or- PHP & MySQL for performance? [closed]
Money, Staff, Skill and preference to open source or commercial is neutral. Let’s take the best of the best programmers (for arguments sake) and think about this: What will perform better overall: …
Are singleline if statements or if statements without braces bad practice?
I was told that the first instance wasn’t a good idea. I have no idea whether this is really this case (or for the second one either); does it not shorten the amount to type? Or is it because it just makes a mess? Answer The best practice is to write code that others can read and update easily. Your
Calling a function from a string in C#
I know in php you are able to make a call like: Is this possible in .Net? Answer Yes. You can use reflection. Something like this: With the above code, the method which is invoked must have access modifier public. If calling a non-public method, one needs to use the BindingFlags parameter, e.g. BindingFlags.NonPublic | BindingFlags.Instance: