Hi
I want to do a for loop by bit shift, so I loop through 0,1,2,4,8 etc... 0,1,10,100,1000 etc
So I did this:
for(int i =0x1; i<100; i = i<<1)
{
//do stuff
}
Thats fine, but it leaves out zero. I can't start at zero cos a bit shift on zero is zero. I was thinking if I cut off the least...
Hi,
When I output my log4j logs, I prepend the statement with WARN ERROR INFO etc. Is there anyway I can customise this text? You see our build system searches for ERROR and WARNING (its mainly C++ stuff) so instead of WARN I want WARNING. Is this possible?
Thanks
Hi,
I have my jar file created with the main class specified. That works fine but it fails to find associated libraries which I have included in a lib folder in the jar. So my questions is how do I specify on the command line the classpath to look at dirs inside the jar. When I say to look at...
Hi,
Im currently looking at using XML Schemas to validate my code. Here is my problem. I want to validate by attribute so that if attribute is x i have 1 child element otherwise i have 2:
<element att="x">
<cap>a</cap>
<cap>b</cap>
</element>
<element att="y">
<cap>a</cap>...
Hi,
I have an XML doc i want to write a DTD for. I have element a and he can have 0 to 4 children of element b. How do i write this in a DTD?
I know ? mean (0,1), + means (1,infinity) and * means (0, infinity) is there something I am missing?
Thanks,
Ste
Hi,
I have a stored procedure and it looks like the following
ALTER PROCEDURE USP_NCUInsertContentCodeTest
@var1 int,
@var2 int
etc
AS
DECLARE @RC int
//Do stuff
RETURN @RC
I know how to execute the procedure in c# but I cant figure out how to get the return value. I know if I declared the...
Hi,
I have a form with a dropdownlist on it. I have an eventhandler for OnSelectedIndexChanged which works grand. The problem arises when I try to add a submit button. Form appears fine first time, but when I attempt to change the selected item in dropdownlist, and error comes about saying...
Hi I have an Asp repeater on my form filled from a website. Basically each member is a href. What I want to do is depending which is selected I wish to set a session variable say x, to be some value, dependant on the selection. Any ideas? Thank you in advance
Stephen
Hi
I have a checkbox on my form and everything works grand. Except I want it to appear checked when I load the page. I was doing this:
box.Checked = true;
and it came up as being checked alright, but when I tried to check it off and submit the form, it still returns true. Whats the rumpus here...
Hi,
I was wondering where does console.write write to? I dont want to be using Repsonse.writes for debugging. I cant see the console output anywhere in VS. Is there an equivalent of catalina.out as in java maybe?
Hi,
I have a page which may have to upload any number of files, call the number x. The way I am doing it is I have an asp:table on the page and I cycle through a for loop (0 to x), each time adding a row and cell which contains an asp:htmlinputfile control. Each time I give it an id of file1...
Hi I was just wondering if someone could help me. I have an aspx page and on the code behind page I get a variable from the database. Whatever this returned variable is, call it x. I want to have x fields on my form to upload files to the webserver. I tried using
Response.Write("<input...
Hi,
Im writing a program that performs approximately 50,000 inserts into a DB using jdbc. It is really slow however. How can I speed it up? I tried using batch queries but didnt speed up at all. What is the optimum size of the batch? Are there any other ways to speed things up? Thanks in...
Hi I was wondering if someone could help me. I have a directory with a number of .log files. I want to be able to pass the name of the directory in as a command line arguement, and process each of the *.log files and output the results into 1 single file. How can I go about this? Thank you in...
Hi,
I was wondering if someone could help me with ACL's. I have a file, say output, created by the root user, member of group other. Its permissions are rwxr--r--. I want only people in group other to have rwx access, but I also want one other user, stephen, member of some_other_group to have...
Hi,
I was just wondering if the usr directory is used just for data and applications etc. If I was to delete its contents would the system still boot? If not what are the relevant files in it? I basically want to strip my system down to the bare minimum. Thanks in advance,
Stephen
Hi,
Is there a way to print from the shell the directory size alone? I was trying du -k but that just gives all the subdirectories etc to, and I just want to know the directory size. Thanks in advance
Stephen
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.