ndeniche 402 Posting Virtuoso Featured Poster

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
ndeniche 402 Posting Virtuoso Featured Poster

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

ndeniche 402 Posting Virtuoso Featured Poster

Here, have a little search

ndeniche 402 Posting Virtuoso Featured Poster

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

ndeniche 402 Posting Virtuoso Featured Poster

TextBox1.PasswordChar = "*"

More like = "•", but yeah xD

ndeniche 402 Posting Virtuoso Featured Poster

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

ndeniche 402 Posting Virtuoso Featured Poster

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?

ndeniche 402 Posting Virtuoso Featured Poster

Did you try scrolling to the bottom of the page?

ndeniche 402 Posting Virtuoso Featured Poster

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.

ndeniche 402 Posting Virtuoso Featured Poster

My favorite part is the

x
xx
xxx
xxxx
xxxxx
xxxxxx
xxxxxxx
xxxxxxxx
xxxxxxxxx
xxxxxxxxxx

Thank you OP

ndeniche 402 Posting Virtuoso Featured Poster

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.

ndeniche 402 Posting Virtuoso Featured Poster

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;
}
ndeniche 402 Posting Virtuoso Featured Poster

Uhh... DaniWeb? xD

happygeek commented: that made me smile today, which was no small feat +0
ndeniche 402 Posting Virtuoso Featured Poster
ndeniche 402 Posting Virtuoso Featured Poster

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.

ndeniche 402 Posting Virtuoso Featured Poster

I guess what Chilton is trying to say is that you should compare your do... while loop to MAX_ACCOUNTS, instead of the constant number 10.
So, instead of this

do
{
... 
}while(input != QUIT && counter < 10);

Do this:

do
{
... 
}while(input != QUIT && counter < MAX_ACCOUNTS);

That way you can change the constant value anytime, and you actually use the constant variable you created.

Chilton commented: Yup. +2
Vindal commented: Very Helpful +1
ndeniche 402 Posting Virtuoso Featured Poster

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

ndeniche 402 Posting Virtuoso Featured Poster

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 | 5 | 7 | 1 | 3 | Enter the loop: is 5 < 7 ? Yes
Since it is, it assigns 5 to a temp variable, assign 7 to the position where 5 was originally located and assign 5 to where 7 was originally located.

So, now we have: | 7 | 5 | 1 | 3 | Move forward. Is 5 < 1 ? No
Move forward. Is 1 < 3 ? Yes
Since it is, repeat the same process as before (switch the numbers)

Now, we have | 7 | 5 | 3 | 1 | KEEP ALWAYS IN MIND: 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

ndeniche 402 Posting Virtuoso Featured Poster

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

public GameScreen(String name)
{
...
}

So when you call it from the first panel, you call it this way:

new GameScreen(txtName.Text).show();
HelloMe commented: Straight to the point and without cryptic extra explainations. +2
ndeniche 402 Posting Virtuoso Featured Poster

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:

  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?
  2. The upvoting/downvoting system... I finally see it working the way it should be... Congrats on that

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!!

ndeniche 402 Posting Virtuoso Featured Poster

uh huh... As far as you've posted, you've got nothing in your code... try a little bit harder, take some code snippets as a reference, google some tutorials, and come back when you've got a real CODE issue, ok?

ndeniche 402 Posting Virtuoso Featured Poster

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

ndeniche 402 Posting Virtuoso Featured Poster

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 double function, constituted by nested for 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")

ndeniche 402 Posting Virtuoso Featured Poster

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 Console.OpenStandardInput() . 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:

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

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!!

ndeniche 402 Posting Virtuoso Featured Poster

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

Nick Evan commented: *nods* +15
ndeniche 402 Posting Virtuoso Featured Poster

well... i think it should work by specifying the a:hover as anither class in the #links id... like this:

#links a
{
   code
}

#links a:hover
{
   code
}
Pim commented: Helpful, it worked. +3
ndeniche 402 Posting Virtuoso Featured Poster

shut up josh!!

ndeniche 402 Posting Virtuoso Featured Poster

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
ndeniche 402 Posting Virtuoso Featured Poster

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
ndeniche 402 Posting Virtuoso Featured Poster

2869

ndeniche 402 Posting Virtuoso Featured Poster

yeah... i think living together would be the best way to get prepared for marriage... i'm catholic and i have no inconvenience with living together... (though i'm not what you would call a saint...) i think i'll give it a try...

and you're right... it's best not to involve financial obligations... since if it doesn't work, one of both (most probably the guy) will end up screwed up...

BTW guys... this is my 1000th post!!!

christina>you commented: yay for getting your first star! =] +15
~s.o.s~ commented: Bah, spammers!! ;-) +20
Serunson commented: join the club :P +3
ndeniche 402 Posting Virtuoso Featured Poster

Hey guys!!! this is my last <1000 post... soon to get my first star!!! :P

Rashakil Fol commented: Attention whore!!!!!! -1
Ancient Dragon commented: congrats for your first 1000 posts! +19
joshSCH commented: .. but I like whores ;-) +12
ndeniche 402 Posting Virtuoso Featured Poster

i don't think anyone that qualifies in other might be able to answer that poll...

Sulley's Boo commented: hehe +3
ndeniche 402 Posting Virtuoso Featured Poster

first of all... let me make myself clear... i hate gays... i hate everything that has to do with gays...

in my opinion, gayness is the worst disease there is... because that's what it is, a psychological disease, that makes a man feel attracted by another man...

there's nothing genetic, nor any physiological need, since AFAIK it is not necessary for a man to be physically satisied by another man... what is a physiological need is for a man to be satisfied by a woman, just as it was meant to be... physiological needs are those humans have from their animal being, also called instinct... such as the need to pee, to eat to sleep... or have you ever seen a dog having gay relationships with other dogs? of course not... why? because they don't have a mind to have f***ed up by some weird "need" to have someone of their same sex beside them...

gay people shouldn't be praised... his only causes more people to think this is good...

actually gay sex is the source of many diseases... maybe is a punishment to mankind for allowing this to happen... or at least i feel it that way...

even (as christians may know), God Himself is againsta gay relationships... i can't recall where it is, but it clearly says (in other words, obviously) "gays will not go to Heaven"...

conclusion... gays shouldn't exist... and it is a mistake to think they are a "nature's …

joshSCH commented: haha :D +11
ndeniche 402 Posting Virtuoso Featured Poster

for my wake there will be the best rave there ever was... and there will be lots of rock bands, and my band will be playing many of my songs... and everyone will be drunk and probably many children will come out of that party (if you know what i mean)

Serunson commented: Have Some Meaningless rep :P Great post though +3
ndeniche 402 Posting Virtuoso Featured Poster

Take a look... finally, this is my 666th post... *evil laugh* :D

arjunsasidharan commented: Your the devil!! :D +4
ndeniche 402 Posting Virtuoso Featured Poster

^ is really cute

christina>you commented: aw thanks. :) +21
ndeniche 402 Posting Virtuoso Featured Poster

my favorite:

S*** happens

Sulley's Boo commented: hehe +4
ndeniche 402 Posting Virtuoso Featured Poster

Who likes solving riddles? i love those ones in which when you find the correct answer you just feel soo stupid... lol

why don't we try each other with some?

here you go with the first one:

Imagine you are in a room with 3 switches. In an adjacent room there are 3 bulbs (all are off at the moment), each switch belongs to one bulb. It is impossible to see from one room to another. How can you find out which switch belongs to which bulb, if you may enter the room with the bulbs only once?

Geek 8-) commented: riddles are awesome +3
ndeniche 402 Posting Virtuoso Featured Poster

i love geek jokes... they are those jokes other people wouldn't understand...

lets see this one for example...

A detailed explanation of sex for the computer literate and real life illiterate.

Think of sex as a new protocol developed for real world communication and interaction between members of the opposite sex, much as TCP/IP allows all makes and models of computers to communicate and interface.

In this example, let's represent the woman as a Windows computer. A bit flighty, fun to look at, and occasionally does something useful. In the same way, the man will be represented as a DOS system. Not impressive looking, rough around the edges, but it can get the job done as long as you're patient.
Let's say the DOS system wants to interface with the Windows box. In this case, the two units could be in a crowded bar, represented here as a busy toking ring.

The DOS system attempts to open communication with a simple SMPT style message, in this case, HELLO. The Windows box generates a random number via an unknown internal process, and in some instances, responds with a similar HELLO message.
At other times, the Windows box fails to respond at all, either due to the initial HELLO message being lost in the network traffic, background noise, or due to internal conflicts in the Windows box's memory . In this case, let's assume the initial message was received and responded to.

The next step is a simple …

christina>you commented: :D +20
ndeniche 402 Posting Virtuoso Featured Poster

what are you complaining about?

maravich12 commented: nice defense +2
ndeniche 402 Posting Virtuoso Featured Poster

lol

joshSCH commented: I think someone got cheated.. +16
ndeniche 402 Posting Virtuoso Featured Poster

Hope Aia didn't bet against me, cause she would've lost lots of money...

i beat sk8... (sorry dude) and now looking forward to play jocamps...

whenever you're ready partner...

maravich12 commented: good job on sk8 +2
EnderX commented: Congrats on the win. +3
sk8ndestroy14 commented: yeah yeah yeah +7
ndeniche 402 Posting Virtuoso Featured Poster

got until level 42... dunno how to make it through...

ndeniche 402 Posting Virtuoso Featured Poster

jbennet & me haven't even started our game... sorry, but i was away in a trip... i'm waiting for jbennet's answer to see when we're playing...

joshSCH commented: Happy Independence Day! :) +15
Rashakil Fol commented: RASHAKIL DISAPPROVES OF INDEPENDENCE DAY. -2
Aia commented: Happy Mother's day. Oops!. Too late. The intention is what counts. Right? +6
ndeniche 402 Posting Virtuoso Featured Poster

yup... that happens with 'ch', 'll' and 'ñ'... our alphabet has 29 characters...

Aia commented: Ñichito no es lo mismo que Nichito. ;) +6
ndeniche 402 Posting Virtuoso Featured Poster

To our Honduran friend: my apologies, I've never been able to understand much about Central America (I don't know why not). Did Nicaragua end up communist? And what's the state of Honduras?

ok... actually we're under command of an idiot that thought he could be president just because he could ride horses and feed cows... and the worse part is that people are so stupid (i'm not included... i couldn't vote... fortunately, 'cause all candidates were complete ignorants...) they voted for him... even though there were leser evils... people die because it rains (you might be able to imagine how well our infrastructure is going)...

but it's not all that bad... we beat the hell out of mexico the gold cup... haha

nicaragua did not end communist... but nearly did... things are finally getting set down more peacefully... actually my dad got a job there and he's going pretty well... though they've got a political party that remains with communist ideals and stuff...

and there's no need to apologize... i live in central america and even i don't understand what the heck is going on in here... it's nice though... (sometimes)

jamello commented: nice one my dear. Stay positive +2
ndeniche 402 Posting Virtuoso Featured Poster

you should also take a look to Deitel books about c++, since they have great reputation...

iamthwee commented: Excellent resource! +11
ndeniche 402 Posting Virtuoso Featured Poster

the thing is... if you are in an open place, where air can flow freely, i can't find any inconvenience with smoking (besides the obvious own harm and lung frying)

ndeniche 402 Posting Virtuoso Featured Poster

ok... i certainly know smokers will be with me in this...

i've got reasons to smoke: pay attention...

first, i'm elping to make this planet a better place for my children, or lets say the children of the children of the children of my children, since, the more cigarrettes i smoke, the more the cigar industry grows, and when a market grows, it means more production... and with more prouction, there is more tobacco... and with more tobacco, there is less food for tobacco... so, what will happen when the soil runs out of minerals for tobacco? it will not be possible to keep growing tobacco, and there will be no more cigars in the world... and, some might say, why not just buy the cigars and throw them away? well, that's because i'm not throwing away my money, so if i buy something, i use it...

second: i am preparing myself to extreme conditions... how do athletes prepare their body for competitions? going through heavy sessions of exercises... so... the same way athletes exercise their muscles for extreme situations... i prepare my lungs for extreme siuations... say, someone's house is burning... a non-smoker would not be able to survive all that smoke caused by the fire, but, a smoker, since has been preparing his lungs by providing them doses of smoke IS prepared to receive that smoke from the fire, and enter the house and save, say a child that is trapped, hiding under the dinning …

WolfPack commented: Makes perfect sense to me. +10
Salem commented: Parody is fun +9