ndeniche 402 Posting Virtuoso Featured Poster

The first post gets the point of reading input... from the mouse. I might implement it somewhere else, so thanks anyway. The second post is a little bit more close to what i need... definitely will take a look. I'll post results when i try it

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, i'd rather choose a portable hd... since they come in sizes such as 100 Gb, which is 3 times bigger than dell's flash drive, and, as well, cheaper... so... taking the theory of Infarction, which says, install an OS in 10 Gb, you still have 90 Gb left for whatever you would like...

So... i don't know u guys, but i would prefer buying a 100 Gb portable hd...

ndeniche 402 Posting Virtuoso Featured Poster

Hi guys...

you see, not a long time ago, my computer worked fine... absolutely fine... about a week and a half in, something odd started happening... when i play any flash embedded games online (say... facebook), after a while (when the game gets too loaded) my pc goes berzerk, moving my cursor all over the screen and making beeping error sounds, to finally crash and shut down... any ideas?

ndeniche 402 Posting Virtuoso Featured Poster

Solved... thanks!

ndeniche 402 Posting Virtuoso Featured Poster

I knew i was close when i thought about IDictionaryEnumerator... now... should i use IDictionary or Dictionary

ndeniche 402 Posting Virtuoso Featured Poster

Hi all. Is there any collection object that will let me create a list of items which I could call by name, instead of by number? so instead of soing this:

//Create List
List<ClassType> list = new List<ClassType>();

//Assign values to list
list.add(new ClassType(params, [params, [params]]));

//Call list items
list[0].method();
list[1].method();

i do this:

//Create List
List<ClassType> list = new List<ClassType>();

//Assign values to list
list.add(new ClassType("id", [params, [params]]));

//Call list items
list["id1"].method();
list["id2"].method();

I have a query manager class which has a string for every table, in order to call just the tables i need, so, by calling the List items by id makes the association easier, since i assign an id for the table, as much as for the List item referencing the table.

Thanks

ndeniche 402 Posting Virtuoso Featured Poster
ndeniche 402 Posting Virtuoso Featured Poster

so, after reviewing some notest on SQL connections for c#, here's the final code...

string conStr, cmdStr;
conStr = "--Copy Connection String Here--"
System.Data.OleDB.OleDBConnection con = new System.Data.OleDB.OleDBConnection(conStr);
cmdStr = "Delete YourTable Where ID_Primary_Key = ?"
DataRow row;
int rowcount, registryID;
rowcount = YourDatabaseDataSet.YourTableName.Rows.Count;
for (int i=0;i<rowcount;i++)
{
    row = YourDatabaseDataSet.YourTableName.Rows[i];
    for (int j=0;j<rowcount;j++)
    {
        if(row == YourDatabaseDataSet.YourTableName.Rows[j])
        {
            registryID = Int32.Parse(YourDatabaseDataSet.YourTableName.Rows[j].ItemArray[0].ToString());
            using (System.Data.OleDB.OleDBCommand cmd = new System.Data.OleDB.OleDBCommand(cmdSTR, con))
            {
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.AddWithValue("ID_Primary_Key",registryID);
                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
            }
            rowcount--;
        }
   }
}
ndeniche 402 Posting Virtuoso Featured Poster

so, after reviewing some notest on SQL connections for c#, here's the final code...

string conStr, cmdStr;
conStr = "--Copy Connection String Here--"
System.Data.OleDB.OleDBConnection con = new System.Data.OleDB.OleDBConnection(conStr);
cmdStr = "Delete YourTable Where ID_Primary_Key = ?"
DataRow row;
int rowcount, registryID;
rowcount = YourDatabaseDataSet.YourTableName.Rows.Count;
for (int i=0;i<rowcount;i++)
{
    row = YourDatabaseDataSet.YourTableName.Rows[i];
    for (int j=0;j<rowcount;j++)
    {
        if(row == YourDatabaseDataSet.YourTableName.Rows[j])
        {
            registryID = Int32.Parse(YourDatabaseDataSet.YourTableName.Rows[j].ItemArray[0].ToString());
            using (System.Data.OleDB.OleDBCommand cmd = new System.Data.OleDB.OleDBCommand(cmdSTR, con))
            {
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.AddWithValue("ID_Primary_Key",registryID);
                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
            }
            rowcount--;
        }
    }
}
ndeniche 402 Posting Virtuoso Featured Poster

my bad... it's your DataSet... so it represents the DataSet created by c# when you add a datasource

ndeniche 402 Posting Virtuoso Featured Poster

that is because detailsAdapter is not a DataTable, its a TableAdapter. What you should do is, instead of reading a DataTableAdapter, reading a DataRow and run a nested for loop within another for loop, gather the information from the outer's for loop index row and compare it to the rest of the table. That way you remove the duplicates in the table, and you can update the database using a sql query. What database areyou using?

the nested for loops would go something like this:

DataRow row;
DataTable table;
int rowcount;
table = yourDataBinding.yourTable;
rowcount = yourDataBinding.yourTable.Rows.Count;
for (int i=0;i<rowcount;i++)
{
    row = yourDataBinding.yourTable.Row[i];
    for (int j=0;j<rowcount;j++)
    {
        if(row == yourDataBinding.yourTable.Row[j])
        {
            table.RemoveAt(j);
            rowcount--;
        }
    }
}
ndeniche 402 Posting Virtuoso Featured Poster

this is no place for us to do your homework... why don't you check your notes and come back later?

ndeniche 402 Posting Virtuoso Featured Poster
char ch;
string str1,str2;
int num;
num = str1.IndexOf(ch);
str2 = cadena.Substring(num);
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

sounds like you could use some ajax or javascript, since html is much of a static code: once it's loaded, you can't change it.

What you want to do is dynamically change the content of a Javascript string variable contained in the paragraph in question, so when the user clicks on an image, javascript assigns that variable the string desired (in this case, your paragraph).

ndeniche 402 Posting Virtuoso Featured Poster

if you want your whole background to be black, why don't you style the body instead?

<style type="text/css">

body
{
    background-color: #000;
}

</style>
ndeniche 402 Posting Virtuoso Featured Poster

Yes it is.

Anything else?

ndeniche 402 Posting Virtuoso Featured Poster

why don't you try MySQL?

ndeniche 402 Posting Virtuoso Featured Poster

can Swing run on web applets though?

ndeniche 402 Posting Virtuoso Featured Poster

What are the differences between both and which one should i consider for the different kinds of java-based apps?

ndeniche 402 Posting Virtuoso Featured Poster

you should make your det_max function an int instead of a void fucntion, returning the max value and assigning it to the max variable in yourmain function... like this:

int det_max(int yards, int max)
{
   if(yards>=max)
      return max;
   else
     return yards;
}
...
int main()
{
...
max=det_max(yards,max);
...
}
ndeniche 402 Posting Virtuoso Featured Poster

the code you have there asks for the name, week and yardage twice: once in the main function and a second time in the showRByards before showing the stars... maybe you should try removing it from the main function.

ndeniche 402 Posting Virtuoso Featured Poster

great, thanks!!

ndeniche 402 Posting Virtuoso Featured Poster

Hello...

is there any way of making java listen or capture an F-key input? i mean, like, if the user presses F5, a new panel will come up and that sorts of things...

thnx

ndeniche 402 Posting Virtuoso Featured Poster

k... so, here's the thing...

I'm creating a User's Interface to insert some data into a database, and there are some fields that have foreign keys to other tables, which i have listed in a <SELECT> form, so the user would just select the vlue from a list instead of inserting a new one, which might cause some trouble with the db's integrity... when i want to insert the value to the table, i must do a subquery to obtain the value that goes into the table... that's where i have the problem... mysql just returns an error telling me i have an error in my MySQL syntax...
here's the code for 'insertar.php':

<?php
if($_POST['submit_region']){
   if(mysql_query("
      INSERT INTO Region (Nombre, Cod_Pais)
      VALUES ('$_POST[nombre_region]', (SELECT Cod_Pais FROM Pais WHERE Nombre=$_POST[opcion_pais]))", $cos_s)){
      echo "Fila insertada en la tabla 'Region' existosamente<br />";
   }else{
      die("Error al insertar registro en tabla 'Region'<br />" . mysql_error());
   }
}
?>

and this is the code for 'insertar_datos.html':

<form action="insertar.php" method="post">
   Nombre de la Region: <input type="text" name="nombre_region" /><br />
   Pais de la Region: <select name="opcion_pais">
      <option>--Seleccionar Pais--</option>
      <?php 
         $resultado_pais = mysql_query(" SELECT * FROM Pais ORDER BY Nombre");
         while($row = mysql_fetch_array($resultado_pais, MYSQL_ASSOC)){
            echo "<option value=\"" . $row[Cod_Pais] . "\">" . $row[Nombre] . "</option>";
         }
      ?>
   </select><br />
   <input type="submit" name="submit_region" value="Insertar Region">
</form>

this is the output: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/www/lapuglia.awardspace.com/insertar.php on line 21

ndeniche 402 Posting Virtuoso Featured Poster

Hi silverside,

ever occurred to you we're not here to do your homework for you??

ndeniche 402 Posting Virtuoso Featured Poster

actually i don't know what happened... honest... the only thing i changed before reloading was changing the defaul font to arial... but, after noticing it was fixed, i changed it back again, and, voila!

ndeniche 402 Posting Virtuoso Featured Poster

dunno what happened, but it's fixed now... :D

ndeniche 402 Posting Virtuoso Featured Poster

they're not actually unmuted... but it won't let me raise their volume

ndeniche 402 Posting Virtuoso Featured Poster

all of them are unmuted except for Mic Boost , Optical Raw , Audigy Analog Output Jack , and External Amplifier

ndeniche 402 Posting Virtuoso Featured Poster

why not copying the documentation into a txt file?

ndeniche 402 Posting Virtuoso Featured Poster

it's no good using WYSIWYG html editors, because they turn your site into something less functional than what it should be...

though, if you want you can check out trial versions for coffee cup, or dreamweaver... i suggest trial versions since, as it is obvious, you don't need it for professional html editing, but just to come out of the rush... if you were truly interested in designing a site, you should get your hands in a html and css tutorial...

ndeniche 402 Posting Virtuoso Featured Poster

well, installing truetype fonts didn't fix the issue...

ndeniche 402 Posting Virtuoso Featured Poster

that's the lspci output...

the following is the lsmod output:

Module                  Size  Used by
nls_cp437               6784  1 
isofs                  36412  1 
udf                    87204  0 
af_packet              24840  2 
fglrx                 656352  15 
ipv6                  273892  12 
rfcomm                 42136  2 
l2cap                  26240  11 rfcomm
bluetooth              57060  4 rfcomm,l2cap
ppdev                  10244  0 
speedstep_lib           6404  0 
cpufreq_stats           7232  0 
cpufreq_powersave       2688  0 
cpufreq_userspace       5280  0 
cpufreq_ondemand        9612  0 
freq_table              5792  2 cpufreq_stats,cpufreq_ondemand
cpufreq_conservative     8072  0 
sbs                    19592  0 
dock                   10656  0 
container               5504  0 
button                  8976  0 
video                  18060  0 
ac                      6148  0 
battery                11012  0 
sbp2                   24072  0 
lp                     12580  0 
sg                     36764  0 
snd_via82xx            29848  0 
snd_mpu401_uart         9984  1 snd_via82xx
sr_mod                 17828  1 
snd_seq_dummy           4996  0 
snd_seq_oss            35712  0 
snd_emu10k1_synth       8448  0 
snd_emux_synth         36736  1 snd_emu10k1_synth
snd_seq_virmidi         8448  1 snd_emux_synth
snd_seq_midi_emul       7936  1 snd_emux_synth
snd_emu10k1           139296  2 snd_emu10k1_synth
snd_seq_midi            9728  0 
snd_seq_midi_event      8576  3 snd_seq_oss,snd_seq_virmidi,snd_seq_midi
snd_rawmidi            26112  4 snd_mpu401_uart,snd_seq_virmidi,snd_emu10k1,snd_seq_midi
snd_ac97_codec        101284  2 snd_via82xx,snd_emu10k1
parport_pc             37412  1 
parport                37448  3 ppdev,lp,parport_pc
ac97_bus                3456  1 snd_ac97_codec
snd_pcm_oss            44800  0 
snd_mixer_oss          18048  1 snd_pcm_oss
snd_pcm                81156  4 snd_via82xx,snd_emu10k1,snd_ac97_codec,snd_pcm_oss
snd_page_alloc         11272  3 snd_via82xx,snd_emu10k1,snd_pcm
snd_util_mem            6016  2 snd_emux_synth,snd_emu10k1
serio_raw               8068  0 
snd_hwdep              10628  2 snd_emux_synth,snd_emu10k1
pcspkr                  4224  0 
snd_seq                54640  9 snd_seq_dummy,snd_seq_oss,snd_emux_synth,snd_seq_virmidi,snd_seq_midi_emul,snd_seq_midi,snd_seq_midi_event
snd_timer              24580  3 snd_emu10k1,snd_pcm,snd_seq
snd_seq_device          9740  8 snd_seq_dummy,snd_seq_oss,snd_emu10k1_synth,snd_emux_synth,snd_emu10k1,snd_seq_midi,snd_rawmidi,snd_seq
i2c_viapro             10004  0 
i2c_core               26112  1 i2c_viapro
psmouse                39952  0 
snd                    56708  18 snd_via82xx,snd_mpu401_uart,snd_seq_dummy,snd_seq_oss,snd_emux_synth,snd_seq_virmidi,snd_emu10k1,snd_rawmidi,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_hwdep,snd_seq,snd_timer,snd_seq_device
emu10k1_gp              4736  0 
gameport               16776  3 snd_via82xx,emu10k1_gp
soundcore               8800  1 snd
shpchp                 34580  0 
pci_hotplug            32704  1 shpchp
via_agp                11264  1 
agpgart                35016  2 fglrx,via_agp
evdev                  11136  4 
ext3                  133896  1 
jbd                    60456  1 ext3 …
ndeniche 402 Posting Virtuoso Featured Poster

i think i'll better mount it on windows...

i tried mounting iton a virtual machine, but it didn't work...

ndeniche 402 Posting Virtuoso Featured Poster
00:00.0 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro Host Bridge
00:00.1 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro Host Bridge
00:00.2 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro Host Bridge
00:00.3 Host bridge: VIA Technologies, Inc. PT890 Host Bridge
00:00.4 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro Host Bridge
00:00.7 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro Host Bridge
00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge
00:09.0 Multimedia audio controller: Creative Labs SB Audigy (rev 03)
00:09.1 Input device controller: Creative Labs SB Audigy Game Port (rev 03)
00:09.2 FireWire (IEEE 1394): Creative Labs SB Audigy FireWire Port
00:0f.0 IDE interface: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)
00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800/K8T890 South]
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)
01:00.0 VGA compatible controller: ATI Technologies Inc RV350 AS [Radeon 9550]
01:00.1 Display controller: ATI Technologies Inc RV350 AS [Radeon 9550] (Secondary)
ndeniche 402 Posting Virtuoso Featured Poster

will this mess up my HDD?

ndeniche 402 Posting Virtuoso Featured Poster

how specific do you need it? with hexadecimals and everything?

ndeniche 402 Posting Virtuoso Featured Poster

As i said on my other post, i recently installed Ubuntu 7.10 in my desktop computer... i have two HDD's, a master and a slave... before formatting my pc to install ubuntu, i moved some information from my master to my slave. But, when i tried to access my second HDD, it sends the message in the picture. It is fully recognized, and it even show's me the hardware details... but it won't let me access it, and i have very important information there... i was thinking extracting the information in a friend's computer, but it would be better if i fix the problem in my computer...

ndeniche 402 Posting Virtuoso Featured Poster

I recently changed my Desktop PC from Windows XP to Ubuntu 7.10 (yay for me!), but, i had several issues... one of them (the less urgent) is that my Creative Audigy SoundBlaster 0090 doesn't show any signs of life... though, the interesting part is that it is fully installed and fully recognized by ubuntu... i've tried installing every related package, including the ALSA related, but nothing works... so any help would be appreciated...

ndeniche 402 Posting Virtuoso Featured Poster

k... i'm on it

ndeniche 402 Posting Virtuoso Featured Poster

well, i'll try changing my browser's settings to other apart from the default ones, but i don't think it'll change anything. What about the gray boxes' rounded corners? They shouldn't be affected by the font's size...

@ Midimagic I haven't changed anything in my computer from its default settings... nor played any fullscreen games (actually i've played only the ones packed with ubuntu) so... i don't know...

ndeniche 402 Posting Virtuoso Featured Poster

yeah... that's not the problem... i tried Ctrl + 0 and no change... i even zoomed in and out, and same response...

ndeniche 402 Posting Virtuoso Featured Poster

here's a better look at the thingies...

ndeniche 402 Posting Virtuoso Featured Poster

not so long ago, i changed my desktop from Windows to Ubuntu... this is actually the first time i log in to DaniWeb since then, and then... it happened... i'm running mozilla, and it's rendering the gray boxes around some items in a very odd way... take a look at the screenshot.

Also, the LOGOUT button from the user's navigation menu, in the upper side of the page is in a new line, not with the rest of the buttons... probably these two rendering errors are caused by my desktop's resolution, but, either way, it shouldn't do that, right?

ndeniche 402 Posting Virtuoso Featured Poster

a syrup container in use? the top left part is the base, and the tip, is... the tip

ndeniche 402 Posting Virtuoso Featured Poster

a microwave?

ndeniche 402 Posting Virtuoso Featured Poster

found out where my problem was (besides that one)... thank you...

ndeniche 402 Posting Virtuoso Featured Poster

let me see... so, what you want to do is the list to appear directly below the tabs, or a hover menu to appear when you hover the tabs?