Really what I'm looking for is some kind of mobile equivalent for SQLConnection and SQLCommand. Any thoughts?
The Big Programming Thread - Page 118
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
Craton
United States17233 Posts
Really what I'm looking for is some kind of mobile equivalent for SQLConnection and SQLCommand. Any thoughts? | ||
![]()
tofucake
Hyrule18977 Posts
| ||
noonoo
3 Posts
| ||
MiyaviTeddy
Canada697 Posts
![]() I'm trying to make a function that takes an array of characters (basically a string/phrase) and count how many words out of it. A "word" is defined to be a sequence of non-null, non-whitespace characters, separated from other words by whitespace. This is what I have right now.
right now I'm using the phrase " R2! \t\t Where \n\n are you?" (exactly as typed) and I get 5 words when there is only 4 (R2!, Where, are, you?. Yes they all count). Help? | ||
freelander
Hungary4707 Posts
| ||
LukeNukeEm
31 Posts
Then your for-loop increases i again, and you are in a place where you shouldn't be. | ||
supereddie
Netherlands151 Posts
int wrd = 0, i = 0; Basically, number of words equals number of spaces + 1 ![]() Do some checking of course to prevent more than one sequential space being counted as more than one word. | ||
darthfoley
United States8001 Posts
![]() | ||
Holy_AT
Austria978 Posts
On February 23 2012 04:41 supereddie wrote: try something like this (much easier) int wrd = 0, i = 0; Basically, number of words equals number of spaces + 1 ![]() Do some checking of course to prevent more than one sequential space being counted as more than one word. I dont think it is a good approach, you could have multiple white spaces between words and your method would not work. A good approach is to count the switches. Just tore the before value and if the before value == " " and the actual value is something else then " " then he should count. | ||
![]()
Insane
United States4991 Posts
Generally increasing the for-looped variable inside the loop itself is something you should be very careful/wary about doing ![]() e: IsWhiteSpace would be a function you'd write that has the characters that for the sake of this you're considering whitespace... | ||
Holy_AT
Austria978 Posts
sentence[i] != '\0' I am more the C# guy, but isnt that a bad way to query for the end of an array ? isnt there some sentence.count or something like that to get the array length ? And stop the loop if i >array.length ? | ||
LukeNukeEm
31 Posts
| ||
![]()
Insane
United States4991 Posts
On February 23 2012 05:07 Holy_AT wrote: I am more the C# guy, but isnt that a bad way to query for the end of an array ? isnt there some sentence.count or something like that to get the array length ? And stop the loop if i >array.length ? If it's just a char pointer array thingy you don't know what the length is without iterating until you find null. There are functions to do that for you obviously, but for classroom assignments I'd be wary about using library functions unless you know you are allowed to use them. For C# it's a trivial one liner with sentence.Split anyway FWIW ![]() | ||
freelander
Hungary4707 Posts
| ||
MiyaviTeddy
Canada697 Posts
Thanks guys for the advice. As for that j, it was used for a different algorithm that I had but it didn't end up the way I wanted it to be. I managed to get the function working, onward to the second function (which I think I'll need some help...). | ||
CecilSunkure
United States2829 Posts
| ||
NoSlack
United States112 Posts
On February 24 2012 13:33 CecilSunkure wrote: Wrote another blog post on game programming in C! Thought you guys here would find it interesting: link. Awesome read thanks! I'm afraid that learning on my own just isn't working, I'm going to need some college classes. I need to be around people that are doing the same thing. As an infantryman in the army, there aren't too many people around me interested in programming ![]() Some day... | ||
FoxyMayhem
624 Posts
Is anyone in this good community interested in a little web development side project, or pointing me in the right direction? Details + Show Spoiler + Currently, the horse pedigrees look like this. ![]() That, my brother said, is the absolute best we can do. I know he's wrong. I'd like the pedigree like this: ![]() With Tooltips Like This: ![]() So, what's the best way to go about creating this? Ideally, it can work inside of our wordpress. Those mockups are my work, so graphics is not so much a problem, just the technical side of things. Thanks guys. | ||
CecilSunkure
United States2829 Posts
On February 25 2012 02:15 NoSlack wrote: Awesome read thanks! I'm afraid that learning on my own just isn't working, I'm going to need some college classes. I need to be around people that are doing the same thing. As an infantryman in the army, there aren't too many people around me interested in programming ![]() Some day... Hey glad you liked it! Bump that thread if you get a chance, would love more people to see and potentially get into programming. | ||
fabiano
Brazil4644 Posts
On February 25 2012 02:46 FoxyMayhem wrote: I have a goal with a website I'm in charge of. It's for a family business. I dipped in HTML back in 04 and 05, but what I want to do is currently beyond my knowledge. In otherwords, I don't know where to look to start learning what I need -- or, perhaps, who to hire. Is anyone in this good community interested in a little web development side project, or pointing me in the right direction? Details + Show Spoiler + Currently, the horse pedigrees look like this. ![]() That, my brother said, is the absolute best we can do. I know he's wrong. I'd like the pedigree like this: ![]() With Tooltips Like This: ![]() So, what's the best way to go about creating this? Ideally, it can work inside of our wordpress. Those mockups are my work, so graphics is not so much a problem, just the technical side of things. Thanks guys. That is extremely easy to achieve, especially if the content is static and you don't plan on changing that often. All you need is to read tutorials on HTML and CSS. Basically what you have there is a table, so learn how to fancy the tables with CSS and you are ready to go. | ||
| ||