Posts

Showing posts from August, 2011

java - Spring data jpa + joining 2 tables -

i have 2 entity classes product , productaltid no @onetomany mapping defined between them. i want this select p productaltid inner join product pai p.id = pai.id how can achieve this? add method productaltid repository (choosing 1 because query returns productaltids): @query("select pai productaltid pai " + "where pai.id in (select p.id product p)") list<productaltid> findforallproducts(); i switched aliases around, seem backward in example.

ruby on rails - association.first returns nil in an RSpec feature spec using a FactoryGirl factory with a has_many association -

i have following in rails 4 app: factorygirl.define factory :todo_list after(:create) |t| create_list(:item, 3, todo_list: t) end factory :public_todo_list is_public true end end factory :item sequence(:position) { |n| n } name "this item ##{:position}?" todo_list end end i have following in feature spec: feature "todolists" let(:todo_list) { create(:public_todo_list) } scenario "something requires accessing first item" ... pending todo_list.items.first.name ... end end however, test fails following: failure/error: pending todo_list.items.first.name nomethoderror: undefined method `name' nil:nilclass being todo_list.items activerecord::associations::collectionproxy::activerecord_associations_collectionproxy_item object, seems first should return first item record? nil instead. todo_list.items.count returns 3 , test.log shows records being created correctly. m

python - can't run my developed firefox add-on using cfx run -

i'm trying start developing firefox add-on using tutorial following problem appears (c:\addon-sdk-1.15) c:\users\khaled\my-addon>cfx run using binary @ 'c:\program files (x86)\mozilla firefox\firefox.exe'. using profile @ 'c:\users\khaled\appdata\local\temp\tmph_o0ca.mozrunner'. traceback (most recent call last): file "c:\addon-sdk-1.15\bin\cfx", line 33, in <module> cuddlefish.run() file "c:\addon-sdk-1.15\python-lib\cuddlefish\__init__.py", line 945, in run pkgdir=options.pkgdir) file "c:\addon-sdk-1.15\python-lib\cuddlefish\runner.py", line 705, in run_app runner.start() file "c:\addon-sdk-1.15\python-lib\mozrunner\__init__.py", line 532, in start self.process_handler = run_command(self.command+self.cmdargs, self.env, **se lf.kp_kwargs) file "c:\addon-sdk-1.15\python-lib\mozrunner\__init__.py", line 59, in run_com mand return killableprocess.popen(cmd, env=env, **kill

debugging - Collecting stacktrace of crashing widget with ACRA Android -

i trying debug widget of app i'm developing acra have problem. use following code collect stacktrace: import org.acra.acra; import org.acra.reportinginteractionmode; import org.acra.annotation.reportscrashes; import android.app.application; @reportscrashes(formkey = "", restoasttext = r.string.crash_toast_text, mailto = "mailaddress", mode = reportinginteractionmode.toast, logcatarguments = { "-t", "100", "-v", "long", "activitymanager:i", "myapp:d", "*:s" }) public class myapplication extends application { @override public void oncreate() { super.oncreate(); // following line triggers initialization of acra acra.init(this); } } the problem happens on samsung devices widget become unresponsive after random amount of time , have no idea causing (i never call onupdate nothing should happen story). i'd use acra collect stacktrace wh

google bigquery - How to clear Query History from Big Query Console? -

i want clear query history bigquery console. let me know if possibility can clear failed query result console.let me know possible or not? there isn't way clear results query history. we've considered adding 'show successful queries' flag, has been low priority feature request.

php - Ajax does not send data -

good morning everyone, i kind of newbie concerning ajax. have php script works. know php needs evolve pdos problem. want implement ajax avoid reloading , because want learn it. php script: <?php session_start(); require "connect.php"; $firstname = $_post['regfirstname']; $lastname = $_post['reglastname']; $companyname = $_post['regcompanyname']; $email = $_post['regemail']; $password = $_post['regpassword']; $confirmpwd = $_post['regconfirmpwd']; $add = mysqli_query($con,"insert user (firstname, lastname, companyname, email, password) values ('$firstname' , '$lastname', '$companyname', '$email', '$password') ") or die("can't insert! "); mail($email, "your registration has been successful, please note registration details\n\n id: $email\n\n password: $password\n\n" ); $success = "successful! <a href='../login.php'

css - i want to give padding in pixels and fix width in percentage -

outer div hold thumbnails contains padding: 20px 40px 0px 40px. want fix width in percentage responsive layout. if width not specified, there empty space on right side.can me, how calculate width in '%' if padding there in px. try to box-sizing div{ padding: 20px 40px 0px 40px; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box; } more box-sizing

javascript - itemfilereadstore reading from json file -

i'm starting out dojo , trying thumbnail gallery display json file no luck far. i've searched , viewed other examples none have helped me. please me see i'm doing wrong. it's working when specifying data in script however(as shown commented out code) can't read data external file. my code far: <script> require(["dojo/ready", "dijit/registry", "dojo/dom", "dojo/on", "dojo/parser", "dojo/data/itemfilereadstore", "dojox/image/gallery" ], function (ready, registry, dom, on, parser, ifrs, gallery) { ready(function () { // define attribute names used access items in data store parser.parse(); var itemnamemap = { imagethumbattr: "thumb", imagelargeattr: "large" }; // define request, no query, , count of 20

javascript - Applying fallback styles for background images when images have been disabled -

say user (for whatever reason) has set browser disable downloading of images. can cause few problems if interactive element, such buttons, links etc image based. i'm looking nice fallback if user has disabled images style applied button still visible. i.e background colour. all of usual fallbacks i.e stacking background properties, don't work because browser still supports them regardless of whether images have been turned off or not. any ideas on how can go creating fallback?

swing - BST graphical representation needed in java -

Image
i using model–view–controller design pattern, need ui viewer bst/avl models , i developed model , controller logics, need viewer , not need deal graphics right now, useful if has viewer class method takes root of tree , draws it, no need advanced animation or effects something like simplebstreeviewer.draw(mytree.getroot()); node structure of tree public class nodebst <t extends comparable<t>> { private t data; private nodebst<t> left; private nodebst<t> right; private nodebst<t> parent; //other methods go here ... } this helpful focus of coding logic part, i have searched , found other java applets represents trees have model-logic , view in same class , working in model-view-controller pattern (mvc pattern) , better separate model view as possible , want viewer model -note: sample of need (i use jtree , not satisfactory.) get jgraphx library , starting helloworld in examples coded class using this question calcu

How to display raw image data with html and javascript? -

i have ajax application php side sends uncoded raw image data, coming camera, client javascript side. i display image via html , javascript using img or canvas tags. image data 32*32 unsigned char. i do, whatever takes reach goal (encoding or everythig else), want @ client side beacause cannot handle other operation @ server side. i tried encode raw data jpeg or png data without success. i post example doesn't work: var encoder = new jpegencoder(9); var jpgfile = encoder.encode(rawimage, 9); document.getelementbyid("image").src = jpgfile; jpgfile like data:image/jpeg;base64,/9j/4aaqskzjrgabaqaaaqabaad/2wceafk9q05doflose5kxllphd6qhxp6hf/czahe//////////////////////////////////////////////////8bxmrkhxwf/5cq///////////////////////////////////////////////////////////////////////////aabeiaaaaaambeqaceqedeqh/xagiaaabbqebaqebaqaaaaaaaaaaaqidbaugbwgjcgsqaaibawmcbamfbqqeaaabfqecawaeequsitfbbhnryqcicrqygzghccncscevuthwjdnicoijchyxgbkajsynkckqndu2nzg5okneruzhse

php - Return multiple row without the use of mysqlnd -

i dont have mysqlnd available, implemented helper function job: public function bind_array($stmt, &$row) { $md = $stmt->result_metadata(); var_dump($md); $params = array(); while($field = $md->fetch_field()) { $params[] = &$row[$field->name]; } call_user_func_array(array($stmt, 'bind_result'), $params); } the trouble is, need able return multiple rows. of can return single row. thanks.... edit: im aiming getting same result when calling mysqli fetch_assoc, not available me, dont have mysqlnd... array afterwards json_encoded .. in fact, pdo way easier mysqli mysqlnd. you can try my wrapper pdo can make better original class - it's incredible simple in use, combining simplicity of old mysql functions power , safety of prepared statements. say, multiple results wull need one single line of code , opposite several screens in case of mysqli or half-dozen when using old mysql functions: $sql

c# - Fetch parameters name and values of method throwing exception -

i have 2 classes code [exceptionaspect] public class baseservice { public void method1(string email) { new businessclass().method2(1, email, false); } } public class businessclass { public void method2(int count, string email, bool ignorecase) { throw new notimplementedexception(); } } my exception aspect class has following code , using code i'm able fetch parameters name , values of method1 not of method2 . [serializable] public class exceptionaspect : onexceptionaspect { public override void onexception(methodexecutionargs eventargs) { object[] args = null; if (eventargs.arguments != null) args = eventargs.arguments.toarray(); var parameters = eventargs.method.getparameters(); } } now want fetch , save method parameters name , values of exception target site i.e. count=1,email=email , ignorecase=false of method name method2. add attribute businessclass. [exceptionasp

How to create a test script in Python for a registration page? -

i have website made in php. to increase number of data sets in database, need create python script such need not add 500 registrations manually. there several tools available need create script of own. can 1 me ? ps: have knowledge of php, python , asp.net well. mysql import mysqldb db = mysqldb.connect(host="localhost", user="john", passwd="megajonhy", db="jonhydb") cursor = db.cursor() in range(0,500): cursor.execute("insert mytable values('some string', 1337);") postgresql import postgresql db = postgresql.open("pq://postgres:supapass@127.0.0.1/testdb") prepstatement = db.prepare("insert mytable values($1, $2, $3);") db.xact(): in range(0, 500): prepstatement('some string', 1337, ["a", "list"]) mssql import pyodbc cnxn = pyodbc.connect('driver={sql server};server=localhost;database=testdb;uid=user;pwd=pass') cursor = cnxn

networking - Docker container binds to port, but I am unable to ping it -

Image
i have running docker container (from this image). container seems running correctly far can see (the log-files looking , can connect via ssh container , use sqlplus inside it). however, unable connect container host. i started container this: sudo docker run -d -p 49160:22 -p 49161:1521 -p 49162:8080 alexeiled/docker-oracle-xe-11g i inspected port-binding this: $ sudo docker port <container> 8080 0.0.0.0:49162 and when sudo docker inspect <container> among others this: "networksettings": { "ipaddress": "172.17.0.2", "ipprefixlen": 16, "gateway": "172.17.42.1", "bridge": "docker0", "portmapping": null, "ports": { "1521/tcp": [ { "hostip": "0.0.0.0", "hostport": "49161" } ], "22/tcp": [

How to drop function if it already exist in mysql -

i have defined custom function in mysql (using rails 3 btw), beginning of definition that create function source_name(source int(10)) this function works fine need drop mysql drop function statement. this list of i've tried already, none works, raise exceptions: drop function if exists source_name; drop function if exists source_name drop function if exists source_name(); drop function if exists source_name() drop function if exists 'source_name' drop function if exists 'source_name'; and have no idea next, every example find online looks different...

Emulation of Java application on PHP -

scenario: we have php/mysql based corporate web portal , separate ms sql database on remote server accesed 3rd party vendor java application(web client communicating mssql database). requirement: i rid of java application , transfer functionalities php web portal , need figure out queries don't have source code of java application , there no way reach vendor ask. is there way can capture queries java application sending can use in php scripts? maybe tracing last queries mssql somehow? or somehow see java application emits database in way? while can log incoming queries coming server ( how see query history in sql server management studio ) still going rewrite of queries i'm sure of them dynamic. see end result in log this: select * users id=5 while in php code mysqli or pdo function binds 5 value prepared statement. have figure out why or how java application came query did.

node.js - socket.io redis store on openshift -

i'm trying set socket.io on node.js use redisstore can comunicate pubsub multiple node on opeshift platform, can't manage connect redis server. i'm using this cartridge . tried connect with var pub = redis.createclient(process.env.openshift_redis_db_port, process.env.openshift_redis_db_host); but doesn't work (and found out why: createclient() accept ip addresses ) , fallback default port , host, ran rhc port-forward : $ rhc port-forward appname checking available ports ... done forwarding ports ... address in use - bind(2) while forwarding port 8080. trying local port 8081 connect service running on openshift, use local address service local openshift --------------- --------------- ---- ---------------------------------------------- haproxy 127.0.0.1:8080 => 127.5.149.130:8080 haproxy 127.0.0.1:8081 => 127.5.149.131:8080 s_redis_db_host 127.0.0.1:54151 => blabla.appn

postgresql - How to make this SQL query reasonably fast -

i optimize (read: make feasible @ all) sql query. the following postgresql query retrieves records need. (believe i) confirm running query on small subset of actual db. select b.*, a1.foo, a1.bar, a2.foo, a2.bar b left join a1 on b.n1_id = a1.n_id left join a2 on b.n2_id = a2.n_id b.l_id in ( select l_id c l_id in ( select l_id b n1_id in (select n_id foo between foo_min , foo_max , bar between bar_min , bar_max) union select l_id b n2_id in (select n_id foo between foo_min , foo_max , bar between bar_min , bar_max) ) , (property1 = 'y' or property2 = 'y') ) the relevant part of db looks follows: table a: n_id (pk); foo, int (indexed); bar, int (indexed); table b: l_id (pk); n1_id (fk, indexed); n2_id (fk, (indexed); table c: l_id (pk, fk); property1, char (indexed); property2, char (indexed); explain tells me this: "merge join (cost=6

How to pass an array reference as a parameter from assembly to a c++ function -

i have 2 separate files in 2 visual studio 2012 projects. 1 masm , other c++. masm program supposed call displayboard function in c++ program , needs pass reference array displaying. can't figure out need make work. program created in entirety c++ program , works way should, supposed majority of coding in masm , have minimal c++ functions, trying these 2 files talking having issues. here skeleton codes masm , c++ files. not sure if c++ file needs main, compile without one. also, board array need declared in c++ file if passed in parameter? think doesn't, not sure. don't know if array parameter referenced correctly in c++ file or not. assembly code: title hexassemblytest (hexassemblytest.asm) .586 .model flat,c includelib kernel32.lib includelib irvine32.lib showboard proto near c, hexboard:sdword .data board sdword 121 dup (0) ;array hold hex board .code main proc invoke showboard, addr board ;display board retn main endp

Remove JSON objects which have specific field type from JSON array field in MongoDB document -

given collection documents have array field containing json objects (key-value pairs) e.g.: { ..., arr : [{key: val}, {key : numberlong(100)}]} after update, same document should like: { ..., arr : [{key: val}]} the document in arr field: {key : numberlong(100)} should removed. is possible mongodb $ operators? tried use following code no avail: db.coll.find({}).foreach( function(doc) { var objs = doc.arr; for(var = objs.length; i--;){ if (typeof(objs[i].ts) == numberlong) objs.splice(i,1); } db.coll.save(doc); }) i suppose looking remove data array this: { "field" : "aaa", "list" : [ "aaa", numberlong(123), "bbb", numberlong(456) ] } you can using $pull takes query expression it's argument db.collection.update({ },{ "$pull": { "list": {"$type": 18 } } }) edit since question has changed, still doe

c# - How to redirect immediately user to login page (Default.aspx) on session time out -

i want redirects user if session time outs. here make 1 web user control fetches session context in no session exist it's redirects login page. here web user control code: public partial class webusercontrol : system.web.ui.usercontrol { protected override void onprerender(eventargs e) { if (context.session["username"] != null && context.session.isnewsession) { if (this.page.user != null && this.page.user.identity.isauthenticated) { formsauthentication.signout(); response.redirect("../default.aspx"); } } base.onprerender(e); } } and register method web user control take effect pages master page like: <%@ register src="~/admin/webusercontrol.ascx" tagname="companylogo" tagprefix="uc1"%> here problem occurs not works fine. when session expired it's not redirect user login page it'

internet explorer 8 - Exporting HTML table to Excel, file created but encoded HTML inside Excel sheet -

i exporting html table excel file. using other browsers: window.open('data:application/vnd.ms-excel,<meta http-equiv="content-type" content="text/plain; charset=utf-8"/>' + encodeuricomponent(tblhtml)); but ie8, have done following make export work: jquery post send table html markup string javascript doing post request: if (($.browser.msie && parseint($.browser.version) <= 8)) { $.ajax({ url: '/exportdatatoexcel', data: { 'tbltoexport': tblhtml//encodeuricomponent(tblhtml) , 'tblid': id }, type: 'post', async: false, success: function (html) { //nothing }, error: function (jqxhr, textstatus, errorthrown) { if (jqxhr.readystate != 0) { alert('error occurred'); } } }); window.open("/exportdatatoexcelfilesavedialog", '

python - Brute force closest pair algorithms - for loops -

new python. trying analyze algorithm closest pair of points. found example which has these lines: return min( ((abs(point[i] - point[j]), (point[i], point[j])) in range(numpoints-1) j in range(i+1,numpoints)), key=itemgetter(0)) it not clear me how loops being evaluated. how loops related points, key , itemgetter? when put code in ideone i runtime error in times() function: def times(): ''' time different functions ''' import timeit functions = [bruteforceclosestpair, closestpair] f in functions: print 'time for', f.__name__, timeit.timer( '%s(pointlist)' % f.__name__, 'from closestpair import %s, pointlist' % f.__name__).timeit(number=1) thank you. your min code equivalent using generator follows: def getpoints(point, numpoints): in range(numpoints - 1): j in range(i + 1, numpoints): yield (

java - Holding reference to native class object in JNI -

i trying create c++ class , hold objects array, , reference c++ objects java using jni, since jni not provide mechanism hold non primitive type of objects java. i have implemented code mentioned below output showing me if multiple objects have got created , receiving heap error on second call create new native object. can this? thanks codes: java class(the function loading library dll has been defined in libobj): package org.jnp.pkg004; import org.jnp.libloader.libobj; public class purecppobjfactory extends libobj { private long cppobjlstsz; public purecppobjfactory() { super(); cppobjlstsz=0; } public native void newcppobj(); public native void printcppobjdetails(long cppobjlstindex); } c++ library code: #include "stdafx.h" #include "stdlib.h" #include <iostream> #include <iomanip> #include <stdio.h> using namespace std; #include "org_jnp_pkg004_purecppobjfactory.h" class

android - Weird behavior with asynctask -

so coming across weird problem cant find explaination for. have async task in in dobackground method wait until variable set "wait" notified private class testasynctask extends asynctask<void, object, boolean> { @override protected void onpreexecute() { log.d("test1"); } @override protected boolean doinbackground(void... params) { log.d("test2"); while (nextcardtoplay == null) { wait(); } log.d("test3"); } } activity a: protected void oncreate(){ = new testasynctask().execute(); } protected void onpause(){ a.cancel() } so can see when activity starts, asynctask started. when activity closed asynctask supposed cancelled. what noticed if open activity, close it, , reopen again asynctask created , in wait mode (never cancelled). no problem. whats confusing when start activity (while s

c# - CaptchaImage.axd give 404 error -

i adding captcha image on asp.net project.its working on system.but when send same project other person same code , captcha not working on system. its giving .axd 404 error.i not able find causes problem.we testing code on local in visual studio in both system. i using code: http://www.aspsnippets.com/articles/how-to-implement-captcha-in-asp.net.aspx can please suggest me causes issue.thanks i think forgot add reference ashx files above link suggested. <add verb="get" path="captchaimage.axd" type="mscaptcha.captchaimagehandler, mscaptcha" /> please that. check path correct.

sql server - Entity Framework inheritance and many to many mapping -

this tehnically 2 problems think allready know solution first i'll post here check. i'm using entity framework 6, , building model database first way. in database significan interactions (inserting , modifying) handled through stored procedures (mainly can additional database side perimision checks). first problem i'm trying build school's database. have 2 tables profesors , students. have aditional tabla called personaldata contains personal data info names, surnames , such. profesor , student tables in 1:0.1 relationships personaldata, meaning every single profesor there has personaldata record. same students. not every record in personaldata must student or profesor, of them parents. at first tried implement in ef tpt inheritance, problems may arise if student becomes @ point professor. due way ef handles inheritance personaldata collection contain 2 entities same id. i have googled bit , have found out using inheritance in these kind of cases impossible,

database - Is it good to have foregin key reference to all the tables (indirect references)? -

its simple scenario : university table univ_idn name 1 ut university campus table campus_idn name 1 ut austin 2 ut arlington event registration table event_idn campus_idn univ_idn 1 2 1 2 1 1 event @ point of time concerned campus_idn , not univ_idn directly . although makes sense , required have univ_idn in event registration table or should have campus_idn in terms can univ_idn ? how db's designed ? i think need univ_idn column in university campus table: campus_idn name univ_id 1 ut austin 1 2 ut arlington 1 then event registration table doesn't need univ_id column: can find out university campus table.

sql - How do I enable the MySQL slow query log? -

this question has answer here: how can enable mysql's slow query log without restarting mysql? 8 answers my mysql version details are server: localhost via unix socket software: mysql software version: 5.0.96-community-log - mysql community edition (gpl) protocol version: 10 how enable mysql slow query log? version 5.1.6 , above: 1. enter mysql shell , run following command: set global slow_query_log = 'on'; 2. enable other desired options. here common examples: log details queries expected retrieve rows instead of using index: set global log_queries_not_using_indexes = 'on' set path slow query log: set global slow_query_log_file ='/var/log/mysql/slow-query.log'; set amount of time query needs run before being logged: set global long_query_time = '20'; (default 10 seconds) 3. confi

jsp - Change the drop down list one another dynamically -

in citypair.jsp displaying 3 values air , rail , bus drop down in travel mode field , beside field displaying 3 values first class , business class , economy class drop down in fare class filed now on selection of rail the fare class values should changed first class ac , sleeper class . travel mode div section: <div class="grid_2 omega trip_city_pair"> <my:select optioncode="value" selectoptionpath="${modeoftravel}" required="true" optionlabel="label" label="mode" path="tripdetail.citypairs[${index}].travelmode" index="${index}" onchange="onselectionchange(${index})"></my:select> </div> fare class div section: <div class="grid_4 trip_city_pair"> <my:select optioncode="id" selectoptionpath="${fareclass}" required="true" optionlabel="i18ntextname.defaulttext" l

javafx - Minimize picture size -

i have picture javafx application loaded +30 times chart. use code load , shrink size. imageview liveperformicon = new imageview(mainapp.class.getresource("/images/untitledwdwd.png").toexternalform()); liveperformicon.setfitheight(100); liveperformicon.setfitwidth(100); label.setgraphic(liveperformicon); can tell em how can optimize code performance , memory there way save resources during work. maybe liveperformicon.setcache(true); can solve this? load image once , use same image instance imageviews. example in imageview javadocs this.

php - Pair all elements between them without duplicates -

at point script working not fully. managed pair elements without duplicates, cant seem find way repeat loop can possible results. 20 possible results 16 19 results. appreciated. here's long code + output $studentlist = array ( array('up1','up2','up3','up4','up5','up6', 'up7', 'up8' , 'up9' , 'up10'), array('up1','up2','up3','up4','up5','up6', 'up7', 'up8' , 'up9' , 'up10'), array('up1','up2','up3','up4','up5','up6', 'up7', 'up8' , 'up9' , 'up10'), ); //count how many times user wants pair students $ac = count($studentlist); //take away 1 count due first aray used setting pairs $ac--; //count how may users need paired $c = count($studentlist[0]); $totalcount = $ac * $c; echo $totalcount."<= total count<br>

c# - Date Validation problems with JQuery .valid() method -

i'm trying change jquery date valuation en-gb culture without success. example 23rd march 2013, want enter 23/03/2013 , not 03/23/2013. when call validation method on form returns false. i'm not getting validation error kendo, jquery method. how can change culture setting jquery? <script src="@url.content("~/scripts/kendo/cultures/kendo.culture.en-gb.min.js")"></script> <script>kendo.culture("en-gb");</script> ... @(html.kendo().datepickerfor(model => model.orderdate).htmlattributes(new { style = "width:150px", required = "required" }).culture("en-gb").format("dd/mm/yyyy")) ... var isvalid = $("#orderform").valid(); // returns false if select 23/3/2013 thanks. put in script,and take regex here: regex validate date format dd/mm/yyyy jquery.validator.methods.date = function (value, element) { var dateregex = /copyregexhere/;

sql - Can I use MySQL Workbench to create MariaDB? -

i totally new databases. create database; going make small project going use db. going use maria db totally free commercial use. the question is: can use mysql workbench program create database , transform/change mariadb? from experience -- sure, can use mysql workbench mariadb. however, have tried basic functionalities only, queries, schema design etc. not sure compatibility of advanced features.

How to start a workflow when a document library item added or updated using sharepoint web service -

i have asp.net web app can create and/or update document library items in sharepoint. workflow associated document library not trigger when items created or updated. can use sharepoint web service start workflow, passing item id or row id knows row start working on it? or have use event receiver?

android - How to diagnose CalledFromWrongThreadException -

i have app appears work on several devices have @ office. uploaded market found (via flurry) users getting calledfromwrongthreadexception errors. error occurring in method sets visibility of buttons. looking @ assorted docs appears these functions must called ui thread. problem correcting (and possible similar instances) being hampered fact appear getting away on devices. how can ensure don't away using wrong thread can trap errors before uploading new version market?

spritebuilder game + apportable load FATAL ERROR: RevMobAds/RevMobAds.h NOT found -

i error below when executing "apportable load" command on game made spritebuilder: check error log below: ... compiling /users/icarlitux/documents/kurrentap/git/games/happybird/happybird.spritebuilder/iaphelper.m in file included <built-in>:169: in file included <command line>:20: /users/icarlitux/documents/kurrentap/git/games/happybird/happybird.spritebuilder/source/prefix.pch:20:9: fatal error: 'revmobads/revmobads.h' file not found #import <revmobads/revmobads.h> ^ compiling /users/icarlitux/documents/kurrentap/git/games/happybird/happybird.spritebuilder/kurrentapiaphelper.m in file included <built-in>:169: in file included <command line>:20: /users/icarlitux/documents/kurrentap/git/games/happybird/happybird.spritebuilder/source/prefix.pch:20:9: fatal error: 'revmobads/revmobads.h' file not found #import <revmobads/revmobads.h> ^ 1 error gener

How to store data from a javascript code using PHP,SimpleXML? -

i have javascript able draw on html5 canvas. possible store coordinates of drawings(say coordinates of line drawn on canvas) in server? can retrieve them when ever want? have searched , came across php, simplexml. possible store data using php , simplexml?? if how retrieve them. please post links me. or there anyother way other simplexml? you can (and save, , retrieve) example through ajax query server. example, can use jquery library: http://api.jquery.com/jquery.ajax/ : can see other helpful methods , use above one. example: jquery.getjson() - retrieve jquery.post() - save

actionscript 3 - AS3 Air — Check a Zip to get Audio File -

i have problematic situation wish expose because contains opposites constraints. maybe have idea on how unlock problem. i'm going make mobile application actionscript 3 , air ios , android. application has download zip file uses display text, bitmap , sound. last 1 problem. after research, 1 of best way found check zip file fzip, allows data zip on bytearray form. , sound can't converted bytearray. ( that's lots of results appear say. ) one of solution proposed put bytearray of sound , put in swf. take swf zip sound. can't because zip uploaded admin interface used anybody. can't force them use flash. i have few potential direction ask advices : • use code or native extension ( ios , android ) check zip without files read in bytearray • convert bytearray sound without have pass in swf • dynamicly create swf bytearray of sound • in last possibility, way drag , download few files can consulted in format bytearray ( ios bundle android ) thanks lot

css - making jQuery .show() AND .hide() run side by side with UI effect -

i'm trying make nice menu sliding effects in jquery: http://jsfiddle.net/rxjmv/5/ $(".goback").click(function() { $(this).parent().hide('slide', { direction: 'right' }); $("#parentsidebar").show('slide', { direction: 'left' }); }); $(".sidebarmover").click(function() { var newmenu = $(this).attr('name'); $(this).parent().hide('slide', { direction: 'left' }); $("#" + newmenu + "sidebar").show('slide', { direction: 'right' }); }); notice if click on football menu slides left , other comes right come 1 below other instead of side side.. tried many things, display: inline , using delay() jquery queue, problam css think, nut jquery... ideas? add position: absolute; width: 100%; in container that: <div id="sidebar"> <div id="sidehead">ti