What would be the PHP equivalent of this Perl regex?
if (/^([a-z0-9-]+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)$/
and $1 ne "global" and $1 ne "") {
print " <tr>\n";
print " <td>$1</td>\n";
print " <td>$2</td>\n";
print " <td>$3</td>\n";
print " …
Hi All,
We're evaluating MySQL and PostgreSQL for building our indic language web application which will use MySQL or PostgreSQL.
One of my colleagues mentioned that MySQL had issues with i18n. I mostly come from the Oracle world and although I've played a lil with MySQL, I don't know enough to know that there are issues with its i18n…
In Clojure, I want to combine two lists to give a list of pairs,
> (zip '(1 2 3) '(4 5 6))
((1 4) (2 5) (3 6))
In Haskell or Ruby the function is called zip. Implementing it is not difficult, but I wanted to make sure I wasn't missing a function in Core or Contrib.
There is a zip namespace in Core, but it is described as…
Hi.
I have decided to start programming some apps for the iPhone that eventually will get submitted to App Store. So I have to use a language the Apple supports.
However, from what I understand, there are some variety of languages I can choose from.
Ansi C
Objective C
C
C++
I started learning C++ in school back in 2001, so…
I've found several posts on hubFS of people asking if there is, or will be, offline documentation for F#. These posts haven't been answered. So I want to give it a shot and ask the same question here on SO.
Where I've looked for offline documentation so far:
The April 2010 CTP release of Visual F# (version 2.0) is available…
Ok so i have a DECIMAL field called "Score". (e.g 10.00)
Now, in my SP, i want to increment/decrement the value of this field in update transactions.
So i might want to do this:
SET @NewScore = @CurrentScore + @Points
Where @Points is the value im going to increment/decrement.
Now lets say @Points = 10.00.
In a certain…
i have two perl files that is .pl files
one is action.pl and another one is test.pl
action.pl has a html form as:
print $cgi->header, <<html;
<form action="test.pl" method="post">
html
while (my @row = $sth->fetchrow)
{
print $cgi->header, <<html;
ID:<input name="pid" value="@row[0]"…
Possible Duplicate:
How do I include functions from another file in my Perl script?
I have a couple simple perl scripts that share some subroutines. I'd like to pull those subroutines out into another file, but I'm not sure how to go about doing that.
All I need is an equivalent to C's #include. I found…
I'm designing a programming language, purely for fun, and want to add as many experimental features as I can, just to make programming in it something completely different, and that not in a bad way like Brainf*ck or Malbolge.
However, I seem to be quite bad at coming up with new things for it but I'm sure that…
I've been working on a Django project using South to track and manage database schema changes. I'm starting a new Java project using Google Web Toolkit and wonder if there is an equivalent tool. For those who don't know, here's what South does:
Automatically recognize changes to my Python database models…
What, in your opinion, is the best
API to utilize in developing an
application that handles both
realtime MIDI and audio input and
output? This would be for an
application that is used in the
process of making music as opposed to
playing audio or MIDI files. I'm aware that this may be a subjective…
I have two Perl files: action.pl and the other is test.pl
action.pl has a form:
print $cgi->header, <<html;
<form action="test.pl" method="post">
html
while (my @row = $sth->fetchrow)
{
print $cgi->header, <<html;
ID:<input name="pid" value="@row[0]"…
Hello all,
I just went through this link http://www.pcauthority.com.au/Feature/91093,the-tsar-of-antivirus.aspx and found that it's developed using c/c++ and visual studio with a little assembly language support.
As a programmer i just want to know in what programming language…
I got this question from my cousin:
"What will be the best way to create a similar working website just like: http://www.plakletters.nl".
I have looked into the website and think that to start of with i'm gonna help my cousin write a script that loads all fonts installed on the…
As the title says, the java.io.tmpdir property in Java is really nice, and I can't find an equivalent for C. I'm writing for Windows and in Visual Studio. I don't want to just use something like C:\Temp because in later versions of windows the appropriate directory could be…
It is often said that some programming languages exist that once grasped can open your mind and change the way you write software. A sort of "software design enlightenment", we can say.
I heard this about Lisp, Smalltalk, Haskell, pure functional programming in general..
…
What would be jQuery equivalent of this sf hover suckerfish code?
<script>
sfHover = function() {
var sfEls = document.getElementById("navbar").getElementsByTagName("li");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
…
DBMS_ASSERT is one of the keys to prevent SQL injection attacks in Oracle. I tried a cursory search...is there any SQL Server 2005/2008 equivalent for this functionality?
I am looking for a specific implementation that has a counterpart of all the respective Oracle…
Are query 1) == 2) in terms of estimated query plan AND actual plan? (can statistics affect the actual plan here, ever?)
declare @cat int -- input param from prc
...
1)
select *
from A as a
join B as b
on b.id = a.id
on b.cat = @cat
join C as c
…
I am a total beginner and would like to eventually learn to develop for the iphone.
I have just done a beginner's CS course where the language we learned was JavaScript. We studied basic concepts like: variables, arrays, loops (for,while,if,if..else..), properties…
Hi,
Does does class/object models have a out-of-the-box equivalent to a database foreign key constraint? Assume the language is C# please.
That is say Class A has a field that references Class B and vica-versa. If I have Object A & B (instantiated from…