Posts

Showing posts from March, 2011

Dynamic casts returns null when library with C++ python extensions is used as a plugin on RHEL5 -

i have library c++ python extensions (c++ calls python in turn calls c++) using boost::python , python libraries (this messy, lot of legacy) when tested standalone works correctly. in particular, dynamic_cast works correctly. but when library packaged use plugin on rhel5 using gcc 4.1.2 external application, dynamic_cast returns null resulting in application not working expected. on windows (tested vista 64 bit using visual studio 2005 , 2008) works fine. when debugged using ddd instance, able see pointer before casting has right type_name (slightly mangled compiler usual, suppose?). specific debugging tips here of help. a reinterpret_cast solved problem. while baulked at, @ loss how proceed, esp. since due issues external app. convoluted mess , seems futile, if can here sample code. following c++ snippet creates "smart_handle" queue python commands stored in string "input". string import imports locations , definitions of functions called boost::python::exe...

spark form item gap in Flex -

is there way change space between spark form item , content(textinput, conbobox)? set 0 "gap" property of form, still there lot of vertical space left between form inputs. the spark skin formitem has left/right variables set based on "columns." i.e. left="column1:10" means element 10 pixels right of column 1. so, create skin, reduce numbers in "content" column area , check it. reducing numbers , gap should tighten, along setting gap in form layout.

c# - How do I make my ASP.Net website viewable in my private home network using IIS 6.0? -

i want know how can make website available in private home network? know supposed make ip address static still not know complete steps accomplish want do. possible? if can please explain me have do? this pretty easy need read on security before making live. static ip addresses cost more money dynamic ones suggest signing http://www.no-ip.com/ . it's requires installing program updates domain ip address everytime changes. you need use port forwarding on router knows send http requests pc. http data passed through port 80 or 8080. hope helps.

How to call local WCF service from webpage? -

i'm developing webpage supposed consume wcf webserice located on client's computer. first, user installs software hosts wcf service on computer, he'll view webpage supposed call wcf service. have idea how without having use ativex , ie? add wcf service service reference web project. have specify url of wcf service. clientproxyclass generated you. in webpages or whathever can create instance of proxyclass , code want.

LINKED LIST question C++ ...Can we make TWO different node types in one program? -

i have project finish off regarding linked lists. wanted know if possible write in 2 struct nodetype codes create 2 nodes. if how , should place them? code going contain of 1 node type "videos" in list. , node type "customer" details in list. i plan use functions every other operation enable program do. wanted know code making 2 nodes , how , should specify these nodes when make functions them?(such inserting new video video node , inserting video customer node(showing rented video) etc etc)... can please explain code's details can understand it? because instantiation of class template yields new type, can make list node template: template<class tag> struct listnode { listnode *prev, *next; }; and derive multiple times same template instantiating different tag type: struct videotag; struct customertag; struct item : listnode<videotag> , listnode<customertag> {};

r - Change value of some column in xts based on other columns values with lookback -

i have following xts object (representing long/short entries (column 1 , 2) , exit (columns 3 , 4) triggers "aggregate" signal column should 1 (system long), -1 (system short) or 0 (system flat). can not make work "aggregate" signal column5... the data: longentrysignal shortentrysignal longexitsignal shortexitsignal signal 18.02.93 0 0 1 0 0 19.02.93 0 0 0 1 0 22.02.93 1 0 0 0 1 23.02.93 0 0 0 0 0 24.02.93 0 0 0 0 0 25.02.93 0 0 0 0 0 26.02.93 0 0 1 0 0 01.03.93 0 0 1 0 ...

exception - Java Stop Script Continuation Without System.exit(1); -

i have program , catching error. need program stop , stay idle if there exception. i have this: // try parse integer make sure it's integer. try { integer.parseint(celsiustxtfield.gettext()); } // catch if it's not integer , murder user being stupid. should know temperature consists of numbers , not letters. catch(numberformatexception e) { joptionpane.showmessagedialog(null, "you did not submit number. please try again.", "general error - error #2", joptionpane.error_message); } but, though shows error message, still continues on script. this simple, i'm new java, please excuse not knowing. i found way this. move under try, , way, catch last thing, there's nothing else executed.

.net - issues with text box value changes -

i have textbox, situation when user leaves empty, ok button disabled. if user types in value of duration based on days, button gets enabled. the problem is: let's user clicks on text box, types in : 100, , realizes made mistake, erase value , tries start filling other textboxes , come again afterwards, @ level @ time user clicks on other part of form, value becoems 0 autoamtically , ok button enabled now. how can avoid this? private sub txtmembershipduration_textchanged(byval sender system.object, byval e system.eventargs) handles txtmembershipduration.textchanged if txtmembershipduration.text = "" btnok.enabled = false end if end sub also, how can control auttomatic 0? use tryparse on check, , make sure it's greater 0, instead of checking if it's "". link: tryparse

Android gamedev advice -

i'm planning develop simple tic-tac-toe 3d game android starting point (practical task learn , useful), devguid seems more of reference can hands on particular task. can advice should investigated? (or maybe i'm searching incorrectly) edit: i'm considering other options on learning android development. (though, "practice while learning" approach preferred). edit: my purpose: learn how develop apps android && create app, fun , can placed on android market my initial "data": strong java + java ee, basic c/c++, willing learn means achieve purpose: devguide more of reference, , need solid start lots of explanations. need advice here. you see, mind there no sense read books , on. first reading starting manuals google should definately help. when done them should jump development. of course, have lot of questions, there lots of great manuals , tutorials on internet, have difficulties. if though have them, come here , we'll ...

php - Create unset cookie button -

i have created cookie using php , need create button user can click log out. this php code unset cookie: unset($_cookie['access_token']); but i'm quite stuck how make button functionality. can me it? thanks lot if(isset($_get['logout'])) { unset($_cookie['access_token']); header('location: /'); exit; } on site <a href="?logout">logout</a>

matlab - How to save a plot into a PDF file without a large margin around -

Image
this question has answer here: get rid of white space around matlab figure's pdf output 16 answers if print plot in eps format, content of eps file occupied plot. if print plot in pdf format, there big margins above , below plot in pdf file. how can save plot in pdf file without big margin around plot? my guess how automatically choose proper "paper" size in pdf file print to, according plot size. this question have asked @ tex.stackexchange.com , have got replies tried solve problem outside matlab , , still don't quite understand reply tried solve within matlab. see if there more opinions here. what mean "the proper size"? matlab figures vector graphics, can choose size want on plot. you can set size of paper , position of figure function set . example: plot(epx(1:5)); set(gcf, 'paperposition', [0 0 5 5]); %p...

Writing a R lint program -

when program in python, find using pylint useful. however, when program in r, there nothing comparable. as small side project, thought fun try , write small lint program. nothing fancy, along lines of: making sure function names camel case average function length detecting unused variables spacing. example, function(x=1, y=2) instead of function(x=1,y=2) however, i'm unsure of how started (i have started through pylint soure code). how should started? there standard programming techniques type of project? resources should consider? i write entire project in r. take @ package codetools comes r. details found on cran page package. code in package run when r cmd check example can catch unused variables etc. might started on aspect of rlint . to answer of other aspects... i'd start of writing simple functions 1 task, such convert functions names camel case. build body of small functions can amalgamate them working lint wrapper function, whilst allo...

c - fscanf input with floats -

i'm reading text file contains: mary 55334422 24.90 56.6 45.68 and reading in: ....char name[20]; int num; double worked; double rate; double total;.... fscanf(fp, "%s %d %f %f %f\n", name, &num, &worked, &rate, &total); i'm getting name , integer fine, floating point numbers come out -9522999990000000000000000000.00 am doing wrong here? you need use format double : %lf , rather float %f ... or change floats instead of doubles.

sql - Merge two tables with same column names, add counters -

i have 2 tables same columns, first column name , second count. merge these tables, each name appears added count of 2 tables: table1: table2: result table: name count name count name count name1 1 name3 3 name1 1 name2 2 name4 4 name2 2 name3 3 name5 5 name3 6 name4 4 name6 6 name4 8 name5 5 name6 6 as of moment have created pretty ugly structure execute this, , would like know if possible results in more elegant way. what have far (table1 test1 , table2 test2): create table test1 ( name varchar(40), count integer); create table test2 ( name varchar(40), count integer); create table test3 ( name varchar(40), count integer); create table test4 ( name varchar(40), count integer); create table test5 ( name varchar(40), count integer); insert test4 (name, count) select * test1...

Python list syntax help -

results=[key key, value in adictionary if str(key).startswith('target') , value > 0 ] what trying here select keys if key in dictionary beginswith target , value greater 0. looks there's problem this, me~ results=[key key, value in adictionary.items() if str(key).startswith('target') , value > 0 ]

java - Where to find which library belongs a class? -

i wonder if there page write class name, instance javax.faces.view.facelets.taghandler and tells me in .jar included. because can see in class documentation information not included. edit: using pages, http://www.findjar.com/ or http://www.jarfinder.com/ don't find class. can me on this?? in advance i found out thats: jsf-api-2.0.jar you can download jar here http://download.java.net/maven/2/javax/faces/jsf-api/2.0/

c# - ASP.Net global error handler for all... but a few -

i want implement global error handler asp.net website. i implement in global.asax logging error , redirecting error page. so far good, in case have calls asmx webservices jquery, and, sorry say, errors thrown in asmx webservice used in calling jquery. when errors thrown asmx file, want log them , rethrow them the thing come check .asmx extension in stacktrace, hoping other way (don't know why, string checking feels awkward) you can filter out asmx on basis of request.url. request property available in global error handler in global.asax.

android - Nest TableLayout inside LinearLayout - is it possible? -

i want produce android screen layout looks following: label text field label text field label text field -----button------- -----textfield---- that is, want have tablelayout @ top, number of items underneath table layout (mainly can force these items @ bottom of screen). have tried nest them in code below, items @ bottom don't seem appear. any ideas? <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <tablelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:stretchcolumns="1" android:shrinkcolumns="1" android:layout_height="wrap_content" android:layout_gravity="center_vertical"> ...

internet explorer 7 - combining IE6 and IE7 css hacks in same stylesheet -

i use ie conditionals , have stylesheet each. me neater way this. due constraints, have hack ie6 , 7 in same stylesheet. i know won't validate, how isolate ie6 , ie7 hacks in same stylesheet? comprehensive list of browser-specific css hacks source: http://paulirish.com/2009/browser-specific-css-hacks/ /***** selector hacks ******/ /* ie6 , below */ * html #uno { color: red } /* ie7 */ *:first-child+html #dos { color: red } /* ie7, ff, saf, opera */ html>body #tres { color: red } /* ie8, ff, saf, opera (everything ie 6,7) */ html>/**/body #cuatro { color: red } /* opera 9.27 , below, safari 2 */ html:first-child #cinco { color: red } /* safari 2-3 */ html[xmlns*=""] body:last-child #seis { color: red } /* safari 3+, chrome 1+, opera9+, ff 3.5+ */ body:nth-of-type(1) #siete { color: red } /* safari 3+, chrome 1+, opera9+, ff 3.5+ */ body:first-of-type #ocho { color: red } /* saf3+, chrome1+ */ @media screen , (-webkit-min-device-pixel-r...

load - Sharepoint Webpart loading XSLT file returns 401 -

i trying load xslt file in sharepoint moss 2007 custom webpart, getting 401 error while trying access xslt file. tried providing default credentials empty upon inspection during debugging. does know how can load xslt file custom webpart? in advance. xmlurlresolver resolver = new xmlurlresolver(); resolver.credentials = credentialcache.defaultnetworkcredentials; xsltsettings settings = new xsltsettings(true, true); xslcompiledtransform oxsltranform = new xslcompiledtransform(); string siteurl = spcontext.current.site.url; if (siteurl.endswith("/")) siteurl = siteurl.remove(siteurl.lastindexof("/")); siteurl += "/style library/xsl style sheets/thm1news.xslt"; oxsltranform.load(siteurl ,settings, resolver); this code returns 401 error: the remote server returned error: (401) unauthorized. [webexception: remote server returned error: (401) unauthorized.] system.net.httpwebrequest.getresponse() +...

tfs2010 - working on TFS 2010 -

hey guys, using tfs 2010, have uploaded content on tfs server, dont have clue how download content tfs server local system can check out , check in once have done editing any 1 know how that.. please reply... i need step same. thanks , regards abbas electricwala you need setup local workspace (if there isn't 1 already) , map project local working directory. step 1 of msdn article : you can create workspace mapping in 1 of 2 ways: * set workspace mapping explicitly * perform operation on team project. to set workspace mapping explicitly in visual studio, on file menu, point source control , click workspaces. in manage workspaces dialog box, select computer name , click edit. in edit workspace dialog box, in working folders list, click click here enter new working folder. click ellipsis (…) button, select team project (for example myteamproject1), , click ok. click local folder cell display ellipsis button. click ellip...

c# - LINQ to Sharepoint InsertOnSubmit Question -

for example have list called product , has 3 columns, productname (which title), productprice , producttype. productname string productprice currency (double) producttype lookup on producttypes list normally easy me if not contain lookup column, dont know how deal columns when inserting. i had tried 1 returns error specified cast not valid. here current code entitylist<producttypeitem> producttypes = dc.getlist<producttypeitem>("producttype"); productitem newproduct = new productitem(); newproduct.title = txtproductname.text; newproduct.productprice = double.parse(txtproductprice.text); newproduct.producttype = (from in producttypes a.title == ddproducttype.selecteditem.text select a).firstordefault(); dc.product.insertonsubmit(newproduct); dc.submitchanges(); what newproduct.producttype here error occurs. please note ddproducttype datasource producttype list , uses title in datatextfield , datavaluefield this might out....

javascript - How can I loop an animation continuously in jQuery? -

i need know how infinitely loop animation. text scroll animation , need repeat after it's finished. here jquery: <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".boxtext").ready(function(){ $(".boxtext").animate({bottom:"600px"},50000); }); }); </script> here css ".boxtext" .boxtext { position:absolute; bottom:-300px; width:470px; height:310px; font-size:25px; font-family:trajan pro; color:white; } make function , have call callback: $(document).ready(function(){ scroll(); } function scroll() { $(".boxtext").css("bottom", "-300px"); $(".boxtext").animate({bottom:"600px"}, 50000, scroll); } keep in mind, won...

c# - Preload all assemblies (JIT) -

we taking hit first time heavy ui screens loaded. our project divided 1 main executable , several dll files. dll files can contain ui screens slow first time loaded. is there way (in code) can preload referenced assemblies avoid jit compilation hit? i know there tool called ngen . possible operate ngen in development environment can see effects instantly? ideally though, preload referenced assemblies code. using c# .net 3.5 along devexpress our ui components. take @ ngen . option use ilmerge merge assemblies one. whenever use ilmerge, add post build command happens automatically. other alternative (untested) is, if don't mind longer start-up time, manually call assembly.load() @ beginning each assembly.

.net - How does System.Threading.Monitor.Enter() work? -

i got question how monitor.enter works. investigated .net framework source code, , shows only: [system.security.securitycritical] // auto-generated [resourceexposure(resourcescope.none)] [methodimplattribute(methodimploptions.internalcall)] private static extern void reliableenter(object obj, ref bool locktaken); i guess monitor.enter implementation platform dependent, browsed mono source code , gave :( yes, critical section assigned each system.object instance may solve, but, don't think actual monitor.lock written this, because creating critical section each system.object cost unlimitedly. (win32 not allow billions of critical section objects in process!) does know how monitor.enter works? please reply. in advance. looking @ mono source code, seems create semaphore (using createsemaphore or similar platform-specific function) when object first locked, , store in object. there appears object pooling going on semaphores , associated monothr...

javascript - Reload all tabs -

my question quite simple. i'm developing google chrome extension , wanted know how can reload page. must use chrome api or jquery api ? thansk in advance. here easier solution using background page: chrome.tabs.getallinwindow(null, function(tabs) { for(var = 0; < tabs.length; i++) { chrome.tabs.update(tabs[i].id, {url: tabs[i].url}); } });

workitem - What are the differences among bugs, issues and tasks in TFS -

could give me short explanation on differences among bugs, issues, , tasks in tfs? for scrum tfs process template bug - problem in existing functionality, or missing functionality. defect in code or requirement, error not designed be. issue (impediment)- problem might block development process, example : third party driver identified dependency not releasing on time, issue in development process. task - work planned part of development of project, either result of bug, or issue or requirements, including requirement analysis or development, or testing. etc. for agile tfs process template bug - bug communicates potential problem exists in code team developing. issue - event or cause may delay shipping. task - task communicates need work. each team member can define tasks represent work need accomplish.

structure - Working with Node.JS -

last night dump windows 7 , formatted hard driver port linux based operating system, purely reasons wanted start working node.js so have installed node.js , have done few test stuff, http server , sockets etc. what build http server tightly intergrated mvc framework, before started on need learn how build efficiently in node. for example within php framework create bootloading system load base classes etc, fire events system ready start attaching callbacks. i continue process request etc until output generated gets sent of output handler process headers etc etc but node s totally new environment , im wondering on best practises build system in node. the information im looking more design structure rather actual coding of application, how load lib load libs, etc etc any appreciated. so far webapplication coming along nicely, have built application pretty traditionally , little procedural. what have started out creating directory structure so: <root> ...

Which is the best approach to connect IBM Mainframe application using Java Connector Architecture (JCA)? -

which best approach connect ibm mainframe application using java connector architecture (jca)? you have many options... i've tried them all. their ctg product can bottleneck , licensing ridiculously expensive. recommend staying away cics transaction gateway. you can homebrew solution using plain data sockets. we're doing this. developed standard java annotation library , standard cobol copybook. consider mainframe webservices. xml parsing/marshaling can ziip/zaap eligible, don't incur mips charges. you may consider esb sonic progressive software. offer product called shadow takes guesswork out of mainframe webservices.

.net - Dynamics CRM Get Current Organization Name -

i need current organization name inside of aspx page in isv directory. example i've seen of tries parse out of url or domain name, url doesn't have current org name because page in isv directory...and domain name doesn't have period in case. how can org name? i need can call crmauthenticationtoken.extractcrmauthenticationtoken. thanks. there no "current" organization in asp.net page long not have initialized crmservice. of course want organization being used within browser instance page called, have passed in page's querystring can via request.querystring["orgname"] (or whatever call querystring parameter).

windows phone 7 - microphone buffer becomes 0 after device back key press in WP7 -

i have microphone object record sound. byte buffer array gives me correct result if on same xaml file. but once press key , come same page again, buffer contains 0 in every array member. in constructor, have following code: this.microphone.getdata(buffer); in button click handler, have following code: // stop running microphone if (this.microphone.state == microphonestate.started) { this.microphone.stop(); } // clear previous content of microphone this.microphone.bufferduration = timespan.frommilliseconds(1000); this.microphone.start(); // store recorded audio this.buffer = new byte[this.microphone.getsamplesizeinbytes(this.microphone.bufferduration)]; is there problem using microphone class? cleared or after coming device button press? thanks in advance. please let me know if there doubt in question. if start microphone on page navigate away backwards it, page destroyed, along buffered recording. when next navigate page new instance of created along...

Confusion in PHP variables -

can use same variable name in php used data. example: variable $_get['v'] , can use $v variable other purpose or lead ambiguity? $_get['v'] , $v in no way tied , occupy different memory. can use both names. if change default php configuration enable register_globals , $v created $_get['v'] if such query string parameter existed, still overwrite , use separate variable. register_globals has not been enabled in default php configuration several years.

iphone - UITabBarController set selected MORE BUTTON -

how can switch more button on uitabbarcontroller in code, want make uitabcontroller set selected view more http://developer.apple.com/library/ios/#documentation/uikit/reference/uitabbarcontroller_class/reference/reference.html [mytabbarcontroller setselectedviewcontroller: [mytabbarcontroller morenavigationcontroller]];

C# and SQL LIKE condition: '%' works as single-character wildcard -

i have query in dataset (database located in .mdf file): select * tablename somefield @param table tablename contains record Значение in somefield field. when @param Значени% it's works perfectly, when @param Значен% or Значе% , it's returns 0 rows. Значе%%% works. why '%' works single-character wildcard? your problem should using @param of nvarchar, not nchar declare @param nchar(255) set @param = n'Значе%' this really n'Значе% ...' (many more spaces) so won't match data, n'Значение ...' (padded spaces)

iphone - Openning a new view with button on a Tab Bar -

hey guys, i'm creating project tab bar controller. first, have 4 different tab bar items, each doing own thing. on last tab bar item, have 7 different buttons. when click button, opens new view, image or webview. i'm having trouble trying open 1 because in of tutorials saw, opened views using 2 xib files. tab bar controller, it's diffcult because have different views on each tab bar items. so hope can step-by-step how open view button on tab bar, thanks (sorry, im bad in english) i think work -- make .xib file , add view want on that. , use viewcontroller in below command , not disrupt previous view.this method called in method controlling action of button needs clicked- [self presentmodalviewcontroller:yourviewcontroller animated:yes]; and cancel view using following method in method controls cancel button - [self dismisspresentviewmodalviewcontrolleranimated:yes] in yourviewcontroller thus can change view in way!! hope works , communicate if ...

ruby on rails 3 - Can't get Delayed::Job to work with a very simple class -

i have problem using delayed::job 2.1.4 on simple class, is: class c2dmjob < struct.new(:msg) def perform # doing end end at begining put class @ lib directory moved after model directory testing purposes. when running: delayed::job.enqueue c2dmjob.new('foo') following entry stored inside delayed::job table: 0, handler: "--- !ruby/struct:c2dmjob \nmsg: foo\n", last_error: nil, run_at: "2011-07-21 10:56:58", locked_at: nil, failed_at: nil, locked_by: nil, created_at: "2011-07-21 10:56:58", updated_at: "2011-07-21 10:56:58"> and job fails following error message: [worker(host:xxx pid:2660)] c2dmjob failed nomethoderror: have nil object when didn't expect it! might have expected instance of array. error occurred while evaluating nil.each - 1 failed attempts what think wrong? suspect related serialization have no clue exactly! thanks! the reason class names coincidenc...

strtotime PHP function questions -

i have strtotime function doing this: $var = strtotime('23:59:59' . $date); where $date date in format: mm/dd/yy however, randomly fails , returns nothing it.... doing wrong here? thanks. you should add space character end of time string

c# - WPF Xaml passing Control in attribute -

i have textbox (called searchbox) , listview (called employeelist). textbox's textchanged event displays search results in listview. works good, need functionality, want capture keyup/down events navigate through listview elements. know can add handler keyup/down events , done, using lot wanted that's reusable. here's tried do, created static class (called searchboxhelper) , added attachable property. want pass reference listview control (not 1 of it's properties) value attachable dependency property through xaml. /controls/searchboxhelper.cs public static class searchboxhelper { public static readonly dependencyproperty helpslistview = dependencyproperty.registerattached("helpslistview", typeof(listview), typeof(searchboxhelper), new propertymetadata(null, onhelpslistviewchanged)); private static void onhelpslistviewchanged(dependencyobject d, dependencypropertychangedeventargs e) { listview listview = d listview; // cr...

iphone - iOS Development and Ad Hoc distribution -

it seems need create adhoc profiles separately iphone applications. user administration privilege cannot create adhoc distribution profile. chairperson can create that. secondly 100 devices can added. there way out ? can convert developer build adhoc build ? yes, have create seperate provisioning profiles development adhoc testing distribution adhoc distribution profiles limited 100 devices per year, designed used testing only. you should have separate builds in xcode corresponding these profiles. who can create has been decided chairperson when setting account. you'll need sort out internally.

Ruby on Rails2.3.8: Duplicate entry 'MyString' for key -

so... these mystring entries appear on testing database... , i'm not sure why. i wasn't problem, until needed set unique flag on 1 of columns wasn't id. i'm using factory_girl... so.. i'm not sure generating mystrings on place. has else had issue? have @ fixtures in test/fixtures. mystring default string models attributes. automatically loaded test database.

.net - How do I add the SqlException type to a custom tracking participant? -

i'm getting following (intermittent) errors in workflow tracking: "an error occurred while calling tracking participants causing instance aborted. see inner exception more details. innerexception message: type 'system.data.sqlclient.sqlexception' data contract name 'sqlexception:http://schemas.datacontract.org/2004/07/system.data.sqlclient' not expected. consider using datacontractresolver or add types not known statically list of known types - example, using knowntypeattribute attribute or adding them list of known types passed datacontractserializer." my custom tracking participant looks this: protected override void track (trackingrecord record, timespan timeout) { stringwriter sw = null; if (record == null) throw new argumentnullexception("record"); if (timeout == null) throw new argumentnullexception("timeout"); ...

Spring security cannot find AffirmativeBased class -

can assist me following. i've configured spring authentication fine - can use spring authenticate via database , prevent access based on url etc... i'm trying implement access decision manager , cannot class throwing 2010-12-07 15:20:47,926 error [main] frameworkservlet - context initialization failed org.springframework.beans.factory.beancreationexception: error creating bean name 'scopedtarget.articlecontroller': injection of persistence dependencies failed; nested exception org.springframework.beans.factory.cannotloadbeanclassexception: cannot find class [org.springframework.security.access.vote.affirmativebased] bean name 'sgaccessdecisionmanager' defined in class path resource [scriptgang2-web-context.xml]; nested exception java.lang.classnotfoundexception: org.springframework.security.access.vote.affirmativebased @ org.springframework.orm.jpa.support.persistenceannotationbeanpostprocessor.postprocesspropertyvalues(persistenceannotationbeanpostpr...

html - Pop up image css link on hover -

i trying use following technique http://www.dynamicdrive.com/style/csslibrary/item/css-image-gallery/ create pop image hover effect dynamically generating php. have 1 problem technique every single image downloaded when page loads. how can have css download image on hover.? right css pushing images off screen when page loads (left: -1000px;) brings them view on hover.is possible css accomplish other choices have? instead of setting img src attribute link. set attribute data-src link. when hover set src of image data-src attribute. browser load in then.

c# - WPF Get element at specific coordinates -

i have labels inside canvas, need label intersects coordinates x,y? thanks!! canvas.getleft(element), canvas.gettop(element) element's position. use actualwidth , actualheight form complete rectangle. can iterate through children of canvas foreach. edit: codenaked pointed out elements might set setright or setbottom modified sample code: foreach (frameworkelement nextelement in mycanvas.children) { double left = canvas.getleft(nextelement); double top = canvas.gettop(nextelement); double right = canvas.getright(nextelement); double bottom = canvas.getbottom(nextelement); if (double.isnan(left)) { if (double.isnan(right) == false) left = right - nextelement.actualwidth; else continue; } if (double.isnan(top)) { if (double.isnan(bottom) == false) top = bottom - nextelement.actualheight; else continue; } rect elerect = new rect(left, top, n...

What are some differences between distributed and de-centralized services? -

i unable come fundamental differences between two. come examples: bittorrent distributed p2p system, tor decentralized. web services decentralized, cannot think of distributed web-service. (maybe diaspora?) distributed systems can in 2 type .. centralized , decentralized . centralized distributed systems ,as client-server system , multitired application . decentralized distributed systems not contains server ,such peer peer communication .

misleading plot issue in mathematica -

Image
i want study "strange" functions plotting them out in mathematica. 1 example following: mod2[x_] := which[mod[x, 2] >= 1, -2 + mod[x, 2], true, mod[x, 2]]; f[x_] := which[-1 <= x <= 1, abs[x], true, abs[mod2[x]]]; fn[x_, n_] := sum[(3/4)^i*f[4^n*x], {i, 0, n}] plot[{fn[x, 0], fn[x, 1], fn[x, 2], fn[x, 5]}, {x, -2, 2}] however, plot got mma misleading, in sense maxima , minima of fn[x, 5] should on same 2 levels. due high oscillation of function, , fact mma takes limited number of points draw function, see plot exhibit strange behavior. there option in plot remedy this? many thanks. you need increase setting plotpoints quite bit 'good' result. plot[evaluate[ reverse[{fn[x, 0], fn[x, 1], fn[x, 2], fn[x, 5]}]], {x, -2, 2}, plotpoints -> 4000] (i reversed order of functions, able see curves.)

asp.net - ComboBox in GridView -

i can't access combo box's value using in gridview. gridview this: <dx:gridviewdatatextcolumn caption="cmb" fieldname="cmb" name="cmb" visibleindex="4"> <dataitemtemplate> <dx:aspxcombobox id="aspxcombobox1" runat="server" autopostback="false" clientidmode="autoid" datasourceid="sqldatasource2" enablesynchronization="true" textfield="rolad" valuefield="rolid" valuetype="system.int32"> </dx:aspxcombobox> </dataitemtemplate> </dx:gridviewdatatextcolumn> when accessing fields following codes,it's coming null datas combobox. list<object> selectedvalues; private void getselectedvalues() { list<string> fieldnames = ne...