Re: Round to the nearest .5 value
cfoutput #Round(3.21/0.5) *0.5# #Round(3.31/0.5) *0.5# #Round(3.61/0.5) *0.5# #Round(3.91/0.5) *0.5# #Round(4.24/0.5) *0.5# #Round(4.49/0.5) *0.5# #Round(4.50/0.5) *0.5# /cfoutput produces: 3 3.5 3.5 4 4 4.5 4.5 Cheers, Allen Che Vilnonis wrote: I'm trying to create a ratings system that shows 1/2 values. Quick question, what would be the easiest way to round a value to the nearest .5 of a number? I'm trying to avoid multiple if/elses. i.e. 3.21 would round to 3 i.e. 3.31 would round to 3.5 i.e. 3.61 would round to 3.5 i.e. 3.91 would round to 4 Thanks, Che ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328693 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Question about CF8 on Win 2003 Server
Hey there, I was wondering if anyone has had any experiences with this situation: I have a Windows Server 2003 server. I need to install CF8 (Standard installation) on it, but I know for a fact that in the next little while, that machine will undergo a machine name change. Does CF8 care what the name of the machine is? Has anyone changed the machine name when there is a running CF8 installation on it? I am trying to determine if it is better for me to just wait until the server's machine name changes. Thanks, Allen ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328714 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Education
Billy Cox wrote: I'm a musician as well. scary!! Rick Faircloth wrote: I think you're right, Mark. Music, especially theory, is very logical and an lot like programming...just a different medium. *raises up guitar, and keyboard and rests them on the desk by his keyboard* *officially creepy now* Allen ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327681 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Education
Bryan Stevenson wrote: Speaking as a non-musician. Poppycock, you picked up my guitar when I brought it in the office and played it. Actually I think I really am onejust never had the time to keep playing ;-) I believe that that while you can phrase computer science as a science, there is much more art than science to it. There is artistry in seeing all of the parts and guiding them into the whole. It really makes sense that musicians and programmer/analysts tend to go hand in hand. Allen ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327684 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Getting last inserted record from database
You may also want to consider the use of sequences instead of an identity column (a la Oracle and others). I don't know if that is an option for you though. Allen Alan Rother wrote: Here are the help docs for your database type. http://www.h2database.com/html/functions.html#identity http://www.h2database.com/html/functions.html#identityIn the same CFQUERY as your insert do a select and follow the syntax indicated on that help page. You also need to specify a name for your query so it can return the resulting ID. Keep in mind, in a high transaction environment, this may not always return the ID of the row you just inserted, it could return another query's ID. If you are going to have a high volume of transactions you may want to use a separate query that looks for the data you just inserted =] ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327699 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Education
To buck the overall trend, Computer Systems Technology at Camosun College. I have seen professionals in our field ranging from Computer Science trained, to those with Doctorates in Paleontology. Its funny how most of the instructors (something like 75%) did not have degrees in either computer science or education. From a practical standpoint, experience does count the most. I think, though, that a lot of companies use 'must have a a degree' as a brainless filter to try and weed out a large number of applicants. Its an attitude that has always been there. I personally believe that experience over education is what should really be considered when staffing. That, and communication skills. I've seen computer science people with Masters degrees who were terrible programmers, I've seen people with no computer science background being terrific programmers, and everything in between. I wouldn't even want to apply for a company that _requires_ a degree over experience, because if they are looking at the wrong criteria right off the bat, can you imagine what their attitudes towards doing business are like? Allen Souliere Phillip Vector wrote: Just curious.. I've seen allot of jobs require lately BA/BS and not accept experience in it's place. What in your estimation is the percent of coldfusion people who have these and do you have one yourself? For me, I don't have any college experience and I would guess that about 5% of the coldfusion community actually have a BA/BS. Has your experience been different? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327600 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Free Database Enginer for ColdFusion
Oracle XE may not exceed 4 GB. If this is a limitation, then it is not suitable. Also, I believe it requires full installation. Derby runs out of the box quite easily and has a very small footprint. Allen I. Addoum. wrote: best choice would be Oracle XE (it's free) regards Bob From: Arsalan Tariq Keen arsalk...@hotmail.com To: cf-talk cf-talk@houseoffusion.com Sent: Tuesday, October 6, 2009 7:49:56 AM Subject: Free Database Enginer for ColdFusion Hi fellows, does anyone know of a lightweight free database engine that I can bundle with my applications for small and medium size businesses? Regards, Arsalan ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326979 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: reading text from images
For handwritten forms, you generally must use data entry to make them electronic. There is too much variance in handwriting to ever make it suitable for OCR. You should consider either having them all typed in, or store them electronically and just create a database with enough meta-information about the documents to allow searching. I guess it depends on what the company needs to be able to search by. Allen Richard White wrote: Thanks for the link jason, we will try this out i also should have mentioned that the scanned writing is handwritten. a company is just becoming computerised and therefore wants all previous handwritten forms to be transferred to digital. we are sure many of you have faced the same problem before so would appreciate any advice on how you tackled this issue ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326837 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: reading text from images
Jason Fisher wrote: Agree with Alan here. If you need ancient handwritten docs to be databased and/or search-ready, I would recommend finding a couple college types to do some data entry for you at $10 / hour and get it done that way. OCR can't pick up the possible variations among various handwriting forms. Exactly. I would consider, though, finding a company that does double data entry. The cost is generally quite acceptable, and the accuracy of using a professional data entry firm is well worth it. They can also handle very large volumes very quickly. Years ago, I actually worked in Data Entry, doing birth certificates, death certificates, hunting entries, school marks, etc. I've seen some _truly_ terrible writing, and in the long run I think data entry firms catch much more of those mistakes than most people would. Best of Luck, Allen ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326857 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Best approach
I have a great approach to this, assuming java can run on the tablet PC. It is possible to make a bundle with OpenBlueDragon (with some .bat files to handle the startup) capable of running on the Tablet PC. It can run locally with no network required, allow you to leverage your CFML skills to do the processing of the checklist. Once done, the local CFML web application can then send the data (once connected) via web services (or whatever upload mechanism you decide upon) to the main server over the internet. It is also possible through the admin api to set up a datasource from the tablet to the master server programmatically in OpenBD, and insert directly into your database, but you may prefer to expose the database in a different way (ie Web Services, etc.) instead. I have done a standalone server in this manner before. Otherwise, you may be looking at writing a native app on the tablet PC to do this. Allen Randy Adkins wrote: Looking for the best approach to the following task: allow users to download a checklist to a tablet pc, do some security checks with the tablet pc in hand (not connected to the web). Upon completing the checks, connect to the Internet and upload the results. Then I can parse and add to the master database. Thought? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326367 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Can somebody translate this to coldfusion?
Rick T rtuinenb...@gmail.com wrote: #define STX 0x02 #define ETX 0x03 it is a function of type integer called calculate_lrc. There is an input pointer to a string called packet. short int calculate_lrc(char *packet) { define variables char *lrc_ptr; short int lrc = 0; assign the lrc_ptr (pointer) to the first character of the packet string lrc_ptr = packet; If the first character is a STX (start transmission x02, return with a failure value of -1 if( ! (lrc_ptr = strchr (lrc_ptr, STX )) ) return (-1); The strchr function in ANSI C does this: The strchr() function returns a pointer to the first occurrence of the character c in the string s. So, I take this to mean that if STX does not occur anywhere within the string pointed to by lrc_ptr, then the condition is met and -1 is returned. Add one to the pointer ++lrc_ptr; start a do while loop do { assign the lrc variable to the current pointer address plus one character lrc ^= *lrc_ptr++; This statement is actually doing this: lrc is assigned the value of (lrc BitwiseXOR whatever is stored at the _current_ address of lrc_ptr). Because the ++ is after lrc_ptr, it is a post-increment. So, the ++ increments the pointer _after_ it is referenced in the statment. You could break that statement into 2 parts to see what is really happening: lrc ^= *lrc_ptr; lrc_ptr ++; check to see if the next character is the end of transmission character ETX (x03) } while (*lrc_ptr != ETX); drop out the do while loop when the current character pointed to by the lrc_ptr is ETX assign the lrc variable (perhaps last received character with the char pointed to by the current pointer position I think this is actually performing a Longitudinal Redundancy check (see http://en.wikipedia.org/wiki/Longitudinal_redundancy_check). It states: Set LRC = 0 For each character c in the string do Set LRC = LRC XOR c end do An 8-bit LRC such as this is equivalent to a cyclic redundancy check using the polynomial x8+1, but the independence of the bit streams is less clear when looked at that way. Many protocols use such an XOR-based longitudinal redundancy check character, including the IEC 62056-21 standard for electrical meter reading, and the ACCESS.bus protocol. lrc ^= *lrc_ptr; Once again, ^= means lrc = (lrc BitwiseXOR whatever is stored at the _current_ address of lrc_ptr). return the character return lrc; } So my guess after 25+ years of fooling with this sort of thing is that this function takes a string from the comm port (or other UART device), lops off the control codes, and sends the last character in the string to the caller. I am rusty at this and without context, it is tricky to give you an exact answer. It took me a while to step through this too. I miss C, I haven't been able to use it in a project in ages. Of course, I could be completely out to lunch too. No pun intended as I swallow my burger. I miss the old days are reading teletype and paper tape codes. I remember writing C code to do something like this when I was communicating with a teletype device back when microcomputers came out. It was like magic. Got any COBOL you want translated. ;) Good luck, Roger -- http://www.linkedin.com/pub/roger-austin/8/a4/60 http://twitter.com/RogerTheGeek http://www.misshunt.com/ Home of the Clean/Dirty Magnet http://cfinnc.com/ ColdFusion Conference in North Carolina Oct 17-18 Best of luck too. I started pumping out my CF example, but I won't have time to doublecheck it for accuracy yet. One caveat to this whole thing is that in the code above, the C code is treating each character as a char (1 byte). I have _no_ idea what CF will treat that character in the string as1 byte, 2 bytes, etc. Are you able to say what application you will be using this for? Allen Souliere ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326280 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: warm stand by for a coldfusion application
When my cf application server goes down, I want a backup machine (warm backup I guess) to take over. Should be a simple IP switch from one machien to another if possible. Can someone who have worked on failover scenarios suggest some options for me? I do not want my application to die due to machine crash. Several years ago I had the experience of using the commercial product Central Dispatch from Resonate (sucked up by Sun I believe). http://www.resonate.com/prod_centr_disp.html It was an end to end fail-over and load balancing solution, and at the time it ran on Linux. I believe that they removed support for Linux circa 2000, 2001. It was a really bang-on product though. Allen ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326286 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4