Posts

Python regex: Fix one html close tag -

<div>random contents without < or > , has ( ) <div> just need fix closing div tag so looks <div>random contents</div> i need in python regex. the input exact first line, there no < or > in random contents replace (<div>[^<]*<)(div>) with $1/$2 note: bad practice, don't it unless it's absolutely necessary!

How to update Ruby on Ubuntu 10.10? -

apologies in advance if nubs problem. one friend got beginning rails 3 , started playing ruby using (as .net developers!). have installed ubuntu 10.10 on vmware player - apparently had ruby 1.9.2. based on instructions in book (with quirks total linux nubs) managed install ruby 1.9.1 (ruby --version -> ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux]). but rails (latest version - 3.0.2 think) insist ruby 1.9.2 better our health! so: how update ruby on ubuntu 10.10? want 1 ruby there. i recommend ruby version manager . install (yes, takes leap of faith): $ curl https://get.rvm.io | bash then $ rvm install 1.9.2 $ rvm use 1.9.2

I need help understanding Silverlight 4 security -

does else think silverlight 4 security bit screwball? look @ following scenario: silverlight when set trusted app, , run out of browser mode allows browse file using file open dialog. you require name of path of file open com automation. example (excel/word) anything. it impossible full path of file dialog because of security restrictions you can using com filesystemobject - ever want users file system, including create folders, move , delete files. so in other words, why fuss security in silverlight, hinders real business use cases, when possible access file anyways using com? to way, if user runs malicious silverlight app, unlikely they'll - oh com @ fault. com afterall being called silverlight app. here mean.... user browses file - c:\myfile.xls silverlight prevents getting path (for security reasons) silverlight lets work documents using com can ever want file system in background anyways. including copying file documents, if knew name! besides can wipe...

Windows Compressed Folders avoids Mercurial repo folder .hg -

creating zip file using send -> compressed folder excludes .hg folder on windows 7. same behavior seen in xp. because folder name starts dot ? mercurial creates .hg folder hold repository. whenever working folder zipped, leaves .hg folder out of compressed .zip file. try using 7-zip or archival utility compress files, since windows doesn't filenames starting . .

asp.net mvc - How do I display data from multiple tables in a single MVC view -

i having hard time solving following mvc view. my goal display data multiple tables in single mvc view. bulk of data comes table called retailers. have table called retailercategories stores retailerid retailers table , categoryid linking category table. note there multiple records each retailerid in retailercategories table. in view want show list of retailers , each retailer want show list of categories applicable them. what best way accomplish this? of things have tried covered in can mvc viewmodel issue? this not appear right approach. you need view model tailored needs of view. when defining view models shouldn't thinking in terms of tables. sql tables have absolutely no meaning in view. think in terms of information need show , define view models accordingly. use automapper convert between real models , view model have defined. so forget said tables , focus on following sentence: in view want show list of retailers , each retailer want show ...

What is the best way to structure an nservicebus solution? -

we're in process of developing service , hr service purposes of user management, we're having trouble deciding best way structure projects. one dev believes project , hr project's should separated in subversion , should use svn externals each messages project? another dev thinks should put them in same subversion project partition services having all.sln, hr.sln, , it.sln splitting them folders. what best way partition these service boundaries? i'm not familiar subversion, typically have done have dependencies between services checked source control post build , branched respective service after. reason done allow each service independently decide when take newer version of shared dependency. using branch operation have full history of dependency , can roll @ time. gives ability ship service different versions of same dependency. in subsequent branches of service can have varying versions of dependency. in case check-in messages assemblies , bra...

osx - Fastest Simplest way to use PNG textures in OpenGL -

i looking fastest , easiest way use png (with alpha values) textures in opengl. have tried many different libraries bloated , hard compiled/working on mac. i'm not familiar opengl textures , of "gotchas" putting emphasis on simple. it helpful if give me nice makefile example if solution involves linking library. thanks! you might give soil whirl.