Posts

Showing posts from February, 2010

How can I get a SharePoint user profile via the "Friendly Name" using the SP web service? -

i'm retrieving list of names sharepoint list in client program. names populated name picker in sharepoint. in xml returned list query, list looks this: "#10;#some name;#12;#another name;#15;#yet anothername" my program needs account name (or email address) of each user. can use getuserprofilebyname("domain\\username") , don't have account name. can't getuserprofilebyname("some name") because has account name. the number before each name index or id, can't use getuserprofilebyindex(10) because have managing own data or have administrator credentials. so providing me 2 important pieces of information, can't retrieve further information using them. are sure number index, think might userid site collection. , seems odd sort of user list too, anyway: string result = "#10;#some name;#12;#another name;#15;#yet anothername"; string[] users = result.substring(1).split(new string[2] { ";", "#"

sockets - How to use a PHP Fastcgi process from CLI -

i have php running via fastcgi on apache2. php process uses unix socket. would possible access socket command line , execute php script? i have long running operations can take hours execute, going via webserver not option. on other hand, calling php command line directly not optimal, because cli process cannot access shared caches of fastcgi php process. i tried socket command, notreally know do. i got working cgi-fcgi.

content management system - CodeIgniter - where to put CMS -

i come background of coding client website projects scratch mysql , php. typically public facing sites mixture of static content, dynamic content plus little functionality here , there (i.e. account, searching etc). nothing heavy. so code little cms site let them update need to, put in protected folder , that's that. now i'd use codeigniter , more of mvc approach next site. should doing separate cms out rest of site or area (with own controllers/models etc) , authentication? there several methods create admin interface in codeigniter described at: http://philsturgeon.co.uk/news/2009/07/create-an-admin-panel-with-codeigniter you want @ "#2" on list; it's lightweight , not additional work.

python - Find all links inside a table -

my html page has: ... <table class="t1" ..> <tr><td> ... <a href="">...</a> ... <a href="">..</a> </table> ... i have: html = beautifulsoup(page) links = html.findall('a', ?????????) how can find links inside table? find table ( by class in case), find links within it. html = beautifulsoup(page) table = html.find('table', 't1') links = table.findall('a')

html - Why is right part being positioned differently in IE6 -

on page: http://phplist.xxmn.com/node/18 in ie7 , firefox, right part (the css class contentsidebar) displays ok, in ie6, doesn't display well. displayed abnormally - location @ bottom right. i know ie6 dead, in china, there lots of people still using it. how correct css make page display adequately in ie6? thank you. this ugly sin, fixes ie6 problem: <!--[if ie 6]> <style> #leftcontent { width: 660px } .bread_nav, #leftcontent .node, #leftcontent h1, #author_info { width: auto !important } </style> <![endif]--> (you can put in own stylesheet if wish. make sure it's last one.) the idea set width of #leftcontent bit less was, override million different instances have of width: 668px (these extraneous widths not needed browser, way) on elements inside #leftcontent auto width. @summer had right idea changing widths around, missing specifics.

Can I use these PHP functions together? -

can use these php functions below: $user = mysql_escape_string($user); $user = filter_var($user, filter_sanitize_string); $user = stripslashes($user); $user = trim($user); together this: $user = mysql_escape_string(stripslashes(trim(filter_var($user, filter_sanitize_string)))); sorry if stupid question. var_filter validate or sanitize var according list of predefined filters: filter_validate_email, filter_sanitize_email, filter_validate_url, filter_sanitize_url. trim , stripslashes old school way sanitize vars mysql_escape_string sanitize querys mysql, therefore function deprecated, must use mysql_real_escape_string, syntax identical. var_filter elegant , have many options trim , stripslashes http://www.php.net/manual/en/filter.filters.php

Python's random module is not importing -

i having problems importing python's random module using eclipse. creates red line under random when do: import random i think may have accidentally deleted it, , if so, how can back? tried copying , pasting source python documents, won't compile. first of all, try importing random in python shell. if not work, reinstall python. if pydev complaining random being missing, should try rebuilding pydev's module paths in preferences.

ruby - How do I run my modular Sinatra app? -

i'm building new version of lovers sinatra. can view lovers source code on github . i'm able run app in cucumber mode running cucumber via cli root directory of repository. but... 1) how run app in development mode? it's little tricky because it's modular app, , i've moved app.rb file lib/lovers/application.rb . 2) how run shotgun automatically restarts app on every http request? 3) when run ruby app.rb sinatra app, do? if answer part 3) well, think i'll able figure out answer 1 & 2. thanks! 1) run bundle exec shotgun project root. shotgun, opposed other rack servers thin, designed... actually... designed "development" mode... in reloads code if changes. 2) why on every request? shotgun automatically reloads needed. 3) ruby app.rb runs small app server (as seen here: http://www.sinatrarb.com/ ) not want. shotgun should trick. the important thing see here config.ru in loversapp's root directory. that'

Understanding Silverlight, MEF, on-demand Xap loading and caching -

i'm using mef load-on-demand xaps in silverlight 4 application. looking increasing performance through use of caching. understanding mef uses webclient download xap, in turn use browser's downloading mechanism, , therefore subject caching policy. in testing, results i'm seeing confusing, , results differ between browsers. obviously, on first access, cache cleared, on-demand xaps requested server. and, duration of application session, xaps downloaded once. far. however, expecting (or @ least hoping) xaps cached between browser sessions well. no - observe following (using fiddler): internet explorer if refresh browser (ctrl+f5) on-demand xaps not requested server, , loaded local cache. if restart browser, downloaded again. boo. firefox , chrome if refresh page (ctrl+f5) on-demand xaps requested again server - no caching occurs @ all. boo. , obviously, no caching occurs if restart browser. the ideal behavior me browser, when needs load xap, query server

iphone - Translate String in a language (Enlgish) to other language (phone's current language) using buil-in API -

i calling google maps app show directions between "current location" , location. using following code, nsstring* url = [nsstring stringwithformat: @"http://maps.google.com/maps?saddr=%@&daddr=%f,%f", @"current\%20location", destcoordinate.latitude, destcoordinate.longitude]; [[uiapplication sharedapplication] openurl:[nsurl urlwithstring:url]]; note passing @"current\%20location" saddr . works fine if phones language set english . @pazustep, here , in post regarding finding current location, suggested wont work if language different. , obviously, solve issue, have use core location find current location , pass latitude , longitude google maps app. expecting other way solve issue without modifying implementation logic. is there built-in api available translate string "current location" , or string, current phone language ? if not, there way tell google maps app

Regex to replace all '&' which are in " " in a string....in javascript -

i have url in parameters contain '&' characters ..now have ajax call server sends exception on that..so solution replace '&' of parameters %26 , make call... e.g... url = http://localhost.com/?q=java&industry="it&web"&location="new-york & florida" the result must be... = http://localhost.com/?q=java&industry="it%26web"&location="new-york %26 florida" if you're stuck string , want try encode it: var url = "http://localhost.com/?q=java&industry=\"it&web\"&location=\"new-york & florida\""; one option capture quoted expressions (assuming match, of course), , apply encodeuricomponent on them. result having whole parameter encoded, including quotes: url = url.replace(/"[^"]*"/g, encodeuricomponent); > http://localhost.com/?q=java&industry=%22it%26web%22&location=%22new-york%20%26%20florida%22 similarl

h.264 - Can Flash Media Server stream H264 over RTMP? -

we use flash media server stream flv videos on rtmp security, seeking , adaptive bitrate capability. we move h264 encoded videos in mp4 container not seem work on rtmp. does fms support mp4 h264 on rtmp? fms v4 required (we're on v3)? yes does. try using flash media encoder , you'll find options stream using h264 codec via rtmp. hope helps.

c# - Format code shortcut for Visual Studio? -

in eclipse there shortcut ctrl + shift + f re-indents code , fixes comments , blank lines. there equivalent visual studio 2010? visual studio c# key bindings to answer specific question, in c# using c# keyboard mapping scheme, use these hotkeys default: ctrl + e , ctrl + d format entire document. ctrl + e , ctrl + f format selection. you can change these in tools > options > environment -> keyboard (either selecting different "keyboard mapping scheme", or binding individual keys commands "edit.formatdocument" , "edit.formatselection"). if have not chosen use c# keyboard mapping scheme, you may find key shortcuts different . example, if not using c# bindings, keys be: ctrl + k + d (entire document) ctrl + k + f (selection only) to find out key bindings apply in your copy of visual studio, in edit > advanced menu - keys displayed right of menu items, it's easy discover on system. (please not edit ans

How do I see the list of changed files for a single commit, in Git? -

when git status list of changed files. i'd list of changed files commit. there way use git show or other command that? thanks. yes, pass --stat flag: git show --stat 1268afe676e for commits, git show takes same formatting arguments git diff-tree , see the latter's documentation other formatting options.

c# - Getting a sub set of SortedDictionary as a SortedDictionary -

in c# how filter sorteddictionary using linq producing subset sorteddictionary? eg. i'd write sorteddictionary<int, person> source = ..fetch.. sorteddictionary<int, person> filtered = source.where(x=>x.foo == bar) the way i've found create helper method , use that sorteddictionary<tkey, tvalue> subdictionary<tkey, tvalue> ienumerable<keyvaluepair<tkey, tvalue>> l) { sorteddictionary<tkey, tvalue> result = new sorteddictionary<tkey, tvalue>(); foreach (var e in l) result[e.key] = e.value; return result; } ... sorteddictionary<int, person> source = ..fetch.. sorteddictionary<int, person> filtered = subdictionary(source.where(x=>x.foo == bar)) if want one-statement solution, work: sorteddictionary<int, person> filtered = new sorteddictionary<int, person>( source.where(x => x.value.foo == bar) .todictionary(kvp => kvp.key, kvp =&

silverlight - How to bind stackpanel visibility property -

hi new silverlight 4. have 2 radio buttons in views name internal , external in stackpanel1,which binded view model. in stackpanel2 have textblock , button. need when select internal radio button stackpanel2 should visible , on external selection stackpanel2 should invisible. how bind stackpanel2 visibility property viewmodel. pls solve ma problem possible. you have add new visibility property in data model , bind property stackpanel visibility property, further can bind boolean property have need of converter. converters in silverlight convert assigned value value of property type. you can learn how build converter here. http://weblogs.asp.net/dwahlin/archive/2009/08/15/so-what-s-a-silverlight-value-converter-anyway.aspx

objective c - Crash in kevent on iPhone -

i have iphone app in appstore reports crashlogs of specific type cannot reproduce or find starting point problem. this part of crashlog relevant: exception type: exc_crash (sigsegv) exception codes: 0x00000000, 0x00000000 crashed thread: 1 thread 1 crashed: 0 libsystem.b.dylib 0x31192974 kevent + 24 1 libsystem.b.dylib 0x3123c704 _dispatch_mgr_invoke + 88 2 libsystem.b.dylib 0x3123c174 _dispatch_queue_invoke + 96 3 libsystem.b.dylib 0x3123bb98 _dispatch_worker_thread2 + 120 4 libsystem.b.dylib 0x311e024a _pthread_wqthread + 258 5 libsystem.b.dylib 0x311d8970 start_wqthread + 0 does know might problem here? looking hints allow me start looking problem in code. sigsegv (short segmentation violation) means application tries dereference (access) memory has not been allocated or can't dereferenced other reasons. the fact can't replicate crash makes harder solve.

java - Efficient Webcam Library -

i need extremely efficient webcam library (i'll explain later) works on platforms. basically there 2 webcams , need alternate between them @ fast rate (a least 50fps, has fluid video still) anybody have experience in field , have suggestions? while developing webcam capture project i've tested several frameworks , decided use part of openimaj framework. had extract part of core-video-capture subproject , refince code remove necessary dependencies has. when included refine code in project able stream 250 fps (edit: due bug in windows impl) 50 fps bufferedimage objects (on windows xp, without painting, fetch image webcam). can recommend since compatible operating systems - windows (x86 , x64), linux (x86, x64 , arm), mac os. if interested, can find refined code here . jmf fast, pretty outdated , not maintained more. it's not portable - when want use it, have install jmf. i don't recommend javacv, require huge opencv installation package (~100mb),

iphone - Open the Settings app? -

possible duplicate: opening settings app app can open iphone's default settings app application? you can use on ios 5.0 , later: [[uiapplication sharedapplication] openurl:[nsurl urlwithstring:@"prefs://"]];

winforms - Create button during runtime in C#.net? -

i know how create button during runtime. button button1 = new button(); button1.location = new point(20,10); button1.text = "click me"; // adding groupbox1 groupbox1.controls.add(button1); but problem want add multiple buttons this.. for(int = 1; < 30; i++) { button button[i] = new button(); // button customization here... ... groupbox1.controls.add(button[i]); } the code above false code. how can make happen true in c#.net? want create multiple buttons button name, button1, button2, button3, button4, .... button30; you can't declare variables @ execution time in c# - don't want anyway, wouldn't able access them dynamically afterwards. create array: // buttons declared button[] member variable buttons = new button[30]; for(int = 0; < buttons.length; i++) { buttons[i] = new button(); // button customization here... ... groupbox1.controls.add(buttons[i]); } alternatively, use list<button> , more convenient if

jquery - Javascript wait for image to load before calling Ajax -

function dropresource() { var imgindex = getimageindexbyid(currentdragimageid); var newimgid = resourcedata.length; // create image $('#thepage').append('<img alt="big" id="imga' + newimgid + '" src="' + uploadfolder + '/' + imgdata[imgindex][1] + '" class="mediaimg" />'); // properties var imgw = $('#imga' + newimgid).width(); var imgh = $('#imga' + newimgid).height(); var imgx = $('#imga' + newimgid).position().left; var imgy = $('#imga' + newimgid).position().top; // add array (dbid, imgarrindex, width, height, x, y) resourcedata[newimgid] = new array(0, imgindex, imgw, imgh, imgx, imgy); //alert('artworkajaxhandler.ashx?type=addresource&uploadid=' + currentdragimageid + '&page=' + currentpage + '&w=' + imgw + '&h=' + imgh + '&x=' + imgx + '&y=

iphone - How do the slicing effects work in the Fruit Ninja game? -

Image
does know how slicing effects work in fruit ninja game? or other way achieve similar effect? how swipe point @ how draw line on please .... i draw many lines give slicing effect , removed points simultaneously mutable array put point draw line code:- -(void)init { [self checkallarray]; [self schedule:@selector(removepoints:) interval:0.0001f]; } -(void)checkallarray { if (naughtytoucharray==null) naughtytoucharray=[[nsmutablearray alloc] init]; else { [naughtytoucharray release]; naughtytoucharray=nil; naughtytoucharray=[[nsmutablearray alloc] init]; } } -(void)draw { glenable(gl_line_smooth); glcolor4ub(255, 255, 255, 255); //line color //gllinewidth(2.5f); for(int = 0; < [naughtytoucharray count]; i+=2) { cgpoint start = cgpointfromstring([naughtytoucharray objectatindex:i]); cgpoint end = cgpointfromstring([naughtytoucharray objectatindex:i+1]);

CSS: Is there any difference between these two parts? -

Image
is there difference? not see. first doesn't work, second works. same file (other files not touched). if comment /* */ first part (the second used web-browser), works, if comment /* */ second part (the first used web-browser), nothing works. is magic? i've tried on different web-browsers. resetting browsers cleaning caches. but... no result. may there utilities exist can binary comparison? please give me examples of such programs? update: apologise, screenshot little mislead. use 1 of parts when testing (one of parts commented /* */ when test). update 2: @ this, more full part of style.css file: look, i've added display: none original #items block. there no affect in web-browsers! (do not me cache, i've tried on different browsers, different laptops, reseting , cleaning caches of web-browsers). notice display: none has been added: all works before, didn't write display: none . let's try following: it works! ( display: none wo

vb.net - How to check button is enabled or disabled in selenium -

i trying check whether button enabled or disabled. doing following assert.istrue(browser.iseditable(button)) but gives me error expression not produce value. 1 know how achieve this. using vs2010 mstest in vb.net. can assert presence of "disabled" property of button? assert.istrue(selenium.iselementpresent("css=input[disabled]"));

java - ActiveMQ example which shows client-server 2 way communication? -

i want write java se client application talks java server. imagine akin online game there lot of traffic , potentially multiple clients connected same server. constant communication between client , server communication out of order, out of band neither end knows nor expects message might receive next or when. the server doesn't know client ip , cannot establish comms client (because there may nat in way). open ports must initiated client side. actual payload serialized bytes. intend use protocol buffers marshal messages bytes onto wire transport envelope must lightweight too. client java se, potentially day c++. activemq seems suitable choice here since have never used not sure if has performance or characteristics. can advise if suitable, pitfalls may encounter , perhaps suggest tutorial demonstrates similar considering? yeah, highly recommend activemq , it's fast, easy install, can handle requirements nicely. it's tight encoding option compress

php - Magento query caching -

how cache query result in magento if creating module. basically creating 1 module announcement in admin add announcement admin , displayed on front end(live website) now if information entered though admin not dynamic want cache information while modifying(add, edit delete ) , show in front end. save database query time if cache query result block still going generated every time. (besides, mysql has query cache) it better cache block output saves more effort server. http://www.magentocommerce.com/wiki/5_-_modules_and_development/block_cache_and_html_ouput

Some user attributes not showing up in django admin -

in custom authentication backend extract username, email, first , last name ldap response , try stick them newly generated user object if user doesn't yet exist: user = user(username=username, email=result[0][1].get('mail')[0], first_name=result[0][1].get('givenname')[0], last_name=result[0][1].get('sn')[0]) user.save() and variant tried: user = user.objects.create_user(username, result[0][1].get('mail')[0]) user.first_name = result[0][1].get('givenname')[0] user.last_name = result[0][1].get('sn')[0] user.save() while username , email show in admin after user's initial successful authentication attempt can't first , last name display. logging values ldap response shows these exist. any idea what's going wrong here? ok, indeed own stupidity: should not have restarted frontend webserver uwsgi! add defense these baby steps uwsgi...

mysql user defined function - How to in PHP -

how create mysql user defined function php, straight away passing whole create mysql udf code in mysql_query function ? is there php library or easy way play such things ? it's query other. send mysql_query .

java - Programs in netbeans do not terminate as they are done with execution but continue running on as "Running Tasks" -

my programs in netbeans not terminate done execution continue running on running tasks appearing @ right bottom corner of netbeans window. each time re-run same program new thread added 'running tasks' when code done execution. why caused ? how can rectify ? it seems 1 of user thread running, post code exact answer

vb6 - Error to connect with SQL Server -

i have runtime error "not associated trusted sql server connectiion" please me this happens when try connect sql server db has been set windows authentication (not windows , sql server authentication)...that can changed if have access db. see: http://decipherinfosys.wordpress.com/2008/11/14/the-user-is-not-associated-with-a-trusted-sql-server-connection/

jqGrid copy between grids -

i have page has 2 jqgrids on it. 1 contains list of available options, other contains list of included options. when page loaded each grid gets it's initial data server. after want user able move rows between grids until they're ready submit final result. my code accomplish is: function copyselected(fromgrid, togrid) { var grid = jquery(fromgrid); var rowkey = grid.getgridparam("selrow"); if(rowkey != null) { var row = grid.jqgrid('getrowdata', rowkey); grid.delrowdata(rowkey); jquery(togrid).addrowdata(rowkey, row); } } the problem approach end duplicate rowids in destination grid. there way tell jqgrid create new id, or next free id? you can use prefix ids destination grid: jquery(togrid).addrowdata("bla_"+rowkey, row);

GUI for PHP/MySQL -- Create, Read, Update, Delete -

looking fast, simple way roll-out application layer existing database. realize open end question, if is, question factors should account when compare options provided vs. implementation requirements; example, orms supported, js-frameworks supported, etc. questions, feedback, comments -- comment, thanks! adminer it more light-weight phpmyadmin , imo provides better interface (though fewer advanced features). , easier rolling - single php file. i'm not entiery sure mean "orms supported". adminer supports mysql, postgresql, sqlite, ms sql , oracle database systems, if that's mean.

mysql - SQL query INSERT not working inserting values into my DB -

i'm trying insert registration data database php code isn't inserting values db although i'm not getting errors either, can me? code i'm using: $connect = mysql_connect("localhost","myusername","mypassword"); mysql_select_db("application"); $queryreg = mysql_query('insert users("username","password","email","date") values("$username","$password","$email","$date")'); die ("you have been registered."); i need add username password email , date fields have specified won't work, please help! change line $queryreg = mysql_query("insert users(username,password,email,date) values('".$username."','".$password."','".$email."','".$date."')"); check error if (mysql_errno()) { die('invalid query: ' . mysql_error()); }

crash - Application get crashed due to "SIGABRT" in iPhone? -

i developing ipad application , did orientations. times application crashed due "sigabrt" , error log is, *** terminating app due uncaught exception 'calayerinvalidgeometry', reason: 'calayer position contains nan: [15 nan]' i have used 3 table view in apps, have added labels , images table view cell.and have displayed contents dynamically , set frame size dynamically. please me out thanks you're probable getting somewhere division 0 operation, if contents dynamically set. try debug code.

java - Set a Timeout to a Thread Class -

hy!! i have thread class , want set timeout inside after 10 sec. how been made? class: public class httpconnection extends thread{ list<namevaluepair> list; string url; handler handler; public httpconnection(list<namevaluepair> params, string url, handler handler) { this.list = params; this.url = url; this.handler = handler; } @override public void run() { try { httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost(url); string result; bufferedreader in = null; httppost.setentity(new urlencodedformentity(this.list)); // execute http post request httpresponse response = httpclient.execute(httppost); if(response != null){ in = new bufferedreader(new inputstreamreader(response.getentity().getcontent())); stringbuffer sb = new stringbuffer(""); string line =

ipad - UIPinchGestureRecognizer position the pinched view between the two fingers -

Image
i implemented pinch zoom of view. however, view doesn't position wished be. stackoverflowers ipad, view centered on ipad photos.app : when pinch&zoom on album, photos present in view expanding. view approximately centered top right hand corner on first finger , bottom left hand finger on other finger. mixed pan recognizer, way user has pinch, , pan adjust. here graphic explanation, post video of app if that's unclear (no secret, i'm trying reproduce photos.app of ipad...) so initial position of fingers, begining zooming : this actual "zoomed" frame now. square bigger, position below fingers here have : same size, different origin.x , y : (sorry poor photoshop skills ^^) you can cgpoint of midpoint between 2 fingers via following code in method handlingpinchgesture . cgpoint point = [sender locationinview:self]; my whole handlepinchgesture method below. /* instance variables cgfloat lastscale; cgpoint lastpoint; */ - (void

scala.collection.immutable.WrappedString need an implicit CanBuildFrom to fulfill documented features? -

wrappedstring scaladoc 2.8.1: "this class serves wrapper augmenting strings operations found in indexed sequences. difference between class , stringops calling transformer methods such filter , map yield object of type wrappedstring rather string" scala> import scala.collection.immutable.wrappedstring import scala.collection.immutable.wrappedstring scala> val s = new wrappedstring("foo") s: scala.collection.immutable.wrappedstring = wrappedstring(f, o, o) scala> s.filter(x => true) res1: scala.collection.immutable.wrappedstring = wrappedstring(f, o, o) scala> s.map(x => x) res2: scala.collection.immutable.indexedseq[char] = vector(f, o, o) alas, map returns vector , not wrappedstring. if understand correctly: filter works since uses newbuilder method, map needs implicit canbuildfrom wrappedstring bitset has. bug in code or documentation or missing something? also, sc

Neat way of doing stuff with a List (and such) in Java -

in c# can operations on list, this: return mylist.average(p => p.getvalue()); this returns average of values. there similar in java? (that save me calculation of sum , division number of elements?) thanks! lambdaj provides functionality this: double totalage = sumfrom(persons).getage(); //divide size average http://code.google.com/p/lambdaj/wiki/lambdajfeatures

Whole PDF compression -

i'm working on tool writing pdfs , trying find way compress objects , streams in pdf. number of pdfs i'm generating large, can substantially reduced compressing objects (or of pdf structure) flate stream. swear i've seen done before, none of pdfs i've looked @ seem it. tried using acrobat x compress "entire file compression", seems compress streams. i've tried using objstm, doesn't have lot of support other file readers. need has little more support outside of adobe. any suggestions appreciated! in pdf can have 2 types of compression: stream compression - data compressed using various methods, pdf file structure not compressed. object compression - compress file structure, objects not include streams. these supported compression scenarios in pdf. selecting right compression method depends on data want compress: page content streams flate compression used, 1bpp images use ccitt g4 or better jbig2, color images better compressed

language design - Is whitespace optional in SQL queries? -

i have noticed using either oracle or sqlite, queries valid select*from(select a,max(b)i c group by a)where(a=1)or(i=2); is “feature” of sql keywords or words of query need not surrounded whitespace? if so, why designed way? sql has been designed readable, seems form of obfuscation (particularly max(b)i thing i token serves alias). sql-92 bnf grammar here explicitly states delimiters (bracket, whitespace, * etc) valid break tokens, makes white space optional in various cases other delimiters break tokens. this true not sqlite , oracle, mysql , sql server @ least (that work , have tested), since specified in language definition.

html - Export a WebHelp manual to a PDF file -

i learning use software package issues manual web page, http://www.orcina.com/softwareproducts/orcaflex/documentation/orcfxapihelp/default_left.htm#starttopic=html/matlab_introduction.htm if convert web manual 1 pdf file, learn package quicker since mark pdf notes , underlines in acrobat pro. tried printing each section out individual pdf concatenating them 1 pdf, there >100 sections slow. there better way convert whole web manual document single pdf file, manual contents in right order? in acrobat pro, should able open web page directly , it'll convert pages pdf on fly you. ctrl+shift+o (oh, not zero, , works in v9 , vx both) i believe can tell spider outward degree. yep... that's not working. blank page. looks of content filled in via script/ajax type stuff. not programming solution, solution none less. wkhtmltopdf handle script, don't know if it'll spidering you.

Read VARBINARY(MAX) from SQL Server to C# -

i need read data row sql server 2008. type of 1 of columns varbinary(max) . in c# want use out parameter read (and given scenario satisfies needs mostly). but need specify parameter variable size fill c# variable. here assume 8000 enough... knows: database.addoutparameter(command, "vbcertificate", dbtype.binary, 8000); so questions are: what size of max in number sql server 2008? is ok use out parameter scenario? as @marc_s said, want add something. there 2 data types binary [ ( n ) ] fixed-length binary data length of n bytes, n value 1 through 8,000. storage size n bytes. varbinary [ ( n | max) ] variable-length binary data. n can value 1 through 8,000. max indicates maximum storage size 2^31-1 (equals int.maxvalue i.e. 2,147,483,647) bytes. storage size actual length of data entered + 2 bytes. data entered can 0 bytes in length. if specifying max concern should varbinary instead of binary database.addoutparameter(command, "vbcer

RPMBUILD //SOURCES -

i'm trying build rpm barnyard2-1.9, when attempt receive error. these last few lines of rpmbuild output: + /usr/bin/install -d -p /home/snort/rpm/barnyard2-1.9/tmp/barnyard2-1.9-root/usr/share/doc/barnyard2-1.9/contrib + /usr/bin/install -d -p /home/snort/rpm/barnyard2-1.9/tmp/barnyard2-1.9-root/usr/share/man/man8 + /usr/bin/install -d -p /home/snort/rpm/barnyard2-1.9/tmp/barnyard2-1.9-root/usr/share/doc/barnyard2-1.9/doc + /usr/bin/install -m 644 etc/barnyard2.conf /home/snort/rpm/barnyard2-1.9/tmp/barnyard2-1.9-root/etc/snort/ + /usr/bin/install -m 644 /home/snort/rpm/barnyard2-1.9//sources/barnyard2.config /home/snort/rpm/barnyard2-1.9/tmp/barnyard2-1.9-root/etc/sysconfig/barnyard2 /usr/bin/install: cannot stat `/home/snort/rpm/barnyard2-1.9//sources/barnyard2.config': no such file or directory error: bad exit status /home/snort/rpm/barnyard2-1.9/tmp/rpm-tmp.66176 (%install) rpm build errors: bad exit status /home/snort/rpm/barnyard2-1.9/tmp/rpm-tmp.66176 (%install

java - Why do multiple RPC calls in GWT significantly slow response time? -

i'm testing google web toolkit application , having performance issue multiple rpc calls. structure of app is: user submits query initial query serviced single server-side servlet once initial reply received, multiple components subsequently updated iterating on each component , calling update method, passing results of initial query each component's update method work on data passed it, in addition potentially calling other server-side services on success of these calls, component updated in ui. with initial query service , 1 component (effectively running sequentially), response time fast. however, adding other components (e.g initial query service + 2 components, these 2 components calling asynchronously) hugely impacts response time. is there way improve / rectify this? example: (iqs = initial query, c1 = component 1, c2 = component 2, c1s = comp. 1 service, c2s = component 2 service) initial query + 1 component iqs, returned - propagating results, 1297

sqlclr - Replicate SQL Server CLR Function -

is possible replicate clr function using transactional (or merge) replication? yes. see: publishing data , database objects

api - Question on Google Maps integration -

i working on webapplication need deliver products houses in country. all street names , neighborhoods present in google maps. want know if there way street data(street name, region) google maps 1 single file load in database. this way people can find there street auto-suggest options javascript has. , can calculate cost, trough distance, people have pay. or there way use google maps data in web application. ps. sorry not being programming question. if knows place on stackexchange can question better answered post can relocated. getting in database not google going give you. it's taken them lot of effort build , want return. you have option of working geonames can either download database or use webservice. alternatively, access google's database using google geocoding api . i recommend working google version more date.

php - sfDoctrineGuardPlugin forgets credentials after verifying them -

i searching solution authentication problem. i've found 1 person (in symfony-users google group) same problem (#2 @ bottom) way in may of last year. far can tell, no solution posted list. in development environment on mac os x, sfdoctrineguardplugin working properly. when attempt access secure page, redirected login. when enter valid credentials, redirected requested page. in test environment @ dreamhost, not working properly. when attempt access secure page, redirected login. when enter valid credentials, redirected requested page, symfony loses authentication status , (re-)redirects me login once again form emptied. (in contrast, if enter invalid credentials, receive error message on login page , username remains filled in.) in each environment, symfony verify credentials valid , have 'admin' privileges, test forgets credentials redirects me requested page. nothing interesting shows in apache error log. dev log snippets: feb 09 10:05:51 symfony [info] {sf

javascript - Detect mouse dblckick outside of nested element? -

what i'm trying here configure jquery have 2 boxes. first box allows me hide first box , open new 1 when clicked. new (second) box removed when clicking body outside of element. i've been playing differnt things including exit/enter events, can't seem find simple , straightforward way effect. i've set jsfiddle demonstrates i'm trying do. http://jsfiddle.net/wdapu/2/ i think need add event.stoppropagation(); to event handler bound #opener . prevents event bubbling , raising event handler in #body . see updated version: http://jsfiddle.net/wdapu/3/ reference : event.stoppropagation now, still hide new box if double click inside new box. prevent have bind event handler , prevent event bubbling too. can done shortcut: $('#content').dblclick(false); (see here: http://jsfiddle.net/wdapu/6/ ) if creating boxes dynamically, have @ .delegate() , event.stopimmediatepropagation() .

asp.net mvc - System.Data.OracleClient.dll crashes w3wp.exe on w2k8 -

i'm using windbg debug error happening in website have on windows server 2008, iis7 environment. i've set symbol path "srv*c:\websymbols* http://msdl.microsoft.com/download/symbols " then browse website, takes me login page. in moment attach windbg w3wp.exe process. enter credentials login page , submit form, process giving problems. select windbg -> debug -> go unhandled exception, outputs following in console: modload: 6d720000 6d835000 c:\windows\assembly\nativeimages_v2.0.50727_32\system.data.oraclec#\fb8da45f3873169a502db3cb492b25a0\system.data.oracleclient.ni.dll modload: 06a80000 06afb000 system.data.oracleclient.dll modload: 06b00000 06b7b000 system.data.oracleclient.dll modload: 06a80000 06afb000 c:\windows\assembly\gac_32 \system.data.oracleclient\2.0.0.0__b77a5c561934e089\system.data.oracleclient.dll modload: 06b80000 06be1000 c:\xeclient\bin\oci.dll modload: 7c340000 7c396000 c:\windows\system32\msvcr71.dll modload: 0

c# - Microsoft.Win32.RegistryKey for 64 bit OS -

hi there modifying windows registry works on windows xp dosenot work on win 7 64 bit changes once never again. i posted question , no answer found , wondering if following statement root cause of trouble microsoft.win32.registry registry = microsoft.win32.registry.currentuser.opensubkey( "hkey_local_machine\\software\\wow6432node\\microsoft\\windows\\currentversion\\internet settings", true); now here changing 64 bit registry using microsoft.win32.registrykey may not work on 64 bit. any solutions changing registry on 64 bit machine you can't write part of registry without admin rights don't have uac. works in xp because presumably run admin there. you may need account registry redirection .

git checkout: what does this weird output mean? -

when checkout, get: me@localhost# git checkout master d deps/example m deps/example2 switched branch "master" the man page doesn't mention cryptic output. mean? that's output of git status ; git showing after checking out master there still uncommited changes working copy (one modified file , 1 deleted file). check man git-status : m = modified = added d = deleted r = renamed c = copied u = updated unmerged

python - Get value from a dynamic url -

my url looks like: http://www.example.com/blah/prod/4/x/blah.html now if page has sub-pages, like: http://www.example.com/blah/prod/4_2343/x/blah.html i.e. after /prod/4 there underscore number. again if page has sub-pages, be: http://www.example.com/blah/prod/4_2343_234/x/blah.html i need text put ??? below: /prod/???????/x/blah.html how can this? for example this. regexp matches pattern prod/???/x/blah, ??? string consisting of numbers , underscores: import re pattern = re.compile('prod/([\d_]+)/x/blah') query = "http://www.example.com/blah/prod/4_2343_234/x/blah.html" result = pattern.search(query).group(1) print result

asp.net - How mature & felxible is the Entity Framework's code-first library? -

i'm getting ready small, brief architecture spike using ef code-first approach, introduced scott gu here , here . before do, i'd know whether worth it. have project uses ef poco generation template, , i'd investigate advantages can out of switching more pure poco strategy domain model. particularly, these things i'm interested in: avoiding automatically-generated partial classes collection fixup methods, , being able concentrate on essential domain object code without worrying association persistence. avoiding having transform templates every time want add artifact model. still being able have control on strategy of table persistence (locations of complexttypes, table-per-type versus table-per-hierarchy, etc). these aren't important other 2 concerns. the recent version find of ctp4, released summer 2010. current version? what cons of choosing approach, using particular library? can recommend other concerns should investigate in spike? go thro

security - Difference between PGP and SMIME -

i wondering why there need 2 secure email standards. if not wrong, nowadays pgp , smime provide more or less same functionality. in past, difference pgp build on web of trust, whereas smime used third trusted party. in meantime think can configure pgp ca. further, pgp intended encrypt plain mail messages while smime decrypt attachments. in meantime sure pgp can same. so question is: there difference between these 2 protocols? many thanks, andrew openpgp data encryption , signing standard. it's use in securing e-mails called (open)pgp/mime , combination of openpgp , mime. pgp/mime not used nowadays. s/mime on other hand supported mail clients , mail processing applications. the problem s/mime non-trivial procedure obtain certificates e-mail signing. point of view pgp/mime more handy (at least or occasional uses). just note: our secureblackbox product offer support of above mentioned technologies, have extensive experience them.

php - How to make part of regex pattern optional? -

im working regex pattern: |img_class.*?<img src="(.*?)"(.*?)<\/td>|ms but want make <img src="(.*?)" optional (not src part), because img_class td empty , when pattern fails. i tried |img_class.*?(<img src="(.*?)")?(.*?)<\/td>|ms never match. (i know use xpath or better im using pretty big class , dont want recode right now). |img_class.*?(?:<img src="(.*?)")?(.*?)<\/td>|ms

mongodb - How to install mongoose driver on nodejs? -

i have started working nodejs. java script newbie. have nodejs , mongodb running on ubuntu. downloaded mongoose driver. install using npm or copy mongoose folder has js files nodejs lib folder? links tutorials start working driver me lot. regards, lalith here's extensive walkthrough: http://dailyjs.com/2011/02/07/node-tutorial-12/ seems recent. according learnboost's github site, suggested method installation use npm. https://github.com/learnboost/mongoose/ $ npm install mongoose

wpf - Accessing ListBox DisplayMemberPath data value in SelectedItem template -

Image
i attempting create generic listbox control customize edit in place other features. in example below, want bind "text" property of listbox "selected item" data value of displaymemberpath in viewed structure. such xaml binding expression replace question marks in code (text="{binding ????????????????"). using contentpresenter instead of binding text works display purposes, have not been able bind text component used on presenter. alternative finding binding expression able text content contentpresenter. i can think of number of ways accomplish through code behind, looking xaml solution if such thing exists. i appreciate ideas. sure there trivial answer this, after spending couple days on it, admit nudge in right direction me. <window x:class="wpfapplication1.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title=&quo