Posts

In ASP.NET MVC, how do I display a property name as a label splitting on CamelCase -

i know have seen before. can't remember if c4mvc template demo or input builder thing! need know how can use convention of camelcasing view model properties , having "camelcasedproperty" rendered in label "camel cased property". should handled create new view wizard rather programatically handling this. i don't think want possible in vanilla asp.net mvc 2. in asp.net mvc 2 need decorate model displayname attribute text want , auto generated wizard use labelfor output label property. eg: class mymodel() { [displayname("your property name")] public string yourpropertyname { get; set; } } then in view: <%= html.labelfor(m => m.yourpropertyname) %> if saw demo of being done other way have been mvccontrib project inputbuilders . here direct link part of project think referring to: http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-la...

Concatenate HTML tables with PHP DOMDocument -

i have whole bunch of large html documents tables of data inside , i'm looking write script can process html file, isolate tags , contents, concatenate rows within tables 1 large data table. loop through rows , columns of new large table. after research i've started trying out php's domdocument class parse html wanted know, best way this? this i've got far... $dom = new domdocument(); $dom->preservewhitespace = false; @$dom->loadhtmlfile('exrate.html'); $tables = $dom->getelementsbytagname('table'); how chop out other tables , contents? i'd remove first table since it's table of contents. loop through table rows , build them 1 large table. anyone got hints on how this? i've been digging through docs domdocument on php.net i'm finding syntax pretty baffling! cheers, b edit: here sample of html file data tables i'd join http://thenetzone.co.uk/exrates/exrate.html ok got sorted phpquery , lots of tria...

how to run vibrate continuously in iphone? -

in application i'm using following coding pattern vibrate iphone device include: audiotoolbox framework header file: #import "audiotoolbox/audioservices.h" code: audioservicesplaysystemsound(ksystemsoundid_vibrate); my problem when run application gets vibrate second want vibrate continuously until stop it. how possible? there numerous examples show how private coretelephony call: _ctserverconnectionsetvibratorstate , it's not sensible course of action since app will rejected abusing vibrate feature that. don't it.

iphone - SIGABRT error when running on iPad -

all. i've been banging head few hours because of problem. have universal project that's mix of iphone , ipad projects. put these codebases universal project and, after lot of " #if __iphone_os_version_min_required >= 30200 " checks, got project run in both iphone (os 3.0 3.1.3) , ipad simulators. after doing more finagling project settings of external libraries load, got app load on iphone (which runs os 3.1.3). however, when run app on ipad, immediate sigabrt error. i've tried running under debug , under release , active architecture of both armv6 , armv7. i've checked , double-checked app has right nib files set (but, again, app runs fine in simulator). i've gone through external libraries i'm using , set them have same base sdk (3.2), same architectures (optimized (armv6 armv7)), same targeted device family (iphone/ipad), , same iphone os deployment target (iphone os 3.0). so, summarize... have universal app works in simulator iphone...

c# - Create custom print port in .NET -

i trying figure out if possible create custom print port in .net. functionality trying achieve intercept data generated printer driver , send remote server instead of device. not really. either creating virtual port driver or network redirector requires native code. however... you capture data installing network print port , implementing server side in .net. example, lpr require create tcp socket server, , that's feasible in c#. i don't know of existing c# implementation, learn lot source code of p910nd .

configuration - CakePHP: What to use for MySQL users & permissions? -

i'm getting ready deploy cakephp site first time. i'm using site mysql database, , i'm still little unclear proper use of users & permissions mysql -- i'm talking "login" , "password" fields appear in app/config/database.php. during development, i've been using 'root' , 'root' -- i'm pretty sure can't idea. question is: best practices assigning mysql user cakephp app, , mysql privileges should assigned it? the least amount of permissions possible, insert, select, update, , delete on database in question, not create/drop privileges. best practice: make password hard guess. you're hardcoding anyways, there's no reason not make terrible monster of password. also, ensure can accessed localhost or ip. grant insert, select, delete, update on mydb.* 'myuser'@'localhost' identified 'monsterpassword'

animation - ActionScript - Screen Wrapping A Gradient Line? -

i have straight, gradient line extends 1 end of screen other. what best (or only) approach screen wrapping line graphic, appears moving? my current " solution " draw horizontal line @ double width of screen , duplicate gradient pattern each half of line. line center-registered , it's moved toward right. once half of line traverses stage, line reset it's starting point. is there better way? well, alternative can think of using drawing api draw gradient stroke, calculating offset in each frame. more costly applying positional transform on display object. tiny bit of arithmetic alone should enough make slower. your proposed solution may not seem elegant , or efficient running in vm highly optimized drawing , transforming occluded vectors , bitmaps (and undependable on every other optimization) think best bet trust vm @ point. :)