Posts

javascript - Implement social buttons on unlimited/infinite scrolling website? -

i'm using jquery social-likes plugin implement social buttons on index page of ruby on rails based website. index page infinitely scrollable, when new content loaded, newly loaded item doesn't display social buttons. how can make re-rendering of these social buttons when new item loaded on runtime. thanks!

How to use Interceptor.Dll in C# and Kinect SDK to send keypresss event to DirectX Games? -

Image
i want send keyboard key events directx games using kinect. i using c# + kinect sdk, have tried interception.dll wrapper. but cannot implement interception in c# code. here code getting error: input input = new input(); input.keyboardfiltermode = keyboardfiltermode.all; input.load(); input.sendkeys(keys.up,keystate.down); input.unload(); screenshot:

php - UTF-8 all the way through -

i'm setting new server, , want support utf-8 in web application. have tried in past on existing servers , seem end having fall iso-8859-1. where need set encoding/charsets? i'm aware need configure apache, mysql , php - there standard checklist can follow, or perhaps troubleshoot mismatches occur? this new linux server, running mysql 5, php 5 , apache 2. data storage : specify utf8mb4 character set on tables , text columns in database. makes mysql physically store , retrieve values encoded natively in utf-8. note mysql implicitly use utf8mb4 encoding if utf8mb4_* collation specified (without explicit character set). in older versions of mysql (< 5.5.3), you'll unfortunately forced use utf8 , supports subset of unicode characters. wish kidding. data access : in application code (e.g. php), in whatever db access method use, you'll need set connection charset utf8mb4 . way, mysql no conversion native utf-8 when hands data off applicati...

analytics - How to perform approximate (fuzzy) name matching in R -

i have large data set, dedicated biological journals, being composed long time different people. so, data not in single format. example, in column "author" can find john smith, smith john, smith j , on while same person. can not perform simplest actions. example, can't figure out authors wrote articles. is there way in r determine if majority of symbols in different names same, take them same elements?

oop - Do "return success" methods violate the single responsibility principle? -

public class foolist { public boolean add(foo item) { int index = indexof(item.getkey()); if (index == -1) { list.add(item); } return index == -1; } } since adds item and returns success value, violate single-responsibility principle? if so, matter? an alternative throw exception: public class foolist { public boolean add(foo item) throws fooalreadyexistsexception { int index = indexof(item.getkey()); if (index == -1) { list.add(item); } else { throw new fooalreadyexistsexception(); } } } but this, too, violate single-responsiblity principle? seems method has 2 tasks: if item doesn't exist, add it; else, throw exception. bonus question: methods can return null violate single-responsibility principle? here's example: public class foolist { public foo getfoo(string key) { int index = indexof(key); return (index == -1) ? null...

php - Syntax error or access violation: 1064 ' brandname -

i'm getting error in magento script: product not added exception:exception 'pdoexception' message 'sqlstate[42000]: syntax error or access violation: 1064 have error in sql syntax; check manual corresponds mysql server version right syntax use near 's secret'' @ line 1' some background info: i have php script running on cron job add , update products. runs while now, got error. think it's because manufacturers name got apostrophe in it. have no clue how fix it. changing manufacturer's name not option. function addmanufacture($pid,$men){ $resource = mage::getsingleton('core/resource'); $readconnection = $resource->getconnection('core_read'); $query = "select manufacturers_id p1_manufacturers m_name='".$men."'"; $lastid = $readconnection->fetchone($query); $write = mage::getsingleton("core/resource")->getconnection("core_write...

java - Google Map V2 shows blank screen when downloded from google play store -

Image
i made simple maps project, works great when installing form eclipse onto tablet, however, when uploded google play store, turns out when download store, map blank, tried , realized true this how app looks when installing form eclipse device and how looks when downloded device google play store. this manifest <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.zivkesten.find_a_place" android:versioncode="5" android:versionname="1.4" > <uses-sdk android:minsdkversion="11" android:targetsdkversion="19" /> <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.write_external_storage" /> <uses-permission android:name=...