Posts

android - Why are there so many bluetooth profiles? -

i got started in developing bluetooth android, , keep wondering why there many bluetooth profiles , why useful? if whole purpose of bluetooth communication send messages (bits) , forth, shouldn't core bluetooth stack have standardized way of doing without need different profiles work different types of data . mean...data streams of bits. i working bluetooth health device profile (hdp) not bluetooth stacks implement. implement (like bluez) pass me streams of bits. not support hdp, tried listen using more generic profile spp , can't data... why? you wondering why there many different data connection cables, since send bits. for bluetooth profile assigns rfcomm channel number (such avrcp , hfp support profiles), can connect specified rfcomm channel number using spp, send necessary profile negotiation responses required not connection dropped, , send/receive raw data streams. of course, profile @ other end expecting "raw data" send fit profile d...

excel - Loop through two columns on one sheet, find corresponding unique row on another sheet, and return value in third column -

i have columns , b in sheet ("reference") contain criteria. want macro loop through these criteria, through columns , b in sheet ("pages"), find unique corresponding row, , return value in third column of sheet if it's not blank. below have tried far, doesn't return value: each in sheetrng each j in proprng dim x long, lr long, flag boolean lr = range("a" & rows.count).end(xlup).row x = 3 lr if range("a" & x) = "theo caliber" , range("b" & x) = , range("c" & x) = j , not isempty(range("d" & x)) flag = true exit end if next x dim y integer y = rows(2).find(what:="total marketing", lookin:=xlvalues, lookat:=xlwhole, matchcase:=false).column dim z variant set z = cells(x, y) thisworkbook.activate sheet...

algorithm - Mandelbrot Recursive Function for C -

i new coding , required make mandelbrot function. of don't know, mandelbrot set set of complex numbers. essentially, take complex number start with, square , add original complex number. example, if used number 1, set 0, 1, 2, 5, 26, ... got value from: 0, 1, (1^2) + 1 = 2, (2^2) + 1 = 5, (5^2) + 1 = 26. now, recursive function supposed find sum of set using 2 inputs: number n, how far going set. example, if n 3, first example set (0, 1, 2). second input complex number structure, have defined 2 parts, imaginary number , real number. goal multiply 2 complex numbers , add original complex number. have made multiply , add functions complex well, need recursion part. here have far: #include <math.h> #include <stdio.h> complex_t mandelbrot(doublen, complex_t c) { if(n == 0) { return c; } else { complex_t first = mandelbrot(n-1, c); complex_t multiplied; ...

JNA using C DLL -

i'm using jna c dll file , have exception can't resolve: java.lang.classcastexception: lecteur.$proxy0 cannot cast com.sun.jna.library here source code: package lecteur; import java.util.hashmap; import com.sun.jna.library; import com.sun.jna.native; import com.sun.jna.win32.stdcalllibrary; public class lecteur { interface nativeinterface extends stdcalllibrary.stdcallcallback { boolean getapierrorstring(string pcerrorstring, int mxlen); } public static void main(string[] args) { hashmap<string, object> namemapping = new hashmap<string, object>(); namemapping.put(library.option_function_mapper, stdcalllibrary.function_mapper); namemapping.put(library.option_calling_convention, stdcalllibrary.stdcall_convention); nativeinterface instanceinterface = (nativeinterface) native.loadlibrary("mvxapi", nativeinterface.class, namemapping); string pcerrorstring= "aod"; int maxlen = 275; system.out...

data mining - How is frequent itemsets compared with item-based collaborative filtering in recommender systems? -

what difference between data mining approaches: frequent itemsets , item-based collaborative filtering in area of recommender systems? frequent itemsets use unary data: know person has items in basket have no idea if knows other items in universe exist. is, not have item z in basket because knows , doesn't it, or because doesn't know (and might have included if did). item-based collaborative filtering, on other hand, includes rating data. e.g., star ratings on scale of 0.5 5.0 (in case of movielens). here can better calculate similarity between items because have both positive , negative opinions, , can make more informed guess if user doesn't rate item, doesn't know exists.

perl - DBD::Sybase error -

first of all, let me thank time , knowledge sharing, i'm kind of ignorant in trems of perl modules i have 64bit ubuntu server 12.04, perl version 14, subversion 2 (v5.14.2) built x86_64-linux-gnu-thread-multi , cpan exploration , modules installation (v2.10). i'm trying use perl script accessing microsoft sql server , i'm having hard time upon dbd::sybase module when try install dbd::sybase cpan tells me it's installed: cpan[1]> install dbd::sybase reading '/root/.cpan/metadata' database generated on wed, 29 apr 2015 14:53:21 gmt dbd::sybase date (1.15). i find multiple sybase.pm files on filesystem, of them under perl path root@server:# find /* -name sybase.pm /home/usriten/download/dbd-sybase-1.15/sybase.pm /root/.cpan/build/dbd-sybase-1.15-ttui0t/sybase.pm /root/.cpan/build/dbd-sybase-1.15-knqdf7/sybase.pm /root/.cpan/build/dbd-sybase-1.15-rzgcta/sybase.pm /usr/local/lib/perl/5.14.2/sybase.pm /usr/local/lib/perl/5.14.2/dbd/sybase.pm /usr/...

mysql - Insert based on conditions -

i trying insert data in mysql table. have option in opencart option_id = 6, want insert products containing option_id=6 new option option_id=9. insert oc_product_option (`option_id`) select 9 (select `option_id` oc_product_option `option_id` == 6); is not working. how can give condition in opencart? edit: here more information. have 1 option color 1 assigned thousands of products. trying assign color 2 products containing color 1. color1- option id = 6 color2- option id = 9 in opencart, mysql db tables oc_product_option , oc_product_option_value. in oc_product_option have fields product_id, product_option_id(auto incremental-no need update), option_id so doing selecting option id of color 2 -9 , assigning products option id = 6 if got right query must like: insert oc_product_option (`product_id`,`option_id`) select product_id,9 oc_product_option `option_id` = 6;