Posts

Featured post

SAP Web Service from .NET via WCF -

i'm trying consume sap web service .net via wcf. i've generated proxy , have configured app.config file. here test code: webservicesap.ztest_rfcclient mywcfservice = new webservicesap.ztest_rfcclient("myendpoint"); mywcfservice.clientcredentials.username.username = "<username>"; mywcfservice.clientcredentials.username.password = "<password>"; webservicesap.ztestrfc parameter = new webservicesap.ztestrfc(); parameter.testinput = "this simple test"; webservicesap.ztestrfcresponse response = mywcfservice.ztestrfc(parameter); console.writeline(reponse.testoutput); console.readline(); the ztestrfc sap method simple function accepts input string, , outputs: "result: <the input string>" when call ztestrfc method, got null value in variable response. soap messages seem fine. soap request <messagelogtracerecord> <httprequest xmlns="http://schemas.microsoft.com/2004/06/servic

Optimized Line drawing in QT -

i new qt. working on graphics. i using qwidget drawing graphics(for drawing graphics in qwidget paint event). need draw background , foreground graphics. background fixed graphics. foregrounds drawing lines. each 100 millisecond need draw 20points. drawing time 8 sec. total need draw 1600 points (total points represents contentious line). i using qtimer invoke drawing in each 100ms. first few drawing drawn fast. in middle of drawing it's become slow. the problem need draw foreground , background in each 100ms. please me fix problem. if 1 have sample code please provide. in advance. is there way draw partial area ie. particular modified region of graphics? qpainter-drawing can slow without hardware support. using qgraphicsview won't if lines visible, since internally uses qpainter anyway. if have draw 20 new points (or lines) per update , per update background gets cleared have render again, there few things try: 1) disable background autofill. see

java - how can i have a list of icons in my android app; -

can 1 suggest how can have list of icons browser icon,email icon , contacts icon upon clicking on should lead android browser,email , contacts apps respectively...right have done it, upon clicking buttons. want icons(with image , text) instead of buttons... check out: http://developer.android.com/resources/tutorials/views/hello-formstuff.html#custombutton this show had put images want in res/drawable/ , load them buttons in app.

regex - Replacing all non-ASCII characters, except right angle character in C# -

writing file utility strip out non-ascii characters files. have regex: regex rgx = new regex(@"[^\u0000-\u007f]"); which works fine. unfortunatly, i've discovered silly people use right angles (¬) delimiters in files, these stripped out well, need those! i'm pretty new regex, , understand basics, awesome! thanks in advance! you need include code point angle bracket in set: try this: regex rgx = new regex(@"[^\uxxxx\u0000-\u007f]"); or this: regex rgx = new regex(@"[^\uxxxx-\uxxxx\u0000-\u007f]"); (where xxxx unicode code point character want preserve.) the reason giving 2 options here know can specify multiple ranges within 1 negative character group, don't know if can match individual characters ranges.

datetime - str to time in python -

time1 = "2010-04-20 10:07:30" time2 = "2010-04-21 10:07:30" how convert above string time stamp? i need subtract above timestamps time2-time1 . for python 2.5+ from datetime import datetime format = '%y-%m-%d %h:%m:%s' print datetime.strptime(time2, format) - datetime.strptime(time1, format) # 1 day, 0:00:00 edit: python 2.4 import time format = '%y-%m-%d %h:%m:%s' print time.mktime(time.strptime(time2, format)) - time.mktime(time.strptime(time1, format)) # 86400.0

internationalization - Why NHibernate returns multiple results from one database row? -

i have translation engine mapped follows: <class name="core.model.entities.translation, core.model" table="translation" lazy="false"> <id name="id" column="id" type="int64"> <generator class="native" /> </id> <map name="translations" table="translation_value" inverse="true" fetch="join" cascade="all-delete-orphan" lazy="false"> <key column="translation_id" /> <index-many-to-many column="language_id" class="core.model.entities.language, core.model"/> <one-to-many class="core.model.entities.translationvalue, core.model"/> </map> </class> <class name="core.model.entities.translationvalue, core.model" table="translation_value" lazy="false"> <id name="id" column="id" type="int64"&g

oracle - is it possible to regexp_replace using a function? -

i calculations on value in string , replace them. oracles regexp seemes \1 gets evaluated @ end of calcualtions. wondering if fore evaluation before passing function? set serveroutput on declare l_foo varchar2(4000); function f_test(i_t varchar2) return varchar2 begin dbms_output.put_line('given parameter: ' || i_t); return upper(i_t); end; begin l_foo := regexp_replace( 'http://www.scoach.com/${asset_type}/${isin}?eventtarget=${target}andeventvalue=${target_value}' ,'\$\{([[:alpha:]_]+)\}' ,f_test('\1') ); dbms_output.put_line(l_foo); end; gives result like: given parameter: \1 http://www.scoach.com/asset_type/isin?eventtarget=targetandeventvalue=target_value pl/sql procedure completed. it looks passing backreference function within reg ex function not going work (at least in test , lack of finding out there works (although there link hard call reference) but can this, it'll slow-by-slow pro