761 Posted Topics

Member Avatar for Gerbiler

Can you access the database using the [URL="http://dev.mysql.com/doc/refman/5.0/en/connecting-disconnecting.html"]mysql[/URL] command line tool? [list=1] [*]If you can, then the issue is somewhere in PHP-land. [*]If you get the same problems using command line mysql, then the problem is somewhere on the database side of the world (including issues with the particular port)[/list] …

Member Avatar for griswolf
0
540
Member Avatar for jdstone550

What is the value of [ICODE]savingsRate[/ICODE] when you calculate [ICODE]pmt[/ICODE] on line 21?

Member Avatar for jdstone550
0
100
Member Avatar for rhuffman8

You want [URL="http://docs.python.org/library/datetime.html#datetime.date.strftime"]datetime.date.strftime()[/URL] (and follow the link for details)

Member Avatar for griswolf
0
201
Member Avatar for srdva59

How did you decide this is a PHP question? If I understand correctly, OCX files are useful only on Windows systems, and have nothing (directly) to do with PHP.

Member Avatar for Wraithmanilian
0
133
Member Avatar for Ana_Developer

well, I see that your code is identical to what I found at the sgi site. A little more exploration yields this: [URL="http://www.sgi.com/tech/stl/hash.html"]Defined in the headers hash_map and hash_set, and in the backward-compatibility headers hash_map.h and hash_set.h. This class is an SGI extension; it is not part of the C++ …

Member Avatar for mike_2000_17
0
151
Member Avatar for shurshot

Well, there are two issues [LIST=1] [*]You can just do this with introductory level algebra, and you should. [*]You have a variable [icode]OtherSub[/icode] that is never initialized, and even if it were, you should be saying [ICODE]OtherSub += 1[/ICODE] at line 17 (I think you meant) [/LIST] For option 1, …

Member Avatar for TrustyTony
0
353
Member Avatar for thecoolman5
Member Avatar for mukthyar1255

Sigh. Please read [thread=366794]This thread[/thread] to understand how to ask for help in the best possible way. Then, please, [URL="http://docs.python.org/library/email-examples.html"]RTFM[/URL] (One of the first few hits when I googled for 'send email using Python')

Member Avatar for griswolf
0
156
Member Avatar for yuvalm2

Just my own perspective: HTML was much easier for me to learn than any particular graphic package. Django is quite approachable for small projects (and this one looks "small" from the perspective of the UI)

Member Avatar for woooee
0
226
Member Avatar for jackmaverick1

So what is it that makes up an operating system? (I really don't have a clear cut answer: Too many possible ways to slice things). By mentioning the idea of skipping the boot loader and kernel, you make it clear that you're experimenting with something less fundamental; so just pick …

Member Avatar for rubberman
0
200
Member Avatar for lilbluemonky

"[B][I]I'm having issues[/I][/B]" ... Hmm. That's not a very specific question.

Member Avatar for raptr_dflo
0
1K
Member Avatar for TrustyTony

hmmm. [CODE]a = list(range(10)) a[::-2] = "ZYXWV" print (a)[/CODE] I had completely forgotten about the step option for slices.

Member Avatar for TrustyTony
3
673
Member Avatar for Kirielson

This: [icode]class lk(old_image):...[/icode] declares a subclass of class old_image. I'm guessing that what you want is actually to [B][I]initialize[/I][/B] an instance of lk with the old image. You do that in lk's member function [icode]def __init__(self, old_image):...[/icode] Of course this is only a guess at what you intended. By the …

Member Avatar for griswolf
0
342
Member Avatar for Dante2002

[QUOTE]... having problems getting it to compile and run.[/QUOTE] It is always best if you give the exact compilation error message, so we don't have to guess what the problem might be. And, if you read the error message carefully, thinking about how a compiler author has to be generic, …

Member Avatar for fibbo
0
214
Member Avatar for johanngomes

Confused why you need this. If you need to print with double quotes, do it like this `print('"%s"'%"qwerty")` P.S. Bad idea to name your variable "string" as it conflicts with the string module (chant `help("string")` from the Python prompt)

Member Avatar for Schol-R-LEA
0
688
Member Avatar for Tweekler

You'll get best help if you show some code (using the CODE button to keep indentation, etc). However, just for starters, a [URL="http://www.cplusplus.com/reference/stl/vector/"]vector[/URL] can grow as large as you need, so you just create one and [icode]push_back[/icode] each new value in turn. There are some efficiency issues with resizing a …

Member Avatar for m4ster_r0shi
0
132
Member Avatar for vasuv

Jython questions are good in this forum. However, you will need to be much more specific about your needs before we can be helpful. The best way to be specific is to tell us exactly what you need to do [B][I]and[/I][/B] to show us the code that you are trying …

Member Avatar for griswolf
0
101
Member Avatar for Shruti4444

you need [icode]grep -q[/icode] (Chant [icode]man grep[/icode] then check the -q option, then experiment a little bit until you understand how it works.) Hint: A zero status is the way Unix utilities signal 'it worked'; so you can use it in a logic test.

Member Avatar for IIM
1
134
Member Avatar for Noob_Programmer

You probably want a script that looks more like this:[CODE] # do any initialization while True: # prompt for user choice # clean up the choice: at least one non-white character, lower cased, # if 'q': break # if something legal, look up the appropriate fortune (but see 'get' below) …

Member Avatar for griswolf
0
101
Member Avatar for s1w

Or write your own very simple parser if you prefer, using regex to recognize the interesting bits. You probably need [B]start_of_tag[/B], [B]tag_contents[/B], [B]end_of_tag[/B] and some non-regex things to keep track of opening and closing tags with the same name. To avoid rolling your own, check [URL="http://www.crummy.com/software/BeautifulSoup/"]Beautiful Soup[/URL] if you are …

Member Avatar for s1w
0
204
Member Avatar for prathu1
Member Avatar for vasuv

Why can you not find out? What have you tried doing? Do you need to check each file to see if it is still growing, or is it sufficient to know it exists?

Member Avatar for griswolf
0
101
Member Avatar for Thisisnotanid

for my purposes (actually need to use some pseudo random things from time to time), I have been quite happy to simply import [random](http://docs.python.org/library/random.html) Of course, if you want to write your own that's different. The "bestest" random function I ever read about: Get bits from the microphone input. There …

Member Avatar for Schol-R-LEA
0
333
Member Avatar for silvercats

I had always thought they were the same. But [URL="http://en.wikipedia.org/wiki/Multiprogramming"]the wiki knows![/URL]

Member Avatar for TrustyTony
0
758
Member Avatar for Shane the House

In fact it depends on the use as both richieking and Gribouillis suggest. The technical terms are 'row major' (indexed as[ICODE] data[row][column][/ICODE]) and 'column major' (indexed as [ICODE]data[column][row][/ICODE]). Some math applications work much better column major, for instance. For "large" data, it can matter (perhaps not so much in Python) …

Member Avatar for vegaseat
0
121
Member Avatar for bleedblue

No, someone will not do that. This forum is to [I]help [B]you[/B] do your work[/I]. It is [B]not[/B] to [I]do your work for you[/I]. See [thread=78060]These strong suggestions[/thread], particularly the last item.

Member Avatar for griswolf
-1
191
Member Avatar for [V]
Member Avatar for can_surmeli

I understand that you asked for "good" and this is a somewhat broader brush. [url]http://lmgtfy.com/?q=principles+of+logic+design[/url]

Member Avatar for griswolf
0
113
Member Avatar for spurfilm

You need to be specific in your own mind about what a 'Start date' is, then. I see two basic options:[list=1] [*]You always look at activity[I]N[/I]'s startDate [*]You base it on the earliest (or most recent) startDate for the user [/list] Option 1 is easy. [icode]SELECT blah, blah from activities …

Member Avatar for spurfilm
0
129
Member Avatar for n3red

Why not do the work in a language with which you are already comfortable? I have a dozen utilities in my $HOME/bin directory (which is early in my PATH) written in Python (and several more written in bash, and a couple compiled from C and ...) For your task, I'd …

Member Avatar for griswolf
0
364
Member Avatar for gork000
Member Avatar for gork000
0
209
Member Avatar for eman 22

Are you asking for a way to determine what is the [B][I]optimum[/I][/B] order for a given B+ Tree? If you think about it, you will see that this "optimum" value depends on the cost to do these things:[list] [*]Searching[list] [*]Follow a link to a child node [*]Find the appropriate key …

Member Avatar for rubberman
0
129
Member Avatar for MARKAND911
Member Avatar for [V]

Look at the [icode]setdefault[/icode] method on dictionaries. If you first [ICODE]setdefault(key,[])[/ICODE] you can then always [ICODE]keys[key].append(pairs[1])[/ICODE]

Member Avatar for vegaseat
0
156
Member Avatar for TJones

The first thing I'd do to change your code is to make the loop [icode]while True:[/icode] and then add [icode]if student_name.lower() == 'q': break[/icode] That allows you to move the input for student name inside the loop (and that means you only write it once). Your inner loop can be …

Member Avatar for TJones
0
487
Member Avatar for shylesh_kerala

[URL="http://lmgtfy.com/?q=algorithms+for+doubly+linked+lists"]http://lmgtfy.com/?q=algorithms+for+doubly+linked+lists[/URL]

Member Avatar for antechindia
-1
132
Member Avatar for kitkat123

[QUOTE=Rashakil Fol;1555012]You ask them.[/QUOTE] Good but insufficient. You ask them [B][I]in a carefully structured way[/I][/B]. The important questions for you are: [LIST=1] [*]What is the data? [*]How do I access the data? [*]What interactions are necessary? [*]What is the expected outcome (for each interaction)? [*]How can the expected outcome be …

Member Avatar for antechindia
0
112
Member Avatar for ret801

Semantics is what you say; syntax is how you say it. You can insert numbers and strings into other strings for later output in a variety of ways. Generally, you will use the [URL="http://docs.python.org/library/string.html#formatspec"]format mini-language[/URL] and the modulus operator (%). For very simple cases it is very easy. For instance[CODE]anint …

Member Avatar for ret801
0
139
Member Avatar for TrustyTony

Is this the formula found [URL="http://www.math.hmc.edu/funfacts/ffiles/20010.5.shtml"]here[/URL]?

Member Avatar for TrustyTony
1
618
Member Avatar for kmilof

you want some variation on code like this[CODE]gracefulStart() # create circle etc while True: # display the circle # do some work; pause; etc if readyToStop(): break # adjust the location of the circle gracefulEnd() [/CODE]

Member Avatar for predator78
0
227
Member Avatar for trelokamenos

This is a variation of traveling salesman problem where the cost of any outbound edge is a probabilistic function of the distance to N from that edge's other node. That function ought to be interesting to write :) As Tony points out, you can start by considering the[URL="http://en.wikipedia.org/wiki/Shortest_path_problem"] known minimum …

Member Avatar for mrnutty
0
108
Member Avatar for Tehim

So you would prevent your customers from using punctuation of any kind Wouldnt that be a little hard for them I think it would make me crazy

Member Avatar for diafol
0
366
Member Avatar for yongj

Make is different in a couple of ways from most programming and scripting languages: You don't describe [I]how to do what you want[/I] (procedural languages) but instead give [I]transformation rules[/I], then ask for what you want (declarative languages). The makefile syntax/format is also odd (though if I recall correctly the …

Member Avatar for zaraki
0
164
Member Avatar for rena0514

why is the return type of [icode]whitespace(...)[/icode] [icode]void[/icode]?

Member Avatar for rena0514
0
221
Member Avatar for Shansal

You might want to use [URL="http://docs.python.org/library/collections.html#collections.Counter"]Counter[/URL]

Member Avatar for TrustyTony
0
175
Member Avatar for weblover

sed can do it. The trick is to deal with the 'c' so that sed doesn't remove it entirely until the new 'c' are added in. That's the point of the '%' in the first and last clauses of the script. I'm assuming that the leading digits in your example …

Member Avatar for weblover
0
139
Member Avatar for dspjm

Virtualization allows me to use my hardware more efficiently. People are slow, and machines are fast. Where we used to have big machines with multiple accounts running on the same OS, we can now afford to have big machines with multiple OSs running on the same hardware. The value is …

Member Avatar for ComputerNetwork
0
167
Member Avatar for tucker001

You will be well served to think about the program flow first. Here are some questions whose answers may help you write the code you need. [list] [*]How does the program know how many numbers to work with? [list] [*]is the number specified by interaction? [*]is the number specified in …

Member Avatar for predator78
0
315
Member Avatar for GhostMonkey

That is a particularly unhelpful question. Perhaps your file is named "a.out" in the same directory as your .cpp file(s)? Perhaps you could add information about how you built the project? What compiler you're using? Why there's sql involved in a C++ project?

Member Avatar for GhostMonkey
0
116
Member Avatar for jkrueger

Huh. Why on [B]Earth[/B] would you want that? Note that if you have multiple terminal windows open, pressing ⌘-Q causes them all to close. ⌘-W is a better choice.

Member Avatar for jkrueger
0
958

The End.