Posts

c - Getting cpu_subtype_t in process that runs under i386 arch -

i'm using c code generate coredump file out of mach-o based process. however, i'm getting parsing corruption while loading lldb debugger after generating coredump 32bits process : (lldb) target create --core "/tmp/core_pid_1354" core file '/tmp/x/core.1354' (unknown-mach-32) loaded. this, unknown 32 architecture issue, derived wrong cpu_subtype in struct mach_header. in order cpu_type + cpu_subtype in following method : struct current_arch cpuarch = {0}; int mib[ctl_maxname]; size_t miblen; size_t cputypesize; pid_t pid = getpid(); miblen = ctl_maxname; int err = sysctlnametomib("sysctl.proc_cputype", mib, &miblen); if (err) { log_error("coultn't mib cpu type using sysctlnametomib. err = %d ", err); return kern_failure; } mib[miblen] = pid; miblen += 0x1; cputypesize = sizeof(cpuarch.type); err = sysctl(mib, (u_int)miblen, &(cpuarch.type), &cputypesize, 0x0, 0x0); if (err) { log_error("coultn...

android - how to prevent default keyboard from popping up and enable copy paste option? -

i have own custom keyboard in app . in edittext box disabled ontouch() returning true ontouchlistener otl = new ontouchlistener() { @override public boolean ontouch(view v, motionevent event) { switch (event.getaction()) { } return true; } }; this helps in preventing keyboard popup.but disables touch event, , not getting option copy paste default feature of android .this scenario happening in many app not getting way it. please help. instead of disabling touch, can setfocusable false . disable softkeyboard popping up. edittext.setfocusable(false); edittext.setfocusableintouchmode(false); and in ontouch , popup custom keyboard hope helps.

html - Marker-end do not work -

Image
i encounter problem marker-end . i try display arrow doesn't work. when directly change svg line in html code, arrow appears. when change code doesn't work. see arrow appear have directly change code in source code of page. know why? , how fix this? for example here have changed width manually make work... path.svgedgeview{ stroke: #777 !important ; stroke-width: 1.5px !important ; marker-end: url(#arrow-edge-end-marker) !important ; } <path class="svgedgeview" id="0.2916158037260175" d="m1290 80c1365 80 1515 205 1440 205"></path> i found solution. i had created svg document.createelement(tagname) instead of document.createelementns(' http://www.w3.org/2000/svg ', tagname). the svg element not created.

Hibernate-Criteria: Select distinct column from table ordered by another column -

what want achieve: list of unique ids ordered column, using hibernate criteria. my code far: criteria crt = createcriteria(); //complex method returning criteria //with joined tables, restrictions , ordering crt.setprojection( projections.distinct( projections.property( "id"))); list<integer> ids = crt.list(); what wrong: when set order column let's "date" query: select distinct id table \\join, where...\\ order date); which wrong , results in error: ora-01791: not selected expression my idea how solve it: somehow force hibernate generate query: select distinct id (select * table \\join, where...\\ order date); problems , tried: there createcriteria() method, don't want modify if it's not absolutely necessary. didn't find way use criteria detachedcriteria. you cannot put subqueries clause criteria. bug can: use hql use plain sql change query is id not unique anyw...

xml - Limit the result when using following:: in XSL select -

i have complex xml input, need transform flat structure, denormelize tree in xml document repeating related nodes. source xml lookes this: <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="forom%20sample.xsl"?> <customers> <customer> <id>1</id> <name>john madsen</name> <accounts> <account> <id>111</id> <name>aaa</name> <value>11234</value> </account> <account> <id>222</id> <name>bbb</name> <value>64</value> </account> </accounts> <profile> <gender>m</gender> <age>32</age> </profile> <...

ruby - Rails 200 status codes change to 302 if a request takes too long? -

i have rails app fires off code assemble large report on users data. takes ages , needs come off external api (salesforce). i have code works on many records: grabbing data formatting correctly passing view , rendering pdf before refreshing page ajax. most requests end this: rendered record_requests/_get_digest.html.erb (2974.9ms) rendered record_requests/get_digest.js.erb (2983.4ms) completed 200 ok in 5957ms (views: 2770.9ms | activerecord: 222.1ms) which great! but of largest records can take 6+ minutes grab , process - @ point different occurs: ``` redirected https://[base_url]/record_requests/5 completed 302 found in 288345ms (activerecord: 2.4ms) disaster because redirect seems kick off initial request again stuck in loop... these 2 requests use same code!! why 1 getting rendered , other getting redirected? there built-in rails timeouts. soo confused, can shed light on this? this works via excellent restforce gem,the full gemfile listed here . t...

LinkedIn REST API authentication suddenly stopped working Android Emulator -

i using linkedin rest api user's linkedin details , working until today(for past 1 month).i getting basic details name email only.even working till half of today , throwing error, caused by: com.google.code.linkedinapi.client.oauth.linkedinoauthserviceexception: oauth.signpost.exception.oauthcommunicationexception: communication service provider failed: https://api.linkedin.com/uas/oauth/requesttoken @ com.google.code.linkedinapi.client.oauth.linkedinoauthserviceimpl.getoauthrequesttoken(linkedinoauthserviceimpl.java:180) @ in.techchefs.talktemple.login.linkedinasynctask.doinbackground(linkedinasynctask.java:45) @ in.techchefs.talktemple.login.linkedinasynctask.doinbackground(linkedinasynctask.java:14) @ android.os.asynctask$2.call(asynctask.java:292) ...