Hi All
I just installed php 5.3.1 in my linux server and now my old work which i used to write with tags is not working at all..
Please help me out..
How can i resolve this??
I have this for a for loop which I made I was wondering how I would write so it would work with a while loop.
def scrollList(myList):
negativeIndices=[]
for i in range(0,len(myList)):
if myList[i]<0:
negativeIndices.append(i)
return negativeIndices
So far I have this
def scrollList2(myList):
negativeIndices=[]
i= 0
length= len(myList)
while i != length:
if myList[i]<0:
negativeIndices.append(i)
i=i+1
return negativeIndices
The last time I worked with Zend_Db I recall I used to write SQL Queries manually. I've been searching for some ORM application, but, since I read something like Zend_Db is also capable of doing so, I started to try it, but I can't find neither a good tutorial explain it or a good documentation.
I read something lake Gateway pattern and ModelMapper class but I can't figure it out.
Can someone shine my path? :P
Probably a stupid question, but I can't find any documentation anywhere for it. Is there a way to do an if in prolog, e.g. if a variable is 0, then to do some actions (write text to the terminal). An else isn't even needed, but I can't find any implementation of if.
How do you reverse a string in Ruby? I know about string#reverse. I'm interested in understanding how to write it in Ruby from scratch preferably an in-place solution.
I am attempting to write a regular expression to process a string of key value(s) pairs formatted like so
KEY/VALUE KEY/VALUE VALUE KEY/VALUE
A key can have multiple values separated by a space.
I want to match a keys values together, so the result on the above string would be
VALUE
VALUE VALUE
VALUE
I currently have the following as my regex
[A-Z0-9]+/([A-Z0-9 ]+)(?:(?!^[A-Z0-9]+/))
but this returns
VALUE KEY
as the first result.
I want to write a program to implement an array-based stack, which accept integer numbers entered by the user.the program will then identify any occurrences of a given value from user and remove the repeated values from the stack,(using Java programming language).
I just need your help of writing (removing values method)
e.g.
input:6 2 3 4 3 8
output:6 2 4 8
I was trying to add a method to the String class. This method should mutate the current string (of course it would be possible to write a not mutating version but I'd prefer the mutating one). I had no idea how to do this and after some googling I found the method rb_str_modify which makes a given string mutable. That's exactly what I need but I couldn't find an equivalent in the Ruby language. Did I miss something or is there really no possibility in the language itself?
Hi, I hv 3 java web-apps running in jetty and i want one of them to be accessed only through localhost. I dont want to write filter. Can it be done by modifying some jetty configuration?
a difficult one..
using classes of primitive types in java, like Integer, Float, Long, etc, write a code fragment using a method to double the value of a variable passed as an argument
I have a user control with a form, and I am trying to embed it in sharepoint 2007... I am getting an error about having two server-side forms on one page. This is crazy! Surely I can write a user control with a form and embed it in sharepoint??
Thanks.
Hello.
I can not find how to implement a design in C++. In the language of Delphi in case the operator can write the following design:
case s[j] of
'0'..'9','A'..'Z','a'..'z','_': doSomeThing();
How can i do the same in c++. Attracts me is the construction type 'a' .. 'z' and etc...
Thank you
hi guys, can anyone help me how to write code for checking spellings in android?
or can anyone provide me the sites which will be useful to me.
thanks in advance
any help will be appreciated.
I'm developing an NSIS installer, to update a program that runs in background. Obviously, I'd like to send the program termination signals, because otherwise I repeatedly get a "can't write" error. How can I do this, with a limited overhead on installer size?
Here's what I'm doing now:
mysock = urllib.urlopen('http://localhost/image.jpg')
fileToSave = mysock.read()
oFile = open(r"C:\image.jpg",'wb')
oFile.write(fileToSave)
oFile.close
f=file('image.jpg','rb')
ftp.storbinary('STOR '+os.path.basename('image.jpg'),f)
os.remove('image.jpg')
Writing files to disk and then imediately deleting them seems like extra work on the system that should be avoided. Can I upload an object in memory to FTP using Python?
some case i write code like these:
a,temp,b = s.partition('-')
i just need to pick the first and 3rd element. temp would never be used. is there a better way to do this?
the common case is ,a better way to pick separted element to make a new list?
for example
i want to make a new list use old list 0,1,3,7 element
code would be this:
newlist = [oldlist[0],oldlist[1],oldlist[3],oldlist[7]]
it's pretty ugly,isn't it?
How can I write the output of this line of code to a float variable instead of piping it to a file? The output of this line is a floating number.
FILE *child = _popen("java -jar c:\\simmetrics.jar c:\\chtml.txt c:\\thtml.txt", "r");
How are the below valid and invalid as shown and what do they mean. When would such a situation arise to write this piece of code.
++x = 5; // legal
--x = 5; // legal
x++ = 5; // illegal
x-- = 5; // illegal
I dont have perl install on windows. I would like to copy the entire testdb to testdb on my linux VM. What is the easiest way to do that? I can run code on my windows machine to connect to both DB and do sql operations. I am using C#.NET so if i need to write code and its simple then i'm open to that.
Hello,
Im trying to write query in linq
Select UserId, UserNumber
FROM User
where UserNumber in
(Select UserNumber
FROM User
group by UserNumber
having Count(UserId) = 1)
Aby hints ?
Is there any pitfalls when using char*'s to write cross platform code that does memory access?
I'm working on a play memory allocator to better understand how to debug memmory issues. I have come to believe char*'s are preferable because of the ability to do pointer arithmetic and derefernce them over void*'s, is that true? Do the following assumptions always hold true on different common platforms?
sizeof(char) == 1
sizeof(char*) == sizeof(void*)
sizeof(char*) == sizeof(size_t)
Is there a built in equivalent to the .NET framework's DateAdd or AddMonths functions?
I'm looking for the easiest, cleanest way to add X month to a Javascript date.
I'd rather not handle the rolloing over of the year as done here.
or have to write my own function as done here.
Is there something built in that is as nice as the .NET Date.AddMonths function? Or something close?
Hey,
I'm trying to get this function to get the following output with the listed input, the "..." is where I'm not sure what to write:
void Question8(void)
{
char sentence[100];
int grade;
scanf(….);
printf("%s %d", sentence, grade);
}
Input:
My CS Grade is 1000
Output:
My CS Grade is 100
However, the kicker is that I need the scanf to read a c-string and then an int with a single scanf command, is this even possible?