Slade 66 Practically a Master Poster

Hi Salem,

Thanks for your reply. The problem is that it kind of has to be native to windows since these are scripts that will be run on other peoples machines who may not have cygwin. I'll keep digging around and see if I can figure this one out. Will keep you all posted.

Actually on this note (but on a tanget to the topic), I have another script which I use to generate C# code documentation using doxygen. If someone doesn't have doxygen clearly this script will not work. I figure one potential way around it though might be to package the doxygen exe with the scripts (I guess this would work for the tee suggestion as well) - but I'm not sure licensing would really permit that. I haven't looked into it myself in depth yet, but would anybody know off hand if the GNU General Public License allows for this?

Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.

To me that sounds like a yes, but I could be mistaken.

Cheers,

Anthony

Slade 66 Practically a Master Poster

Hi guys,

Basically what I want to do is run a series of commands in my batch file, and display stdout to screen as well as saving it in a file. So to set the context..

::To output to helloworld.txt
Echo hello world! > helloworld.txt

::To output to console
Echo hello world! > CON

What I’d like to do is have the output of a single command directed to both. As a workaround I’ve got something which will output to a file, and then copy the contents of the file to console.

::Output to file then copy file contents to console
echo Hello World! >test.txt
copy test.txt con > nul

This isn’t ideal since I’d like for the user to see the activity in the console as the batch file is executing commands, rather than in a big batch at the end.

Cheers,

Anthony

Slade 66 Practically a Master Poster

Just FYI, I was forced to format recently and even though a previous format didn't work it seemed to resolve the issue this time. I'm not 100% sure how but perhaps it was the Vista service pack.

Slade 66 Practically a Master Poster

Hi all,

This relates back to the thread I posted where my mouse and keyboard stopped working:

http://www.daniweb.com/forums/thread111869.html

I figured it deserved a new post since I found out the root of the problem... and a work around.

Since connecting my PS2 controller, the problems got worse. Everything works FINE without the 360 receiver plugged in, however with the PS2 AND the 360 gamepads plugged in I can only use the basic keys on my keyboard as input to my computer (no tablet, mouse, programmable keys, etc. - the gamepads themselves even work).

I tried checking the IRQ for each of these, but they are listed under a USB controller device so I'm not sure they get one.

I noticed if I disabled my wireless 360 gamepad receiver and restarted that everything would work fine again (even with it plugged in, it just has to be disabled in windows). Once windows had started up I could re-enable it and everything will still work fine, so I've devised a work around listed in steps below:

  1. Download Devcon
  2. Write the following scripts to enable and disable the xbox 360 gamepad input receiver:

    Disable.bat:

    @ECHO OFF
    ECHO.
    ECHO Disabling 360 gamepad receiver...
    ECHO.
    devcon disable "USB\VID_045E&PID_0719&REV_0100" '<-Replace with YOUR hardware id

    Enable.bat:

    @ECHO OFF
    ECHO.
    ECHO Disabling 360 gamepad receiver...
    ECHO.
    devcon disable "USB\VID_045E&PID_0719&REV_0100" '<-Replace with YOUR hardware id
  3. Now I put these scripts in startup and shutdown events. This is detailed here
Slade 66 Practically a Master Poster

Notified microsoft of the issue. Will inform if anything eventuates.

Slade 66 Practically a Master Poster

After a great deal of screwing around I've managed to come up with a solution. This was after flashing my BIOS, updating the firmware on my mouse, uninstalling and re-installing my mouse and keyboard drivers completely, and a host of other things.

The problem ended up being, not the wacom, but my xbox 360 wireless gamepad input receiver. Yep... obscure I know. I figured this out by unplugging ALL my devices bar the mouse and keyboard, booting, it worked, and slowly plugged the devices in one at a time. To my surprise the wacom worked fine with the mouse and keyboard. Then I plugged in the receiver and I had the same issues as before! No matter what I tried then I was able to simulate the problem 100% of the time so long as the x360 receiver was plugged in.

I have the latest drivers for it installed for vista. My only guess is that vista can only handle so many USB Human Interface Devices, or installation of the wacom forced a conflict with these devices somehow. I dunno.

At any rate, if anybody knows how I can stop it from loading the drivers for this device until login that'd be great. I have a feeling its got something to do with the order vista is loading the drivers up or something that's causing the problem.

Being a games programmer (and a gamer) I find not being able to have my 360 gamepad receiver not …

Slade 66 Practically a Master Poster

In case anyone was wondering, I've just hacked together a solution for now... but it'd be nice if somebody came up with something cleaner... :P

System::String^ HtmlStyle::GetStyleString(System::Web::UI::HtmlTextWriterStyle style)
{
  String^ str = style.ToString();  

  // Skip the first char
  for(int i = 1; i < str->Length; i++)
  {
    if(System::Char::IsUpper(str[i]))
    {
      str = str->Insert(i, "-");
      i++;
    }
  }
  return str->ToLower();
}

This solution assumes that for every upper case letter in a style (the string versions are always something like FontSize) bar the first, will have a dash before them in the syntactically correct Html.

Slade 66 Practically a Master Poster

Hi Guys,

I'm writing a program for work which uses the HtmlTextWriter to output html files (it's a reporting system). In each file I want to render a style tag at the beginning and to do this I'm using the HtmlTextWriterStyle enumeration.

This means I need to convert any value belonging to this enumeration into its equivalent html formatted string. Ideally, I'd like to make use of the GetStyleName function in HtmlTextWriter, but that's a private function :(.

Note: The enumerations ToString function doesn't convert the styles to syntactically correct Html.

Cheers,

Anthony

Slade 66 Practically a Master Poster

Hi everyone,

I posted about this on the wacom europe forums but I haven't got a response as yet and I'm kind of in a rush to fix this issue (I have some work due this coming weeked :S).

In the last few days I've upgraded to Vista Ultimate (32-bit) from Windows XP Pro (32-bit). I use a Razer Copperhead mouse along with a Logitech G12 Keyboard. The tablet I use is the Bamboo Fun Medium.

The problem I'm having is that as soon as I plug my wacom into my computer, Vista installs some drivers. On reboot, my mouse no longer works at ALL and I the programmable keys on my keyboard don't work either.

At this point I just go back to a restore point I made before plugging the wacom in.

I've tried first installing Wacom's Latest Driver for Bamboo Fun Medium (version 505-7). I restart, everything is fine. Then I plug the wacom in - Vista installs its own drivers (which, I'm pretty sure may be needed anyway) and upon reboot I get the exact same issue.

After I've plugged the tablet in and before I've reboot, the tablet works fine and gets along well with the mouse and keyboard. It's only on restart after plugging the wacom in that this problem occurs.

If anyone knows how to fix this it would be HUGELY appreciated since I love my wacom and it would be a pity to live without …

Slade 66 Practically a Master Poster

I have a friend here who has xbox live. I tend to boycott consoles myself.

Slade 66 Practically a Master Poster

Hello all, it's been a while.

I have a problem with a print stylesheet I'm using at the moment. When I go to print preview, everything is how I want it to look except at the bottom of each page, words just cut in half and continue on the next page. To understand what I mean, the stylesheet is here. and an example page using the print stylesheet is here.

Thanks in advance guys.

Slade.

Slade 66 Practically a Master Poster

*cough* mikeandike

Slade 66 Practically a Master Poster

Ok whoever it was I'm not really happy about the negative rep you gave me for mentioning what you did was Illegal.

Slade 66 Practically a Master Poster

hahahhahaa

thats illegal ;)

mikeandike22 commented: stfu slade i dont wanna get kicked +0
Slade 66 Practically a Master Poster

grrrrrr.....i have have this javascript thing that disables right-clicking, that way people cant take stuff from my site....but, i guess it doesnt work in mozilla. :mad: ill tell u if i made it in photoshop or fireworks but first i want to no y u want 2 no. about the .tk thing.....have u spent alot of time trying to figure out how to do it? and do u have a website cause if u dont u dont need to no how to do it. if u do have a site what is it???

You can stop most copyright this way, but even in IE you can still get the images by saving the whole web page and then going into the folder with the files associated to the web-page. ;)

Slade 66 Practically a Master Poster

graphic cards on xbox's are usually like a geforce 4 or 5200 so there not that good. And for most games that use really complicated controls or use a lot of camera views theni use a controller but since i am an avid cs player i just config most games to my cs controls plus i have a 5 button mouse with a mwheel (shoot, meele, reload, throw grenade, zoom, mwheel up change gun, mwheel down change grednade.) so you see with all that stuff on the mouse i am free to use the controls on my keyboard with out switching hands.

And there is also the fact that you can buy controls for pc or even mod an xbox control to go into a usb port.

Slade 66 Practically a Master Poster

Hehe I love morrowind, but I've made myself promise to finish my website before I play it any more :)

Slade 66 Practically a Master Poster

I only like ragnarok online for online gaming. I don't like CS because it's outdated (you might define this as descrimination) and because there are alot of better games on the market. I don't like HALO due to the game engine, it's very poor (in my eyes). I run Doom 3 at the same settings I run halo and it's so smooth while halo is like watching a slide show, and I think we know which of the two has the better graphics ;).

Slade 66 Practically a Master Poster

is morrowind three the elder scrolls?

Slade 66 Practically a Master Poster

You pirate you. I hate both cs and halo. :)

Slade 66 Practically a Master Poster

Hey all, I have a table with a primary key in it. I use stored procedures to insert new records. What I want to know is how do I make it so a column (foreign key) in another table adds the same number as the primary key in the original table when a new record is inserted? Thanks.

Using T-SQL

Slade.

Slade 66 Practically a Master Poster

I agree incissor... something about those older games just makes them more fun to play. Hmm I'm not sure I can specify a favourite, loved metal slug hehe, liked all the snes Zelda. I just like the older platform rpg's.

Slade 66 Practically a Master Poster

Ok guys, check this out

select app_given, app_surname, contract.contractID
from contract, progression
where pay_nop like 'PAY'
and
contract.status like 'Active'
and
app_type like 'Apprenticeship'
and
Contract.ContractID = progression.contractid
group by contract.contractid, app_given, app_surname

Ok, this works FINE. But, when I try to add Not..:

Not Contract.ContractID = progression.contractid

It just brings up all of the contract ID's, including the one's in the progression table. What I want it to do is bring up the contract Ids that ARENT in the progression table.

Thanks in advance for your help,

Slade

Slade 66 Practically a Master Poster

oh... I got it working but I must've forgot to hit the submit button when I typed it last night eheh.... I'll do it when I get home.

Slade 66 Practically a Master Poster

Hey guys :)

Well i've written some code to upload it :D but now I have to get some to download it and display it ehehe...

Ok stored procedure:

CREATE procedure sf_GetProfileImage
 @UserID nvarchar(20) 
  
AS
SELECT Avatar, Av_type
FROM sf_Members
WHERE UserID = @UserID
GO

and now the vb code...

Private Sub UpdateProfile(ByVal UserID As String)

Dim imgstream As Stream = Pic.PostedFile.InputStream

Dim imgdata(Pic.PostedFile.ContentLength) As Byte

imgstream.Read(imgdata, 0, Pic.PostedFile.ContentLength)



Dim myConnection As New SqlConnection(ConfigurationSettings.AppSettings("strSqlConnectionString"))

Dim myCommand = New SqlCommand("sf_GetProfileImage", myConnection)

myCommand.CommandType = CommandType.StoredProcedure

Dim paramUserID As SqlParameter = myCommand2.Parameters.Add("@UserID", SqlDbType.NVarChar, 20)

paramUserID.Value = UserID

Dim myReader As SqlDataReader

myConnection.Open()

myReader = myCommand.ExecuteReader
 
Dim paramAvatar As SqlParameter = myCommand.Parameters.Add("@Avatar", SqlDbType.Image)
 
paramAv_type.Value = Pic.PostedFile.ContentType
Dim paramAv_type As SqlParameter = myCommand.Parameters.Add("@Av_type", SqlDbType.NVarChar, 100)

paramAvatar.Value = imgdata

myReader.Close()
myconnection.close
myconnection.dispose
mycommand.dispose
 
End Sub

And the html input button in the aspx page is:

< INPUT id="Pic" type="file" name="Pic" runat="server" >

and then of course you have to declare it in the server side code :|

Protected WithEvents Pic As System.Web.UI.HtmlControls.HtmlInputFile

PHEW! Finally done, now I need to know how the heck I can display these images on the page. Anyone got any ideas?

Slade 66 Practically a Master Poster

I hate anime it is boring. I mean i know some of it has cool action scenes and all but geesh could you make cartoons get any creepier. And the people I know who like anime are just creepy, stupid, asian kids who no one really likes(not because their asian).

How many enemies can a guy make in one post? lol just kidding. But seriously, I don't recall being creepy stupid or an asian kid.

Slade 66 Practically a Master Poster

<- as you can see naruto rules

Slade 66 Practically a Master Poster

Hmm I think I found my mistake, but I can't test it as of yet... will let you know how I go when I get home :)

Slade 66 Practically a Master Poster

For this error it was this line

imgdatastream = Pic.PostedFile.InputStream

Cheers Tekmaven,

Slade

Slade 66 Practically a Master Poster

Hey guys next question :(. Now I have having troubles with the IMAGE data type, can anyone provide examples on how to retrieve and update the image? I have tried the following:

Dim imgdatastream As FileStream

Dim imgdatalen As Integer

Dim imgtype As String

Dim n As Integer

imgdatastream = Pic.PostedFile.InputStream

imgdatalen = Pic.PostedFile.ContentLength

imgtype = Pic.PostedFile.ContentType

Dim imgdata() As Byte = New [Byte](imgdatalen) {}

n = imgdatastream.Read(imgdata, 0, imgdatalen)
 
Dim paramAvatar As SqlParameter = myCommand.Parameters.Add("@Avatar", SqlDbType.Image)

paramAvatar.Value = n

But I recieved the lovely error "
Specified cast is not valid. "


help? :(

Slade 66 Practically a Master Poster

IO -> iou :mad:

Slade 66 Practically a Master Poster

Ok, I've heard so many times that a macintosh platform is better for graphics, video editing, etc.

Aside from programs that come with the mac os, I see no evidence that the mac is truly better for multimedia. Somebody PLEASE prove that the MAC os is better for multimedia than the average PC. What makes it better?

Cheers,

Slade

Slade 66 Practically a Master Poster

I don't know if I'd put the stipulation on a Gmail invite that you have to have X number of posts on someone else's forum.

Don't you think that would just increase the amount of spam on the board?

Agreed. Someone would just post crap on there :|. Anyways, send me an invite if anyone is feeling generous :) slade@sladesfaculty.com

Cheers,

Slade

Slade 66 Practically a Master Poster

payout -> everyone

Slade 66 Practically a Master Poster

Hey dani, I notice that all of the links in these forums always open up a new window, is that a feature of vbulletin or is there someway I can declare that globally?

Slade 66 Practically a Master Poster

fake -> Zorba

Slade 66 Practically a Master Poster

Are we talking about the same thing here? I mean the dispose method :). I just read an article saying you should always dispose. So wherever I use a command or a connection I should dispose of them once I'm done am I correct?

http://www.lhotka.net/WeBlog/PermaLink.aspx?guid=67fcc062-465e-49f6-b48d-f9b4ecf4582f

Slade 66 Practically a Master Poster

is it ok to use this method for datalists and grids etc? I noticed you didn't use it in the Public Function GetArt() As SqlDataReader...

Slade 66 Practically a Master Poster

What exactly does the dispose method do? If I am accessing the connection pretty frequently is it still ok to dispose of it?

Slade 66 Practically a Master Poster

LMAO! I don't know whether to be angry or happy. Turns out I was databinding it correctly but I had the label set to invisible lol.

Cheers Tekmaven, I'll buy you a beer if I ever go to America,

Slade

Slade 66 Practically a Master Poster

How do I databind the content of the "Content" field to a label? And are you suggesting I use ntext? I don't mind about the size, I was forced to use it because nvarchar was too small since most of it will be for storing html.

Slade 66 Practically a Master Poster

hehe I always use stored procedures. But people shouldn't be able to inject if it's just a reading query right? I'm not too sure. Also, what types of characters WONT text hold? Can you give examples?

Slade 66 Practically a Master Poster

LOL that is basically the standard format I use now, to think it was so simple... and I was just doing stupid things! oh well :).


Thanks heaps tekmaven you rule.

Slade 66 Practically a Master Poster

No, actually it's related to Visual Studio .NET's web page designer. When you are on the WYSIWYG ("Design") view of the page, it reformats your code, and sometimes screws up on tags. There is a setting to control what view you get when you double click on a file in the project window; I have it going to HTML View, which there is no problem with (I rarely use the designer for Web Development).

Lol I don't use it either, it's such a pain. I usually just build my project and view it in my browsers every now and then to make sure it's all ok :).

Slade 66 Practically a Master Poster

Hey guys. I just want to know how would I write a stored procedure in SQL server 2000 to read, and another to update a Text data type field. I also need to know how I am able to execute this stored Procedure in asp .net using vb .net.

My table is something like this:

ArtID int
Title varchar 200
Contents Text
Hits int
HitText nvarchar 200
UserID nvarchar 20

Any help is appreciated!

Cheers,

Slade

Slade 66 Practically a Master Poster

Welcome Will :) . Advanced hardware eh? Well we just have a hardware forum where all of our hardware questions etc. go :). Man it's 8:30 in the morning and I'm at work about to fall asleep... *yawn*

Slade 66 Practically a Master Poster

I'm using asp .net but I want a css footer... try this link again http://scott.sauyet.name/CSS/Demo/FooterDemo1.html, sorry for some reason it was hyperlinked to my inbox. Check it out.

Slade 66 Practically a Master Poster

Does anybody know how I can use a css defined div to keep a footer at the bottom of the page regardless of how much content is in the page? I found a solution but it's incompatible with opera :(. please help

Thanks in advance,

Cheers, Slade.

Slade 66 Practically a Master Poster

rubbish-bin -> garbage

Slade 66 Practically a Master Poster

sharingan he copied