Official Programmers Thread

  • Christian Chat is a moderated online Christian community allowing Christians around the world to fellowship with each other in real time chat via webcam, voice, and text, with the Christian Chat app. You can also start or participate in a Bible-based discussion here in the Christian Chat Forums, where members can also share with each other their own videos, pictures, or favorite Christian music.

    If you are a Christian and need encouragement and fellowship, we're here for you! If you are not a Christian but interested in knowing more about Jesus our Lord, you're also welcome! Want to know what the Bible says, and how you can apply it to your life? Join us!

    To make new Christian friends now around the world, click here to join Christian Chat.
B

Belgian_Pilot

Guest
#41
Aksel, I am having fun with my CSS

thank you My pleasure! :)

I had hoped I could set up a template which defined the top of the page and the left hand column
then left the rest of the interior to be specified on each HTML page
is this possible? Yes it is possible. I'll make an example (not right now, my mom's birthday this weekend, family visiting etc... I'll try for monday!)

it would mean the left hand column would come from the css file
then the middle and right hand column from the html

look like it can't be done like this; can it? I get it. Let me make an example and you'll see what I mean. The nasty thing is that you'll have to repeat contents each time (css has no contents). So if you want a telephone in the heading on each page on the same place, you can define the layout in css for that heading, but you'll have to put the nr in each html file. A 'masterpage' (only ASP or PHP) solves that problem.

also

i want to change the backgound colour from olive

what are my choices?

background-color: Olive ; Use any color you wish. The system has basic colors like 'red', 'orange', etc...., but you can also use #0123FF colors (hexa). #RRBBGG
RR= redvalue from 00 to FF, BB = blue GG = green.

thanks and shalom,

off to pool now I go tonight. But another pool. The one with balls and cues... :D
Have fun coding!
 
B

Belgian_Pilot

Guest
#42
File one: default.htm:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<title>Hill Bible Church Sidney homepage</title>
<
link href="Stylesheet.css" rel="stylesheet" type="text/css" media="interactive, braille, emboss, handheld, projection, screen, tty, tv" />
</
head>
<
body>
<div id="top-information">
</div>
<div id="menu">

<table style="width:100%;">
<tr>
<td>
<a href="Default.htm">Home</a></td>
<td>
<a href="Links.htm">Links</a></td>
<td>
<a href="MP3s.htm">MP3s</a></td>
</tr>
</table>
</div>

<div id="the-body">
<div id="body-left">
<h3 >Welcome on our Churches webpage.</h3>
<br />
The Hill Bible Church Sidney is a community of special people like Adrian. The community comes together every sunday. The church has 150 members. I just write donw some
blablabla to show the layout. The weather is not really good now. I guess it's night right now in Australia.
<br />
<h4 >Where to find us?</h4>
<br />
The Hill Bible Church Sidney is a community of special people like Adrian. The community comes together every sunday. The church has 150 members. I just write donw some
blablabla to show the layout. The weather is not really good now. I guess it's night right now in Australia.
</div>
<div id="body-right">
<h4>Special announcements</h4>
<br />
- Monday 2/3/10 special activity
<br />
- Saturday 1/6/30 Another activity
<br />
<br />

<h4>Today's verse</h4>
<br />
John 4:1-3: Something here. You can add as much as you want!

</div>
</div>
</
body>
</
html>
 
B

Belgian_Pilot

Guest
#43
file two: Links.htm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<title>Hill Bible Church Sidney links</title>
<
link href="Stylesheet.css" rel="stylesheet" type="text/css" media="interactive, braille, emboss, handheld, projection, screen, tty, tv" />
</
head>
<
body>
<div id="top-information">
</div>
<div id="menu">

<table style="width:100%;">
<tr>
<td>
<a href="Default.htm">Home</a></td>
<td>
<a href="Links.htm">Links</a></td>
<td>
<a href="MP3s.htm">MP3s</a></td>
</tr>
</table>
</div>

<div id="the-body">
<div id="body-left">
<h3 >Interesting links</h3>
<br />
These links can be quite interesting. We're not responsible for the content on other sites.
<br />
<h4 >Links</h4>
<br />
- <a href="http://www.boretti.be">Boretti
</a>
<br />
- <a href="http://www.christianchat.com">Christian Chat
</a>
<br />
- <a href="http://www.vliegclub-grimbergen.be">Flying club Grimbergen
</a>
</div>
<div id="body-right">
<h4>Link of the day</h4>
<br />
<a href="http://www.rvg.be/Eng/home_en.htm" style="color=olive">Regional airfield Grimbergen

</a>

</div>
</div>
</
body>
</
html>
 
B

Belgian_Pilot

Guest
#44
File three Stylesheet.css

#top-information
{
height: 215px;
margin-left: auto;
margin-right: auto;
margin-bottom: 0px;
margin-top: 10px;
color: #0c0cf1;
background-color: Olive ;
font-size: .85em;
position: relative;
width: 750px;
background-image: url(Images/image2826.png);
background-repeat: no-repeat
}
#menu
{
width: 750px;
height: auto;
margin-left: auto;
margin-right: auto;
position: relative;
margin-bottom: 0px;
margin-top: 10px;
text-align: center;
background-color: Olive;
font-family: Verdana;
}
#the-body
{
width: 750px;
height: auto;
margin-left: auto;
margin-right: auto;
position: relative;
margin-bottom: 0px;
margin-top: 10px;
text-align: center;
background-color: Olive;
font-family: Verdana;
color: Navy;
}
#body-left
{
width: 540px;
height: auto;
padding-left: 5px;
padding-right: 5px;
padding-bottom: 10px;
text-align: justify;
background-color: Olive;
font-family: Verdana;
font-size: small;
float: left;
}
#body-right
{
width: 186px;
height: auto;
padding-left: 5px;
padding-right: 5px;
padding-bottom: 10px;
text-align: justify;
background-color: Maroon;
font-family: Verdana;
font-size: small;
float: right;
color: Olive;
}
a:link
{
color: Maroon;
}

a:visited
{
color: navy;
}
a:hover
{
color: red;
}
 
B

Belgian_Pilot

Guest
#45
If you want the files, I'll mail them. Note that I refer to thee css file to keep the same layout.

Cheers!
 
B

Belgian_Pilot

Guest
#46
Nearly forgot: It needs the same map Images with that Image I created in it...
 
G

greatkraw

Guest
#47
thank you aksel
will have fun with this
 
B

Belgian_Pilot

Guest
#48
For some weird reason, this site throws away the spaces in the html tags when I post them...
 
G

greatkraw

Guest
#49
For some weird reason, this site throws away the spaces in the html tags when I post them...

yeah astrid and i already found you lose your indentation which is a huge problem with python code
 
G

greatkraw

Guest
#50
NOLOCK is also known as "dirty reads". This option directs SQL Server not to issue shared locks and not to honor exclusive locks. So, if this option is specified, it is possible to read an uncommitted transaction. This results in higher concurrency and in lower consistency.

This means it is possible to read some data that is currently undergoing change by another process &#8211; so that once the dirty read is finished the other process then also finishes its changes and what was retrieved no longer resembles what is there

When using an updatable cursor, it is important to guard against lost updates. A lost update is a scenario in which two or more transactions update the same row, but neither transaction is aware of the modification made by the other transaction, and consequently the second change overwrites the first modification. The following example illustrates this problem:
1. An application opens a cursor on the following query against the sample database.
2. SELECT ID, Quantity
FROM Products;
ID Quantity
300 28
301 54
302 75
... ...
3. The application fetches the row with ID = 300 through the cursor.
4. A separate transaction updates the row using the following statement:
5. UPDATE Products
6. SET Quantity = Quantity - 10
WHERE ID = 300;
7. The application then updates the row through the cursor to a value of (Quantity - 5 ).
8. The correct final value for the row would be 13. If the cursor had prefetched the row, the new value of the row would be 23. The update from the separate transaction is lost.

&#8226; Domains
&#8226; Unique constraints and primary keys
&#8226; Foreign keys (also referred to as referential integrity)
&#8226; Check constraints in table definitions
&#8226; Check options in view definitions
&#8226; Default values
&#8226; Triggers
&#8226; Transactions
These features should be used whenever possible to protect the integrity of the database, guaranteeing that incorrect or inconsistent data is not entered into it. By applying data integrity constraints through the database management system, the responsibility of ensuring the data integrity of the database is moved from the users of the database to the database designer.

This means that inconsistent data is not consistent with the data type of the field it has been put in
For instance an int may contain a string or vise versa
dblDollars = &#8220;hello&#8221;
 
B

Belgian_Pilot

Guest
#51
Great example Kraw, thx! I'm learning here too... :)

This is also a good explenation:

Accessing and Changing Relational Data (SQL Server)
Concurrency Problems
If locking is not available and several users access a database concurrently, problems may occur if their transactions use the same data at the same time. Concurrency problems include:
Lost Updates

Lost updates occur when two or more transactions select the same row and then update the row based on the value originally selected. Each transaction is unaware of other transactions. The last update overwrites updates made by the other transactions, which results in lost data.
For example, two editors make an electronic copy of the same document. Each editor changes the copy independently and then saves the changed copy, thereby overwriting the original document. The editor who saves the changed copy last overwrites changes made by the first editor. This problem could be avoided if the second editor could not make changes until the first editor had finished.
Uncommitted Dependency (Dirty Read)

Uncommitted dependency occurs when a second transaction selects a row that is being updated by another transaction. The second transaction is reading data that has not been committed yet and may be changed by the transaction updating the row.
For example, an editor is making changes to an electronic document. During the changes, a second editor takes a copy of the document that includes all the changes made so far, and distributes the document to the intended audience. The first editor then decides the changes made so far are wrong and removes the edits and saves the document. The distributed document contains edits that no longer exist, and should be treated as if they never existed. This problem could be avoided if no one could read the changed document until the first editor determined that the changes were final.
Inconsistent Analysis (Nonrepeatable Read)

Inconsistent analysis occurs when a second transaction accesses the same row several times and reads different data each time. Inconsistent analysis is similar to uncommitted dependency in that another transaction is changing the data that a second transaction is reading. However, in inconsistent analysis, the data read by the second transaction was committed by the transaction that made the change. Also, inconsistent analysis involves multiple reads (two or more) of the same row and each time the information is changed by another transaction; thus, the term nonrepeatable read.
For example, an editor reads the same document twice, but between each reading, the writer rewrites the document. When the editor reads the document for the second time, it has changed. The original read was not repeatable. This problem could be avoided if the editor could read the document only after the writer has finished writing it.
Phantom Reads

Phantom reads occur when an insert or delete action is performed against a row that belongs to a range of rows being read by a transaction. The transaction's first read of the range of rows shows a row that no longer exists in the second or succeeding read, as a result of a deletion by a different transaction. Similarly, as the result of an insert by a different transaction, the transaction's second or succeeding read shows a row that did not exist in the original read.
For example, an editor makes changes to a document submitted by a writer, but when the changes are incorporated into the master copy of the document by the production department, they find that new unedited material has been added to the document by the author. This problem could be avoided if no one could add new material to the document until the editor and production department finish working with the original document
 
G

greatkraw

Guest
#52
last paragraph is very useful example
 
G

greatkraw

Guest
#53
looking for astrid; and waldo

did you see them together?
 
W

wwjd_kilden

Guest
#54
will have a look after the programming
 
G

greatkraw

Guest
#55
what exam did you have today and what still to go?
 
W

wwjd_kilden

Guest
#56
UML today

Programming wedensday
databases friday
 
W

wwjd_kilden

Guest
#58
Exam thingy:

well, first i made a class called Merchendise, then the subclasses Book, music and Games, with some varying attributes

the task told us to create a Register and append the objects to a list there.
but how does one append objects without having specific objects?
(meaning; I am not saying
name=input(.....
to get attributes to it, I just append the objects themselves (?) at least that what the teacher said it meant when I asked him about it

but how do I append nonexistant objects?

I just made this, hoping to scrape a few points:

Reg=Register()
self.liste=[]

def append(self,object):
self.liste.append(object)

and that makes no sense whatsover :S

Im used to first creating the objects, then appending with
function(self, attr...)
liste.append(Class(attr...)

but that wouldn't work without the attributes!


ARRRH!
 
G

greatkraw

Guest
#59
Exam thingy:

well, first i made a class called Merchendise, then the subclasses Book, music and Games, with some varying attributes

the task told us to create a Register and append the objects to a list there.
but how does one append objects without having specific objects?
(meaning; I am not saying
name=input(.....
to get attributes to it, I just append the objects themselves (?) at least that what the teacher said it meant when I asked him about it

but how do I append nonexistant objects?

I just made this, hoping to scrape a few points:

Reg=Register()
self.liste=[]

def append(self,object):
self.liste.append(object)

and that makes no sense whatsover :S

Im used to first creating the objects, then appending with
function(self, attr...)
liste.append(Class(attr...)

but that wouldn't work without the attributes!


ARRRH!
in your assignments you had to infer things; same here

when you are working you are gonna get sustomers who say i want something that does this

as you gain experience it will become your job to see that before you can do this, you first have to do that and the other

lemme see what I would do?????? hmm??

i immediately see some inheritance here

merchandise has a name and a price maybe

3 things inherit merchandise
book - author, publisher

music - artist, publisher

game - publisher, genre

how am i going?
 
W

wwjd_kilden

Guest
#60
in your assignments you had to infer things; same here

when you are working you are gonna get sustomers who say i want something that does this

as you gain experience it will become your job to see that before you can do this, you first have to do that and the other

lemme see what I would do?????? hmm??

i immediately see some inheritance here

merchandise has a name and a price maybe

3 things inherit merchandise
book - author, publisher

music - artist, publisher

game - publisher, genre

how am i going?
that was not the problem

the problem was appending objects to the list without appending the attributes
I didn't understand that part