dickersonka 104 Veteran Poster

lol maybe i overcomplicated that statement

lets see you are setting a variable for an admin

if($is_admin){
    $sql = "select * from myadmintable";
}

if the user isn't an admin, the statement won't be executed, but could still be on the page

dickersonka 104 Veteran Poster

$sql doesn't necessarily mean for sure it will be executed, it means that a query is being constructed, as long as someone named a variable called that for a query

but also, gotta remember if there are checks to run the query and any includes

dickersonka 104 Veteran Poster

not sure what kind of front end you have to look at the mysql side with

you could either set up a counter with a static variable, to increment and decrement connections, queries etc

http://webmaster-forums.code-head.com/showthread.php?t=202

you can also use mysql administrator to view current connections

there is a program called heidi sql that shows some detailed info as well
http://www.heidisql.com/screenshots.php?which=host_commandstats

and one last thing, you could try running show processlist
http://dev.mysql.com/doc/refman/5.0/en/show-processlist.html

dickersonka 104 Veteran Poster

Yeah I want there to be one row per airport and then, inside of that row, I want to list the related services, either as columns or as rows.

you are meaning sql or php?

dickersonka 104 Veteran Poster

why not do the similar thing as before

loop through the results
when the airportcode changes that means you are in a new group

if in same group, loop through the services and check the appropriate box

i'm not really following the part you are having trouble with, unles you are meaning you want rows to columns? meaning one single row per airport with columns of services

dickersonka 104 Veteran Poster

lol oh filch

this is where the dynamic piece would have helped on the saving

i would suggest to possibly alphabetize them, that is unless they are in order by id

to your query add this

order airport.airport asc, service.service asc
dickersonka 104 Veteran Poster

how are you accessing the database, through java php etc?

dickersonka 104 Veteran Poster

and just to supplement anteka, in case you are having trouble reading it from the database

SqlCommand cmd = new SqlCommand("select imagecolumn from tablename where id = 1");
SqlDataReader dataReader = cmd.ExecuteReader();
byte[] imageBytes = (byte[]) imageReader.GetValue(0);

MemoryStream ms = new MemoryStream(imageBytes);

FileStream fs = File.OpenWrite(imagePath);
fs.Write(ms.GetBuffer(), 0, ms.Position());

//now we have it on the filesystem
dickersonka 104 Veteran Poster

is it showing the news for a previous link id they have used?

i understand its not the correct page, but need more specifics, when is it from? same url? any further info?

dickersonka 104 Veteran Poster

i think it might be the page cache, also if they click refresh, does it properly display?

try to add this to the top of the page

<%@ OutputCache Duration="60" VaryByParam="*" %>
dickersonka 104 Veteran Poster

how about the rich text editor for asp.net

http://www.codeplex.com/rte

dickersonka 104 Veteran Poster

do you have samples of the urls they are clicking on?

dickersonka 104 Veteran Poster

its because you send the email through an smtp server

if you are on your own network, most likely you can get authenticated, or it might have a relay address to where you can send to, no security issues

when you try to send from a remote server, it will require authentication and only if they do allow you to send through them

dickersonka 104 Veteran Poster

You can do it for all users (HKEY_USERS\.DEFAULT) or current user (HKEY_CURRENT_USER), we'll do the setting for all all users, it will look the same almost for current user

//opens HKEY_USERS
RegistryKey k = Registry.Users;

//opens path off HKEY_USERS
RegistryKey securityKey = k.OpenSubKey(@"Software\Policies\Microsoft\Security", true);

//Set registry value
securityKey.SetValue("CheckAdminSettings", "00000001", Microsoft.Win32.RegistryValueKind.DWord);

to do it for current user, just change the top line to Registry.CurrentUser

also be prepared, you will prob run into permission issues if you are non admin and accessing .DEFAULT, otherwise if you edit currentuser, the current user should have privileges to their own reg hive, but i've seen some machines locked down enough where they don't, you'll get it :-)

dickersonka 104 Veteran Poster

sorry i assumed you knew where to place it

public static void main(String []args)
{
   new GridDrawingApplet();
}
dickersonka 104 Veteran Poster
new GridDrawingApplet();

you don't need to explicitly call paint

dickersonka 104 Veteran Poster

i have not had a hosted sharepoint server only an inhouse, but know limitations of normal hosted services

many sharepoint apps require addition to the gac unless you want to go through a lot of painful measures, if you are just doing the classic sharepoint stuff then hosting should be fine, but if you are truly doing a custom sharepoint application with custom webparts and lots of communication, a lot of modifications, then go the in house route

dickersonka 104 Veteran Poster

please tell me the code asap

show us your work, we'll show you ours

dickersonka 104 Veteran Poster

hey man, it takes time to grasp onto the concept of programming, (althought we all can't admit it :-) ), i commend you on trying and thats what we like to see here, not just give me an answer

keep up the good work and keep showing your effort!!!

dickersonka 104 Veteran Poster

use the same for loop concept, put it at the bottom of the while loop

for(int i=0; i<index; i++)
{
  System.out.println(num[i]);
}
dickersonka 104 Veteran Poster

well if you are wanting a database, don't know how deep you want to go with this

schedule
SCHEDULE_ID
SCRAPER_ID
LAST_RUN_TIME

scrapers
SCRAPER_ID
SCRAPER_NAME
INTERVAL_SECONDS
EXCLUDE_DATE

then you can check if LAST_RUN_TIME + INTERVAL_SECONDS >= currenttime
this means it is now scheduled to stated

then check your exclude date
id(date != EXCLUDE_DATE)
{
run the scraper
}

i don't know what you are meaning by best practices or reading materials, for what crons?

this might help
http://www.adminschoice.com/docs/crontab.htm

dickersonka 104 Veteran Poster

what you need for the rows is a repeater control, problem is the dynamic columns, which means you need a dynamic repeater control

here's a sample that should get you started

http://www.neowin.net/forum/index.php?showtopic=658854

dickersonka 104 Veteran Poster

you are doing a single check with the if loop

do a for

bool contains = false;
for(int i=0; i<index; i++)
{
  if (number == num[i])
{
System.out.println("Value has already been entered.");
contains = true;
} 
}

if(!contains)
{
num[index] = number;
++index;
}
dickersonka 104 Veteran Poster

lol just playing, just as i was thinking he was a darn good technical writer :-)

dickersonka 104 Veteran Poster

registry is nothing to be afraid of, pretty seamless to navigate around it, here's a link if you need a start

http://www.csharphelp.com/archives2/archive430.html

you can open HKCU or default, then go to the subkey and set the value, as long as you have permissions, you should be good to go :-)

dickersonka 104 Veteran Poster

lol i don't think checking if the password contains c o o l, was too secure, thats why i made the post

dickersonka 104 Veteran Poster

lol outrageous

you mean he didn't make that up himself

dickersonka 104 Veteran Poster

is the first one in a stored procedure? where you pass @table_name in?

dickersonka 104 Veteran Poster

depends upon the context, a lot of times you will check to see if bytesRead > -1 or sometimes you check for CRLF (carriage return line feed), other times you will pass how many bytes you will be sending and read until all the bytes have been sent

Antenka commented: Thanks againg for goog and quick help! +1
dickersonka 104 Veteran Poster
dickersonka 104 Veteran Poster

i believe its because you have to "tell" the server when you are done sending, since you want the server to send the request back you have to say i'm done, now send the information

dickersonka 104 Veteran Poster

lol it is working and you are asking what is wrong?

what part doesn't work? or you mean why it didn't work before?

dickersonka 104 Veteran Poster

it needs to be changed to this format

if (userPass.charAt(index) == 'c')

but you are making it hard, you can do this

if(userPass.startsWith("cool")){
return false;
}
dickersonka 104 Veteran Poster

sure thing, will you post your solution or what you needed to do, so others can learn from this as well

dickersonka 104 Veteran Poster

but how are inserting the record? calling dataadapter update?

what are the commands that are set for insert, select, and delete on it?

dickersonka 104 Veteran Poster

the syntax would be

string sql = "INSERT INTO LoginTable (Username, Password) vaues ( \""+ txtUsernameInput.Text + "\", \"" + txtPasswordInput.Text + "\")";
dickersonka 104 Veteran Poster

an insert is a new row, an update is making changes to an existing row

example

INSERT INTO Users (USER_ID, USERNAME, PASSWORD) values (1, 'myusername', 'mypassword')
UPDATE Users set PASSWORD = 'newpassword' WHERE USER_ID = 1
dickersonka 104 Veteran Poster

the join will let you know when the thread has been completed, but will also block the calling thread (as in your case the ui is unresponsive), when waiting for the threads to complete

i'm not sure how your threads exit, but while waiting you can check either ThreadState or IsAlive

dickersonka 104 Veteran Poster

when those others are launched, does it contain something like ?

Thread.CurrentThread.Suspend()

or

myThreadName.Join()
dickersonka 104 Veteran Poster

in c# you have classes, think of it this way

you have a node, and a node on the left and right

each node is connected to another node (rightChild) and (leftChild)

you can't just translate this code to c#, you need to think about what structure you need first

dickersonka 104 Veteran Poster

what is your question? also please post code in code tags, much easier on the eyes

dickersonka 104 Veteran Poster

did you do it in python or is that some else's?

here's a link that will give you a java version

MAKE AN EFFORT
http://simpleprogrammingtutorials.com/tutorials/bst-overview.php

dickersonka 104 Veteran Poster

then make an effort, and we will make an effort

if you are having trouble with a specific piece, rather than just though whole thing then let us know, we won't do the work for you

dickersonka 104 Veteran Poster

i would suggest to post in the access forum then

also what trouble are you having? you can't insert into your database then another database as well?

dickersonka 104 Veteran Poster

ok then, what are you having trouble with and what language is your form in?

dickersonka 104 Veteran Poster

whenever the insert happens on your table, in sql server you can create a trigger that can insert into another table for you

http://www.4guysfromrolla.com/webtech/091901-1.shtml

if thats not what you are meaning, try to give a more clear explanation

dickersonka 104 Veteran Poster

please put the code in code tags

do you have any of this done yourself in c# yet?

dickersonka 104 Veteran Poster

why not use a trigger?

dickersonka 104 Veteran Poster
dickersonka 104 Veteran Poster

did you try to start it manually

/etc/init.d/mysql start