Posts

Showing posts from 2015

c - What is the difference between LVM_GETITEM and LVM_GETITEMTEXT? -

i want text of listview row (text of item , subitems), not sure if should use lvm_getitem or lvm_getitemtext . what difference between these 2 messages, first retrieve entire information item or subitem while other retrieve text? both lvm_getitem , lvm_getitemtext can used retrieve item's or subitem's text data. since retrieving item's text data common operation, lvm_getitemtext message provided convenience implementation. to illustrate difference, here 2 implementations using either message (error handling elided brevity): std::wstring getlistviewitemtext( hwnd a_hwnd, int a_item, int a_subitem) { std::vector<wchar_t> buffer( 1024 ); lvitem lvi = { 0 }; lvi.mask = lvif_text; // required when using lvm_getitem lvi.psztext = buffer.data(); lvi.cchmaxtext = static_cast<int>( buffer.size() ); lvi.iitem = a_item; // required when using lvm_getitem lvi.isubitem = a_subitem; ::sendmessage( hwnd, lvm_getitem,

ios - Do I need to remove NSMutablearray objects before NULL/deleting NSMutablearray -

nsmutablearray *thisarray = [[nsmutablearray alloc] initwithobjects:@"one", @"two", @"three", nil]; do need delete objects before deleting thisarray? thisarray = null; a nsarray/nsmutablearray keeps reference objects contains, , setting array null automatically releases references. don't have cycle through them release them manually.

mysql - changing from 5.3 to 5.5 php getting SQL Error: 1064 in loop -

i have upgraded php 5.3 5.5 used code: foreach($searcharr $token) { foreach($longtbldef $element) { if (isset($element['th']) && !empty($element['th'])) $query .= "lower(" . $element['td'] . ") '%" . strtolower($token) . "%'"; if (next($longtbldef) && !empty($element['th'])) $query .= " `or "; }` if (next($searcharr)) $query .= ") , ("; } in 5.3 , worked fine. when use in 5.5 message: sql error: 1064 -- have error in sql syntax; check manual corresponds mysql server version right syntax use near 'lower(cases_tbl.host) '%dawn%') order cases_tbl.rec_id desc' @ line 6[] this query: select cases_tbl.rec_id "cases_tbl.rec_id", cases_tbl.date_added "cases_tbl.date_added", cases_tbl.status "cases_tbl.status", clients_tbl.client_number "clients_tbl.client_number"

python - Mongodb How to add addtional information when aggregating? -

i beginner , wrote line pipeline works, wanna add other information output, screen name , or number of tweets.i tried add under $group gave me syntax error everytime here pipeline: def make_pipeline(): # complete aggregation pipeline pipeline = [ { '$match': { "user.statuses_count": {"$gt":99 }, "user.time_zone": "brasilia" } }, { "$group": { "_id": "$user.id", "followers": { "$max": "$user.followers_count" } } }, { "$sort": { "followers": -1 } }, { "$limit" : 1 } ]; i using on example : { "_id" : objectid("5304e2e3cc9e684aa98bef97"), "text" : "first week of school on :p", "in_reply_to_status_id" : null, "retweet_count" : null,

r - Create bubble chart with biggest bubble at the center -

Image
i'm trying create bubble chart using set of data follows: x --> 10 y --> 20 z --> 5 q --> 10 i need have biggest bubble (based on number) @ centre (give or take) , rest of bubbles around without overlapping. all of r examples have seen require 2 dimensional dataset, , since data have 1 dimensional, know if it's @ possible create such graphs in r. it great if suggest me useful hints or so. way task need use sa tools d3js out of options. however, open using tool other r. i wasn't quite sure if question should asked in on stack overflow or cross validated , if moderators believe doesn't belong here, i'll remove it. this should do, main idea being sort value of radius, first biggest, shift values around (odd on 1 side, on other) values decreasing both ways. further explanations in code. library(plotrix) library(rcolorbrewer) # set random seed, reproducible results set.seed(54321) # generate random values radius num.circles <

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

i have 1 application using @manytomany annotation link 2 different entities 1 parent entity. not sure if have implemented properly. when execute .findone() on parent entity's repository find it, @ first fetch data along executing delete queries internally delete record mapping table (a table jpa creates after adding @manytomany annotation.). following generated sql queries , code snippet: java class @entity @table(name = "inventory") public class inventory { @id long id; // many other properties @manytomany(fetch=fetchtype.lazy) private list<stream> streams; @manytomany(fetch=fetchtype.lazy) private list<subject> subjects; } there no other annotation i've put in stream , subject entity class link inventory class. when run app, create following tables: inventory stream subject inventory_stream inventory_subject (inventory_stream , inventory_subject, 2 tables created automatically, don't k

sql - ORA-02292: integrity constraint violated - child record found -

when try delete user interface of application, integrity constraint ora-02292: integrity constraint (v.fk_s) violated - child record found.. but not able see constraint in all_constraints : select table_name all_constraints owner = 'v' , constraint_name = 'fk_s'; i guess missing here. tips search further?

java - How to set TableLayout's cells vertical & horizontal alignments -

Image
is there way set alignments in tablelayout's cells ? if want component in cell set example right bottom? this example of using tablelayoutconstraints : import javax.swing.jbutton; import javax.swing.jframe; import layout.tablelayout; import layout.tablelayoutconstraints; public class tablelayoutcellalignmentexample { public static void main(string args[]) { jframe frame = new jframe("example of tablelayout"); frame.setsize(700, 400); double size[][] = {{200,200,200}, // columns {100,100,100}}; // rows frame.setlayout(new tablelayout(size)); string[] labels = { "should top left", "should top center", "should top right", "should middle left", "should middle center", "should middle right", "should bottom left", "should bottom ce

Encryption between desktop app and server - C# to PHP -

i have app designed in c#. in simple terms app sends data , image web server takes $_post data , processes it. confess not understand how security end of things work. employ relevant experience wouldn't know ask them @ point in accepted techniques. i assume not simple base64 encode/decode data , needs higher level of encryption. webserver have https ssl(ov) certification on next few weeks limited understanding still need sort of protection/encryption when transferring data users pc web server not listening in on data transfer or that. in simple terms if want keep data secure between users , webserver of common or accepted methods c# php? the data goes directly app on users pc server, control source code both myself , not developer hence lack of technical knowledge on issue. one c# developer talked suggested symmetric/asymmetric algorithm not php developer doesn't know if php can take data , decrypt it. to answer further questions, when server issued , confi

How to add duration for input.ondown in phaser? -

how can add duration this.input.ondown() event in phaser if user clicks 10ms action "a" should happen , if click prolonged action "b" should happen? if (this.input.activepointer.duration > 10 && this.input.activepointer.duration < 25) { // action "a" } else if (this.input.activepointer.duration > 25) { // action "b" } put inside update() or wrap in function call there. should work last active pointer if have multiple (e.g. on mobile).

android - How to add several relativeLayout with 2 views inside programmatically? -

i took on stackoverflow can't find answer. add several rows ( relativelayout ) parent ( linearlayout ). relativelayout composed of 2 views, imageview on left , textview on right, both same row, each item: linearlayout userlayout = (linearlayout) view.findviewbyid(r.id.participant_user); relativelayout rl = new relativelayout(context); relativelayout.layoutparams params = new relativelayout.layoutparams(relativelayout.layoutparams.wrap_content, relativelayout.layoutparams.wrap_content); params.addrule(relativelayout.align_left) (participant participant : participants) { textview textview = settextview(context, participant.getname()); rl.addview(textview, params); imageview imageview = new imageview(context); imageview.setimageresource(r.drawable.bz_ic_default_user); rl.addview(imageview, params); userlayout.addview(rl); } it doesn't work, first element displayed or app crashed... thank ! you should use listadapater or recylerview her

jQuery isotope filter not working -

i have jquery isotope filtering working @ following address: http://romeavenue.com/en/2/tours-of-italy however, trying implement same functionality on different site can't work. have http://eternalcitytours.com/en/2/tours-of-italy the issue <ul id="filter-container" class="feature cf"> on 1 works, code shows class isotope being applied container <ul id="filter-container" class="feature cf isotope"> , <li> items having isotope-item class assigned. on 1 doesn't work isotope class isn't being assigned. have no idea why. my custom.js is: var $container = $('#filter-container'); $container.imagesloaded( function(){ $container.isotope({ itemselector : 'li', filter: '*', resizable: false, animationengine: 'jquery' }); }); // filter buttons $('#filter-buttons a').click(function(){ // select current

dplyr - Adding prefix or suffix to most data.frame variable names in piped R workflow -

i want add suffix or prefix variable names in data.frame, typically after they've been transformed in way , before performing join. don't have way without breaking piping. for example, data: library(dplyr) set.seed(1) dat14 <- data.frame(id = 1:10, speed = runif(10), power = rpois(10, 1), force = rexp(10), class = rep(c("a", "b"),5)) i want result (note variable names): class speed_mean_2014 power_mean_2014 force_mean_2014 1 0.5572500 0.8 0.5519802 2 b 0.2850798 0.6 1.0888116 my current approach is: means14 <- dat14 %>% group_by(class) %>% select(-id) %>% summarise_each(funs(mean(.))) names(means14)[2:length(names(means14))] <- paste0(names(means14)[2:length(names(means14))], "_mean_2014") is there alternative clunky last line breaks pipes? i've looked @ select() , rename() don't want explicitly specify each variabl

Why some builtin methods in python requires assigning to a variable? -

i confused python treats below examples. example 1 >>> = '{}' >>> a.format('1') '1' >>> '{}' >>> example 2 >>> = [] >>> a.append(1) >>> [1] in example 1, 'a' '{}' in example 2, 'a' [1] in both examples, i'm not assigning result 'a', what's difference? answering on broader sense require more detail study particular case difference crops because 1 of object mutable , other non-mutable. you cannot expect call method on string , change it. supposed create new string object. for list.append , because mutable, method call can update list in place.

java - Strange behaviour during deployment of Jboss in Eclipse -

Image
i'm working in app with: eclipse version: luna service release 1 (4.4.1) jboss eap 6.3 maven, spring, hibernate, log4j etc... i'm experiencing strange strange issue when doing modification in code: if don't execute run as... maven install goals clean package -x nothing changes except debug points don't match code. build automatically enabled. why happening? can because .class files not syncronized .java ones? knowing this, it's bit tricky can deal it, every thime make modification, stop server, rebuild war file ( run as... maven install ) see changes applied in code , restart server. problem comes randomly when restart server, app not start , exception: 17:40:12,816 error [org.apache.catalina.core.containerbase.[jboss.web].[default-host].[/xxx]] (serverservice thread pool -- 71) jbweb000287: exception sending context initialized event listener instance of class net.aqualogy.xf.component.web.spring.contextloaderlistener : org.springf

ms access - add decimal places to number in a report -

i have number in table 153695029 , need format 1,536,950.29 . have used ~format , decimal~ spot textbox , 153,695,029.00 . doing wrong? datatype double. you set format of textbox control, this. like, ? format(153695029, "###,###,###,###,###.00") 153,695,029.00

objective c - property not found on object of type error but property is there -

so i'm trying access property isportclosed(bool) in serialportcontroller , giving me error, i'm kinda new objective-c. feel should work i've got reference class *port. here link project. error messages: ~/groundstation/groundstation/viewcontroller.m:16:22: property 'isportclosed' not found on object of type 'serialportcontroller *' #import <cocoa/cocoa.h> #import "sceneview.h" #import "serialportcontroller.h" @interface viewcontroller : nsviewcontroller @property (strong) iboutlet serialportcontroller *port; @property (weak) iboutlet sceneview *accelsceneview; @end #import "viewcontroller.h" @implementation viewcontroller - (void)viewdidload { [super viewdidload]; // additional setup after loading view. while(!self.port.isportclosed) { } } - (void)setrepresentedobject:(id)representedobject { [super setrepresentedobject:representedobject]; // up

android - Disappearing ImageView after scroll in GetView -

Image
i have problem. have inflate listview icons , texts. items should have icons (imageview) (with text1...text5) last item should haven't icon (text6). first image ok, second too, when scroll list (image 3) icon text1 disappear. again when scroll down list (image 4) icon text5 disappear... public class myadapter extends baseadapter { /* */ public view getview(final int position, view view, viewgroup parent) { final viewholder holder; if (view == null) { view = layoutinflater.inflate(r.layout.list, null); holder = new viewholder(); holder.textview1 = (textview) view.findviewbyid(r.id.text_view); holder.imageview1 = (imageview) view.findviewbyid(r.id.icon); view.settag(holder); } else { holder = (viewholder) view.gettag(); } /* */ //icons (text1 text5) if (array[position].istrue()){ holder.imageview1.setimageresource(r.drawable.icon1);

How to style select option with css -

Image
i need style select css, looks image below, there 2 things cant figure out, when option selected remove classic blue background, how indent text, text-indent not working me, , how lower option box. <select name="txtcountry"> <option>select country</option> <option value="1">georgia</option> <option value="2">afghanistan</option> </select> select tags near-enough impossible customise, , @ mercy of browser how styled (albeit height , width). you better construct , style own using css if looking customisable option in cross-browser compatible. i have used jquery in order complete functionality. makes use of spans in order replace option tags, allowing further styling (no external library needed, although there many available): $('.item').hide(); $('.item').click(function () { var x = $(this).text(); $(this).siblings(".selected").text(

Refactor a Ruby switch statement when each case evaluates to the same value? -

suppose have ruby switch statement like: x = 1 case name when "bob" = x when "joe" b = x when "tom" c = x ... end what's best way refactor in one-liner? update: renamed variables make clearer i'm getting at. in case, can use eval method, not "nice way" it. name = "tom" a,b,c = [0]*3 config = {"joe" => "a", "bob" => "b", "tom" => "c"} x = 1 eval("#{config[name]}=#{x}") puts a, b, c # => 0 # => 0 # => 1

vb.net - Sharing Controls from multiple forms/classes -

i'm stuck in how share controls between 2 forms. want do: - have several forms have own function. - want bring them gather on 1 mainform. normally creating following code: public class form1 private sub form1_load(sender object, e eventargs) handles mybase.load dim f new form2 groupbox1.controls.add(f.get_groupbox_controls) end sub end class this add control containing in form2.groupbox1 , adds form1.groupbox1. works fine me. where "get_groupbox_controls" function returns form2.groupbox1 or if doesn't works display entire form2 on form1 transparancykey. (this isn't need solution, have lot of location calculating, works) however got form has lot going on. mainform want display 1 container(groupbox) when user clicks "more setting.." has show entire form control on it. the problem when use container.controls.add() function exception "invoke or begininvoke cannot called on control until window handle has been create

primefaces - Forced to use a HTML tag when using <ui:include> -

i'm using primefaces 5.2 , index: <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"> <h:head> <title>demo</title> <!-- incluyendo css: --> <link rel="stylesheet" href="./css/style.css" type="text/css" media="all" /> </h:head> <h:body > <div id="header"> <h:form id="ribbon"> <ui:include src="/ribbon.xhtml"/> </h:form> </div> <div id="section"> <ui:include src="#{navegacion.pagename}.xhtml"/> </div> <div id="footer"> <ui:include src="/foote

python - Open file in different directory -

i've written function , want open file in subdirectory 'data'. def _save_exrates(date, rates): """ saves exchange rates data date 'date' in appropriate exchange rates file, described below. """ file = open(os.path.join('data', 'rates-'+date+'.csv'), 'wt') w = csv.writer(file, lineterminator='\n') w.writerow(['code', 'rate']) key, value in sorted(rates.items()): w.writerow([key, value]) file.close() my program working on windows when run on mac error: filenotfounderror: [errno 2] no such file or directory: 'data/rates-2001-03-03.csv' how can open directory on mac windows? make sure create directory before creating file inside that.

rust - How to box a trait that has generic type parameters? -

i able use trait type parameter box<>: trait ctxval {} type ctxnodes = hashmap<string, box<ctxval>>; but when trait has it's own generic type parameters, partialeq , i'm stuck. type ctxnodes = hashmap<string, box<partialeq>>; i error: main.rs:6:37: 6:46 error: type parameter `rhs` must explicitly specified in object type because default value `self` references type `self` main.rs:6 type ctxnodes = hashmap<string, box<partialeq>>; ^~~~~~~~~ if provide type partialeq , be? box<partialeq<???>> you need specify want object able compared equal to: fn foo(value: box<partialeq<u8>>) -> bool { *value == 42 } fn bar(value: box<partialeq<&str>>) -> bool { *

mysqli - PHP -> mySQL Connection Errors -

i'm having connection errors trying connect php mysql. i'm using video instructable, because i've been having several of these connections before, outdated , i'm trying use mysqli instead of mysql commands, i'm winding nothing posting on pages, think because of this. can tell me if correct translation of it? function user_exists($username) { $username = sanitize($username); $query = mysqli_query("select count('user_id') 'users' 'username' = '$username'"); sanitize defined on page (and included) as: <?php function sanitize ($data) { return mysqli_real_escape_string($data); } ?> please help! first need connect mysql..is function have ? incomplete..on screen.. example.. $link = mysqli_connect("localhost","root","","database") or die("error " . mysqli_error($link)); $query = "select `release_year` film limit 5" or

java - How to remove the Ehcache WARN messages when using Hibernate -

i have ehcache xml configuration: <ehcache> <defaultcache maxelementsinmemory="10000" eternal="false" timetoidleseconds="120" timetoliveseconds="120" overflowtodisk="false" diskspoolbuffersizemb="30" diskpersistent="false" diskexpirythreadintervalseconds="120" memorystoreevictionpolicy="lru" /> </ehcache> and also, have packages entities (around 150). if deploy application on tomcat server, there lot warn messages in log: 2015-04-29 11:59:02,712 [rmi tcp connection(3)-127.0.0.1] warn org.hibernate.cache.ehcache.abstractehcacheregionfactory - hhh020003: not find specific ehcache configuration cache named [com.company.project.entity.package.myentity]; using defaults. i can write configuration each entity - <cache name="com.comp

xml - Spring-MVC : Unable to access static files in the ressource folder -

i have maven webapp running in tomcat server, using spring-mvc 4 dependency.and can't load login.css file located in folder named css inside resource folder of app. request returns 404 file not found error. the url being used access file : http://localhost:8080/wfmconf/resources/css/login.css the css doesn't load when access jsp page directly either. here relevant code : web.xml : <web-app> <display-name>archetype created web application</display-name> <context-param> <param-name>contextconfiglocation</param-name> <param-value> /web-inf/spring/spring-security.xml /web-inf/spring/spring-database.xml </param-value> </context-param> <!-- spring security --> <filter> <filter-name>springsecurityfilterchain</filter-name> <filter-class>org.springframework.web.filter.delegatingfilterproxy </filter-class> </filter> <fil

scala - How to make elastic4s store _timestamp field? -

i'm able enable timestamp on mapping : "sometype" ( "somefield" typed stringtype ) timestamp true but able retrieve when searching using "fields": ["_timestamp"] needs have store attribute set true . if : "sometype" ( "somefield" typed stringtype, "_timestamp" typed longtype/datetype store true ) timestamp true then not returned _search : get /myindex/sometype/_search { "fields": ["_timestamp"], "query" : { "match_all" : {} } } the resulting mapping looks : "sometype": { "dynamic": "dynamic", "_timestamp": { "enabled": true }, "properties": { "_timestamp": { "store": "yes", "type": "long" } } } but i've got feeling should : "sometype": { &

c++ - Overloading streaming operators for a Boost Graph bundle output for GraphViz -

is possible use bundled properties in boost graph library, standard library type, while using type's overload of << stream operator satisfy write_graphviz ? #include <boost/graph/graphviz.hpp> namespace boost { namespace detail { namespace has_left_shift_impl { template <typename t> inline std::ostream &operator<<(std::ostream &o, const std::array<t,2> &a) { o << a[0] << ',' << a[1]; return o; } } } } static_assert(boost::has_left_shift< std::basic_ostream<char>, std::array<double,2> >::value,""); int main() { using namespace boost; typedef adjacency_list<vecs, vecs, directeds, no_property, std::array<double,2>> graph; graph g; add_edge(0, 1, {123,456}, g); write_graphviz(std::cout, g, default_writer(), make_label_writer(boost::get(edge_bundle,g))

javascript - Click on "this" in a backbone view -

i newbie backbone , have little problem events system. i have view represents li element, , want when click on it. here code : var indicatorview = backbone.view.extend({ tagname: 'li', classname: 'indicator', initialize: function(options){ _.extend(this, _.pick(options, "controller")); this.model.on('change', this.render, this); var self=this ; this.$el.on("click", function(){ alert(self.model.get('name')); }) }, render: function(){ this.$el.html(this.model.get('name')); return this; // enable chained calls } }); for moment, works, using jquery events. how can same thing backbone events ? answers :) use empty selector bind event view el : var indicatorview = backbone.view.extend({ tagname: 'li', classname: 'indicator', events: { 'click': function() { alert(this.model.get('name')); }

algorithm - Visual Studio C++ error reading location -

i'm having guess simple problem. i'm practicing in coding binary tree(first time, maybe in year, i've looked again @ c++). so, when launch code in vs 2013, error "unhandled exception .... reading location address ". , when try debugging it, after creating root tree , trying add first leaf, happens, right , left leaves have addresses, don't have values(they pointed unable read memory). but, when load code online compiler, works perfectly. maybe it's settings in vs, because don't have other variants, why works in online compiler , doesn't work in vs. here code: #include <iostream> #include <string> using namespace std; struct node { string value; int key; node* left; node* right; }; void addnodetotree(node* tree, int key, string value) { if (key < tree->key) { if (tree->left != nullptr) { addnodetotree(tree->left, key, value); } else {

android - NDK - include error -

i need because drives me crazy. cause error? the error is "jni/algorithm.cpp:4:33: fatal error: opencv2/core/core.hpp: no such file or directory #include <opencv2/core/core.hpp> ^ compilation terminated. make: *** [obj/local/arm64-v8a/objs/algorithm/algorithm.o] error 1" my algorithm.cpp is: #include <jni.h> #include <string.h> #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/features2d/features2d.hpp> #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc_c.h" using namespace std; using namespace cv; extern "c" { jniexport jlong jnicall java_com_example_hematoma_mainactivity_fce(jnienv *env, jobject obj, jlong matimage) { mat *jni_image = (mat*) matimage; return (jlong)jni_image; } } my android.mk is: local_path := $(call my-dir) include /home/ne

html - Apply multiple CSS rules with one selector -

if example, have lot of css styles have apply objects within div #container . possible instead of write #container in front of all, have type of selector? don't have write every object within div #container ? html <div id="container"> <div class="letter">a</div> <div class="letter">b</div> <div class="number">1</div> <div class="number">2</div> </div> <div class="letter">c</div> <div class="number">3</div> css .letter { font-size:25px; color:green; } .number { font-size:30px; color:red; } i want write rule every .letter , .number within #container . ofcourse i'm reproducing issue here, there possibility change rules of .letter , .number applies #container without having change 2 times (2 times in reproduction)? (in issue it's 30 objects). tried #container selector befo

How to fix "Headers already sent" error in PHP -

Image
when running script, getting several errors this: warning: cannot modify header information - headers sent ( output started @ /some/file.php:12 ) in /some/file.php on line 23 the lines mentioned in error messages contain header() , setcookie() calls. what reason this? , how fix it? no output before sending headers! functions send/modify http headers must invoked before output made . summary ⇊ otherwise call fails: warning: cannot modify header information - headers sent (output started @ script:line ) some functions modifying http header are: header / header_remove session_start / session_regenerate_id setcookie / setrawcookie output can be: unintentional: whitespace before <?php or after ?> the utf-8 byte order mark specifically previous error messages or notices intentional: print , echo , other functions producing output raw <html> sections prior <?php code. why happen? to understand why hea

sql server - Error - There is no row at position 0 C# -

Image
when debug project, error: there no row @ position 0 code error in return (byte[]) ... public static byte[] baixararquivo(long codarquivo) { database db = databasefactory.createdatabase(); dbcommandwrapper dbcommandwrapper = db.getstoredproccommandwrapper("gerrel_arquivo_baixar"); dbcommandwrapper.addinparameter("@codarquivo" , dbtype.int32 , codarquivo); >>>> return (byte[]) db.executedataset(dbcommandwrapper).tables[0].rows[0]["arquivo"]; } i checked database , found no problems. might happening? ===== private void page_load (object sender, system.eventargs e) { string codigoarquivo = request.querystring ["codarquivo"]; response.binarywrite (bo.arquivo.baixararquivo (int.parse (codigoarquivo))); } executedataset seems return dataset contains table empty. have check if it's correct no rows returned stored-procedure. if it's poss

Javascript:: Is it possible to create an array of new audio objects? -

this example work : var audio=new audio(); audio.src="hezi.mp3"; audio.play(); but wondering if there possibility create array of new audio objects such: var audio[0]=new audio(); audio[0].src="hezi.mp3"; audio[0].play(); var audio[1]=new audio(); audio[1].src="gangina.mp3"; audio[1].play(); off-course second example not current syntax can idea... you'd need adjust somewhat... plus don't want attempt play them @ once - , adding them dom allow give controls user. var audio = []; audio[0]=new audio(); audio[0].src="hezi.mp3"; audio[0].play(); audio[1]=new audio(); audio[1].src="gangina.mp3"; audio[1].play();

email - How to send mail using mail() function in PHP from localhost -

this question has answer here: php mail function doesn't complete sending of e-mail 22 answers i using mail() function send mail in php localhost not working. sending mail localhost primary concern. please guide me way achieve same. it configured use localhost:25 mail server. the error message says can't connect localhost:25. therefore have 2 options: install / configure smtp server on localhost port 25 change configuration point other smtp server can connect to

c - CUDA program running slower on Tesla K20 than GTX 965 -

i'm doing project have compare various gpu cards performance analysis. i had ran same cuda code canny edge detection in both gpu's , found gtx 965 faster(200%) tesla k20. observed tesla c2075 running same of tesla k20. as far know k20 has 2496 cores, 965 has 1024 cores , c2075 has 448 cores. k20 , c2075 nvidia kepler architecture , 965 maxwell architecture. what i'm doing wrong or there difference in hardware part causing problem? also, can check power consumed graphic card using program or theoretical calculations? many cores not mean shorter execution times. if cuda app utilizing single thread , run app on: k20, has lots of cores 706mhz frequency, as opposed gtx965 has half of them working on 944mhz ... gtx965 can work faster. in theory, long utilizing less 1024 cores app, gtx can outperform k20, in case if memory not bottleneck k20 has: bigger memory bandwidth, much more memory in general, a tiny bit higher memory clock. so, sum up,