Posts

Showing posts from April, 2010

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;

Cocoa osx NSButton show text when mouse over -

Image
in application mac want show info text when users moves mouse pointer on button. this: how can achieve correctly? thanks in advance. this works me in xcode 6.2: in identity inspector(the pane on right hand side in image below), in tool tip section enter "sad face":

android - onOptionsItemSelected is never called -

i'm following tutorial , , i'm writing simple activity . ... update : after tips i've edited app, method onoptionsitemselected() still not called when select item popup menu. popup menu inflated when user click on item action bar. the activity: public class map extends appcompatactivity implements googlemap.onmaplongclicklistener, googlemap.onmarkerclicklistener, googlemap.onmapclicklistener, onmapreadycallback, resourcestate.onresourcestatechangelistener { ... @override public boolean oncreateoptionsmenu(menu menu) { map.menu = menu; getmenuinflater().inflate(r.menu.map_menu, menu); return super.oncreateoptionsmenu(menu); } @override public boolean onoptionsitemselected(menuitem item) { switch (item.getitemid()) { ... case r.id.menu_item_map_type: // here show popup popupmenu popup = new popupmenu(this, findviewbyid(r.id.menu_item_map_type)); popup.getmenuinflater().inflate(r.

Google URL Shortener automatically visits my links on shortening -

when use google url shortener shorten links, see in useragent logs being automatically visited right on creation. can explained in way? most visited in order build preview shown on every link.

How can I trace Operational Analytics in MobileFirst Platform 6.3 to determine why data is being lost? -

i'm working in scenario trying operational analytics working within mfp 6.3 environment. there mobilefirst client application (hybrid, if matters), mfp 6.3 server, , operational analytics server (the system dev/test only, lightly loaded, , no uptime/performance concerns exist). currently, seeing intermittent problems, data appears in operational analytics console on adapter invocations etc., , periods (sometimes days) go past no data showing up. how can trace or log behaviour of operational analytics engine? understand it, there queueing mechanism on mfp 6.3 server (currently wl.analytics.queue=1 , wl.analytics.queue.size=0 ) forwarding data client oa server. there way see messages put or got queue? this environment uses nd. from ibm engineer: ibm mobilefirst platform 6.3 not provide traceability options in mfp operational analytics component. improved in mfp 7.0 in log output various analytics components, including queues , sender embedded in mfp ser

javascript - OpenLayers (2.13.1) zoom/pan has stopped working -

i have legacy product utilises older version of openlayers (specifically 2.13.1 - had on sversion 2.12 , upgraded 2.13.1 see if rectified problem - didn't). the problem recently, without code changes having been made, zoom in/out , drag-panning not work - map stays is, zoomed in @ initial level. i can see whenever zoom or pan controls triggered, request made google maps url (e.g. http://maps.googleapis.com/maps/api/js/staticmapservice.getmapimage?1m2&1i524027&2i524088&2e2&3u12&4m2&1u523&2u400&5m5&1e3&5sen-us&6sus&10b1&12b1&token=39368 ) however can see returns blank, black image. i can find no sign of functionality having been deprecated , i'd avoid inherent time cost of upgrading version 3 on legacy application. any ideas? appreciated.

javascript - Why does jQuery or a DOM method such as getElementById not find the element? -

what possible reasons document.getelementbyid , $("#id") or other dom method / jquery selector not finding elements? example problems include: jquery silently failing bind event handler, , standard dom method returning null resulting in error: uncaught typeerror: cannot set property '...' of null the element trying find wasn’t in dom when script ran. the position of dom-reliant script can have profound effect upon behavior. browsers parse html documents top bottom. elements added dom , scripts (generally) executed they're encountered. this means order matters. typically, scripts can't find elements appear later in markup because elements have yet added dom. consider following markup; script #1 fails find <div> while script #2 succeeds: <script> console.log("script #1: %o", document.getelementbyid("test")); // null </script> <div id="test">test div</div> <

c# - Convert datetime to string always defaults to system time zone offset, Need to get the users timezone offset in the result -

i have code user enters datetime , timezone in dates needs converted , format in end date should be. below code. the code converts datetime timezone user has entered when formatting datetime, date time offset value defaulted systems time zone offset. example when convert date 2014-10-30t08:01:01-06:00(central time) pacific standard time , format it. result 2014-10-30t06:01:01**-06:00** , should 2014-10-30t01:01:01**-08:00** offset value defaulted systems time zone central time. datetime inputtime; string timezoneid; string outputdateformat; inputtime = "2014-10-30t08:01:01-05:00" timezoneid ="pacific standard time". outputdateformat ="yyyy-mm-ddthh:mm:ss zz" datetime finaloutputtime = timezoneinfo.converttimebysystemtimezoneid(inputtime,timezoneid); string finalformatteddate =finaloutputtime.tostring(outputdateformat); you can use datetimeoffset instead of datetime handle this: datetimeoffset time = datetime

translation - Load .mo files in C -

i've been working on project, , i've decided make translation files, have translated .po files, don't know how use on c, have make .mo files using .po (no mattter that). i've been looking around i've found answers php (like one: how run or load .po/.mo files localization in php ) nothing c if me great. you don't load files directly, that's done gettext. see the manual . it's long, it's pretty good.

javascript - Find/recenter arbitrary node in d3 force-directed layout -

i have force-directed graph large number of nodes (thousands) - volume of data makes specific node difficult locate in graph. love have way search specific node, , recenter graph on it. is parsing force.nodes() specific data value , somehow recentering graph on node? or more complicated that? not troublesome. once you've identified special node, re-run layout own tick handler. in tick handler, set special node's x , y properties keep centered. layout algorithm adjust other nodes accordingly. for smoother user experience, incrementally move node it's starting position center within tick handler.

appcompat - Missing resources for Android CardView library -

i'm using cardview in project , i'm getting error on older devices: e android.view.inflateexception: binary xml file line #25: error inflating class android.support.v7.widget.cardview e @ android.view.layoutinflater.createview(layoutinflater.java:518) e @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:570) e @ android.view.layoutinflater.rinflate(layoutinflater.java:623) e @ android.view.layoutinflater.rinflate(layoutinflater.java:626) e @ android.view.layoutinflater.inflate(layoutinflater.java:408) e @ android.view.layoutinflater.inflate(layoutinflater.java:320) seems similar few questions on such this one my problem solution questions feels hacky , that's understandable answer given last year when lollipop entered public preview. have things changed since? how resources?

python - Matplotlib Basemap not working Windows 8.1 -

i want plot gps-data using python 2.7 using matplotlibs basemap. i download binary windows installer , executes , run without problems. however, when try import , run in python get: from mpl_toolkits.basemap import basemap importerror: no module named basemap i tried the python setup.py and pip install basemap-1.0.8-cp27-none-win_amd64 in prompt seems succesful. geos, dependency should involved in basemap installer installed osgeo4w64 separately make sure geos_c , init in place. i hope can me out. feels above level. i have ofcourse looked through other threads on page, none of them seem offer solution. best regards instead of this: from mpl_toolkits.basemap import basemap do this: from mpl_toolkits.basemap import basemap check this well.

How can i identify the font with used for a specific textblock inside a pdf file with multiple fonts embedded? -

i used 2 fonts webpage , printed webpage pdf wkhtmltopdf. in pdf file 3 fonts embedded. copied whole text acrobat reader libre office writer. in libre office 2 fonts shown. how can identify font used specific textblock inside pdf file? how can extract text specific font pdf file? how can red inking text specific font inside pdf file? that's 3 questions. simplest solution: open firefox, about:config way pdfjs.bdfbugenabled setting , set true . open pdf file in firefox , select text care about. debug panel on right show fonts applied selected text. copy-paste, anywhere else, or export plain text pdf application. i have no idea you're asking here. if want edit pdf (which think you're asking) pdf needs have been built in way allows that. if has: use pdf editor acrobat need do. if hasn't: can't.

web services - Connect to webservice with certificate from java -

This summary is not available. Please click here to view the post.

c++ - XLL and EXCEL : Drag or Load -

i have problem loading xll excel. use xlw generate xll , , use excel 2007. when drag file on spreadsheet, can use xll functions, , works well. when load using excel-add in , file loaded none of functions there. i tried same thing excel 2010, , worse. when drag xll file spreadsheet, xll opened text file, , cant make work did in excel 2007, can load using excel-addin , cant of xll functions. do know problem ? edit : followed steps in following video : https://www.youtube.com/watch?v=_mpw5_jw7t4 edit 2 : in excel 2007, when drag xll spreadsheet, works dll missing in add-ins section.

how i can lock a javacard with a secret key? -

i installed applet on javacard without problem, problem can delete applet or install applet,so want lock card, how can ?? thanks like this: https://github.com/martinpaljak/globalplatformpro#lock--unlock-usage and sure save new key somewhere safe.

increment - Java Initialize Variable Incremented -

is risky initialize global variable increment of global variable? example: int a=0; int b=a++; int c=a++; int d=a++; this should output: 0,1,2,3 could happen compiler read global value before other? it behave expected. if try use field before it's defined, compiler throw error: public class foo { int = b++; //compiler error here int b = 0; } this covered in jls 8.3 for case, output of variables if they're not modified, be: a = 3 b = 0 c = 1 d = 2

html - NoMethodError in StaticPages#home when attempting to list database query -

ruby noob here, created search form , trying query db , display results. getting nomethoderror in staticpages#home along with.... /home/action/projects/codoncodertest5/app/views/static_pages/home.html.erb line #4 raised: undefined method `each' nil:nilclass where going wrong? layouts/staticpages/home <h1>staticpages#home</h1> <% @data_bases.each |list| %> <div class="list"> <h1 class="list-mrnacodon"><%= link_to list.mrnacodon %></h1> </div> <% end %> controller class databasecontroller < applicationcontroller def new end def index if params[:search] @data_bases = match.search(params[:search]).order("created_at desc") else @data_bases = match.order("created_at desc") end end end the error means @data_bases in view evaluating nil. makes sense, since way view staticpages#home have access variable if

DotCover: How to remove code coverage highlighting from your code -

Image
i using jetbrains' dotcover writing units tests in .net application. dotcover highlights whole code base either green or red based on code coverage, want remove highlights after i'm done checking code coverage. there anyway other quitting visual studio, removing test results folder and.dotuser file, , restarting visual studio? you can switch highlighting on , off pressing ctrl + alt + k , h . or can click "highlight code" on toolbar of "coverage results" window.

PHP - PDO error -

this question has answer here: syntax error due using reserved word table or column name in mysql 1 answer i'm getting error pdo: pdostatement::execute() [pdostatement.execute]: sqlstate[42000]: syntax error or access violation: 1064 have error in sql syntax; check manual corresponds mysql server version right syntax use near 'key, pseudo, ip, date) values ('mykeyperso', 'mrthebigbosseur', '86.208.78.145',' @ line 1 in /home/a1394006/public_html/api/skype.php on line 51 and don't know why my source code: $req = $bdd->prepare('insert logs (key, pseudo, ip, date) values (:key, :pseudo, :ip, :date)'); $req->bindparam(":key", $key1, pdo::param_str); $req->bindparam(":pseudo", $pseudo1, pdo::param_str); $req->bindparam(":ip", $ip1, pdo::param_str); $req->bindparam(&qu

ruby on rails - Fog issue using iam profile and fetching urls from aws -

using fog w/ aws instance profiles , after 3 day s3 urls no longer working. i'm getting fresh urls, error returned aws provided token has expired. restarting application gets working again, no errors other 1 aws present. i have read switching keys should fix issue, hoping keep iam profile. has run this? my carrierwave config bellow , using carrierwave version 0.9.0 , fog 1.28.0 carrierwave.configure |config| fog_credentials = { :provider => 'aws', :region => 'us-east-1', :path_style => true, :host => 's3-external-1.amazonaws.com' # routes requests northern virginia datacenter } if defined?(settings.use_iam_profile) && settings.use_iam_profile fog_credentials[:use_iam_profile] = true else fog_credentials[:aws_access_key_id] = settings.s3_access_key fog_credentials[:aws_secret_access_key] = settings.s3_secret_key end config.fog

java - Is my ExpirableLazyObject not thread safe? Is there a race condition? -

a while back, created java class encapsulates lazy initialization lazyobect . maintains concurrency , threadsafety , provides reset() method clear value. public final class lazyobject<t> { private volatile t value; private volatile boolean updated; private final supplier<t> supplier; private lazyobject(supplier<t> supplier) { this.supplier = supplier; } public t get() { if (!updated) { synchronized(this) { if (!updated) { value = supplier.get(); updated = true; } } } return value; } public void reset() { if (updated) { synchronized(this) { if (updated) { updated = false; value = null; } } } } public static <b> lazyobject<b> forsupplier(supplier<b> supplier) {

Tabs keep disappearing on Visual Studio -

Image
tabs keep disappearing on visual studio 2013 ultimate. below screenshot of how tabs rows different window sizes. on both screenshots, both files open when window's maximized (or larger) can see 1 of tabs. if resize window make smaller, other tab shown. happens if set pinned tabs shown on same row. need not consistent (it doesn't happen always) , occurs on 1 of dev machines. i've updated video drivers (nvidia) , reinstalled windows on machine. they don't disappear, file not shown on tab due size issues when space constrained. to it, select arrow drop down list 'hidden' files not shown. above yellow triangle. or selct white triangle right scroll next file hidden. once moved right, there left pointing arrow on opposite side move left hidden files. from extensions , updates download "productivity power tools" allows tabs colored (as shown above) , placed, left, right or bottom. prefer left, no files hidden listed horizontally.

Links dont work (beginner html css only) -

i've had through questions thought similar mine turns out beginner questions advanced me! for reason links in header , footer work, not in side bar or main body, please explain me why , how can fix it? i've opened html without css , works fine then, dont know how css make link invalid :s code here: http://codepen.io/anon/pen/gppbmp im "pretty" sure css thats messing things ive pasted down there, codepen has html :) (i aware super basic, first try , has start somewhere! :)) body { font-family: "helvetica"; background: #dcdcdc; } header { font-size: 12px; color: black; text-decoration: none; } .side { font-size: 12px; color: gray; text-decoration: none; } .product { font-size: 12px; color: gray; text-decoration: none; text-align: center; } .product p { font-size: 12px; color: gray; text-align: center; } footer { font-size: 12px; color: gray; text-decoration: none; } body a:hover { color: #ff0066

javascript - Highcharts skip non-provided steps in a series -

i have bar chart in high chart. send items x & y. happened x-values numerics. in such case, assumes there missing entries , add missing entries. want force high chart not include assumed items. possible without using categories? http://jsfiddle.net/96bk4661/1/ $(function () { $('#container').highcharts({ "chart": { "type": "column" }, "series": [{ "name": "x-axis", "data": [ [1, 77926], [2, 71245], [4, 75275], [5, 78175], [6, 75369], [7, 78145], [8, 77638], [9, 75706], [12, 77491] ], "color": "#1aa4d5" }] }); }); this 1 different http://stackoverflow.com/questions/15973457/automatically-join-missing-data-gaps-in-highcharts-js don't w

model view controller - Spring Security Custom Authfilter doesnt work -

i working in personal project , using spring web mvc , spring security 4, annotation based configs, , custom usernamepasswordauthenticationfilter never reached, losing it, search can solved, if help, 'd grateful, here code spring initialization @order(1) public class springmvcinitializer extends abstractannotationconfigdispatcherservletinitializer { @override protected class<?>[] getrootconfigclasses() { return new class[]{appconfig.class}; } @override protected class<?>[] getservletconfigclasses() { return null; } @override protected string[] getservletmappings() { return new string[]{"/"}; } } security initialization @order(2) public class securityinitializer extends abstractsecuritywebapplicationinitializer { } spring beans declarations , context stuff @enablewebmvc @configuration @componentscan({"app","server"}) @import({ securitycontext.class }) public

spring - Maximum number of Quartz nodes in a cluster? -

i'm working on system uses quartz in cluster-mode , have 18 servers in cluster. problem we're facing jobs executed twice , jobs 'stuck' in acquired state or other weird issues. i read documentation says: the scheduler makes use of cluster-wide lock , pattern degrades performance add more nodes (when going beyond three nodes - depending upon database's capabilities, etc.). we have lots of warnings this: [warn o.s.s.q.localdatasourcejobstore - scheduler instance (xxx) still active recovered instance in cluster. may cause inconsistent behavior. we have synchronized clock on machines in cluster. my questions are: does else have big cluster of quartz instances , experiences similar problems? is quartz limited maximum 3-4 machines per cluster? are there work-arounds this?

mysql - Improve database design for online exam -

i working on multiple choice online test project here have designed database store result looking more optimized way. requirements: every question have 4 options. only 1 option can selected , needs stored in database. my design: tables: students stud_id, name, email tests test_id, testname, duration questions que_id, question, opt1, opt2, opt3, opt4, answer, test_id answers stud_id, que_id, answer by way answers can stored increase number of records every question solved student new record added in answers table. e.g. 1 test consists 100 questions , 1000 students take test, every student there 100 records each question , 1000 students 100k records. is there better way number of records less. initial response understanding data you have done work. far data concerned, design correct, incomplete. there 2 errors: opt1…opt4 repeating group, breaks 2nf. must placed in separate table. further, there seems no option name or descr

sql - basic php else if not working -

i have php validation user signup form. it's validating input if correct else @ end, checks see if username in use , if not creates record in database. reason last else doesn't activated , refreshes data still in input boxes. can't find problem anywhere!! if(isset($_post['user'])) { $firstname = sanitisestring($_post['firstname']); $surname = sanitisestring($_post['surname']); $user = sanitisestring($_post['user']); $pass = sanitisestring($_post['pass']); $email = sanitisestring($_post['email']); $dateofbirth = sanitisestring($_post['dateofbirth']); $gender = sanitisestring($_post['gender']); $test_arr = explode('-',$dateofbirth); if($firstname == "" || $surname =="" || $user == "" || $pass == "" || $email == "" || $dateofbirth == "" || $gender == "") {$error = "not fields ent

javascript - Ajax jQuery load in 9 divs at a time -

i'm having div looks this: <div class="all_articles third_article_module"> <!--load in content loadmore.html via ajax --> </div> i have show me more text looks this: <div class="showmemore"> <h2>load more articles</h2> </div> my loadmore.html page loops through , show articles. ting want show number of articles each time (for example 9) , h2 tag appends end of div. when there's no more articles left want h2 tag hidden. js looks this: $('.showmemore_inner h2').on("click", function(e){ e.preventdefault(); $('.third_article_module').load('loadmore.html'); }); $(document).ajaxstart(function(){ $(show_header).text('loading more articles').css('color', '#4c4c4e'); $('.showmemore .showmemore_inner h2 span').css('display', 'block'); }); $(document).ajaxcomplete(function(){ $('.showmemore').app

r - Unexpected symbol in read.table -

i trying read data with: data <- read.table('pwaves.txt', header=true, row.names=1, sep='\t') works ok,except got x in front of each number.like this: x5 x6 x7 fcm 13.0 12.5 11.8 gk 10.9 10.5 10.2 gg 12.0 11.0 10.8 why? isn't because headers numeric, r checks , transforms it. try add check.names=false data <- read.table('pwaves.txt', header=true, row.names=1, check.names=false, sep='\t')

Firefox Network Monitor Request Size -

firefox network monitor lists column size of request, not specify if it's total size of outbound , inbound traffic, or outbound. is there way measure request's outbound traffic size (post data + headers + cookies) not involve installing wireshark? there no way see full size - i've logged this bug track issue. think it's idea.

php - Yii2 custom sql query in gridview -

i'm quite new yii2. i'm using advanced structure i need show custom sql result in view without using model because display sql view. index.php <?= gridview::widget([ 'dataprovider' => $dataprovider, 'columns' => [ ['class' => 'yii\grid\serialcolumn'], 'cod_risorsa', [ 'label' =>"nome", 'attribute' => 'nome', 'value'=>function($data){ return $data["nome"]; } ], 'cognome', ['class' => 'yii\grid\actioncolumn'], ], ]); ?> vrisorsecontroller.php public function actionindex() { $totalcount = yii::$app->db->createcommand('select count(*) v_risorse')->queryscalar(); $dataprovider = new sqldataprovider([ 'sql' =&

javascript - Why do I have to check for length === 0 to restart the slides? -

i'm following codecademy "make interactive website" course. don't have error, had question don't understand: if-statement used in slide thing thing thing. if (nextslide.length === 0) { nextslide = $('.slide').first(); nextdot = $('.dot').first(); }; this if-statement after last slide go first slide. why nextslide.length === 0 ? jquery: var main = function() { $('.dropdown-toggle').click(function() { $('.dropdown-menu').toggle(); }); $('.arrow-next').click(function() { var currentslide = $('.active-slide'); var nextslide = currentslide.next(); var currentdot = $('.active-dot'); var nextdot = currentdot.next(); if (nextslide.length === 0) { nextslide = $('.slide').first(); nextdot = $('.dot').first(); }; currentslide.fadeout(600).removeclass('acti

php - Showing images from multi-page galery in continuus lightbox -

i looking solution using lightbox possible see images while these images spread on multiple pages in multi-paged gallery (page 1-2-3-...). now can see images in lightbox on current page - offcourse - normal. tips or tricks there still able scroll on images have? <div class="row" id="gallery"> <?php $page = isset($_get['page']) ? $_get['page'] : 1; $start = ($page - 1) * $images_per_page; $end = $start + $images_per_page; if ($end > $total) { $end = $total; } ($i = $start; $i < $end; $i++) { ?> <div class="col-lg-4 col-md-4 col-xs-6"> <a class="fancybox" rel="group" href="<?php print '/upload/files/'.basename($images[$i]); ?>"> <img src="<?php print '/upload/.thumbs/files/'.basename($images[$i]); ?>" alt="restau

osx - Problems installing Homebrew on a new OS X installation (SSL error) -

have fresh os x installation here (new vm), , when trying install homebrew ssl error. fatal: unable access 'https://github.com/homebrew/homebrew/': unknown ssl protocol error in connection github.com:-9847 failed during: git fetch origin master:refs/remotes/origin/master -n --depth=1 this command i'm using: ruby -e "$(curl -fssl https://raw.githubusercontent.com/homebrew/install/master/install)" checked around little bit , tried adding --insecure (or -k) , removing s https, doesn't seem help. --insecure server aborted ssl handshake. anybody have idea wrong here? "xcode-select --install" has been run well. edit: following suggestion below dumped packaged tcpdump pcap file , opened tshark. i'm getting: 1 0.000000 my_ip_removed -> 192.30.252.130 tcp 78 49451→443 [syn] seq=0 win=65535 len=0 mss=1460 ws=32 tsval=170479114 tsecr=0 sack_perm=1 2 0.128228 192.30.252.130 -> my_ip_removed tcp 78 443→49451 [syn,

windows phone 8.1 - How to write part of the app on azure? -

hi hope question asked right way i have been researching hours , can't me achieve want... here's thing developing windows phone app uses cloud features (like sql azure,authentication,etc...) , had in mind want divide code 2 parts: the first on cloud handles operations , logic makes use of cloud , take different parameters input the second part on phone interface , local operations i want in future can write ios , android versions of app minimum code also if of please provide links beginner level mobile azure programmer very grateful since tutorials seem assume previous experience or outdated....i used azure before never mobile developer you can use azure mobile services backend apps , in front, can use ionic / cordova / phonegap build views using html5 / css3 , compile ios / android / windows phone. please check channel9 links: https://channel9.msdn.com/tags/windows+azure+mobile+services https://cordova.apache.org/ http://cordova.apache.org/docs

sql server - Where to Store sensitive data/information -

i have two factor authentication system need store auto generated code , requested time in form storage retrieving later purpose. need know best way store these sensitive information. i planning use session store sensitive information. when googled, in places people telling not recommended use session store sensitive information. can body explain why so. any suggestion highly appreciated. thanks in user database fine, it's web app database should hidden end users (if managed). the rest making sure actual application secure -- ie no sql injections, no buffer overflows, proper workflows pass through server side authentication engine etc.

android - How to use setLabelCount(...) in MPAndroidChart? -

Image
i using mpandroidchart library . i have used barchart.getaxisleft().setlabelcount(5); , returns labels 0.00, 20.00, 40.00, 60.00 want 0.00, 25.00, 50.00, 75.00, 100.00 . i want show 100 also. there possibilities? update i have added following lines, barchart.getaxisleft().setaxismaxvalue(100); barchart.getaxisleft().setaxisminvalue(0); barchart.getaxisleft().setlabelcount(5); now output is 0.0, 20.0, 40.0, 60.0, 80.0, 100.0 so changed following, barchart.getaxisleft().setaxismaxvalue(100); barchart.getaxisleft().setaxisminvalue(0); barchart.getaxisleft().setlabelcount(4); now output 0.0, 30.0, 60.0, 90.0 but need following output. 0.0, 25.0, 50.0, 75.0, 100.0 any highly appreciated. may set custom y axis value via valueformatter . such as: public class customvalueformatter implements valueformatter { public customvalueformatter() { } @override public string getformattedvalue(float value) { return (value/20)*25 + &

use CSS3 not selector to only select elements that are not children of certain element -

for example how change color of p not belong textarea element? p { color: #000; } textarea + p { color: #222; } p + textarea { color: #222; }

excel vba - How to autofit row using a variable -

i'm trying use vba in excel autofit row beforehand stored in variable, can't work. have ideas? sub test1() dim intyellowrow integer intyellowrow = 18 rows(intyellowrow & ":" & intyellowrow).entirerow .autofit end end sub you close: sub test1() dim intyellowrow integer intyellowrow = 18 rows(intyellowrow).entirerow.autofit end sub

xml - How to separate the attribute from xpath? -

i split attribute xpath . $xpath = "/configuration/system.servicemodel/services/service/endpoint/@binding" $node = $xpath.split("@")[0] $attribute = $xpath.split("@")[1] $attribute having correct value "binding" but node xpath "/configuration/system.servicemodel/services/service/endpoint/". there "/" @ end . want rid of that. how remove it? use -split operator: $xpath = "/configuration/system.servicemodel/services/service/endpoint/@binding" $node, $attribute = $xpath -split '/@', 2