For starters, the structure in your json object seems odd. Let me re-format it, so that we can give it a closer look:

[{
    dateTime: "2018-12-04T10:30:45:222z"
    comments:""
    drivers: [
        {
            fname: 'John',
            lname: 'Doe',
            driverCode: 'DOEJ'
        },
        {
            fname: 'Mary',
            lname: 'Smith',
            driverCode: 'SMIMA'
        }
    ]
},]

That's better.

Now, the for sintax is invalid in both cases. The for syntax allows for three semi-colon separated rules, whereas you have four. You separated the declaration and initialization of the index variables. The correct syntax is for (var i = 0; i < json.length; i++).

Additionally, you can iterate the array using a for..in. So instead of for(var i = 0; i < json.length; i++) you can iterate the array like so:

for(var i in jsonArray){
    var objectInstance = jsonArray[i];
    for(var j in objectInstance.drivers) {
        var driver = objectInstance.drivers[j];
        ...
    }
}

Also, by instancing a variable with the specific index of the json object you're calling (var driver = objectInstance.drivers[j] in this example), you save yourself from bidimensional array hell, avoiding using i and j as much as possible.

Hope this helps!

jkon commented: great answer and +1 for specifying the reason for editing this ( I never do it but I should ) +9

There's a way to prevent automatic photo uploads by Dropbox, right there in the settings.

Here, have a little search

There must be some way in which we can improve the endorsement system. I recall the reputation system being flawed a long time ago.

TextBox1.PasswordChar = "*"

More like = "•", but yeah xD

You could extend the submenu width to make it fit... Oooor, you could wrap the text in the submenu item so it won't overflow from the box by assigning a width to the <li> element

I just recently discovered OpenBadges, which help recognize and verivy learning and skills, so that go me thinking...

What if Daniweb gave out badges to posters based on their expertise on the topics here discussed?

Did you try scrolling to the bottom of the page?

Hey guys. I would like to know, which js library do you prefer when designing websites that implement the parallax effect and why. Which one suits you better and why?

I'm new to this effect (it took me quite i while, I know), and I'd like to know your oppinions on the libraries available.

I, for one, have found parrallax-js very useful and easy to implement.

My favorite part is the

x
xx
xxx
xxxx
xxxxx
xxxxxx
xxxxxxx
xxxxxxxx
xxxxxxxxx
xxxxxxxxxx

Thank you OP

I have just come back as well, and I did too make some friends here. Some of them are now banned, some of them passed away (actually, one each), and some I still smile when I see their screen name.

Thanks everybody for these awesome years. Thanks to everyone that replied to my posts, either to make a joke, or to scold me for my comments, but most of all thanks everybody for making this such a nice place.

And thanks to our queen, the cscgal for building this treehouse where we can all be our geekest selves.

Well, your tag names are all wrong. Try this:

HTML

<div id="wrapper">
    <div class="logo"><img src="meshomagic_logo.jpg" width="559" height="280" alt="meshomagic logo"></div>
    <div class="bgShape"><img src="images/logo_bg.png" width="1000" height="114"></div>
</div>

CSS

#wrapper .bgShape {
position: absolute;
left: 0px;
top: 0px;

}
#wrapper .logo {
background-color: #000;
position: relative;
top: 0px;
z-index: 2;
}

Uhh... DaniWeb? xD

happygeek commented: that made me smile today, which was no small feat +0

you can do this perfectly in php, though you'd have to create an array for the different weeky values. Better do this with a sql query, using sum(column) and a group by clause.

I guess what Chilton is trying to say is that you should compare your [icode]do... while[/icode] loop to MAX_ACCOUNTS, instead of the constant number 10.
So, instead of this
[code=C++]
do
{
...
}while(input != QUIT && counter < 10);
[/code]
Do this:
[code=C++]
do
{
...
}while(input != QUIT && counter < MAX_ACCOUNTS);
[/code]
That way you can change the constant value anytime, and you [b]actually use[/b] the constant variable you created.

Chilton commented: Yup. +2
Vindal commented: Very Helpful +1

Since you are counting into [icode]counter[/icode]each time an account gets data entered, you can use it as the sentinel for your print loop

what the program does is, instead of overriding, replace the numbers to order them from largest to smallest... Let me explain:

Suppose the original input is [icode]| 5 | 7 | 1 | 3 |[/icode]

Enter the loop: is [icode]5 < 7[/icode]? Yes
Since it is, it assigns [icode]5[/icode] to a [icode]temp[/icode] variable, assign 7 to the position where 5 was originally located and assign 5 to where 7 was originally located.

So, now we have: [icode]| 7 | 5 | 1 | 3 |[/icode]

Move forward. Is [icode]5 < 1[/icode]? No
Move forward. Is [icode]1 < 3[/icode]? Yes
Since it is, repeat the same process as before (switch the numbers)

Now, we have [icode]| 7 | 5 | 3 | 1 |[/icode]

KEEP ALWAYS IN MIND: [b]To better understand an excercise, do a desktop test, by running the process with paper and pencil, so you can visually track the program's data flow[/b]

You can pass it through the constructor of the second panel's class constructor, like this:

[code=java]
public GameScreen(String name)
{
...
}
[/code]

So when you call it from the first panel, you call it this way:
[code=java]
new GameScreen(txtName.Text).show();
[/code]

HelloMe commented: Straight to the point and without cryptic extra explainations. +2

Hello guys... First of all, I'd like to excuse myself for being away for so long (for those who know me from a while ago), but I've been up to soooo many many things lately, that it's been hard to keep up... but lemme say: "I'm baaaack"

Second, as I've not been around for a while, I couldn't help to notice several changes that have been made around here... For instance:

[LIST=1]
[]The new design: TOTALLY LOVING IT!! Who's idea was it and who made it? Love the bar at the bottom, the new logo, the colors, everything is pretty awesome...
The only thing I don't agree with is the location of the "Start New thread" button... Why was it relocated to the bottom?
[
]The upvoting/downvoting system... I finally see it working the way it should be... Congrats on that[/LIST]

There's been a lot going on, and I agree with a lot of the changes that were made... Like the implementation of a Mobile Development forum, love the tag clouds (and the tag clouds per user)... Hope we keep on changing for good!!

uh huh... As far as you've posted, you've got nothing in your code... try a little bit harder, take some [URL="http://www.daniweb.com/code/forum8.html"]code snippets[/URL] as a reference, [URL="http://www.google.com"]google[/URL] some tutorials, and come back when you've got a real [b]CODE[/b] issue, ok?

in line 19, you have a semicolon. That should do it

what anout a function that will break up both strings (the one from the input and the one from the access db) into string arrays and compare them in a [icode]double[/icode] function, constituted by nested [icode]for[/icode] that will go through both arrays, counting the amount of matching words, loops that will return the results from the comparison... something like this:

String 1: "I would love to do that"
String 2: "I love to do that"

Array 1:
| "I" | "would" | "love" | "to "| "do" | "that" |

Array 2:
| "I" | "love" | "to" | "do" | "that" |

Total words in array 1: 6
Amount of matching words: 5

Percetnage of matching words= 5/6 * 100 = 83.33%

83.33 > 60 ? True

printf("true")

Ok. So.

I'm trying to develop an application to capture the input buffer to identify a device's input commands to build a user control that uses this commands for further use.

I'm actually developing a project that simulates Guitar Hero, and I want it to recognise the Guitar Hero Controller's input.

I know there are already several controls that work with the guitar hero controller. The thing is i MUST develop this control myself.

What i've done so far only recognises input from the keyboard using [icode]Console.OpenStandardInput()[/icode]. The thing is, as the class name says, it reads input from the Console... not from all sources possible, such as mouse, and other peripherals (joystick, and as i need it, Guitar Hero Controller)

Here's my code:

[code=vb]
Sub Main()
Dim Data As System.IO.Stream
Dim buff(32) As Byte
Dim buffOut() As Byte
Data = Console.OpenStandardInput()

    'Dim DataBuff As System.IO.BufferedStream
    'DataBuff = System.IO.BufferedStream.Synchronized(Data)
    Using memoryStream As New System.IO.MemoryStream
        Dim count As Integer
        Do
            count = Data.Read(buff, 0, buff.Length)
            MsgBox(buff.GetValue(0))
            memoryStream.Write(buff, 0, count)
        Loop While count <> 0
        buffOut = memoryStream.ToArray()
        Debug.Print(buffOut.ToString())
    End Using
End Sub

[/code]

I guess (since i don't really know) all i need is guidance towards the right input buffer to use for this purpose, since the Console Input Buffer is not working for me.

Thanks in advance!!

actually, computers are neither men nor women... they're machines, so... where am i supposed to place my vote?

Nick Evan commented: *nods* +15

well... i think it should work by specifying the a:hover as anither class in the [inlinecode]#links[/inlinecode] id... like this:[code=css]

links a

{
code
}

links a:hover

{
code
}[/code]

Pim commented: Helpful, it worked. +3

shut up josh!!

um... josh... your opinion isn't even as valuable as the opinion of a member 2 minutes old...

you're soo overrated...

joshSCH commented: I'll f***ing kill you!! just kidin ;-) +12

have you ever tried on creating a dropdown menu inside the dropdown menu?

for example, the web development menu has a dropdown menu in which web design is a category which has three subcategories... have you tried displaying these three subcategories in an extra dropdown?

Ancient Dragon commented: excellent suggestion +23

2869