Posts

Showing posts from August, 2014

PayPal TimeOut - DoExpressCheckoutPayment -

we using paypal on faily large website, integration went code helpers integration wizard. had processed number of transactions in first day of putting live small percentage (5%) had there transaction processed paypal our system recieved timeout. believe happens @ point submit "doexpresscheckoutpayment" method. , because of system cannot tell if payment has been complete or not. this real tough one, website has live currency need update paypal taking money system not updating not acceptable. i'm interested know if common problem , how should go handeling it. i'm doing best re-create issue cannot @ time. this looks similar problem - https://www.x.com/thread/45136 any appriciated! add retry logic application. common way of handling problem.

c# - .NET: what are my options for decrypting a password in my project .setting file -

in ui of winform ask user user name , password. store password text in settings (the .settings file) of project. app visual studio add-in how can encrypt , decrypt password before , after enter settings file? i don't need fancy. it's little in-house app. i'd know options thanks bob use .net cryptography features simple as in article .

c# - WPF ListBox selection does not work -

i have listbox few items, , need able click them. problem is, selectionchanged event doesn't fired when click on item's text, if click on blank part. i'm quite new wpf, , don't understand why happening. xaml: <listbox name="lboxvouchers" borderthickness="0" fontsize="15" selectionchanged="lboxvouchers_selectionchanged"> <listbox.itemtemplate> <datatemplate> <listboxitem content="{binding name}" /> </datatemplate> </listbox.itemtemplate> </listbox> handler: private void lboxvouchers_selectionchanged(object sender, selectionchangedeventargs e) { if (e.addeditems.count > 0) messagebox.show("you selected " + e.addeditems[0]); } i'm binding list of objects in code via lboxvouchers.itemssource property, , show up. each object has name property, of course. i've tried setting isenabled on listbox , it...

mysql - Inserting multiple rows with SQL where a record does not exist -

i want insert multiple rows of data mysql database, when order_id field unique. current query have, doesn't work. lets record order_id of 2 in table: insert conversion (user_id,url_id,order_id,sale,commission,transaction_date,process_date) values (1,1,1,'32',0.3995,'2010-11-15 12:15:18','2010-11-15 12:15:18'), (3,6,2,'*not-available*',0.001975,'2010-11-15 12:15:18','2010-11-15 12:15:18') (order_id <> 3); any appreciated. tom solved using replace. example: replace conversion (user_id,url_id,order_id,sale,commission,transaction_date,process_date) values (1,1,3,'32',0.3995,'2010-11-15 12:50:31','2010-11-15 12:50:31'),(1,2,2,'*not-available*',0.001975,'2010-11-15 12:50:31','2010-11-15 12:50:31'); url: http://dev.mysql.com/doc/refman/5.0/en/replace.html thanks all.

One question about function definition in C++ -

i'm reading material function pointer in c++, , come across 1 function definition not understand. standard function definition have form: type name (param...) but following definition seems little strange me. can explain me ? thanks. float (*getptr1(const char opcode)) (float, float)<br> { if(opcode == '+') return &plus; else return &minus; // default if invalid operator passed } note: plus , minus 2 functions param (float, float) , return float. the rule reading hairy declarations start leftmost identifier , work way out, remembering () , [] bind before * (i.e., *a[] array of pointers, (*a)[] pointer array, *f() function returning pointer, , (*f)() pointer function): getptr1 -- getptr1 getptr1( ) -- function getptr1( opcode) -- taking single parameter named opcode getptr...

JavaDoc for joint java + groovy project -

i have project uses java , groovy intermixed. works well. however, want create javadoc this. know javadoc creation plain java projects. combination of groovy , java, have not found such tool. there out there? well, there tool (unimaginatively) named groovydoc , works way of ant task . as far see, works drop-in replacement javadoc on java classes, suspect work on mixed java/groovy project.

ASP.NET developer looking to get into SharePoint - 2007 or 2010? -

i've been working asp.net 5 years , i'm looking sharepoint development. would make more sense speed on sp 2007 first or dive straight sp 2010? seems learning sp 2007 give me better understanding of "story" , broaden work opportunities. what think? grasp of sp 2007 must sp developer @ point? thanks thanks helpful , encouraging answers. seems unanimous recommendation skip sp 2007 , dive straight sp 2010 dev tools better, i'll :) as wrote in previous answer think people starting should focus on 2010. depending on work situation, may limit in types of contract jobs can take, development environment better in 2010. reason start 2007 can appreciate how easier 2010 makes :)

c# - Fullscreen app prevents hotkeys -

i've developed wpf application registers hotkeys using com interop , processes them using wndproc. the hotkeys work when application doesn't have focus. however, don't work when fullscreen appications have focus (games). there way me fix this? thanks! the disabling of hotkeys design , far know not can it. full screen directx applications (typically games) call idirectdraw::setcooperativelevel ddscl_fullscreen , ddscl_exclusive flags results in, amongst other things, registered hotkeys being disabled.

ruby on rails - Uninitialized constant error in controller when deploy to heroku -

i try set devise , omniauth follow https://github.com/plataformatec/devise/wiki/omniauth:-overview , deploy heroku. there no error in localhost , when push heroku , app crash. in heroku logs , found 'uninitialized constant users' error in omniauth_callbacks_controller.rb . how initialize users? have heroku rake db:migrate already. cant run heroku console because app crash , cant check there user model. information , generate controller rails g omniauth_callbacks_controller in heroku logs /disk1/home/slugs/338566_ad6243a_bbb1-19eae435-d901-44ba-9dd5-baf36d656448/mnt/app/controllers/omniauth_callbacks_controller.rb:1: uninitialized constant users (nameerror) in omniauth_callbacks_controller.rb class users::omniauthcallbackscontroller < devise::omniauthcallbackscontroller def facebook @user = user.find_for_facebook_oauth(env["omniauth.auth"], current_user) if @user.persisted? flash[:notice] = i18n.t "devise.omniauth_callbacks.succes...

Server Real Time on Website -

i grab time (something like): 16:08 server - , display on website real time. (like, each minute update, , display new time. i'm not sure however, way accomplish nor if there nice plugin should aware of. :d can have insights possibilities here? i'm using php , can use jquery library. thanks lot, mem use javascript , set timer every minute. have timer call function uses ajax call correct page on time server gets time , have javascript replace existing time. you actual time server when load page, use javascript increment minute/hour section appropriately using timer 'ticks' every minute.

sql - Replacing In clause with exists -

hi gurus, i'm looking replace in clause exists, despite reading other similar cases on here i've not been able apply them dataset. i looking add in column main query tells me if fund found within separate list, , if label 'emergency' , if not 'non-emergency' the list defined so: select f.id _audit inner join _fund f on a.article_id = f.id a.entity_name = 'fund' , a.changes '%finance_code2%oldvalue>3%' ) union ( select id fund_reference _fund (finance_code2 '3%' or finance_code2 '9%') , finance_code2 not null and looking like: select ...main query here... ,case when fund_id in (list_details) 'emergency' else 'non-emergency' end i know more efficient like select ...main query here... ,select case when exists (select fund_id list_details fund_id not null) 'emergency' else 'non-emergency' end but every time try keeps returning false values (saying funds contained within list wh...

php - How to let users tag their friends in a Facebook status update posted from a tab on a Facebook page? -

basically looking way facilitate tagging of friends in pre-populated status update. on tab users fill out couple details, including friends tag, pre-populate status update, prompt them if post updates user tags in place. direction on sort of thing appreciated. the facebook api doesn't support tagging in status updates. functionality limited site itself.

winforms - Facing problem in initialization of components in C# -

i student c# programmer. learning localization , globalization. created button change current culture (currentculture , currentuiculture) of current thread. after running program button not working need. button click event written below: private void btnlocalized_click(object sender, eventargs e) { cultureinfo ci = new cultureinfo("hi-in"); if (thread.currentthread.currentculture != ci) { thread.currentthread.currentculture = ci; thread.currentthread.currentuiculture = ci; } else { ci = new cultureinfo("en-in"); thread.currentthread.currentculture = ci; thread.currentthread.currentuiculture = ci; } } i tried calling initializecomponent() method after else block. create button component without dispossing current button. how can re-initialized button edit: want change text properties current local language set bt application. ...

sql server - SQL group where clause by employee -

i have query return employees: name form bob abc bob gfd bob fgf john abc gavin abc jessie ala jessie asf how if abc exists employee result = yes , if abc doesnt exist no? want see this: name result bob yes john yes gavin yes jessie no sql server 2000+, use: select e.name, coalesce(max(case when e.form = 'abc' 'yes' end), 'no') result employees e group e.name the max portion return null if none of form values match "abc", coalesce catches return "no".

What are the differences between Visual Studio "Ultimate" and "Premium"? -

whats "real world" difference between visual studio ultimate , premium? intellitrace historical debugging can useful ultimate has additional architecture , testing features.

database - MySQL Datetime & timestamp for row level and table level -

i need have 3 columns in tables reflect these per requirements: create date/time -> date , time row created. value should never change forever. modified date/time -> date , time portions of row last modified. value change if detail in row changed. updated date/time -> date , time entire row last updated. value change if details in row changed. in addition need maintain same details @ table level-> - date/time table created - date/time last row inserted - date/time last edit took place. so 2 questions: 1) 3 row cases of date/times: 1 needs datetime , 1 timestamp? 2) 3 table level date/times: can store in same table somehow or need separate table store info, , functions can use this? end goal automate these date/times, because lot of data lookup tables entered/edited end users front end need db date/times on own in without manual insertions these colunms. also, need perform reporting on these date/times, hence need ensure can manipulated @ code lev...

android - Getting "not responding" errors from other apps while playing my game -

i'm making game android , it's nice , working, during game errors pop other apps (like twitter/facebook or htc sense related processes) not responding. am doing wrong game apps don't enough cpu or ram or be? hints highly appreciated, don't want players disturbed this. thanks!

tomcat7 - Start tomcat at windows 7 startup? -

i have tomcat 7 installed on windows 7 machine. start it, have start manually time. not start when reboot machine. ideas how enable tomcat run automatically when windows 7 boots or not possible in tomcat? (optional) if you've installed tomcat service, can configure start automatically when computer boots: start > settings > control panel > administrative tools > services (for open service) and : right click "apache tomcat" > properties and : set "startup type" automatic final : click start or restart pc ***--> https://wiki.openmrs.org/display/docs/step+3+-+install+tomcat

grails - Integration Test for Controller -

controller action: def deletedept = { def departmentinstance = department.findbyname(params.department.name) if (!departmentinstance) { println "no dept instance" throw new org.codehaus.groovy.grails.exceptions.newinstancecreationexception ("could not create deptinstance ${params.department.name}") } else if (departmentinstance.paysvcs && !departmentinstance.paysvcs.isempty()){ println "instance paysvcs" // !!!! not delete department if has payment services !!!! departmentinstance.errors.reject('department.do.not.delete.message') // render(view: "editdept", model: [departmentinstance: departmentinstance]) redirect(action: "editdept", id: departmentinstance.id) } else{ println "proceed delete" try { departmentinstance.delete(flush: true) ...

Usage of virtual class and extern in C++ -

i've been developing in c++ time when student, never used virtual class or extern in c++ in of projects. recent read these two, , hoping if had better understanding of usage. what purpose of virtual class? example of used/implemented. gloss on bit on ibm website , wrote test program see in action, when use virtual class? the same goes extern well. saw example, , did test myself in c++, advantage of using extern instead of using header file? , advantage of header file instead of extern? virtual classes when encounter dreaded diamond . example: struct base { int x; }; struct d1 : base {}; struct d2 : base {}; struct derived : d1, d2 {}; here, derived has two base parts, , result two member variables called x . compile, might experience unexpected behaviour when manipulating derived object through 1 of base classes. derived derived; d1& d1 = derived; d2& d2 = derived; d1.x = 1; d2.x = 2; cout << d1.x << d2.x << endl; // 12 ! virt...

performance - Directory structure for storing images ASP.NET - Advice needed -

i'm working on application store around 50.000 images within it's first year , 75.000 in it's second. images can come galleries, news images, article images , profile images. want give each image guid , store guid in database. as directory structure thinking of this: ~/upload/images/f2/50/f2504e0-4f89-11d3-9a0c-0305e82c3301.jpg so i'm using first 4 characters of guid directory structure spread images bit more evenly between directories. now have questions approach: is considered practice store different kinds of images rather use ~/images/upload/profiles , ~/images/upload/articles etc. i'm storing thumbnails , have different guid thumbs not in same folder original , somehow doesnt give me feeling guess should not matter but. same goes galleries, i'm used store galleries in folders ~/images/upload/galleries/12 , , images gallery scattered around in different subfolders, big performance hit? do guys have other ideas directory structures? as ...

ipad - How to launch an iPhone app with a document using the document's file type? -

in this thread learn how associate mime types , file suffixes iphone app app invoked when tries open document of type. great. i'm wondering how invoke magic app: given document known mime type, how ask ios "launch whatever app accepts document"? note, said "document", not "url"... tried invoking uiapplication.openurl() http url pointing document in question (which lives on web server serves correct mime type), iphone (actually ipad running 3.2 in case) launches safari, downloads document, looks @ mime type, , shows icon document , button saying "open in [other app]". works ugly , requires , seemingly unnecessary hop through safari. if download document manually myself, store in temporary file (with appropriate file suffix should recognized "other app"), , invoke uiapplication.openurl() using file's file:// url, fails. take @ uidocumentinteractioncontroller. example here ipad: https://developer.apple.co...

version control - How can I merge SVN branches into my trunk without losing commit messages and author details -

our svn repository works follows: nothing can committed trunk unless passes qa (trunk "releasable") development work done on branches last approximately 30 days , reintegrated trunk (after qa of course) the problem approach commits branches developers end looking single huge commit on trunk single developer (the 1 did merge). my question is: is there way improve this? other version control systems better job @ maintaining logs? ones? i'm not interested in having commit trunk , branching each release. did number of years , doesn't work us. need maintain concurrent development branches , need have ability release on short notice. with merge tracking (as of subversion 1.5) can see revisions produced code later merged. see http://tortoisesvn.net/docs/release/tortoisesvn_en/tsvn-dug-showlog.html#tsvn-dug-showlog-mergetrack describes problem.

flex - Channel not found error in - Spring BlazeDS Integration -

i'm trying convert simple chat java/blazeds project on new spring blazeds setup. i started fresh , copied in blazeds-spring folder contents in blazeds 4 turnkey distro added few new files web.xml flex-servlet.xml spring/ app-config.xml infrastructure-config.xml security-config.xml flex/ services.config services.config has removed references messaging, remoting , proxy configs. flex swf compiling against services-config. <services> <default-channels> <channel ref="my-polling-amf" /> </default-channels> </services> my flex-servlet.xml contains <flex:message-broker> <flex:message-service default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" /> <flex:secured /> </flex:message-broker> <flex:message-destination id="chat" /> the problem have when launch swf message [messagingerror message='destination 'chat'...

MySQL keys: PRIMARY KEY, FOREIGN KEY, KEY -- what is "KEY"? -

looking @ "mysqldump -d" , see key key, not "primary key" or "foreign key" what key? example: create table if not exists `table_001` ( `col_001` int(256) not null, `col_002` int(256) not null, `col_003` int(256) not null, `col_004` int(256) not null, `col_005` int(256) not null, `col_006` int(256) not null, `col_007` int(256) not null, `col_008` int(256) not null, `col_009` int(256) not null, `col_010` int(256) not null, `col_011` int(256) not null, `col_012` int(256) not null, primary key (`col_001`), key `col_002` (`col_002`,`col_003`), key `col_012` (`col_012`), ) engine=myisam default charset=utf8; also, when i'm create new version of table, changing myisam innodb require additional changes besides "engine=myisam" "engine=innodb"? key alternative syntax index declaration. create table statement includes creating 2 indexes, on col_002 , col_012 separately. ...when i'...

rest - Is it considered bad practice to perform HTTP POST without entity body? -

i need invoke process doesn't require input user, trigger. plan use post /uri without body trigger process. want know if considered bad both http , rest perspective? i asked this question on ietf http working group few months ago. short answer is, yes ok, suggest reading thread more details.

Rails, link_to is using a period and not a / in the URL? -

<%= link_to 'view item', items_url(@item, :only_path => false) %> which generating: http://0.0.0.0:3000/items.124/ this no has period should have forward slash like: http://0.0.0.0:3000/items/124/ anyone know y? thanks shoot, should item_url not items_url

ipad - Map app in iphone 4.1 -

i ran map application(built in) in iphone 4.1.when give, example "shops in new york", shows in map annotations of shops.i hope handles xml file through google url.anybody knows url implement in aplication?needs url csv response or xml response multiple latitude , longitiude values, u have given direct url. 'shops in new york' seems predefined query google maps accepts. you can issue within standard browser using http://maps.google.com/maps?q= "shops in new york" i'm not sure if problem trying solve, - feel free provide more detail , we'll see if can figure out. gemma

jsf - IceFaces: panelPopup autoCentre problem with IE -

i'm having problems panelpopup , ie8. when set autocentre="true" , positiononloadonly="true", expect popup appear in center of view port , stay put there. works fine in safari, chrome , firefox, in ie popup "follows scroll", if see mean. i.e if page popup displayed longer popup popup re-centered when scroll page. also, , bigger issue - if popup longer page can scroll part of way down it, it's re-centered. means can never see information @ bottom of popup... this code used generate popup: <ice:panelpopup id="popup" positiononloadonly="true" autocentre="true" style="z-index:999; background: #ffffff;" resizable="false" draggable="false" modal="true" clientonly="true" visible="#{somebean.popuprendered}" > any ideas? thanks! according documentation, autocentre option supposed keep centered thro...

Always app Java end with "Exit 143" Ubuntu -

this question has answer here: how gracefully handle sigkill signal in java 5 answers i have application in java, permanently pulled. execute follows: nohup ant> log.txt & the problem last indefinitely, application quits , message "exit 143". exit code 143 corresponds sigterm , signal sent default when run kill <pid> . possible process or user killing application? without more information it's difficult suggest else.

vbscript - Programtically add a hyperlink button to outlook 2007 -

i adding toolbar outlook. the toolbar have 1 button on it. this button, when pressed, open web site. i've created button & toolbar no problem, cannot work out how add hyperlink? any ideas? thanks in advance, jim set otbar = oview.add("toolbarname") otbar.position = 1 otbar.visible = true set obutton = otbar.controls.add obutton .caption = "click here!" .style = 3 .hyperlinktype = 1 .faceid = 1707 end haha! you need add tooltip: .tooltiptext = "http://your_url"

How do I re-size an icon -

i remove icon (png format), unfortunately it's bigger. icon finder site doesn't seem contain smaller size, maybe same icon of size 16x16 preferable. how re-size? why don't download icon , resize manually, using gimp , example?

vb.net - How can i create a table in sql server 2005 that is totally new for me..? -

i have 1 problem in want know how can create table can used end solution in vb 2010. i want know when choose data source in vb.net sql server want choose....simply can used because there 2 or 3 little different name..... i'm struggling understand question, in effort help: i'm guessing want programmatically create table used other parts of vb application, need ensure table name unique...? if i'm right in assumption, see below. you can use query: select * information_schema.tables table_type = 'base table' to list of table names in database. can compare table_name column values desired table name. if exists already, change name adding differentiator, eg: mytable, mytable1, mytable2 etc. alternatively, sql server accepts guids table names. disclaimer: imho, if table not going temporary deciding table names in manner pretty ugly solution , lacks supportability.

app store - Possible to change version numbering scheme for already deployed iPhone app? -

some time ago released app appstore on client's account. client preferred simple version number scheme, apps first version number 1.0. since it's release, however, there seems unexpected need minor changes content of app on regular basis, more precise versioning scheme, reflecting content revisions, more feasible now. is possible "refine" numbering scheme in course of update app? instead of upgrading 1.0 1.1, i'd go 1.0.1 now. would sufficient change version number according new needs or appstore accept new releases if follow original scheme? thanks!! you can, if haven't submitted 1.1 version yet. 1.0.1 > 1.0 it's ok. taken "developer guide" ( https://itunesconnect.apple.com/docs/itunesconnect_developerguide.pdf ) version number: the version number of app adding. numbering should follow typical software versioning conventions (for example, 1.0 or 1.0.1 or 1.1).

javascript - Set scroll position -

i'm trying set scroll position on page scroller scrolled way top. i think need it's not working: (function () { alert('hello'); document.body.scrolltop = 0; } ()); any ideas? you can use window.scrollto() , this: window.scrollto(0, 0); // values x,y-offset

javascript - why doesn't this line of code work? -

im trying make user can't click #shareheart twice in row, making animation screw up. maybe i'm trying create active state without adding , removing classes? why doesn't work? first piece of code what's not working, it's not following if statement, did wrong here? if($('.share-text').not(':animated') && $('.share-text span').is(':visible')) { // } here's full code: $('#shareheart').click(function() { if ($('.share-text:animated').length == 0 && $('.share-text span').is(':visible')) { $('.share-text span').animate({'opacity': '0'}, 800, function() { $("#share-what").fadeout(400) $('.share-text').stop(true, false).animate({'width': 'toggle','padding-left': 'toggle','padding-right': 'toggle'}, 800) $('#short-url').css('backg...

design - MATLAB script to generate reports of rounding errors in algorithms -

i interested in use or created script error rounding reports in algorithms. hope script or similar done... think usefull digital electronic system design because it´s neccesary study how accuracy error depending of number of decimal places considered in design. script work 3 elements, algorithm code, input, , output. script show error line line of algorithm code. modify algorith code command roundn , compare error of output. define error errorrounding = output(without rounding) - output round for instance have next algorithm calculation1 = input*constan1 + constan2 %line 1 of algorithm output = exp(calculation1) %line 2 of algorithm where 'input' input of n elements vector , 'output' output , 'constan1' , 'constan2' constants. n number of elements of input vector so, put algorithm in script , generated in automatic way next algorithm: input_round = roundn(input,-1*mdec) calculation1 = input*constant1+constant2*ones(1,n) ca...

amazon ec2 - Hosting rails on ec2 -

i want deploy rails onto amazon ec2. i've had @ poolparty , ec2onrails neither seem maintained anymore. what people using this? homebrewed puppet , capistrano or there project me going? i can recommend 2 projects: if have single rails app, take @ rubber . it's gem can provision ec2 instances you, install software , deploy app. it's based on capistrano. there recipes common components (mysql, apache, passenger, postgres, etc.). in case have more complex setup (e.g. multiple apps or specific needs aren't covered rubber) recommend chef. have quite learning curve, prepare yourself. take @ opscode started chef.

Mercurial: Did not pull before committing local changes and push. Created 8+ heads -

i read questions suggested while posing, ended getting confused :s made few changes , committed , pushed them. later came know repository pushed to, before pushed it. questions are: q1. did pushing overwrite repository, i.e repository no longer have changes pushed before me? q2. should in such cases? need have changes made, , other changes too, w/o having make other guy pull code, re-commit, re-push, , pulling again, same working copy. q3. there anyway code can updated/pulled implicitly before commit/push? q4. rebase option? read on documentation, changes perform on code not private. assumptions: there aren't branches created. (well, created, different modules, , not concerned them). i use eclipse , mercurialeclipse. edit: sorry if question (possible) duplicate of existing question. when manage create medusa-repo in hg, determine branch going "mainline". go each sub-branch , perform process: hg -r subbranch hg merge -r mainline-branch hg co...

haskell - Is there a better way to convert from UTCTime to EpochTime? -

i want set file's modification time time got exif data. to time exif, found : graphics.exif.gettag :: exif -> string -> io (maybe string) to set file modification time, found : system.posix.files.setfiletimes :: filepath -> epochtime -> epochtime -> io () assuming find time in exif, need convert string epochtime. with parsetime can utctime . with utctimetoposixseconds can posixtime with posixtime can more or less epochtime to convert utctime epochtime typechecks, i'm not sure it's correct : fromintegral . fromenum . utctimetoposixseconds $ etime this part of function gettime return time exif data, if present, otherwise file's modification time : gettime (path,stat) = let ftime = modificationtime $ stat err (someexception _) = return ftime time <- liftio $ handle err $ exif <- exif.fromfile path let getexiftime = maybet . liftio . exif.gettag exif res <- runmaybet $ tmp <- ms...

jQuery: Loading external HTML content; Access to elements inserted fails -

i load table element html (additional_content.html) current html via jquery. managed load content not able access elements inserted if not inserted. however, when inserting alert statement after load statement, able access elements of table inserted via load . appears me dom tree not updated immediately. the code fragment within parent document looks this: <div id="content"></div> <script> $("#content").load("additonal_content.html #content table").hide(); $("#content").find("img").each(function() { alert("test"); }); </script> and table within *additional_content.html" (excerpt): <table> <tr> <td><img src="image1.gif"></td> <td>some text...</td> </tr> <tr> <td><img src="image2.gif"></td> <td>some text...</td> </tr> </table> i...

vb.net - How can I call a WCF service from code, in the .net framework 3 -

i'm working in vb.net , i'm trying make piece of code more generic. in fact, there's big select case statement build proxyserver based on value passed in parameter (a string). select case _strnterahl7 case constantes.nomprpmin306010 strurl = obtenirurl("providerdetailsquery", _strversion, _strenvir, true, _blnsimulcais, _blnsimulpds, _blnsimulpdssiir, _blnsimulpdsinteg) objwshl7 = new wsproviderdetailsquery.providerdetailsqueryclient(objbinding, new endpointaddress(strurl)) case constantes.nomprpmin301010 strurl = obtenirurl("addprovider", _strversion, _strenvir, true, _blnsimulcais, _blnsimulpds, _blnsimulpdssiir, _blnsimulpdsinteg) objwshl7 = new wsaddprovider.addproviderclient(objbinding, new endpointaddress(strurl)) the objects "wsaddprovider" , "wsproviderdetailsquery" in previous example service references have been added through gui of visual studio... ...

math - function for computing bicoherence -

dear i'm looking numpy/scipy function compute bicoherence , auto-bicoherence fore studying of 3-wave interaction. thank possible nicola the best package in python land http://pypi.python.org/pypi/nitime it has several coherence estimators, didn't @ those. package neuroimaging, algorithms use numpy , scipy, intentionally, can used other applications.

geometry - How to optimally plot parametric continuous curve? -

let's have parametric curve, example circle: x = r * cos(t) y = r * sin(t) we want plot curve on screen in way that: every pixel painted once (the optimal part) there painted pixel each (x, y) lies on curve (the continuous part) if plot (x, y) each t in [t1, t2], these conditions not met. i searching general solution parametric curve. a general solution 100% satisfies criteria not exist. so have compromize. usually tackled starting stepsize (usually parameter routine), stepsize can subdivided triggered heuristic e.g.: subdivide when distance covered segment larger given distance (e.g. 1 pixel) subdivide when curve direction changes much or combination of these. usually limit subdivision given avoid taking forever. many systems offer parametric plotting start changeable default setting heuristic params , step size. user can adapt these if curve not "nice" enough or if takes long. the problem there pathological curves defeat...

Android Application with Login -

i'm french computer science student. i've project do, create simple application login website, display (if login correct) new activity 3 tab (each tab contains activity). application structured this: first activity: login. if correct, go 3 tab activity. first tab displayed profile tab, nickname , stats (obtained api of website). second tab friend tab. third "upload" tab. use upload photo taken in photogallery. can follow , teach me creation of app? need know, first thing, how login , keep session tab activity, if login correct. i see lot of answers here on stackoverflow, neither me. see other questions guy, phil, reply don't me. i hope can give me help. here tutorials, should able started forum. android tutorial source code build app taking bits of info need each tutorial.

C# - Class "List" that implements linear lists -

i have create "list" class in c# sharp (i've started new project - console application - in visual studio) using method "design-by-contract" create "list" class implements linear lists. kinda stuck , not know how start this. more information "design contracts" method can found here: http://www.bitrepository.com/apps/design-by-contracts.ppt i hope can give me clue on how achieve this. regards, gabriel for guidance on how create "list" class, take @ system.collections.generic.list<t> . public api give ideas on sort of functionality such type should provide. if interested in implementation details, can decompile type using tool such reflector . might have design work if goal different, example if "that implements linear lists", mean type represents list-of-lists. the c# programming language has no direct support design-by-contract. best bet use design-by-contract library tooling support, such code ...

winforms - C#: Forms: Step-By-Step Hide/Show Forms -

i writing small windows forms application in c#. basically, ask user series of questions in step-by-step format. have new form each "step," question is: there standard logical way of doing this? right now, doing making class holds instance of each different form. have "next" , "previous" buttons allow user go , forth using "show()" , "hide()" commands different forms. some problems i'm having: -i want forms pop in exact same location previous 1 (right bit skewed) -i'm afraid method of implementation not best. common thing do, i'm sure there accepted procedures. i'm looking insight people more experienced me. i'll appreci for example... user opens program. first screen asks them choose date. user chooses date , clicks "next." first screen closes , next screen opens. second screen asks user choose file. user chooses file , clicks "next." etc. thanks! edit: further clarify...inst...

Complete List of forbidden file and folder names for windows -

on windows file names com1.txt or lpt1.txt forbidden. there list of forbidden file , folder names on windows (or forbidden chars in file , folder names :? ...) the list of invalid characters is: < (less than) > (greater than) : (colon) " (double quote) / (forward slash) \ (backslash) | (vertical bar or pipe) ? (question mark) * (asterisk) plus characters 1 31 source but should use system.io.path.getinvalidfilenamechars , system.io.path.getinvalidpathchars (or equivalents) recommended flipscript a) it's neater , b) means if list ever changes won't have modify application.

android - ImageView that is a fixed size, regardless of image size -

i have imageview want same size. if image smaller view, i'd centred in view. if image larger view i'd scaled down - aspect ratio preserved. i've had several attempts @ myself - latest of is: <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <imageview android:id="@+id/itemimage" android:layout_width="100dp" android:layout_height="100dp" android:scaletype="fitcenter" android:adjustviewbounds="true" android:gravity="center" android:padding="10px" /> <textview android:id="@+id/currentlentitem" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10px"/> </linearlayout> what missing here? try using scale type centerin...

.net - Hash on Unicode Password -

i'm writing password salt/hash procedure .net application, largely following guide of article: http://www.aspheute.com/english/20040105.asp basically code computing salted hash this: public string computesaltedhash(string password, byte[] salt) { // password ascii text bytes: byte[] passwordbytes = system.text.encoding.ascii.getbytes(password); // append 2 arrays byte[] tohash = new byte[passwordbytes.length + salt.length]; array.copy(passwordbytes, 0, tohash, 0, passwordbytes.length); array.copy(salt, 0, tohash, passwordbytes.length, salt.length); byte[] computedhash = sha1.create().computehash(tohash); // return ascii string return system.text.encoding.ascii.getstring(computedhash); } however, want allow allow users use unicode chars in password, if like. (this seems idea; can think of reason it's not?) however, don't know ton how unicode works, , i'm worried if change both references of system.text.encoding.ascii ...

Logging in Java Desktop app -

i'm developing java desktop app , wondering best practices logging bugs , exceptions. i'd log exceptions in file that's sent me when there's problem. there frameworks doing or retarded idea? lot elsanto 696 log4j de facto standard (with standard java logging framework close second). you should use version 1.2.x production use. you can configure log4j via code (at runtime) or via configuration file (either java properties or xml format). from website: the target of log output can file, outputstream, java.io.writer, remote log4j server, remote unix syslog daemon, or many other output targets. there smtpappender can configured sending mails log entries on specific conditions, in case email meant "sent me".

Problem with fwrite php -

i getting problem while using fwrite in php. following code works in local computer gives error in server. $fp = fsockopen("www.example.com", 80, $errno, $errstr, 30); if(!$fp) { echo 'error: '.$errno.', '.$errstr; } else { fwrite($fp, 'kool'); } there no error fsockopen. passes , gives no error. fwrite not being able write. fails , returns no error false if you're on shared host, server not allow outbound connections on port 80. inbound connections allowed.

wcf - How do I make WIF use RSA15 when encrypting data using a certificate? -

i have been working on wcf service return base64 encoded string is, in reality, full saml response xml document. because information handed off vendor, have meet requirements how saml document , encoded. having trouble getting output meets requirements. i know wcf , wif should me. built service using wif create saml assertions (token) , other c# code generate final saml document. of works , meets vendor's requirements except <encrypteddata> node of document. section uses aes256 , rsaoaep vendor wants aes128 , rsa15. thus, hunting resolution. appreciated. here walk through. the service takes in guid used call database , return fields. these used so: datatable userdata = getdataforuser(userid); list<claim> claims = new list<claim>() { new claim("clientid", "nameofclient") }; foreach (datarow row in userdata.rows) { string memberid = row["memberid"].tostring().trim(); string firstname = row["firstname...

Need An Event To Fire After Leaving A Grid Control Filter DevExpress -

is there event fires after leaving cell in grid controls row filter? the first row of grid filter row, when type in cell of , column in filter row select row want event fire. what happening have lot of code in gridview1s focusedrow changed event, when use filter select first row focusedrow event not fire. if select first first row returned focusedrow event fires , fine, need capture event after type in filter cell , select first row in grid. i've tried reproduce issue using xtragrid 9.3.4. no avail. works expected in tests. so, suggest create new ticket in support center , upload sample project. find cause of issue , let know how resolve it.

c# - Executing javascript in Silverlight with Firefox -

i trying execute piece of javascript in silverlight application. pretty simple example have created... single button tries execute line of code... private void button_click(object sender, routedeventargs e) { htmlpage.window.eval("alert('hi');"); } the alert window come freezes firefox, have force quit firefox never comes life.... has ran this?? i thought maybe firefox plugin causing problem have disabled them same results. the way can work if go about:config in firefox , set dom.ipc.plugins.enabled.npctrl.dll false any ideas??? well think partially figured out... i added parameter silverlight hosting page... <param name="windowless" value="true" /> so whole <div> <div id="silverlightcontrolhost"> <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> <param n...

Oracle sql functions -

i have table column called type , can have 3 values ( name1 , name2 , name3 ). can write query first returns records type = name1 , rows values name2 , name3 where clause, can filter them creationdate instance? that means, return day 01/01/2000 : row 'name1' row 'name1' (rest of rows) id type creationdate 1, 'name1', '2000/01/01' 8, 'name1', '2000/01/01' 18, 'name3', '2000/01/01' 82, 'name2', '2000/01/01' 11, 'name2', '2000/01/01' 12, 'name3', '2000/01/01' 2, 'name1', '2000/01/02' 4, 'name1', '2000/01/02' 98, 'name2', '2000/01/02' for every day, records of type 'name1' first , rest of types no order. thank you! udo. you can order create date type. if need define order of type can use case. select id, type, creationdate "table" order creationda...

c# - Nlog - Generating Header Section for a log file -

just got experimenting nlog, , occurs me able add header information top log file such as: executable name file version release date windows user id etc... after searching have been unable find in existing on-line documentation or code forums indicates type of functionality. possible? have included sort of information in log files, , have found useful on numerous occsions in past, when sourcing information on production issues @ customer sites. admittedly, functionality custom built solutions , not based on of current .net logging frameworks. i'm not aware of way easily. having said that, of examples give available (or pretty available custom code) added each log message. is, each logged message can tagged executable name, file version, release date, windows user id, etc via layout , layoutrenderers. this not same creating header @ top of log file, might not useful you. on other hand, use technique mentioned in pat's answer in post associate multiple ...

c# inheritance help -

i new inheritance , wanted ask something. have base class has lots of functionality shared number of derived classes. the difference each derived class single method called name. functionality same each derived class, there need name distinction. i have property in base class called name. how arrange derived classes can each override base class property? thanks. declare method virtual public class { public virtual string name(string name) { return name; } } public class b : { public override string name(string name) { return base.name(name); // calling a's method } } public class c : { public override string name(string name) { return "1+1"; } }

python - Django + Eclipse, shell issues -

i'm using pydev use django in eclipse. i'm following tutorial here (http://docs.djangoproject.com/en/dev/intro/tutorial01/), making simple poll application. in example when run shell able this: from polls.models import poll, choice however, reason, i'm not able this. in order work, have this: from projectname.polls.models import poll, choice any idea why is? eclipse thing? path wrong somewhere in settings.py? thanks! i'm assuming you're using pydev. see how pythonpath structured... (right click on project in package explorer > properties > pydev - pythonpath. if project set as project_root/ +-projectname/ +-polls/ +-models.py and if pythonpath points project_root , you'll have refer poll class projectname.polls.models.poll . however, if set pythonpath projectname , can refer it polls.models.poll .

ms access - NOT IN condition in SQL -

can tell me exact syntax not in condition in sql on 2 columns. this query written in vba. strnewsql = "select distinct(tblrevrellog_detail.partnumber), tblrevrellog_detail.changelevel, tblrevrellog_detail.id tblrevrellog_detail left join tbleventlog on tblrevrellog_detail.partnumber = tbleventlog.partnumber" strnewsql = strnewsql & " (tbleventlog.partnumber) not in(select tbleventlog.partnumber tbleventlog tbleventlog.eventtypeselected = 'pn removed wrapper') , tbleventlog.trackingnumber = """ & temptrackingnumber & """ , tbleventlog.trackingnumber = tblrevrellog_detail.revreltrackingnumber;" i want change sub query like, should apply on combination of 2 columns follows: strnewsql = "select tblrevrellog_detail.partnumber, tblrevrellog_detail.changelevel, tblrevrellog_detail.id tblrevrellog_detail left join tbleventlog on tblrevrellog_detail.partnumber = tbleventlog.partnumber" strnewsql = str...

android - Why can't I delete using a getContentResolver..? -

i can data no problem...but cannot delete data. suggestions..?? cursor cu = getcontentresolver().query(content_uri, null, null, null, null); if (cu.movetofirst()) { numberindb = cu.getstring(2); system.out.println("number in db = " + numberindb); } contentresolver c = getcontentresolver(); neither of these next 2 lines work c.delete(content_uri, "title ="+ numberindb, null); getcontentresolver().delete(content_uri, "title ="+ numberindb, null); if title string, suspect need quote in query: getcontentresolver().delete(content_uri, "title ='" + numberindb + "'", null) also, check logcat output , see if there sqlite errors.

php - Dynamically Generated Radio button form when submitted does not display data -

i trying create quiz php/mysql... i have created form radio buttons answers displays data pulled database values radio buttons. tried submit form result page not show anything. my quiz code goes follows: <form method="post" action="insertscore.php" name="csscheckbox" id = "csscheckbox"> <?php $query = "select * questions (`topics` = '.net' or `topics` = 'php') order rand() limit 5"; $result = mysql_query($query); if ($result && mysql_num_rows($result)) { $numrows = mysql_num_rows($result); $count =1; while ($row = mysql_fetch_array($result)) { ?> <div class="group"> <input type="hidden" name="<?php echo $row['key_id']; ?>"><?php $row['key_id']; ?></input> <span class="test_question"><strong><?php echo $count;?>) <?php echo $row['question']; ?> </strong><br...