• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:31
CEST 18:31
KST 01:31
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
BSL Team A vs Koreans - Sat-Sun 16:00 CET6Weekly Cups (Oct 6-12): Four star herO85.0.15 Patch Balance Hotfix (2025-10-8)80Weekly Cups (Sept 29-Oct 5): MaxPax triples up3PartinG joins SteamerZone, returns to SC2 competition32
StarCraft 2
General
The New Patch Killed Mech! TL.net Map Contest #21: Voting Revisiting the game after10 years and wow it's bad Stellar Fest: StarCraft II returns to Canada herO Talks: Poor Performance at EWC and more...
Tourneys
SC2's Safe House 2 - October 18 & 19 Sparkling Tuna Cup - Weekly Open Tournament $1,200 WardiTV October (Oct 21st-31st) WardiTV Mondays RSL Offline Finals Dates + Ticket Sales!
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers Mutation # 492 Get Out More
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ BW caster Sayle BSL Team A vs Koreans - Sat-Sun 16:00 CET BW General Discussion Question regarding recent ASL Bisu vs Larva game
Tourneys
[ASL20] Semifinal B [Megathread] Daily Proleagues SC4ALL $1,500 Open Bracket LAN [ASL20] Semifinal A
Strategy
Current Meta BW - ajfirecracker Strategy & Training Relatively freeroll strategies Siegecraft - a new perspective
Other Games
General Games
Stormgate/Frost Giant Megathread Dawn of War IV Path of Exile Nintendo Switch Thread ZeroSpace Megathread
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Men's Fashion Thread Sex and weight loss
Fan Clubs
The herO Fan Club! The Happy Fan Club!
Media & Entertainment
Series you have seen recently... Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
Formula 1 Discussion 2024 - 2026 Football Thread MLB/Baseball 2023 NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
The Heroism of Pepe the Fro…
Peanutsc
Rocket League: Traits, Abili…
TrAiDoS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1503 users

The Big Programming Thread - Page 135

Forum Index > General Forum
Post a Reply
Prev 1 133 134 135 136 137 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Dazarath
Profile Joined July 2010
6 Posts
May 01 2012 03:41 GMT
#2681
On May 01 2012 07:53 Blisse wrote:
If I were to try to find the best hand in a group of 7 cards, do I need to specifically account for the 2 extra cards?

I'm trying to do this.

Right now I just throw everything into a vector of each suit of size 13 from A to K, and then start comparing the vectors at Straight Flush and working my way down. Is there a difference between having 7 cards and 5 cards this way?


This sounds about right. I'd probably use a 4x13 multidimensional array rather than four vectors, but the end result will be more or less the same. From there, a straight flush would be 5 adjacent cells in the same row (need to take into account A-T straight as well as A-5). Four of a kind would be 4 cells in the same column. Etc etc. If you're going for performance, you could store the sums of each of row/column somewhere, and that could be used to significantly cut down search time for possible hands. This method will scale for any number of cards, even if you wanted to find the best 5 card hand out of 30.
Anacletus
Profile Blog Joined April 2012
United States733 Posts
May 01 2012 03:54 GMT
#2682
On April 30 2012 06:12 svi wrote:
what are some good books that teaches you some advanced programming?

i've read a bit (not entirely) of 'introduction to algorithms', 'sicp', 'the c programming language', etc so i pretty much understand the basics of programming, but i wanna dive into making some 'larger' programs, so to speak.

ie programs that don't just spit out a few lines of data, but something like a text editor or a emulator, or w/e that can be used for real world value.


I think that you aren't really looking for another book, rather some difficult problems to test your skills at. I highly recommend tying https://www.interviewstreet.com/challenges/. They have some real world value to their problems (although wrapped in silly questions) you'll find them pretty tricky and becoming inventive to solve them correctly as there sre maby screwballs.

These challenges would be great for anyone to ponder over and having participated myself I highly recommend them!
http://talk-to-stimey-please.1324083.n2.nabble.com/
Anacletus
Profile Blog Joined April 2012
United States733 Posts
May 01 2012 04:05 GMT
#2683
On May 01 2012 12:41 Dazarath wrote:
Show nested quote +
On May 01 2012 07:53 Blisse wrote:
If I were to try to find the best hand in a group of 7 cards, do I need to specifically account for the 2 extra cards?

I'm trying to do this.

Right now I just throw everything into a vector of each suit of size 13 from A to K, and then start comparing the vectors at Straight Flush and working my way down. Is there a difference between having 7 cards and 5 cards this way?


This sounds about right. I'd probably use a 4x13 multidimensional array rather than four vectors, but the end result will be more or less the same. From there, a straight flush would be 5 adjacent cells in the same row (need to take into account A-T straight as well as A-5). Four of a kind would be 4 cells in the same column. Etc etc. If you're going for performance, you could store the sums of each of row/column somewhere, and that could be used to significantly cut down search time for possible hands. This method will scale for any number of cards, even if you wanted to find the best 5 card hand out of 30.


No there shouldn't be a difference between 5 and 7 as long as you assume a flush beats a straight of 6 cards. Basically I'm saying that you need to make sure to read your data correctly meaning you only use 5 cards to determine the best hand even if you have 7 mapped. Also, be sure to keep it efficient by not doing extra calculations - like if you have a flush why check for pairs. But be weary of breaking too soon as you mentioned there could be a royal flush for instance

Hopefully this helps and makes sense/doesn't seem like I'm rehashing your entire problem as I'm sure you've already considered most of what I went over.
http://talk-to-stimey-please.1324083.n2.nabble.com/
Highways
Profile Joined July 2005
Australia6104 Posts
May 01 2012 11:11 GMT
#2684
I can't get my head around reflection. Can someone explain what it is and how it works? (in particular for .NET)
#1 Terran hater
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
May 01 2012 19:22 GMT
#2685
On May 01 2012 20:11 Highways wrote:
I can't get my head around reflection. Can someone explain what it is and how it works? (in particular for .NET)

I haven't used it, but looked it up just now. Sounds to me that the basic idea is instead of hardcoding function or method calls, you use variable calls to functionality. If the code that is run during runtime is variable instead of hardcoded, then the program can possibly behave in a more reactive nature. That's what I got out of the wiki page after a couple minutes of reading.

Seems like things would really get complicated when deciding how and why to modify what.
Sluggy
Profile Joined June 2010
United States128 Posts
May 01 2012 20:57 GMT
#2686
On May 01 2012 20:11 Highways wrote:
I can't get my head around reflection. Can someone explain what it is and how it works? (in particular for .NET)


It can get pretty in depth and I'm no expert myself. The easy thing to say is that it allows you to inspect assemblies and the data in them from within your program. The hardest part is coming up with examples of how you can use this functionality to do something useful. To start you off here are some basics. In .NET you have this notion of a common type system (CTS). Types that belong to this system are classes, interfaces, structures, enums, and delegates. Each of these types can have members (also classified by the CTS). These are things like constructors, properties, methods, operators etc...

After your code is compiled to an .exe or .dll it contains information about all the types/members described by your program. This is called metadata. What reflection does is provide a way to examine this metadata and even instantiate objects from it at runtime.

Attributes go hand in hand with reflection. Lets say you have a simple project with two classes:


[MyAttribute]
public class SomeClass
{
// .. stuff and things
}

public class SomeOtherClass
{
// .. more stuff and more things
}

public class MyAttribute : System.Attribute
{
// .. an empty 'marker' attribute with no properties
}


The meta-data for SomeClass will include the fact that it's 'marked' with my MyAttribute. One thing you could do is use relection to inspect the assembly that contains these two classes and get all types that have the MyAttribute attribute. If I were you I would make a simple project, like this, and mess around with ways to filter on types. Look at MethodInfo, PropertyInfo, and the Activator (the class that allows you to create an instance of a type once you have its meta-data).

chroniX
Profile Blog Joined January 2008
517 Posts
May 02 2012 01:16 GMT
#2687
Okay im done with CSS. Its driving me insane!

My current problem is as follows:

I have to fix a CSS-Layout that was done by another guy. So i have no real clue what he was doing. Its written with the help of YAML. I am pretty much a newb when it comes to CSS.
Basically i have a DIV-Wrapper that creates the body of the page, a main body div, a header div, a content div and a footer. The Wrapper is supposed to span over all the divs. The main div is supposed to span over the header and content div.

Now somehow Chrome/Firefox/Opera fails to include the Footer into the Wrapper and doesnt span the main div over the content. IE draws everything as supposed to be.
Now that probably sounds totally confusing but its probably just some stupid small error somewhere. I dont want someone to understand or actually fix the layout for me.

My question is rather how can i find the error? I have doublechecked every Tag, ran the code through some validators. Looked at it with Chrome Developer Tools. I know where the browser gets it wrong but the code is correct (as far as my debugging skills go ).

Are there any CSS Debugging Tools or Editors that can point out Code-Errors or maybe a tool that analyzes my framework? Anything?
ObliviousNA
Profile Joined March 2011
United States535 Posts
May 02 2012 01:35 GMT
#2688
Ok so I'm working on a .Net project at work and I had a design issue I'm hoping someone can answer. We are storing our data in a System.Data.DataTable structure (http://msdn.microsoft.com/en-us/library/system.data.datatable.aspx) and we have it bound to a DataGrid (formerly DataGridView from WinForms).

My project is to create an undo/redo logging system. To keep it crash resistant we are manually serializing the table changes and recording them in the file. For example if you were to delete Row 3, which contains
1|row3 text|MyObject3,
The log file would add a line that says something along the lines of
DataTableName removed Row 3 Values 1|row3 text|[MyObject3.field1 ...]

2 questions:

1) Is this optimal? Considering the crash-resistant and memory constraints, can we do this faster? I've optimized the file reads/writes - i.e. using FileStream.Write(byte[]), flushing to OS instead of straight to disk, etc) I realize that there are some XML serializations but they didn't give us the capability of hosting multiple dataTable changes in a single undoFile.txt

2) The DataGrid UI allows you to select multiple rows and delete. From a user standpoint, ctrl+z should undo that "mass delete" and replace all those rows in a single step. However, the DataGrid propagates those changes one at a time. There is no method in DataTable to delete multiple rows at once, so those deletes occur serially. Consequently, I have no way of knowing where the user deleted 10+ rows simultaneously, or deleted them by pressing the delete key REALLY FAST. Using some kind of timer to see when the events fire (i.e. within 10 ms of eachother) is kind of a hack, and with (potentially very large) file IO there's no real guarantee it will complete within a reasonable time. Our solution was to listen to the sending window - if an onClick or keystroke event registers, all changes that occur afterward are associated with that one click event. This is also a hack, and runs into issues with programatically changing the DataTable.

Ideas?

Thanks- sorry for the long post :D
Theory is when you know everything but nothing works. Practice is when everything works but no one knows why. In our lab, theory and practice are combined: nothing works and no one knows why.
ObliviousNA
Profile Joined March 2011
United States535 Posts
Last Edited: 2012-05-02 02:00:26
May 02 2012 01:58 GMT
#2689
On May 01 2012 20:11 Highways wrote:
I can't get my head around reflection. Can someone explain what it is and how it works? (in particular for .NET)

I've used it a bit at work recently, it's REALLY cool if you're going to be passed an object that you don't have access to at compile time. Are you looking for code examples or what?

For example, I have a library (see my above post :D) that takes a number of DataTables at runtime. The DataTable can have custom objects/structs within them. I have to convert these objects to some well-known text format to save their values. With reflection, I can create an array of FieldInfo objects associated with my unknown object, and find every field within my unknown object! For example

FieldInfo[] fieldInfo = unknownObject.GetType().GetFields();
string fieldName = fieldInfo[0].Name;
var unknownObjectField1 = fieldInfo[0].GetValue(unknownObject);
var newObject = Activator.CreateInstance(FieldInfo[0].Type);

This is pseudocode, but you get the idea. It can be incredibly useful if you need to serialize an unknown object, or modify a variable at runtime (using fieldInfo[0].SetValue(newValue, newObject) I believe).

Also, you can examine the object to see if it implements any interfaces that you have access to.

In short, it has a few specific circumstances where it's incredibly useful. In general, it's just rather neat.

As to how it works, I'm assuming that running GetType() on an object looks to some local metadata which points to a location in a loaded DLL. I'm pretty sure it ISN'T stored local to the object, because it works on primitives like INT, which is only 4 bytes.
Theory is when you know everything but nothing works. Practice is when everything works but no one knows why. In our lab, theory and practice are combined: nothing works and no one knows why.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2012-05-02 03:20:52
May 02 2012 03:20 GMT
#2690
On May 01 2012 13:05 Anacletus wrote:
Show nested quote +
On May 01 2012 12:41 Dazarath wrote:
On May 01 2012 07:53 Blisse wrote:
If I were to try to find the best hand in a group of 7 cards, do I need to specifically account for the 2 extra cards?

I'm trying to do this.

Right now I just throw everything into a vector of each suit of size 13 from A to K, and then start comparing the vectors at Straight Flush and working my way down. Is there a difference between having 7 cards and 5 cards this way?


This sounds about right. I'd probably use a 4x13 multidimensional array rather than four vectors, but the end result will be more or less the same. From there, a straight flush would be 5 adjacent cells in the same row (need to take into account A-T straight as well as A-5). Four of a kind would be 4 cells in the same column. Etc etc. If you're going for performance, you could store the sums of each of row/column somewhere, and that could be used to significantly cut down search time for possible hands. This method will scale for any number of cards, even if you wanted to find the best 5 card hand out of 30.


No there shouldn't be a difference between 5 and 7 as long as you assume a flush beats a straight of 6 cards. Basically I'm saying that you need to make sure to read your data correctly meaning you only use 5 cards to determine the best hand even if you have 7 mapped. Also, be sure to keep it efficient by not doing extra calculations - like if you have a flush why check for pairs. But be weary of breaking too soon as you mentioned there could be a royal flush for instance

Hopefully this helps and makes sense/doesn't seem like I'm rehashing your entire problem as I'm sure you've already considered most of what I went over.


Thanks. I do have those extra functions in place. think by just checking the number of different suits and ranks I can find most of the cards. Thanks for the help.
There is no one like you in the universe.
dahdum
Profile Joined May 2010
United States46 Posts
May 02 2012 04:19 GMT
#2691
On May 02 2012 12:20 Blisse wrote:
Show nested quote +
On May 01 2012 13:05 Anacletus wrote:
On May 01 2012 12:41 Dazarath wrote:
On May 01 2012 07:53 Blisse wrote:
If I were to try to find the best hand in a group of 7 cards, do I need to specifically account for the 2 extra cards?

I'm trying to do this.

Right now I just throw everything into a vector of each suit of size 13 from A to K, and then start comparing the vectors at Straight Flush and working my way down. Is there a difference between having 7 cards and 5 cards this way?


This sounds about right. I'd probably use a 4x13 multidimensional array rather than four vectors, but the end result will be more or less the same. From there, a straight flush would be 5 adjacent cells in the same row (need to take into account A-T straight as well as A-5). Four of a kind would be 4 cells in the same column. Etc etc. If you're going for performance, you could store the sums of each of row/column somewhere, and that could be used to significantly cut down search time for possible hands. This method will scale for any number of cards, even if you wanted to find the best 5 card hand out of 30.


No there shouldn't be a difference between 5 and 7 as long as you assume a flush beats a straight of 6 cards. Basically I'm saying that you need to make sure to read your data correctly meaning you only use 5 cards to determine the best hand even if you have 7 mapped. Also, be sure to keep it efficient by not doing extra calculations - like if you have a flush why check for pairs. But be weary of breaking too soon as you mentioned there could be a royal flush for instance

Hopefully this helps and makes sense/doesn't seem like I'm rehashing your entire problem as I'm sure you've already considered most of what I went over.


Thanks. I do have those extra functions in place. think by just checking the number of different suits and ranks I can find most of the cards. Thanks for the help.


Here's an awesome summary of some hand evaluation approaches and libraries.
http://www.codingthewheel.com/archives/poker-hand-evaluator-roundup

Near the bottom he summarizes the basic approach and links to an C example. Definitely overkill for a quick exercise, but I found it fascinating (ended up using the 2+2 evaluator for my project).
Tiax;mous
Profile Blog Joined July 2010
669 Posts
Last Edited: 2012-05-03 11:57:11
May 03 2012 11:49 GMT
#2692
Hello everyone!
It has been a long time since I last posted in TL I think but there are some stuff I wanted to share with you guys. I'm doing a spring cleaning and posting some programming related stuff every day and since one of them is Sc2 related, I thought it would be nice to post here about them as well.

For now there are 2 things;

1) Towel
It's a remake of my old ScCalendar Application ( I wonder if anyone remembers that ). I posted the latest setup ( beta version ofc ) and talked a bit about why the project is on hold.

Screenshots
+ Show Spoiler +

[image loading]
[image loading]



You can read more about it and download here

2) Map Generator
Open sourcing this old project. It's a procedural map generator created using C# & XNA. It generates random islands every run etc. There are like 7 posts on this on in my blog in case you want to read more about it. Blog posts are how-to for 2D version, repository is for 3D version.

Screenshots
+ Show Spoiler +

[image loading]
[image loading]
[image loading]
[image loading]



About Open Sourcing it

How-To
Part 1 - Introduction
Part 2 - Creating the Island
Part 2.5 - Smoothing the Coastline
Part 3 - Elevation
Part 4 - Rivers
Part 5 - Moisture

Repository

I'm more than willing to talk about anything you wonder about them so please don't hesitate to ask whatever. I'll open source more stuff in next days/weeks ( most of them are experimental XNA stuff. ) Hope you like those!

straycat
Profile Blog Joined May 2011
230 Posts
Last Edited: 2012-05-03 12:12:32
May 03 2012 12:05 GMT
#2693
On May 03 2012 20:49 Tiax;mous wrote:

2) Map Generator
Open sourcing this old project. It's a procedural map generator created using C# & XNA. It generates random islands every run etc. There are like 7 posts on this on in my blog in case you want to read more about it. Blog posts are how-to for 2D version, repository is for 3D version.

I'm more than willing to talk about anything you wonder about them so please don't hesitate to ask whatever. I'll open source more stuff in next days/weeks ( most of them are experimental XNA stuff. ) Hope you like those!



Interesting! I'll defo check it out!
Rixxe
Profile Joined July 2011
United Kingdom136 Posts
May 03 2012 12:36 GMT
#2694
On May 02 2012 10:35 ObliviousNA wrote:
Ok so I'm working on a .Net project at work and I had a design issue I'm hoping someone can answer. We are storing our data in a System.Data.DataTable structure (http://msdn.microsoft.com/en-us/library/system.data.datatable.aspx) and we have it bound to a DataGrid (formerly DataGridView from WinForms).

My project is to create an undo/redo logging system. To keep it crash resistant we are manually serializing the table changes and recording them in the file. For example if you were to delete Row 3, which contains
1|row3 text|MyObject3,
The log file would add a line that says something along the lines of
DataTableName removed Row 3 Values 1|row3 text|[MyObject3.field1 ...]

2 questions:

1) Is this optimal? Considering the crash-resistant and memory constraints, can we do this faster? I've optimized the file reads/writes - i.e. using FileStream.Write(byte[]), flushing to OS instead of straight to disk, etc) I realize that there are some XML serializations but they didn't give us the capability of hosting multiple dataTable changes in a single undoFile.txt

2) The DataGrid UI allows you to select multiple rows and delete. From a user standpoint, ctrl+z should undo that "mass delete" and replace all those rows in a single step. However, the DataGrid propagates those changes one at a time. There is no method in DataTable to delete multiple rows at once, so those deletes occur serially. Consequently, I have no way of knowing where the user deleted 10+ rows simultaneously, or deleted them by pressing the delete key REALLY FAST. Using some kind of timer to see when the events fire (i.e. within 10 ms of eachother) is kind of a hack, and with (potentially very large) file IO there's no real guarantee it will complete within a reasonable time. Our solution was to listen to the sending window - if an onClick or keystroke event registers, all changes that occur afterward are associated with that one click event. This is also a hack, and runs into issues with programatically changing the DataTable.

Ideas?

Thanks- sorry for the long post :D



Serialization is always fun!

1) Have you looked into a BindingList? It binds directly to the DataGridView and therefore any changes made to the DGV should be directly translated across. Obviously in the context i think you are trying to use it, it might not fill the full function(?). To make a single xml file record all the changes, you can just serialize the BindingsList, set to append. But again thats a bit of a hash to deal with afterwards.

2) Does the DataGrid not have a record number/ID? If not you could add one and not show it. e.g. If you had 100 rows, delete the first 20, the next row ID should start at number 30. If they delete more than one row all you have to check is the current ID and that will tell you what has been deleted. (Does this help?) You could just add this method to your onclick event.

Hopefully this helps, might of understood incorrectly.
*bleep* you up in a gangsta style!
ohampatu
Profile Joined July 2010
United States1448 Posts
Last Edited: 2012-05-06 03:21:01
May 06 2012 03:20 GMT
#2695
I am trying to write some html code to auto generate a monitoring form i generally have to check off on paper and then type out. Im trying to limit having to re-type the same thing albeit it slightly different every time I monitor a tech. Its not completely done, but I ran into a problem I wanted to fix before moving on. Its a form where you choose yes/no depending on whether the person does it. Then you hit generate and it will auto populate the text I need. My problem is with the radio buttons. It wont let me choose 'yes' on more than 1 in each set of row, but it will for 'no' in some of the others. If you load it the radio buttons are just buggy. Is that because im loading it from a free html previewer? Im not sure why the radio buttons aren't working correctly, the yes/no option shouldn't be tied to next row should it? so why would it not let me choose yes on one of the other rows?


code below
+ Show Spoiler +


<html><head><title>Monitoring Notes</title>
<table>
<tr><td>
<h1>Monitoring Form</h1>
<h3>Greeting: Makes a connection; Builds the relationship</h3>
<table class="info">
<tr><td>Answers Promptly; Identifies Self and ISP at the beginning of the call</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q1" VALUE="n">No </td></tr>
<tr><td>Expresses empathy through words and tone; Offers welcoming words</td><td<INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q2" VALUE="n">No </td></tr>
<tr><td>Asks for the UN and caller name; Uses AdminTool to lookup user info, asks for ticket #</td><td<INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q3" VALUE="n">No </td></tr>
<tr><td>Addresses the caller by name; Starts developing a rapport with the caller</td><td<INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q4" VALUE="n">No </td></tr>
<tr><td>Tells the caller they WILL help, or what they CAN do for them</td><td<INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q5" VALUE="n">No </td></tr>
</table>
<h3>Professionalism: Acts Professionally; Expresses Confidence</h3>
<table class="info">
<tr><td>Takes ownership of the call and control of the situation; is specific</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q6" VALUE="n">No </td></tr>
<tr><td>Uses MAGIC phrases to build confidence and trust</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q7" VALUE="n">No </td></tr>
<tr><td>Expresses sincerity and helpfulness through tone; Maintains a good pace</td><td><INPUT TYPE="radio" NAME="q7" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q1" VALUE="n">No </td></tr>
<tr><td>Speaks clearly with proper volume; Avoids tragic phrases</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q7" VALUE="n">No </td></tr>
<tr><td>Uses Please and Thank You to show courtesy</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q8" VALUE="n">No </td></tr>
</table>
<h3>Attentiveness: Gets to the Heart of the Matter; Listens and Asks Questions</h3>
<table class="info">
<tr><td>Listens, doesn't interrupt; Rephrases appropriately</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q9" VALUE="n">No </td></tr>
<tr><td>Uses proper grammar; Avoids the use of slang words or acronyms</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q10" VALUE="n">No </td></tr>
<tr><td>Asks qualifying questions; Asks for permission to gain more information</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q11" VALUE="n">No </td></tr>
<tr><td>Before a hold/lag time for transfer; explains why and receives permission</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q12" VALUE="n">No </td></tr>
<tr><td>After a hold or wait time; uses caller's name, waits for a resopnse, and thanks him/her</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q13" VALUE="n">No </td></tr>
</table>
</td><td valign="top"><button type="button" onclick="generate()">Generate<br />Feedback<br /></button></td><td valign="top"><textarea name="output" rows="20" cols="20" style="width:400px;height:500px;"></textarea></td></tr>
</table>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />

I am become death, for I am the destroyer of worlds.....You will be missed KT Violet!!!
ThatGuy
Profile Blog Joined April 2008
Canada695 Posts
Last Edited: 2012-05-06 03:44:19
May 06 2012 03:36 GMT
#2696
On May 06 2012 12:20 ohampatu wrote:
I am trying to write some html code to auto generate a monitoring form i generally have to check off on paper and then type out. Im trying to limit having to re-type the same thing albeit it slightly different every time I monitor a tech. Its not completely done, but I ran into a problem I wanted to fix before moving on. Its a form where you choose yes/no depending on whether the person does it. Then you hit generate and it will auto populate the text I need. My problem is with the radio buttons. It wont let me choose 'yes' on more than 1 in each set of row, but it will for 'no' in some of the others. If you load it the radio buttons are just buggy. Is that because im loading it from a free html previewer? Im not sure why the radio buttons aren't working correctly, the yes/no option shouldn't be tied to next row should it? so why would it not let me choose yes on one of the other rows?


code below
+ Show Spoiler +


<html><head><title>Monitoring Notes</title>
<table>
<tr><td>
<h1>Monitoring Form</h1>
<h3>Greeting: Makes a connection; Builds the relationship</h3>
<table class="info">
<tr><td>Answers Promptly; Identifies Self and ISP at the beginning of the call</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q1" VALUE="n">No </td></tr>
<tr><td>Expresses empathy through words and tone; Offers welcoming words</td><td<INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q2" VALUE="n">No </td></tr>
<tr><td>Asks for the UN and caller name; Uses AdminTool to lookup user info, asks for ticket #</td><td<INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q3" VALUE="n">No </td></tr>
<tr><td>Addresses the caller by name; Starts developing a rapport with the caller</td><td<INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q4" VALUE="n">No </td></tr>
<tr><td>Tells the caller they WILL help, or what they CAN do for them</td><td<INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q5" VALUE="n">No </td></tr>
</table>
<h3>Professionalism: Acts Professionally; Expresses Confidence</h3>
<table class="info">
<tr><td>Takes ownership of the call and control of the situation; is specific</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q6" VALUE="n">No </td></tr>
<tr><td>Uses MAGIC phrases to build confidence and trust</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q7" VALUE="n">No </td></tr>
<tr><td>Expresses sincerity and helpfulness through tone; Maintains a good pace</td><td><INPUT TYPE="radio" NAME="q7" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q1" VALUE="n">No </td></tr>
<tr><td>Speaks clearly with proper volume; Avoids tragic phrases</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q7" VALUE="n">No </td></tr>
<tr><td>Uses Please and Thank You to show courtesy</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q8" VALUE="n">No </td></tr>
</table>
<h3>Attentiveness: Gets to the Heart of the Matter; Listens and Asks Questions</h3>
<table class="info">
<tr><td>Listens, doesn't interrupt; Rephrases appropriately</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q9" VALUE="n">No </td></tr>
<tr><td>Uses proper grammar; Avoids the use of slang words or acronyms</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q10" VALUE="n">No </td></tr>
<tr><td>Asks qualifying questions; Asks for permission to gain more information</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q11" VALUE="n">No </td></tr>
<tr><td>Before a hold/lag time for transfer; explains why and receives permission</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q12" VALUE="n">No </td></tr>
<tr><td>After a hold or wait time; uses caller's name, waits for a resopnse, and thanks him/her</td><td><INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q13" VALUE="n">No </td></tr>
</table>
</td><td valign="top"><button type="button" onclick="generate()">Generate<br />Feedback<br /></button></td><td valign="top"><textarea name="output" rows="20" cols="20" style="width:400px;height:500px;"></textarea></td></tr>
</table>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />



Pretty easy catch here.

<tr><td>Expresses empathy through words and tone; Offers welcoming words</td><td<INPUT TYPE="radio" NAME="q1" VALUE="y">Yes
<INPUT TYPE="radio" NAME="q2" VALUE="n">No </td></tr>

Copy paste can be mean sometimes

Second issue is your naming convention. Every 'Yes' has the name 'q1', so it groups all of those 'q1' radio buttons together. Same with a couple of the 'No' buttons. So as an example, you can fix this situation like this


<table class="info">
<tr><td>Takes ownership of the call and control of the situation; is specific</td>
<td><INPUT TYPE="radio" NAME="q2-1" VALUE="y">Yes <INPUT TYPE="radio" NAME="q2-1" VALUE="n">No</td></tr>
<tr><td>Uses MAGIC phrases to build confidence and trust</td>
<td><INPUT TYPE="radio" NAME="q2-2" VALUE="y">Yes <INPUT TYPE="radio" NAME="q2-2" VALUE="n">No</td></tr>
<tr><td>Expresses sincerity and helpfulness through tone; Maintains a good pace</td>
<td><INPUT TYPE="radio" NAME="q2-3" VALUE="y">Yes <INPUT TYPE="radio" NAME="q2-3" VALUE="n">No</td></tr>
<tr><td>Speaks clearly with proper volume; Avoids tragic phrases</td>
<td><INPUT TYPE="radio" NAME="q2-4" VALUE="y">Yes <INPUT TYPE="radio" NAME="q2-4" VALUE="n">No</td></tr>
<tr><td>Uses Please and Thank You to show courtesy</td>
<td><INPUT TYPE="radio" NAME="q2-5" VALUE="y">Yes <INPUT TYPE="radio" NAME="q2-5" VALUE="n">No</td></tr>
</table>
ohampatu
Profile Joined July 2010
United States1448 Posts
May 06 2012 04:02 GMT
#2697
oh damn, copy/paste fail indeed. can't believe i didn't catch that i didn't rename those after creating each line

thanks alot, and i like your example
I am become death, for I am the destroyer of worlds.....You will be missed KT Violet!!!
One Student
Profile Joined April 2011
73 Posts
May 09 2012 17:36 GMT
#2698
Sorry to derail the topic, but seeing as this where most of the forum's IT geeks gather I have a general question concerning employment. I recently applied to a small IT company to do my summer internship as per my CS major requirements. I was wondering if any of you have any experience in the job market and I'd really appreciate someone pm'ing me. I don't want to discuss it publicly.
Depression is what you get for leading a repetitive life.
holdthephone
Profile Blog Joined August 2010
United States523 Posts
Last Edited: 2012-05-10 17:38:08
May 10 2012 17:37 GMT
#2699
What are the best webhosting services? Looking to start up a site and plan to implement a database...

Is GoDaddy the obvious choice?
tofucake
Profile Blog Joined October 2009
Hyrule19144 Posts
May 10 2012 18:34 GMT
#2700
I use DreamHost, personally. They are pretty awesome
Haven't used GoDaddy in years, as my last experience with them was mostly annoying.
Liquipediaasante sana squash banana
Prev 1 133 134 135 136 137 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 29m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
LamboSC2 492
ProTech79
BRAT_OK 56
MindelVK 20
StarCraft: Brood War
Soma 1529
Horang2 1474
Light 830
ZerO 751
Barracks 697
Larva 685
Mini 589
Stork 448
actioN 423
firebathero 312
[ Show more ]
hero 273
Hyun 262
JulyZerg 172
PianO 123
ggaemo 114
Rush 93
sorry 70
Pusan 66
Dewaltoss 63
Mong 62
Sharp 52
zelot 49
ToSsGirL 23
Sacsri 21
Terrorterran 18
scan(afreeca) 11
NaDa 11
ajuk12(nOOB) 8
Dota 2
Gorgc8460
qojqva2660
Fuzer 321
Counter-Strike
olofmeister1983
fl0m1797
Heroes of the Storm
Khaldor607
Liquid`Hasu371
Other Games
singsing2117
B2W.Neo1197
Skadoodle302
Hui .244
ArmadaUGS169
KnowMe160
ZerO(Twitch)34
Trikslyr30
Organizations
Other Games
BasetradeTV26
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• HeavenSC 28
• Adnapsc2 23
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• HerbMon 9
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 3590
• lizZardDota241
League of Legends
• Jankos3420
Upcoming Events
Safe House 2
29m
IPSL
2h 29m
Sziky vs Havi
Artosis vs Klauso
Monday Night Weeklies
23h 29m
WardiTV Invitational
1d 18h
WardiTV Invitational
1d 21h
Tenacious Turtle Tussle
3 days
The PondCast
3 days
WardiTV Invitational
4 days
Online Event
4 days
RSL Revival
5 days
[ Show More ]
RSL Revival
5 days
WardiTV Invitational
5 days
Afreeca Starleague
6 days
Snow vs Soma
Sparkling Tuna Cup
6 days
WardiTV Invitational
6 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
EC S1
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
BSL 21 Non-Korean Championship
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
CranK Gathers Season 2: SC II Pro Teams
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.