Posts

Showing posts from April, 2014

postgresql - Why aren'y my CHECK CONSTRAINTS on child tables being utilized by the planner to reduce the size of the plan? -

i have table partitioned month , used holding apache log information. when run explain simple query has clause on same field partition checks, same plan whether constraint_exclusion on or off. below master table info , 2 examples of child tables info feb , mar of 2010. overall, there child table each month feb of 2010 through june of 2011. on average, each child table has around 100m records. below output of explain simple query, once constraint_exclusion on , once off. unfortunately, check constraints aren't being used reduce plan size. due fact request_dt datatype timestamp time zone check constraints dates? other thoughts? have not yet created indexes on request_dt, according documentation isn't necessary. i'll adding them, wouldn't think should impact use of check constraints. i'm using postgres 8.3.6. spatial_data=# \d rpt.websvcs_logs table "rpt.websvcs_logs" column | type ...

Refining SQL query -

my query returning data. here query, sample data , sample of i'd like. select sd.ident,sd.suniq, td.testc, td.testuniq, td.subtestc, ts.testscore, ud.metadept, max(ts.takendt)as testdate studemo sd, stutests ts, testdef td, udefstu ud ts.suniq =sd.suniq , td.testuniq = ts.testuniq , ts.suniq = ud.suniq , td.testuniq in ('2000089', '2000090', '2000091', '2000092') group sd.suniq, sd.ident, td.testc, td.subtestc, ts.testscore, ud.metadept, ts.takendt, td.testuniq order suniq sample output ident suniq testc testuniq subtestc testscore metadept testdate 102201 2001444 adept 2000091 l3 23 null 09/01/2006 00:00 102201 2001444 adept 2000092 l4 7 null 06/01/2007 00:00 101184 2001532 adept 2000092 l4 5 null 09/01/2006 00:00 101184 2001532 adept 2000092 l4 7 null 06/01/2006 00:00 101184 2001532 adept 2000092 l4 7 null 06/01/2007 00:00 590122 2001950 adept 20000...

ruby - Iterating through array of Models in rails -

yet ruby question bunch of questions in one. i'm starting rails there questions i'd ask straight out. right now, i'm implementing queue in sqlite. have scaffold setup working ok. purpose web crawler read through array , determine links should crawl next. the architecture in program 2 controllers. 1 job , 1 crawler. jobs has standard crud interface supplied scaffold. i'm falling down i'm still trying understand how these things communicate eachother. the job formatted url:string , depth:decimal. table populated 4 objects. @sitestocrawl = job.all @sitestocrawl.each {|x|puts job.url} i have bunch of questions above. at moment, supposed display jobs , foolishly thought display plain text hexidecimal pointer object itself. im trying iterate through @sitestocrawl , put out each jobs url. questions start here: 1: know ruby dynamically typed. @sitestocrawl become array want each slot containing job. 2: @sitestocrawl.each pretty straighforward , i'...

three20 - Adding project to existing one -

i have table view project multiple controllers , 1 image gallery project , have three20 project added it. found in internet. want when table view cell tapped image gallery opens. both projects work fine when test em separated . tried dragging gallery project , adding main project ,but , adding headers project ,but thing got errors. ideas it's hard tell anything, because didn't mention detailed information of works. @ least, must know if using xcode 4, kind of errors have got! , on... moreover, know how link static library xcode project. that's way should work!

facebook - Adding Open Graph Tags for Existing FB Page -

i'm working existing website more tightly integrated existing facebook page web page. in open graph documentation, see ways put in admin ids or app id. don't see way put in existing facebook page id. i have run problem in past , when put myself admin id other open graph tags, generated entirely new fb page me don't want or need. so, long story short - how add open graph tags associate webpage existing facebook page. thanks! add following meta tag: <meta property="fb:page_id" content="yourpageid (integer)" />

windows - Building cvhaartraining.lib -

i trying opencv work on visual studio 2010 , trying compile 'createsamples' project. getting linker errors when trying , after research online i've noticed missing cvhaartraining library. need compile library use in projects. have vs 2005, 2008, , 2010 @ disposal , can switch either 1 long can build. working opencv 2.2 thanks. tried this? http://asadujjaman.wordpress.com/2010/02/15/building-opencv-with-microsoft-visual-studio/

pagination - Synchronous paging against Azure Table Storage -

i new working azure table storage have being able put code below allows query accept filterquery (string) specified user -- ex: (amount le 5000.00) -- , retrieve rows (entities) matching criteria. dim sbuilder new system.text.stringbuilder dim query = mybase.createquery(of cdata)("customerdata") dim userquery = string.format("(partitionkey eq '{0}' , {1})", appid, filterquery) sbuilder.appendformat(userquery) query = query.addqueryoption("$filter", sbuilder.tostring).astableservicequery().take(50) dim results list(of cdata) = query.execute.tolist i should point out way of allowing user specify filter string key me since using generic class has dictionary inside of in order allow caller pass in number of elements store given entity. therefore, solution allows user drive how wants query search , code not have 'know' custom fields. now need add pagination. understanding 'execute' method using handles pagination if the...

c# - Proxy for a software to increase its functionality -

i have software communicates api of website. how increase functionality connect various other api's without touching code in it? think easiest way write proxy resides between api , softwre translates incoming messages other api base api software "understands". should more information on implementing proxy using c#? thank help. hmm sounds 1 of software design patterns come across every day. think fits best "proxy" bridge. from sourcemaking intent - decouple abstraction implementation 2 can vary independently. - publish interface in inheritance hierarchy, , bury implementation in own inheritance hierarchy. - beyond encapsulation, insulation problem “hardening of software arteries” has occurred using subclassing of abstract base class provide alternative implementations. locks in compile-time binding between interface , implementation. abstraction , implementation cannot independently extended or composed. the example in c# http://sourcema...

asp.net - How to bind the URL of a GridView HyperLinkField when the bound value contains a colon? -

i'm trying bind gridview hyperlinkfield such bound column used parameter value in url. pretty standard stuff - nothing fancy, binding fails when bound column contains colon, i.e. : . i'm particular case, value string representing duration of time, e.g. "14:35", or "1:07:19". here's gridview, time value bound hyperlinkfield url. <asp:gridview id="resultsgridview" runat="server" autogeneratecolumns="false" datasourceid="resultsdatasource" enablemodelvalidation="true" allowpaging="true"> <columns> <asp:boundfield datafield="year" headertext="year" sortexpression="year" /> <asp:hyperlinkfield datanavigateurlfields="runtime" datatextfield="runtime" headertext="hyperlink" datanavigateurlformatstring="linkedpage.aspx?param={0}" /> ...

http - How to post XML using digest auth in python? -

i building application following: post xml http address take response , store in table on remote mssql db post xml again , compare response stored in database look differences, , when present, post xml http address take new response, , parse needed, sending results mssql table. the http server uses digest authentication, have had sorts of trouble getting working in python. first forray python , i'm learning kinds of stuff...but can't seem this. have real examples of digest authentication in python? i'd going, , try work through of rest of myself. ideally i'd use cookies keep session open. thanks! edit here have far, , outputs: url = "https://url.here.com/xml" xml = '''<request method=\"switchvox.currentcalls.getlist\"><parameters></parameters></request>''' user = "user" secret = "secret" realm = "switchvox_api_auth" passwdmngr ...

c# - NetNamedPipeBinding: parameter in pipe method is empty -

i have servicehost listening on netnamedpipebinding endpoint. have service contract class single method being called client , handled server. method (we'll call piperequest()) has request parameter. on client side populate object it's empty time gets sent on server. ideas why case? _host = new servicehost(typeof(pipeservice), new uri(servicerequestrouter.uri)); _host.addserviceendpoint( typeof(ipipeservice), new netnamedpipebinding(), _pipename ); _host.open(); [servicecontract(namespace = "http://www.example.com/pipecommunication")] interface ipipeservice { [operationcontract] void piperequest(servicerequestbase request); } [datacontract] [knowntype(typeof(derivedservicerequest))] [knowntype(typeof(someenumtype))] public abstract class servicerequestbase { ... public void dispatch(string ppipename = servicerequestrouter.defaultpipename) { endpointaddress epa = new endpointaddress(_address_)); ipipeservice p...

c# - ValidationSummary doesn't display errors -

i have page charges credit card. when attempt charge card, i'd redisplay page if error response. here's controller method: [httppost] public actionresult charge(creditcardviewmodel viewmodel) { if (modelstate.isvalid) { var request = new authorizationrequest(viewmodel.creditcardnumber, viewmodel.expirationdate.value.tostring("mmyy"), viewmodel.amount.value, ""); var gate = new gateway("xxxxxxxxx", "xxxxxxxxx", true); var response = gate.send(request); if (!response.approved) { modelstate.addmodelerror("", response.message); return view(viewmodel); } else { viewmodel.responsemessage = response.message; return view("results", viewmodel); } } return view(viewmodel); // validation error, redisplay same view } and view: <% html.enableclientvalidat...

mailmerge - Who is the current user -

i using mail merge feature of navision , able add name of user invoking mail merge. if information stored in navision table, can call out , add template. the current nav user can accessed using userid global variable (always defined in nav objects, doesn't need defined you).

Some Android phones add two identical photos to the gallery after launching the camera app and getting the result -

my app starts camera app this: localimageuri = getcontentresolver().insert( mediastore.images.media.external_content_uri, new contentvalues()); intent cameraintent = new intent(mediastore.action_image_capture) .putextra(mediastore.extra_output, localimageuri); startactivityforresult(cameraintent, return_from_camera); the camera app starts, take photo, confirm photo, , returned app expected. on phones, such samsung sidekick, there 2 identical photos in camera's gallery after workflow. on other phones, works without leaving duplicate photos in gallery. is there way change code avoid duplicate photos on phones?

winapi - Use of the function IsWin2000() produces a C++ warning: C4996 - Deprecated Function -

so when using function, iswin2000(), figure out whether or not computer running application running windows 2000, warning: warning c4996: 'iswin2000': function exported support existing modules , obsolete. if obsolete, deprecated function, proper way query operating system running? there other way achieve task, or option suppress warning? thanks! getversionex see remarks @ osversioninfo list of results , how interpret them. see getting system version fledged example. and lets not forget spec says: identifying current operating system not best way determine whether particular operating system feature present. because operating system may have had new features added in redistributable dll. rather using getversionex determine operating system platform or version number, test presence of feature itself

c# - SQL Server CE : questions about working offline -

i heard of sql server ce wonder how apply current window app + sql server? understanding: if window app failed connect hosting server (sql server express) through internet, data key in through offline mode saved in client's pc in sql server ce , stored in client pc. data keyed in during offline mode pushed server once online. question: if have 3 gb of data in server (sql server express), when client launch window app first time, load data server client pc's sql server ce? data in server must tally data in client pc sql server ce? if answer yes, surely taking lot of time. could share me sql server ce sample project on has crud transaction database. have search online found no sample project on this. please kindly inform me if understanding wrong. in regards first point: if talking using rda case yes. according this thread on msdn rda small databases has pull whole table always. alternatively might want have @ sync services ado .net. here a tutorial sta...

iphone - Levels - Cocos2d -

i have 10 levels. normal game, can't play next level unless beat level before it. parts change on each level is, 1 sprite , sprite's position. how make if beat level next level unlocks, distinguishes level on , loads defined "details"(meaning sprite file , position)? any great appreciated! thanks! edit: i used plist load information regarding level first, created plist(right click group then, click resources, "property list"). next, defined information within plist. then, set global variable set level number. when user chooses whichever level(which ccmenu), method changes int "level" correct level number(e.g. 1,2,3,4,5). then, in game init checks int "levels" , runs level plist. this in level methods gamescene init runs after level check. loads plist, sets dictionary, chooses background, adds layer, ints "_ballx, _bally" declared in .h file sets value ball's position located in init! nsstring *path = [[ns...

objective c - CoreData NSArrayController addObject: Agonizingly Slow -

i have coredata app imports information *.xml file. file has 2 sections, summary , detail. in essence, have 2 table views, tvsummary , tvdetail; 2 array controllers, acsummary , acdetail; , 1 mutable array, madetail. i use [acsummary addobject:newsummarydata]; method add summary data records acsummary array controller when import file. once file imported summary data fields populate tvsummary table view. when use [acdetail addobject:newdetaildata]; method add detail data records acdetail array controller can take upwards of twenty minutes import 72000 records (most files contain between 3600 , 21600 records). once lengthy process completed imported detail data fields populate tvdetail table view. when make selections in tvsummary table view data displayed in tvdetail table view changes match selected row. think how supposed work. during cocoa / objective-c / core data learning process (i still neophyte) have found can copy 72000 records madetail mutable array in 5 seconds...

compiler construction - Last SDK to fully support Windows 98? -

i need quick port windows 98. code raw c/c++, need headers, compiler, , preferably documentation clarify supported windows 98 api. what latest sdk (with compiler) still supports win98, win98 documentation? suggestions: 1) find compiler openwatcom, djgpp or turbo c++ 2) whatever current platform (including linux), create win98 vm test code on

Returning a String from a C# WinForm .dll -

Image
i have c# .dll envoked within c# application useing "system.reflection" @ runtime. .dll contains winform class used display information user. .dll envoked using following code: dll = assembly.loadfrom(strdllpath); classtype = dll.gettype(string.format("{0}.{0}", strnscn)); classinst = activator.createinstance(classtype, paramobj); form dllwinform = (form)classinst; dllwinform.showdialog(); now, problem want return string winform .dll. error or show process completed correctly. know how done when calling method within requested .dll, follows: system.reflection.assembly loadedassembly = system.reflection.assembly.load("mscorlib.dll"); system.console.writeline(loadedassembly.getname()); object myobject = loadedassembly.createinstance("system.datetime", false, bindingflags.exactbinding, null, new object[] {2000, 1, 1, 12, 0, 0}, null, null); methodinfo m = loadedassembly.gettype("sy...

c# - FacebookId as primary key? -

will facebookid ever change? if not, safe use in app primary key? facebook_user facebookid (pk) name facebook_friend id ownerfacebookid (fk) friendfacebookid (fk) facebook id not change, facebook treating them primary key. email id can changed dont use email id primary key. using facebook id primary key.

java - Zooming in and zooming out within a panel -

i have panel in 2d objects moving about. have overridden paintcomponent() necessary. want able zoom in , zoom out area. when zooming in, scrollbars appear 1 can view entire field scrolling. while zooming in , out, 2d objects should increase or decrease in size accordingly. swing component or rather combination of components achieve this? easiest way modify panel , introduce double indicating zoom level. double indicate scale, 1 normal , higher zoomed in. can use double graphics2d in paintcomponent . such as: graphics2d g2 = (graphics2d) g; int w = // real width of canvas int h = // real height of canvas // translate used make sure scale centered g2.translate(w/2, h/2); g2.scale(scale, scale); g2.translate(-w/2, -h/2); for scrolling, put panel in jscrollpane , combine getpreferredsize uses zoom scale. jscrollpane uses preferred size of component put in it. show scrollbars if preferred size exceeds own size. if change preferred size of panel width , height returns s...

asp.net - Select Control Populated from JavaScript Returns Empty Value -

in asp.net applications, have server-side html select control. <select id="companydropdown" runat="server" style="width:330px"> </select> i have link on page runs javascript function populates control, , selects "current" item. can see working because list has items , correct 1 selected. however, when page posts in response button click. <asp:button runat="server" id="btnsavecompany" text="save" onclick="btnsavecompany_click" /> companydropdown.value empty, , contains no items. suggestions on how can see selected value on postback? (note: tried using asp.net dropdown control, fails postback validation when control has items added after page rendered.) because items added list using javascript aren't part of viewstate, cannot retrieved server side. if trying selected value, put server-side hidden field on page , set value using javascript each time selecti...

c# - displaying xaml page in content place holder of aspx page -

i trying display arcgis map c# silverlight application project (xaml) content place holder of aspx page. want displayed content place holder. ideas how this? ! silverlight embedded object tag in html, need create proper tag refer silverlight app inside content placeholder.

windows - automatic Samba share script -

i have ubuntu 10.04 server running samba. i want write script (for linux or windows computer) that, given ip of server , path of shared samba folder, can automatically create "network drive" icon on desktop. both machines on local network. i realize different linux/windows. any suggestions? i'm not sure start. thanks! for windows machines, want @ net use . instance, map share "data" on 192.168.0.2 z:, you'd write net use z: \\192.168.0.2\data . there lot of options, check net use complete list. instance, might want @ /persistent , automatically recreate share every time log in. or put in .bat file executed when logging in. on linux, think you'd have root this, it'd require mount command. know desktop environments (such gnome) around this, acually mount need root. command mount same share @ mountpoint /mnt/data mount //192.168.0.2/data /mnt/data , if allow access. if require logon, need add -o user=youruser . prompted password....

c++ - Different template syntax for finding if argument is a class or not -

while reading this question , came across @johannes 's answer. template<typename> struct void_ { typedef void type; }; template<typename t, typename = void> // line 1 struct is_class { static bool const value = false; }; template<typename t> struct is_class<t, typename void_<int t::*>::type> { // line 2 static bool const value = true; }; this construct finds if given type class or not . puzzles me new kind of syntax writing small meta program. can explain in detail: why need line 1 ? what meaning of syntax <int t::*> template parameter in line 2 ? line 1: choosing partial specialization below if test succeeds. line 2: int t::* valid if t class type, denotes member pointer. as such, if valid, void_<t>::type yields void , having partial specialization chosen instantiation value of true . if t not of class type, partial specialization out of picture sfinae , defaults general template value of false . ...

javascript - How to check that a jQuery easing method is defined -

how can check see specific easing method defined? example, jquery includes 2 methods ("linear" , "swing"), jquery ui has bunch more , there third-party plugins have more methods. in plugin, let developers specify easing method them include proper files define methods, want check , display error if have specified easing method not exist. i believe should easy as: jquery.easing['swing'] != undefined // -> true jquery.easing['foobar'] != undefined // -> false

PHP Session scope -

i have 1 index.php , one.php file. in one.php have starting session , setting session var: session_start(); if(isset($_get['user'])){ $_session['user'] = $_get['user']; } function getusername(){ return $_session['user']; } im including one.php in index.php after im calling function getusername() im not starting session in index.php include_once('one.php'); echo getusername(); but im not getting session in index.php . why ? im passing the variable index.php?user=newuser . is not possible session in pages out starting session . possible method global variable where, if set once..? no not possible session in pages without starting session. basically, need follow either of following 2 ways:- start session in new page, @ beginning of page, without whitespace characters, using these lines of code:- <?php session_start(); // other lines of code include common page ( common.php ) has line ( sessio...

android - How to detect phone orientation relative to direction of movement -

problem: consider android device mounted in vehicle. want measure various things using accelerometer. these measurements should relative vehicle's coordinate system. need figure out how device oriented in relation vehicle. simple solution average "early" acceleration after startup, i'm worried first thing driver leave parking lot or turning left onto road, describing curve. feasible ask user start measuring after getting on road, if there no acceleration @ point? question: can suggest strategy or algorithm reasonable job of telling how phone oriented in relation vehicle? pointer foss source solves similar problem better. notes: i not want use gps complicate things user. we can interact user, example requesting user starts measurements before starting out. the accelerometer alone not provide sufficient information purpose, hazard: vectors acting upon device, besides vehicle acceleration, vibration of vehicle itself, road inclines, braking , cent...

Building a text indexer from scratch, need algorithms and resources -

i making simple text search engine self-study. coded myself of work in 'anatomy of search engine' @ http://www.codeproject.com/kb/ip/anatomyofasearchengine1.aspx it featured searching inverted indexes. i want more projects, better search algorithms. online resources @ level hard find. please point me more resources can up, can hands-on experience. i may use in production in future (for simple purposes).

ruby on rails - Error when fetching a has_many association, TypeError: can't convert String into Integer -

note: full code can found @ http://github.com/basicxman/andrewhorsman.net i have tag model , article model in habtm relationship via tagging model. when try find query on article while including association, fails. ruby-1.9.2-p136 :003 > article.find(:all, :include => :tags) article load (0.3ms) select "articles".* "articles" tagging load (0.2ms) select "taggings".* "taggings" "taggings"."article_id" in (1) typeerror: can't convert string integer /users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0.rc4/lib/active_record/associations/preloader/association.rb:83:in `[]' /users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0.rc4/lib/active_record/associations/preloader/association.rb:83:in `associated_records_by_owner' /users/basicxman/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0.rc4/lib/active_record/associations/preloader/collection_association.rb:13:in...

CSS footer at the bottom with certain conditions -

is possible create footer @ bottom of page , when page height example 500px, footer stay @ place , not @ bottom after height value? this footer stay @ bottom ok, when page height under 500px still there, possible use css make such rule ? .footer { position: absolute; bottom: 0; left: 0; } @newbie; may that's have do. css: .wrapper { position: relative; width: 700px; font-size: 0.9em; margin: 0 auto -142px; background:yellow; } .header { height: 190px; background:green; } .footer { position: relative; width: 700px; margin: 0 auto; background:red; } * { margin: 0; } html, body { height: 100%; } .wrapper { min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -142px; .footer, .push { height: 142px; } check example http://jsfiddle.net/sandeep/tcdpx/3/ check more stickyfooter

java me - In LWUIT, Component of another Form are not display -

i new on j2me developer using lwuit library. making 2 forms: 1 mainmidlet.java , upgradeapp.java . problem whatever component add on upgradeapp.java component not displayed. please me. code follows. mainmidlet.java package com.sun.lwuit.jewelvicinity; import com.sun.lwuit.button; import com.sun.lwuit.command; import com.sun.lwuit.component; import com.sun.lwuit.dialog; import com.sun.lwuit.display; import com.sun.lwuit.form; import com.sun.lwuit.image; import com.sun.lwuit.label; import com.sun.lwuit.textarea; import com.sun.lwuit.events.actionevent; import com.sun.lwuit.events.actionlistener; import com.sun.lwuit.layouts.borderlayout; import com.sun.lwuit.layouts.flowlayout; import com.sun.lwuit.layouts.gridlayout; import com.sun.lwuit.plaf.uimanager; import com.sun.lwuit.table.tablelayout.constraint; import com.sun.lwuit.util.resources; import java.io.ioexception; import javax.microedition.midlet.*; public class mainmidlet extends midlet implements actionlistener { fo...

Dynamic finders with Grails many-to-many relationship -

i have 2 domain classes mapped many-to-many relationship. followed instruction of grails documentation, still have problem when processing data on domains. here 2 domain classes: class user { string name int age string job static hasmany = [groups : group] static belongsto = [org : organization] } class group { string groupname string code static hasmany = [members : user] } my problems are: 1. above relationship require 1 class hold belongsto "owner" of relationship. in context, user belongs group, not know how put belongsto user class, because standard syntax grails suggest static belongsto = [group] (just specify owner class name), cannot: - put exist belongsto this: static belongsto = [org : organization, group] - or define belongsto this: static belongsto = [group] is below example right: class book { string title static belongsto = author static hasmany = [authors:author] static mapping = { authors joi...

Is it possible to Add/Remove/Change an embedded resource in .NET DLL? -

is possible add/remove/change embedded resource in .net dll after has been compiled? if so, how done, , there gotchas? edit: i manually, automatically through script in post-build event. there's no way in managed code . once resource has been embedded becomes part of assembly compiled msil code is. however, you manually , suggested lucero , disassembling dll text file using ildasm , removing resource using text editor, , reassembling dll using ilasm . here's example using dll single embedded text file: 1) decompile dll msil: ildasm mylibrary.dll /out=mylibrary.il 2) open resulting mylibrary.il file , remove .mresource section: .mresource public mylibrary.myresource.txt { // offset: 0x00000000 length: 0x0000000f // warning: managed resource file mylibrary.myresource.txt created } 3) reassemble dll modified mylibrary.il file: ilasm mylibrary.il /dll

sql - MySQL proper way to SELECT with many tables involved -

i have movie database has these tables: new_movies, ratings, critic_ratings, colors i'm trying execute select statement combine these 4 tables on same movie using 'mid' (movie id): select distinct new_movies.*, movies_db.*, ratings.rating, ratings.count,color, critic_ratings.rating critic_ratings new_movies inner join movies_db on new_movies.mid = movies_db.mid left join ratings on new_movies.mid = ratings.mid left join colors on new_movies.mid = colors.mid left join critic_ratings on new_movies.mid = critic_ratings.mid order title asc but error: the select examine more max_join_size rows; check , use set sql_big_selects=1 or set sql_max_join_size=# if select okay how query? if don't want enable big selects, reform using correlated sub-queries. (i don't know if you'll still hit limit or not though.) select distinct new_movies.*, movies_db.*, (select ...

Transaction logging in JBoss 6 -

in question: how debug cmt transaction boundaries? some instructions given configuring jboss log transaction begin, commit etc. events. i'm using jboss 6, , don't have file ".../server/conf/jbossjta-properties.xml". is possible achieve same logging in newer version? you can try set logging in jboss-logging.xml file. you can find there logger category com.arjuna.ats log level info . can change trace , check if works you. <logger category="com.arjuna.ats"> <level name="trace" /> </logger> you can find such information in log/server.log file: 2011-07-04 21:58:25,861 trace [com.arjuna.ats.jta] (http-127.0.0.1-8080-1) basetransaction.getstatus 2011-07-04 21:58:25,862 trace [com.arjuna.ats.jta] (http-127.0.0.1-8080-1) basetransaction.begin 2011-07-04 21:58:25,862 trace [com.arjuna.ats.arjuna] (http-127.0.0.1-8080-1) statemanager::statemanager( 2, 0 ) 2011-07-04 21:58:25,862 trace [com.arjuna.ats.arjun...

web services - Restful forums/groups/friends/tags etc from joomla -

are there solutions app consume forums/friends/groups etc features using joomla through restful urls. i found 2 links far, plexicloud-jws :- seems supports core features , not looking out for https://github.com/techjoomla/joomla-rest-api seems support jomsocial looks paid one if not wrong, joomla , jomsocial seem different, kind of social wrapper on joomla? if such solutions not available joomla, other open source gpl/mit in php/rails/java..? could body provide me pointers please? thanks amol

How to store sensitive string data - Android development -

i have included few strings in code. want hide strings external hackers. can plz me... you can use aes encryption encrypt/decrypt data , store/read file or shared preferences. aes key can hardcoded in app, or can use random generated key stored @ different place.

c# - How to loop through class properties tree? -

class classa { public classb myprop {get;set;} } class classb { public classc anotherprop {get;set;} } class classc { public string name {get;set;} } i have object of classa type. how, reflection iterate recursively classc's name property value ? i little sketchy on wanted accomplish. think want start classa , walk through properties , classc. have understand how recursive programming , small amount of knowledge of reflection. here modified version of code have used in past, can find here . private void serializeobject(object obj) { type type = obj.gettype(); foreach (propertyinfo info2 in type.getproperties(bindingflags.getproperty | bindingflags.public | bindingflags.nonpublic | bindingflags.instance)) { methodinfo getmethod = info2.getgetmethod(true); if (getmethod != null) serializeobject(getmethod.invoke(obj, null)); } } what walk through each property , uses method of each property execute proper...

c - Colon separated contents in a text file -

i need c program can read contents text file , contents in file colon separated shown catid;1;catname;cloths;prefix;ch;activestatus;y;...... so can 1 suggest best , simple logic read contents , store in buffer? thanks in advance i'm not sure if it's best way would: use fgets read file line line use strtok tokenize string (or manually depending on how lazy feel) something this: char *p; while (fgets(line, maxline, fp)) { p = strtok(line, ";"); while (null != p) { /* p token */ p = strtok(null, ";"); } }

.net - Edit UserControl subclass in Windows Form Designer? -

in vs2010, targeting framework 4.0, have usercontrol contains tablelayoutpanel empty second row. is possible add items second row using windows forms designer, or have via code? edit: in reply hans passant's comment, linked question references usercontrol being used inside control. asking question inherited controls. i have created following test code, testcontrol usercontrol containing tablelayoutpanel named "tablelayoutpanel1": imports system.componentmodel imports system.windows.forms.design <designer(gettype(testdesigner))> public class testcontrol end class public class testdesigner inherits controldesigner public overrides sub initialize(component system.componentmodel.icomponent) mybase.initialize(component) dim x testcontrol = ctype(component, testcontrol) enabledesignmode(x.tablelayoutpanel1, "tablelayoutpanelx") end sub end class creating following class in new file: public class testinherite...

sql - Nhibernate join filtering -

i have question joins in nhibernate. had issue our sql query generated nhibernate. our db developer optimized raw sql works need, need change nhibernate code make generated sql optimized. the part of original part of query is: from person_visit this_ inner join person_basic per2_ on this_.person_id = per2_.person_id left outer join personc_questions perint10_ on per2_.person_id = perint10_.person_id left outer join telephone_questions intaudit13_ on perint10_.pp_questions_id = intaudit13_.pp_questions_id inner join c_questions intdef14_ on perint10_.question_id = intdef14_.question_id , perint10_.questions_code = intdef14_.questions_code , perint10_.question_id = intdef14_.question_id the optimized 1 : from person_visit this_ ...

Max Number of Paths of Length 2 in a Graph with N Nodes -

what maximum number of unique paths of length 2 in graph n nodes? a path of length 2 u v u->u0->v (where u0 different vertex in graph). in clique can choose each of n-2 (all u,v) u0. so have n-2 paths between each 2 nodes - of length 2. so overall, can choose u , v : choose(2,n) = n!/((n-2)!) , each of them have n-2 possibilities, total: n!*(n-2)/((n-2)!)= n!/((n-3)!)=n*(n-1)*(n-2)

iphone - GCDAsyncSocket - not receiving data - AsyncSocket works ok -

i made iphone client connect server using gcdasyncsocket. server running .net on windows server. connect , sends data too. i tell client go receive directly after send... [sock readdatatodata:[gcdasyncsocket lfdata] withtimeout:15 tag:1]; i have set receive: - (void)onsocket:(gcdasyncsocket *)sock didreaddata:(nsdata *)data withtag:(long)tag and also: - (nstimeinterval)socket:(gcdasyncsocket *)sock shouldtimeoutreadwithtag:(long)tag if wait time out time out method called. if send data server, timeout not called, assume client has seen something, there no indication of on client side. i added: - (void)socket:(gcdasyncsocket *)sock didreadpartialdataoflength: (nsuinteger)partiallength tag:(long)tag hoping see partial packet not triggered either. as mentioned above timeout not trigger if send server client. have thought timeout if hasn't received terminator character. tried reading length of 3 didnt make difference. the gcdasyncsocket...