Posts

Showing posts from August, 2015

python - Compilation error when importing Theano on Windows 7 -

i'm trying use theano on windows 7. able install theano , import theano, after seeing warning not having c compiler installed installed mingw. when try "import theano" compilation error. message rather long, relevant parts (from tell) this: problem occurred during compilation command line below: g++ -shared -g -d npy_array_ensurecopy=npy_ensurecopy -d npy_array_aligned=npy_aligned -d npy_array_writeable=npy_writeable -d npy_array_update_all=npy_update_a ll -d npy_array_c_contiguous=npy_c_contiguous -d npy_array_f_contiguous=npy_f_contiguous -m64 -dms_win64 -ic:\python27\lib\site-packages\numpy\core\include -ic: \python27\include -o c:\users\ameasure\appdata\local\theano\compiledir_windows-7-6.1.7601-sp1-intel64_family_6_model_58_stepping_9_genuineintel-2.7.3-64\lazylin ker_ext\lazylinker_ext.pyd c:\users\ameasure\appdata\local\theano\compiledir_windows-7-6.1.7601-sp1-intel64_family_6_model_58_stepping_9_genuineintel-2.7.3-64\l azylinker_ext\mod.cpp -lc:\python27\lib

jquery - Process Form with php Without refreshing -

i have form ( web poll) , radio answers , need when submitted information action file (voting.php) printed on same page without refreshing! please me i've been trying hard few hours, because i'm new ajax jquery , java , tricky dynamic stuff. <form name="myform" id="myform" action="voting.php" method="post"> <input id="radio1" type="radio" name="answer" value="answer1"><?php echo $answer1?><br> <input id="radio2" type="radio" name="answer" value="answer2"><?php echo $answer2?><br> <input id="radio3" type="radio" name="answer" value="answer3"><?php echo $answer3?><br> <input id="radio4" type="radio" name="answer" value="answer4"><?php echo $answer4?><br> <input id="radio5&

asp classic - Error with FormatDateTime in VBscript -

i running vb script asp classic , getting following error: microsoft vbscript runtime error '800a0005' invalid procedure call or argument: 'formatdatetime' /whatsnew/updated_pages_www.htm, line 52 i trying work out causing error. there wrong format of date in csv file? date format is: 20090220122443 page code below: <%@language="vbscript" codepage="65001"%> <% response.charset = "utf-8" %> <% pagetitle="what published last week on casa.gov.au" %> <% connectstring = "driver={microsoft text driver (*.txt; *.csv)}; dbq=" & server.mappath("/whatsnew/data") set connect = server.createobject("adodb.connection") connect.open connectstring selectsql = "select * www.csv" set www_rs = connect.execute(selectsql) %> <!--#include virtual="/_lib/include/header.htm"--> <!--#include virtual="/_lib/include/menu.htm"--> <p cl

file - How can I indicate the path of a package in a String in Java? -

new fileinputstream("c:\\users\\adam\\documents\\netbeansprojects\\tictactoe_3.0 beta\\src\\resources\\system shock 2 soundtrack med sci 1.mp3"); bufferedimage bf = imageio.read(new file("c:\\users\\adam\\documents\\netbeansprojects\\tictactoe_3.0 beta\\src\\images\\black-squaremod.jpg")); the 2 lines of code above taking kind of resource given paths. change them reference package within same netbeans project, contains same resources. for example, fileinputstream(); ... getting audio file. the bufferedimage bf = imageio.read(new file()); ... getting .jpg image. these 2 files in package called 'resources' in same netbeans project. how change specified paths go directly packages, instead of going through hard disk? thanks. the class.getresource() , class.getresourceasstream() methods relative class location. intended purpose. from javadoc finds resource given name. rules searching resources associated given class imp

javascript - Kendo grid initializing number cells -

Image
by default, fields in datasource marked number have cells filled initial value of 0. i'd have cells empty when grid created without turning field string. the below row added calling grid.addrow(); $("#sale_01_div_grid") .kendogrid( { ... datasource : { schema : { data: "data", total: "total", model: { fields : { seq : { type : "string", editable : false}, sap_cd : { type : "string" }, old_cd : { type : "string", editable : false }, inv_name : { type : "string", editable : false },

java - Differentiating String/Int User Input -

i having issues trying type code make program distinguish whether user inputs string value or int value. if int value typed in, stored array (named data) printed , tested typing string values (as seen in code below in method go() . using .hasnextint incorrectly? here code: import java.util.scanner; import java.util.random; import java.text.decimalformat; public class integerstatistics { java.util.scanner scan; // declare storage integers int[] data; random random; // create constructor public integerstatistics() { scan = new scanner(system.in); data = new int[10]; random = new random(); } private void showmenu() { system.out.println("menu:"); system.out.println(" p - print list of values"); system.out.println(" s - print statistics values"); system.out.println(" f - fill list random values"); system.out.println(" c - clear list of values"); system.out.println("

c# - Intuit POS SDK - Missing manufacturer for inventory query -

i developing against quickbooks pos system. make following request inventory list (in c#). var request = sessionmgr.createmsgsetrequest(1, 0); request.attributes.onerror = enrqonerror.roecontinue; var inventoryquery = request.appenditeminventoryqueryrq(); var response = sessionmgr.dorequests(request); the inventory list not include manufacturer string each inventory item, through string populated in qbpos. field not in returned xml or in iiteminventoryret object, although else appears be. thanks help! the manufacturer field added in later version of program have specify version 3 request it. you can call "qbposxmlversionsforsession" request object ensure end user has compatible version of pos request. this shows fields available versions: https://member.developer.intuit.com/qbsdk-current/common/newosr/index.html

php - Unknown column in where clause -

this script supposed retrieve customerid customer_first_name , customer_last_name has been entered form. $query = "select customerid customer customer_first_name = `.$db_customer_first_name.` , customer_last_name = `.$db_customer_last_name.`"; $result = mysql_query($query) or die(mysql_error()); echo $result; echo $query; when script runs error: unknown column '.christopher.' in 'where clause' the query never printed on screen. any appreciated. your quotes bad use ' instead of tick `

jquery events receive and stop not working on droppable lists -

the html formed , working correctly, neither alerts or functions firing; seems these aren't working. i'm stumped, because seems strange work stop:, nothing else. i'm persisting order within tabs successfully, without these events firing, i'm not sure how persist moves across tabs without hacking. $( ".connectedsortable" ).sortable({ opacity: 0.5, placeholder: "ui-state-highlight", stop: function( event, ui ) { $('.connectedsortable').each(function() { if($("#"+this.id).length > 0){ var margin_id = $(this).attr('margin_id'); var group_id = $(this).attr('group_id'); var sortedids = $( "#"+this.id ).sortable( "toarray" ); console.log(sortedids); update_widget_order(sortedids,__user_id,__page_id,margin_id,group_id); } }); // update widget order

java - Error accessing checkboxes after putting them inside a scrollview -

i changed xbl having checkboxes in layout them being in scrollview. way can add more without troubling users options page. when following error: http://pastebin.com/t5hzhrxu here xml part changed: <view android:id="@+id/view2" android:layout_width="fill_parent" android:layout_height="1dp" android:layout_above="@+id/scrollbox1" android:layout_alignleft="@+id/textview4" android:layout_alignright="@+id/num_input" android:layout_marginbottom="14dp" android:background="#808080" /> <scrollview android:id="@+id/scrollbox1" android:layout_width="match_parent" android:layout_height="55dp" android:layout_above="@+id/view1" > <tablelayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchcolumns="1"> <checkbox android:id=

prolog - Getting all nodes that have atleast 2 nodes connected to them -

Image
having issues prolog question: the following clauses represent directed graph, nodes atoms, , edges denoted connected predicate. given following clauses in database, answer 2 questions below. connected(a,b). connected(b,d). connected(b,e). connected(b,f). connected(a,c). connected(c,f). connected(c,g). connected(h,c). path(x,y) :- connected(x,y). path(x,z) :- connected(x,y), path(y,z). show prolog query returns nodes having 2 or more different incoming edges (i.e., @ least 2 different nodes connected it). also, show result of entering query (asking every solution). query may return same node multiple times, , may printout values of other variables in query. variable denoting node in question should called dnode. so far have: path(dnode,__) , path(__,dnode). but give me b , c think letters more 1 nodes a, b, c, f . tried a, b , c : path(__,dnode),path(dnode,__) ; path(dnode,__) , path(dnode,__). but got a, b, c , h . assuming i

JQuery Widget Factory: Call public method on all instances -

assuming have widget named foo , bind multiple dom elements , call public method of widget first created instance fire method. var instances = $('div').foo(); // instantiate plugin on every div instances.foo('hello'); // calls public method hello on first instance is design? expectation hello method fired every instance.

jquery - Json object not parsing correctly -

i have this page toward bottom can click on different categories parse applicable companies' logos. last item in array (the 'wesco' logo) supposed appear in "distribution" category appears in several categories. json file reads: {"customers": [ {"customername": "3m", "imagelink": "/images/client-logos/logo-3m.jpg", "category": "healthcare,manufacturing","link":"http://www.3m.com"}, {"customername": "acxiom", "imagelink": "/images/client-logos/logo-acxiom.jpg", "category": "info-tech,services","link":"http://www.acxiom.com"}, {"customername": "adobe", "imagelink": "/images/client-logos/logo-adobe.jpg", "category": "info-tech","link":"http://www.adobe.com"}, {"customername"

amazon web services - What kind of data gets stored in data warehouses? -

looking @ services amazon redshift, meant storing petabytes of data. forms of data meant stored here? logs, raw data? the question data warehouse not kind of information store in rather how store , inted use for. data organisation needs analyze , compare may put data warehouse. define data warehouse difficult , you'll many definitions people ask. i've seen lots of different implementations , no 1 can data warehouse , not. there number of key points data warehouse should fulfill, namely should time variant (i.e. store datapoints on time) , should non-volatile (i.e. never update data in data warehouse, insert). following these rules allow common data warehouse analysis, namely analyze data on time, e.g. compare seasons sales last season. i'm not sure amazon redshift do, if data warehouse or not think more question of how use it.

javascript - Show select box options based on link -

i have jsp page. created links. <div align="center" style="border: 1px solid #ddd; position:absolute;left:20px; top:100px; width: 150px;"> <br> <a class="applicationdata" href="#" id="1">organization data</a><br> <a class="applicationdata" href="#" id="2">business units</a><br> <a class="applicationdata" href="#" id="3">applications</a><br> <a class="applicationdata" href="#" id="4">data entity</a><br> <br> </div> similar have created many links. , have select box <label class="control-label" for="dataloadtype">data load type:</label> <select id="dataloadtype" name="dataloadtype"> <option value="fromdb">from database</option> <opti

android - Custom layout for RadioButton -

Image
is there way can change layout radiobutton , still have radiogroup recognise it? what need layout include couple of edittext fields when user selected button fields become active. know can built custom part based on linearlayout , set own layout using: (linearlayout) layoutinflater.from(context).inflate(r.layout.my_layout, this, true) can't figure out how same thing radio button. i have tried option of having fields outside radiogroup , lining them button doesn't work. seems device-dependant. this original layout looked like: <radiogroup android:id="@+id/time_selector_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toleftof="@id/time_selector_hours_prompt" android:layout_below="@id/time_selector_hours_prompt" android:layout_alignparentright="true" android:gravity="right" android:orientation="vertical

In jQuery drag and drop how can I identify a source element and change it's color? -

the code below copies (drag , drop) li 1 column keeping original li in place. trying color orginal li, in orginal column, after copy know have used. this line find hardcoded id in source column , change it's color can't figure out how make 'input1' variable can used on selected line. $(ident).parent().find('#input1').addclass('highlight'); i have tried variations 'event.srcelement' can't select 1 line variable. my code: $( "#available > li" ).draggable({ revert: 'invalid' connecttosortable: '#selected', containment: '#drag_container', helper: 'clone', start: function(ui, event) { dragged = $(this).attr('id'); draggedx = $(this).attr('class'); } }); $( "#selected" ).droppable({ drop: function(event, ui) { var ident = &quo

syntax - How to put a space between two SQL columns after joining them? -

i have joined 2 columns, first name\last name 1 , named alias good. how put space between first , last name? au.first_name || au.last_name name here: au.first_name || ' ' || au.last_name name

linux - The assembly code (x86) with jumps and a syscall read function -

i ask understanding assembly code. problem is: code after label l2 important, calls subroutine function. seems me program never code after label l2, because according me syscall read (after l1) reads 0 , after compare 1. 0 never equals one, seems me program never jumps l2. guess must wrong. appreciate help jmp l1 l2: movzbl -0x11(%ebp), %eax movsbl %al, %eax mov %eax, (%esp) call subroutine_fnc <...> l1: mov $0x0, %ebx lea -0x11(%ebp), %ecx mov $0x1, %edx mov $0x3, %eax int $0x80 mov %eax, -0x10(%ebp) cmpl $0x1, -0x10(%ebp) je l2 the syscall corresponds read , looks trying read 1 byte @ time. read should return number of actual bytes read, if call successful return value of 1, compare true, , jump l2, i.e. l2: subroutine_fnc(...); if (read(fd, buff, 1) == 1) // read 1 byte goto l2; // if 1 byte read loop l2 or, in more structured form: while (read(fd, buff, 1) == 1) { subroutine_fnc(...) }

android - SherlockActionBar: How to adjust CustomView against actionBar -

Image
question: how can have title back? here's screenshot (missing title): actionbar setting: actionbar actionbar = getsupportactionbar(); actionbar.settitle("my title"); actionbar.seticon(drawable.dropdown_user); view mlogoview = layoutinflater.from(this).inflate(r.layout.mlogoview, null); actionbar.setcustomview(mlogoview); actionbar.setdisplayshowcustomenabled(true); actionbar.setdisplayshowtitleenabled(true); actionbar.setdisplayhomeasupenabled(true); mlogoview.xml: <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="match_parent" > <imageview android:id="@+id/img_merchant" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentright="

android - Dropbox file download fails -

i trying download file dropbox using dropbox sdk android. i added following permission in manifest: <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.read_external_storage"/> <uses-permission android:name="android.permission.write_external_storage"/> following code using download file: file mfile=new file(environment.getexternalstoragedirectory().getpath()); try { fileoutputstream mfileoutputstream=new fileoutputstream(mfile); dropboxfileinfo mdropboxfileinfo=mdropboxapi.getfile("/"+filename, null, mfileoutputstream, null); } catch (filenotfoundexception e) { // todo auto-generated catch block e.printstacktrace(); } catch (dropboxexception e) { // todo auto-generated catch block e.printstacktrace(); } you passing directory name in mfile variable. think should append file name after directory path. resolve pro

objective c - Filter dictionary array with multiple value -

( { ireplyid = 3870; name = rahul; }, { ireplyid = 3914; name = tom; }, { ireplyid = 3873; name = smith; }, { ireplyid = 3871; name = yator; }, { ireplyid = 3872; name = jack; }, { ireplyid = 3875; name = smith; }, { ireplyid = 3876; name = rancho; }, { ireplyid = 3878; name = vid; }, ) my requirement filter array multiple condtion ireplyid = 3871,3870,3914 using nspredicate. tried but didn't solution predicate, can solve using loop not way. highly appreciated. [array filteredarrayusingpredicate:[nspredicate predicatewithformat:@"ireplyid in (%@)",[idsarray componentsjoinedbystring:@","]]]

c++ - Locale independed float input and boost::program_options/istringstream -

i've developed small application waits float values input through command line/boost::program_options . also parts of application use std::stringstream formatting floats required precision. my question - need special manipulation proper working of code on systems different locale settings ( because of decimal point separator) ? i tested application different versions of windows xp localisation, , it's working (arabic, finnish, china, france, hebrew, korea, deutch, turkey, portugal, spanish, polish, japan, english, russian) i have found topics issues related float string , string float conversion, caused decimal separator - , want sure . thank you.

i am getting fatal exception:main in android and the application is not getting executed on emulator? -

` public class jsonexampleactivity extends activity { /** called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_json_example); httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost("http://codeincloud.tk/json_android_example.php"); textview textview = (textview)findviewbyid(r.id.textview1); try { httpresponse response = httpclient.execute(httppost); string jsonresult = inputstreamtostring(response.getentity().getcontent()).tostring(); jsonobject object = new jsonobject(jsonresult); string name = object.getstring("name"); string verion = object.getstring("version"); textview.settext(name + " - " + verion); } catch (jsonexception e) { e.print

php - Display results on combobox by selecting a value on another combobox -

i have problem in project. have these categories: football basketball tennis and these sub categories: super league super league b euroleague serie i have categories , sub categories in phpmyadmin db. have code now, display these two, in 2 different comboboxes, via queries db: <?php $category = mysql_query("select * katigories order id_katigoria"); echo "<select name='katigoria'>"; echo "<option selected='selected' value='0'> Επιλογή κατηγορίας! </option>"; while($values = mysql_fetch_assoc($category)) { echo "<option value='$values[id_katigoria]'>".$values['katigoria']."</option>"; } echo "</select>"; ?> and <?php $category = mysql_query("select * upokatigories order id_upokatigoria"); echo "<select name='upokatigoria'>"; echo "<option selected='selected' value='0'

How to avoid NoClassDefFoundError with different Android API versions -

i'm developing application apis v10 v17. my activity implements ondraglistener available api v14. public class myactivity extends activity implements view.ondraglistener { .... } so, when application installed on device api v10 fails load activity java.lang.noclassdeffounderror . i understand won't work on api v10, that's ok. i'm handling inside activity. i want know practice handle different api versions when comes features this? first of can check api levels , depending on execute or not code. example : if(build.version.sdk_int < build.version_codes.honeycomb){ // don't use it. } else { // use new api : // myview.setondraglistener(...); } you should not implement interfaces new api's in activity if want support old android versions too. instead of use approach above.

java - Facebook Login API - No Email Field in Response -

i have web app running in google app engine/java. app allows user login using facebook account. the implementation works error happened , said no email in api response. email included in scope: scope = "email,user_birthday,user_location"; i explicitly required email: "https://graph.facebook.com/me?access_token=" + accesstoken + "&fields=email,id,name,birthday,gender"; but still api don't have email returned. how reproduce error facebook account? when response don't include email? email not required in facebook registraion? workaround this? this old question, issue user doesn't have email. facebook allows users signup phone number growing percent of users not have email associated account. more info: https://developers.facebook.com/docs/facebook-login/permissions#reference-email

asp.net - Asp:BoundField how to force input width -

silly question... code: <asp:boundfield datafield="prevduration" headertext="prev." sortexpression="prevduration" itemstyle-width="25"> </asp:boundfield> html output: <td style="width:25px;"><input name="ctl00$maincontent$gridview1$ctl03$ctl02" type="text" value="1" size="5" title="prev."></td> so code specifies td width, how instead can specify input width? ps. way size=5 comes out from? use controlstyle-width="25px" property. <asp:boundfield datafield="prevduration" headertext="prev." sortexpression="prevduration" controlstyle-width="25px"> </asp:boundfield>

php - Laravel 4 Validation -

i use following rules validation on creating new user: protected $rules= [ 'name' => 'required', 'email' => [ 'required', 'unique:user', 'email' ] ]; when updating existing user use same ruleset shown above don't want validation error if user didn't change email @ all. i resolve using following: if (!user::changed('email')) { unset($user->email); } it feels dirty workaround me wondering if there better alternatives. also note changed method wrote myself. know if there native laravel 4 method checking whether model property has changed? thanks! the unique validation rule allows ignore given id, in case id of data set updating. 'email' => 'unique:users,email_address,10' http://four.laravel.com/docs/validation#rule-unique

model view controller - eh cache implementation in spring -

i have dating module in application, in need show random profile picture of opposite gender, after profile appears , can either accept or reject profile , if u reject profile again random profile appears, every time hitting db , fetching profile.this proving costly in terms of performance, use ehcache cache results. using spring mvc 3.1. can me in implementation, or there other better ways of implementation may http://ehcache.org/documentation/recipes/pagecaching address yours problem.spring suppors ehcache see link http://ehcache.org/documentation/recipes/spring-annotations

vb.net - Protecting columns in excel using C# -

i attempting write excel sheet data , after writing in necessary data, protect cells against editing making them non editable. after operation, data updated on unprotected cells sheet users use , read carry out processing activity. can me out specifically, how lock column editing in excel? how write using c# protected column? how read using c# protected column? simple references examples me out greatly. ps: if more comfortable vb.net references of how on helpful. for excel cell in non-editable mode 2 things have taken care of: 1) excel cell should locked ws.get_range("location", type.missing).locked = true; 2) excel worksheet should locked ws.protect("securitycode", true, true, true, type.missing, type.missing, true, true, type.missing, type.missing, type.missing, type.missing, type.missing, type.missing, type.missing, type.missing); //where ws worksheet object for second question read through

java - Why getOverlays() is undefined for the MapView? -

my qestion might easy sinse i'm android begginer. i'm following the tutorial and have succeed in first part of creating map activity. i'm trying add overlay items. problem in .java code: list<overlay> mapoverlays = mapview.getoverlays(); this line presented in tutorials. error message like: 'the method getoverlays() undefined type mapview'. can me solve it? code: package com.example.mapsdemo; import java.util.list; import com.google.android.gms.maps.mapview; import com.google.android.maps.geopoint; import com.google.android.maps.overlay; import com.google.android.maps.overlayitem; import android.app.activity; import android.graphics.drawable.drawable; import android.os.bundle; public class mainactivity extends activity { private mapview mapview; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main

html - TextArea to Array with PHP -

i'm trying figure out how convert html textarea php array, i've used form post deliver query php script, , php file getting them following line: $ids = array($_post['ids']); needless puts 1 line array ( [0] => line1 line2 line3 line4 ) i need final results replace this: $numbers = array( "line1", "line2", "line3", "line4" ); what best approach divide , re-parse ? using explode on \n proper way new lines. keep in mind though on platforms end of line send \r\n , exploding on \n leave data on end of each line. my suggestion remove \r before exploding, dont have loop through entire array trim result. last improvement, dont know there $_post['ids'] , check first. <? $input = isset($_post['ids'])?$_post['ids']:""; //i dont check empty() incase app allows 0 id. if (strlen($input)==0) { echo 'no input'; exit; } $ids = explode("\n", str_repl

javascript - How to send data from activity to a webview in that activity itself? -

from activity sending data activity public class mainactivity extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); final edittext etxt=(edittext)findviewbyid(r.id.edittext1); final edittext etxt1=(edittext)findviewbyid(r.id.edittext2); button btn=(button)findviewbyid(r.id.button1); btn.setonclicklistener(new onclicklistener() { @override public void onclick(view arg0) { // todo auto-generated method stub string s= etxt.gettext().tostring(); string s1= etxt1.gettext().tostring(); intent intent= new intent(getapplicationcontext(),webactivity.class); intent.putextra("key", s); intent.putextra("key1", s1); } }); } } my second activity receive data intent , want display in webview. public class

asp.net - How to implement "--print-media-type" with c#? -

i using wkhtmltopdf c# download webpage pdf format. however, want generated pdf shown using "print.css". additional details: using microsoft visual studio 2010. this code: protected void imagebutton2_click(object sender, imageclickeventargs e) { string args = string.format("\"{0}\" - ", request.url.absoluteuri); var startinfo = new processstartinfo(server.mappath("~/wkhtmltopdf/") + "wkhtmltopdf.exe", args) { useshellexecute = false, redirectstandardoutput = true }; var proc = new process { startinfo = startinfo }; proc.start(); response.addheader("content-disposition", string.format("attachment;filename=staffdetails.pdf", guid.newguid())); response.addheader("content-type", "application/pdf"); string output = proc.standardoutput.readtoend(); byte[] buffer = proc.standardoutput.currentencoding.getbytes(output); proc.close();

excel - MSG Box display workbook -

i have easy question whatever reason can´t find online. want msgbox return me specific cells apply set of conditions. each cell want workbook cell in. msgbox ("error: " & cl.address & " " & cl.value & " " & thisworkbook.name) is have in code. returning name of reporting workbook , not actual error located. please help in situation should go way: msgbox ("error: " & cl.address & " " & cl.value & " " & cl.parent.parent.name) the final part use hierarchy of excel object model- cell >> sheet >> workbook...

postgresql - Postgres two subqueries poor performance [EAV model] -

i have table called "meta" 2.2 million records. table contains 3 columns: productid, key , value. key , value 2 columns containing meta description of product. the following query takes 2.6 sec , returns 676 results (postgresql 8.4.13, centos 6.4 64-bit). query used retrieve possible meta descriptions filter (size) user filtered on 2 other filters (year , source). i tried array solution topic made worse: postgresql in operator subquery poor performance the 2 subqueries pretty fast (75ms , 178ms), combining them causes performance issues. there way rewrite query? this current query: select distinct on(value) key, value "meta" key = 'size' , "productid" in (select "productid" "meta" "value" = 'ibm' , "key" = 'source' ) , "productid" in (select "productid" "meta" "value" >= 

javascript - Trigger click event on click of other element in a loop -

i have requirement have fire click event on table header on click of other table header (2 different tables), trigger not fired on table when in loop. although if hardcode , bind trigger individual element, works. currently, js looks this: var outsideheaders = $("#header th"); var tableheaders = $(".datatable th"); for(var cnt = 0; cnt< outsideheaders.length; cnt++) { $(outsideheaders[cnt]).bind('click',function(){ $(tableheaders[cnt]).trigger('click'); }); } please provide solution this! updated: how code looks now: var outsideheaders = $("#header th"); var tableheaders = $(".datatable th"); for(var cnt = 0; cnt< outsideheaders.length; cnt++) { (function(headercnt){ $(outsideheaders[headercnt]).bind('click',function(){ $(tableheaders[headercnt]).trigger('click'); }); })(cnt); } the value of cnt inside click event handler function going

android - FFmpeg exit value = 4 -

i try run ffmpeg command on android devices. on of them code below works excellent , video created. on some(e.g. motorola xoom) exit value 4. , while debugging on samsung galaxy s 2.3.3 frozes on process.waitfor(); me please? can't understand wrong. public void execffmpeg(){ try { file resultfile = new file(mcontext.getfilesdir() + "/ffmpeg"); string[] command = null; command = new string[] { resultfile.getabsolutepath(), "-shortest", "-i", audiopath, "-loop", "1", "-i", imagepath, "-acodec", "ac3", "-ab", "128k", "-vcodec", "mpeg4", videofilename }; if(command != null){ process process = runtime.getruntime().exec(command); process.waitfor(); dumpstream(process.getinputstream());