And you would create this dll just as you would any other by creating a class library.
Ezzaral commented: More patience than this poster has earned. +13
And you would create this dll just as you would any other by creating a class library.
Agree with LizR, this is a very common question that comes up.
Remember you can have two users on a machine, and the service could be running as a completely different user than either of those (and most likely will).
If you need your service to be user specific, then it probably doesn't need to be a service.
Remember you can start an application at startup and not show any windows. This would appear to the user the same thing as a service. Possibly rethink if your app truly needs to be a service or can be handled as an application.
nice explanation waltp
the variable col is "column"
as waltp said when you are at position(column) 3 which will be the numbers(2, 5, 8), it will break the line, otherwise it will add tab
Listen to us, this post will end up like the last post, we made a little progress to start with, but as you noticed once you started telling us show me how to do it without any effort it all went down hill.
Take the advice and as we keep saying, read our posts, read your instructions, and show effort, then you can get your assignment back on track.
basic concept could be to create a class that holds your values
//I would recommend private, with getters and setters, just using this for the concept
public class PivotDetails
{
public string clientName;
public string area;
public string number;
public string salesPerson;
public Date salesDate;
}
in your pivot details form you can do something like this
create controls for all your fields, i will reference them using "this"
public void SetPageValues(PivotDetails details)
{
this.tbClientName.Text = details.clientName;
this.tbArea.Text = details.area;
///....continue with the rest
}
from your calling form you create the class and pass it to the other form
//from client form
PivotDetails details = new PivotDetails();
details.clientName = this.clientName.Text;
//same for the rest
//now we'll call the pivotdetails form
frmPivotDetails frmPD = new frmPivotDetails();
//call our method to update it
frmPD.SetPageValues(details);
//show the form
frmPD.Show();
lol your guess is correct
either its not installed, or you need to add it as a reference or classpath or whatnot
you normally wouldn't pass arrays to the stored procedure
for each insert you should make the call to insert purchaseorderdetails, ie 5 items 5 insert calls
passing arrays to a stored procedure i wouldn't consider good practice, the workaround is normally to pass a comma delimited string, but once again i would recommend making the database calls to insert from code side and not rely on it from database side
very clear question and thanks for showing your effort and what you are having trouble with
i'm not too big on vocabulary, but you want to try to get the database to use third normal form
something like this for your bookingrecords table
bookingrecords
CLIENT_ID
DATE
REQUIRED_HOURS
REQUIRED_SERVICE_CODE
clients
CLIENT_ID
CLIENT_NAME
ADDRESS
CITY
STATE
ZIP (sometimes demographics are in a separate table but we'll keep it simple)
PHONE
clientfamily
CLIENT_FAMILY_ID
CLIENT_ID
CONTACT_NAME
DATE_OF_BIRTH
SEX
RELATIONSHIP_ID
relationship
RELATIONSHIP_ID
RELATIONSHIP_NAME
clientpets
CLIENT_PET_ID
PET_NAME
PET_DESCRIPTION
some of the requirements are a little fuzzy, like who owns the pets, client or a family member
that should be enough to get you started, let me know if you need any clarification
advice would be you don't want multiple records with the same value of a
for one your database is set to not allow it
for two, you need to uniquely identify this record
might want to rethink the schema
something with a purchaseorder
and purchaseorderdetails
purchaseorder
PURCHASE_ORDER_ID
PO_DATE
CLIENT_ID
purchaseorderdetails
PURCHASE_ORDER_DETAILS_ID
PURCHASE_ORDER_ID
ITEM_ID
ITEM_AMOUNT
this will allow you to have multiple records for a single purchase order
Optimize pdeudo-code? Well if you say, there should be no optimization since no code is involved, only possible logic changes
you already have to code to display the array
your comments for that method state
Do NOT make any changes to this method.
show me some effort that you can create an array on your own
if it doesn't work big deal, show us you have the effort for us to help
In the instructions it states:
As you can see from the above two runs, the user will be asked to specify the size of the twodimensional
array. So if the user inputs the value (5), then the array should be of the size [5][5].
The elements of the
array are instances of the class “Cell” which is included as one of the three files. This class must
have one data field only:
private String color;
Your cell implementation doesn't fit the instructions.
Take time and read before you start coding. This isn't the easiest problem in the world, nor hardest, but not one to go haphazardly into. Break it into steps. I see you are in Algorithms and Data Structures, and I'm sure they aren't teaching code first.
How about trying to run with a single stick of ram at a time.
Also if all sticks have the same result, try to boot up without a hd drive, with a live cd or something like that and see if that will allow you start up.
my bad misplaced col++, was in a rush, but you still shouldn't be getting 0
int col = 1;
for (int x=0; x<=8; x++)
{
cout << x;
if(col == 3)
{
col = 1;
cout << endl;
}
else
{
cout << "\t";
col++;
}
}
and btw, i left the \n endl because you had it in there
normally you would use one or the other, but for this i would say drop the \n and stick with the endl
for it is then
int col = 1;
for (x=0; x<=8; x++)
{
cout << x;
if(col == 3)
{
col = 1;
cout << "\n" << endl;
}
else
{
cout << "\t";
}
col++;
}
oh boy
along with ddanbe, if you need to "change" the value do not modify the loop
cout << x << endl;
cout << x + 1 << endl;
cout << x << endl; // x is the same
cout << x++ << endl; //uh oh we incremented
cout << x << endl;//still the increment
i wouldn't suggest using a for loop on this one, are you able to use a while or does the program specify for?
Are you sure you are supposed to have an array of cells inside itself? or is that meant to be an int array?
You are having problems calling displayArray from your main method?
I see you are creating one cell, how are you creating the rest?
i am giving you a tip, calm down man
start a brand new thread not another post in this one, with your work as you have said, we are almost on page 4 here and haven't even started with the code and you won't get much help with the comments from before
i am saying start a new thread with code tags and your work and we will help
Lol read. We told you to start a new thread. Also next time put your code in code tags.
The scanner constructor takes a string as a source to read from, the string is not a filepath
use this
File file = new File(fName);
Scanner in = new Scanner(file);
Any beeps when it does freeze up, or just no response? Does it show any completed steps?
Don't know if this is the same machine as your other post.
Try reseating the RAM and other cards, and possbily try a single stick of RAM. Ensure cpu temp is good.
Are you able to get into the BIOS?
You also might want to check out the cpu temp, if it gets too hot it will shut the comp down and if it is too hot, the comp won't turn on.
If the computer wouldn't turn on, most likely the video card isn't bad. When a power supply is going awry, sometimes it may turn on the computer, sometimes not. Make sure all cards/ram are firmly in place, possibly remove and reseat them. If you still have the same result, trying replacing the power supply with a backup one if you have one.
settings -> control panel -> windows firewall -> OFF
That is the point of the query, you are able to distinguish in the same resultset of who are chaplains and not. You want to use the same column and distinguish code side by checking user_level.
thats because you are assigning it, the is_chaplain column didn't exist and we had to give it values, the user level column does exist
use this in both queries and you will get your 2 or 3
..... AS f_name,
`tbl_user`.user_level
FROM assignment,
......
definitely not just help him with the concepts, gotta give him credit on having a specific question
Lol i think its some sort of way to say yes you are correct, but I thought i had a way to help gooki understand.
yes, i thought you meant you didn't have a way to distinguish
instead of the is_chaplain, substitute the user_level into the query
i think we need to add single quotes around the is_chaplain
//readers
0 as 'is_chaplain'
//chaplains
1 as 'is_chaplain'
you don't have to do it this way, this is typically my guideline
i normally would use a for loop with a known size and a while loop where you don't know the size until the last iteration
SELECT assignment.Id, assignment.Candidate, assignment.`Section`, assignment.Team, assignment.Chaplain, assignment.Reader, tbl_user.Id, CONCAT_WS(' ', `tbl_user`.name_pre, `tbl_user`.name_first, `tbl_user`.name_last, `tbl_user`.name_suffix)AS f_name,
0 as is_chaplain
FROM assignment, `tbl_user`
WHERE assignment.Reader= tbl_user.Id
UNION
SELECT assignment.Id, assignment.Candidate, assignment.`Section`, assignment.Team, assignment.Chaplain, assignment.Reader, tbl_user.Id, CONCAT_WS(' ', `tbl_user`.name_pre, `tbl_user`.name_first, `tbl_user`.name_last, `tbl_user`.name_suffix)AS f_name,
1 as is_chaplain
FROM assignment, `tbl_user`
WHERE assignment.Chaplain= tbl_user.Id
this will allow you to have a record set where you could check if the is_chaplain =1 then add to your chaplain list otherwise add to the readers list
If you need the results separated, then why not issue 2 queries?
Or add an additional column to the rows for the union,
for readers 0 as IS_CHAPLAIN
for chaplains 1 as IS_CHAPLAIN
i don't get what the difference is in the concat of the chaplain, you are using the same columns
can you show what the concat difference is?
f_name field is just pre + first + last + suffix
it will use the same formatting for both readers and chaplains
if you want this field different, please explain more clearly with an example of what you need
WHERE tbl_user.Id= assignment.Reader OR tbl_user.Id = assignment.Chaplain
i think this is what you are looking for with the additional where
also, just as a formatting rule, try to keep your control names consistent
i.e. tbFirstName
otherwise, it could get a little messy trying to find all your textboxes on a page
Lol wow, little trouble reading, to make it clear
Mark this as solved and create a new thread and show us you can try to do your work, do not give us an assignment, we will help YOU with your assignment not do it for you
very true, nice catch
you need to check the current rating, not all the ratings
public boolean getStatus(String rating, int age) {
int minAge = 0;
if(rating == "PG"){
minAge = getPGuidance();
}
else if (rating == "G"){
minAge = getGeneral();
}
else if (rating == "A"){
minAge = getAdult();
}
if(age >= minAge){
return true
}
else {
return false;
}
}
and also same thing with the remove
In your instructions you have that you can't add a list of limbs, only single limbs, yet in your code you have.
// adding limbs:
protected void addLimbs(List<Limb>limbToAdd)
{
this.limbs.add((Limb) limbToAdd);
}
you need to change it to
// adding limbs:
protected void addLimb(Limb limbToAdd)
{
this.limbs.add(limbToAdd);
}
have some great ideas on this, but you must show some effort
we will help you, not do the work for you
its possible the file could have been archived
folder propertied -> advanced -> archive
also when you are the owner, did you pick to replace permissions on child objects? otherwise you will own the folder, but not the files
Jugortha, ByRef isn't always going to be c# ref, it will sometimes be out
if you aren't for sure, don't post information that may lead someone down the wrong path
if you are saying $photo prints out the path, but you are placing a slash in src
edit $photo before you set it as src, then echo it
1. put code in code tags
2. where are any of your while loops in the code
ArrayList files = new ArrayList();
StreamReader sr = new StreamReader("C:\\TestFile.txt");
String line;
while ((line = sr.ReadLine()) != null)
{
files.Add(line);
}
sr.Close();
you don't need that for loop in there, and a call to readline makes the stream read again, you are using line as sr.ReadLine() so you needed to add it