Posts

Featured post

php - How can I merge Nodes & Webform Submissions into instances of one general Content Type in Drupal 6? -

i built site using drupal 6 allows users submit information site owner in 3 different ways. are: webform a : quick contact - collects name, email, phone , message. webform b : free pdf book email webform - collects info similar above, , sends user email pdf attachment book written site owner. node create : case evaluation - form node creation page using multi-step module, cck , lot of conditional fields. anonymous users can fill out form , node data emailed site owner based on rule created. all 3 of these forms work in terms of doing supposed site. webform submissions accessed webform node owner, , set table view manage node submissions. even though forms gathering different data, @ end of day, important data personal contact information (each 1 collects name, email and/or phone), , each form submission (from of forms) considered lead owner , followed on. i centralize these various form submissions (2 webforms + 1 node) 1 content type (leads) managed 1 page, rather t...

security - How to sanitize user created filenames for a networked application? -

i'm working on instant messaging app, users can receive files friends. the names of files received set sender of file, , multiple files can sent possibility of subdirectories. example, 2 files sent might "1" , "sub/2" such downloaded results should "downloads/1" , "downloads/sub/2". i'm worried security implications of this. right off top of head, 2 potentially dangerous filnames "../../../somethingnasty" or "~/somethingnasty" unix-like users. other potential issues cross mind filenames characters unsupported on target filesystem, seems harder , may better ignore? i'm considering stripping received filenames ".." , "~" type of blacklist approach individually think of problem cases hardly seems recipe security. what's recommended way sanitize filenames ensure nothing sinister happens? if makes difference, app running on c++ qt framework. it's wiser replace ".....

java - JNLP isn't cooperating JFileChooser Access Denied -

i feel dumb...... so writing java app, , if can me work you'll able see it. so jar file here: http://team2648.com/otis2/admin/omninode2.8.jar i able used java web-start application, following tutorial here: http://download.oracle.com/javase/tutorial/deployment/webstart/deploying.html so wrote following jnlp file directed: <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0+" codebase="http://team2648.com/otis2/admin" href="test.jnlp"> <information> <title>omninode mapper</title> <vendor>techplex engineer</vendor> </information> <resources> <!-- application resources --> <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/> <jar href="omninode2.8.jar" main="true" /> </resources> <application-desc name="omninode mapper" main-class=...

geospatial - MongoDB Bound Queries: How do I convert mile to radian? -

i have collection of stores geospacial index on location propery. what trying given user's latitude, latitude , search radius (mi), want return list of stores within parameters. i saw following example on mongodb documentation ( http://www.mongodb.org/display/docs/geospatial+indexing ), looks distance in radians. center = [50, 50] radius = 10 db.places.find({"loc" : {"$within" : {"$center" : [center, radius]}}}) so, formula convert miles radians? solution awesome people @ mongodb-user helped me find answer. basically, looking way limit distance. per, updated documentation, there 3rd parameter $near query: can use $near maximum distance db.places.find( { loc : { $near : [50,50] , $maxdistance : 5 } } ).limit(20) the value $maxdistance in radians; so, had take distance in miles , divide 69. thank you! as docs say: all distances use radians. allows multiply radius of earth (about 6371 km or 3959 miles) distance in choice ...

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

i having super hard time compiling , using taglib 1.6.3 in qt project. i've tried can think of. taglib claims supported through cmake i'm not having luck. furthermore, i'm confused kinds of files need qt libs! i've built *.a files, *.lib, , *.dll. understand far... believe since i'm working in windows *.lib want. no matter do, end "undefined references" taglib functions try use when try compile qt project. have tried mingw32, msys, visual studio 2008, , cross-compiling windows on linux. turning nothing. what makes less sense me if compile same taglib source qt on mac (g++ think?) works fine! somewhere in windows compilation procedures have going wrong. have been smacking face on desk 30 (on , off) hours trying figure out. since qt uses mingw must compile taglib same compiler? if compile *.lib's visual studio not compatible? are *.a libraries usable in windows? (assuming mingw) i'm still trying handle on c++ stuff, after reading coun...

Using GO in SQL Server 2005 -

i working on sql server 2005 , have come accros issue have run multiple update query on single table 1 one. takes lots of time execute 1 one came know using "go" can run query 1 one. this update table .... go update table a go update table a i not sure can put seperate update statement , run query 1 one. doing on production need sure should work. can give me example can see using go, query runs 1 one , not parallel? from go (transact-sql) go not transact-sql statement; command recognized sqlcmd , osql utilities , sql server management studio code editor. sql server utilities interpret go signal should send current batch of transact-sql statements instance of sql server. current batch of statements composed of statements entered since last go, or since start of ad hoc session or script if first go.

c++ - cin skipping in while -

why cin being skipped in following while? int main() { int option; cin >> option; while(!cin.good()) { cout << "looping" << endl; cin >> option; } } errors in iostreams sticky. need clear error state before cin works again. int main() { int option; cin >> option; while(!cin.good()) { cout << "looping" << endl; cin.clear(); // ignore erroneous line of input: cin.ignore(numeric_limits<streamsize>::max(), '\n'); cin >> option; } }