Posts

Showing posts from July, 2015

mysql - php missing entries in database -

i have 2 mysql tables shown. want code print 11 cow missing entry in 2 tables.since catdog has word dog similar. table 1 amount des 11 catdog 11 cow table 2 amount des 11 dog try this: select table1.* table2 right join table1 on table1.des concat('%', table2.des, '%') table2.des null; sqlfiddle

Custom title for android fragment using viewpager -

i want add custom title each fragment, in viewpager . how can implement. in below code, need add custom title fragmentmain , fragmentmore , fragmentchatview . thanks in advance. public class homeactivity extends fragmentactivity { // page adapter between fragment list , view pager public static pageradapter mpageradapter; // view pager public viewpager mpager; // activity data public string p2text, p3text; public static list<fragment> fragments;// = buildfragments(); // / arraylist<string> categories = {"1","2","3","4","5","6","7","8"}; arraylist<string> categories = new arraylist<string>(); static final string log_tag = "homeactivity"; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); fragments = new arra

javascript - AngularJS directive: Check if attribute is assignable -

i'm trying implement angularjs directive takes attribute-flag selected , indicates initial state + current value, if assignable. how can implement verification in angularjs directive see attribute assignable, before setting value in it? app.directive('customcontrol', [function () { return { restrict: 'e', scope: { selected: '=?', // optional, initial + current selected state; }, templateurl: 'views/directives/customcontrol.html', link: function (scope, elem, attr) { if (/* scope.selected assignable */) { scope.selected = /* value */; } } }; }]); you use $parse service that: link: function(scope){ var selectedget = $parse(attrs.selected); var selectedset = selectedget.assign; // etc... if (selectedset){ selectedset(scope.$parent, obj); } }

php - why hyperlink is not showing/working in gmail after sending password reset mail? -

Image
i sending email server password reset purpose. test purpose i'm sending gmail , yahoo mail . mail delivery gmail , yahoo mail both return link missing gmail , in yahoo shows garbage in <a> tag. i sending click here change password <a href="localhost:4778/resetrequest?id=25fafb03-9715-4003-80bf-e362259afa77">please click link</a> in gmail, showing need please. you need http protocol in href value. otherwise gmail not consider valid link <a href="http://localhost:4778/">some link</a>

python - Running Django management command from tests? -

i have django management command create materialized views on database, runs follows (i store database login details in environment variables): python manage.py create_db_matviews $db_name $db_user $db_pass the management command code looks this: class command(basecommand): def handle(self, *args, **options): db_name = args[0] db_user = args[1] db_pass = args[2] self.conn = psycopg2.connect(database=db_name, user=db_user, password=db_pass) now want run management command inside tests, materialized views created on test data. not work: def setupmodule(): # load fixtures, then... management.call_command('create_db_matviews', ['test', 'test', 'test'], verbosity=0) it fails follows: .... db_user = args[1] indexerror: tuple index out of range how can supply arguments management script in way wants? also, credentials should use access test database?

Change behaviour of Print button in ReportViewer C# -

Image
i using reportviewer , print report. when click on print button, dialog box opens. similar this. i program skip dialog , choose default printer. is there way 1 of following things: just skip dialog box map print button function wrote , prints report without showing dialog box: similar mybutton.click += new eventhandler(mybutton_click); i checked msdn found nothing alter default toolbar. edit: did find this discussion 2006, answer says not possible. guess hiding toolbar , creating own solution it's bit overkill. update: not duplicate. know there question called "how print reportviewer's report without showing form", in guy wants able choose between showing form , printing report. not problem. do want display form, , want when click on print button, prints report, without asking me printer use . i found solution ! more precisely found workaround enables call custom printing function. you need use print event of reportviewer.

sql server - Pdo mssql error messages -

i'm using pdo through freetds driver connect mssql database , i'd output detailed sql errors against generic one. e.g. got generic error pdo sqlstate[hy000]: general error: 547 general sql server error: check messages sql server [547] (severity 16) [(null)] but sql client gives me more details, , i'd them in php. e.g. in same case: the delete statement conflicted reference constraint "fkordiniclienti". conflict occurred in database "dbo.ordini", column 'idcliente' of database "dbname". i've read old note php / pdo / mssql how error informations? , i'd prefer avoid additional query. thanks. i think code doesn't matter, know what's wrong in sql, wanted access second code block php. i solved using odbc driver instead of freetds.

angularjs - How to get an empty (i.e. no-value) attribute in an HTML element in coffeekup's output? -

i'm trying started angularjs using coffeescript , coffeekup. angularjs capable of auto-bootstrapping itself when detects ng-app attribute on html element. according docs, should placed on <html> or <body> element. however, try load attribute value, if given, application root module. when placed on <html> element example, html should be <html ng-app> this output not seem achievable using coffeekup. tried following things: html 'ng-app': '' #prints <html></html> html '': 'ng-app' #prints <html ="ng-app"></html> html 'ng-app': ' ' #prints <html ng-app=" "></html> (still not wanted) to clarify: not want following: html 'ng-app': 'ng-app' #prints <html ng-app="ng-app"></html> since causes angularjs non-existent root module called ng-app . currently, i'm defining empty root module work

sql server - generate a map from an address or longitude and latitude -

i have sql server table "agency" creates following: create table agency ( agency_id int, agency_code varchar(20), agency_address varchar(100), agency_name varchar(100), longitude float, latitude float ) i coding in coldfusion , want generate maps each agency using longitude , latitude data or address. i search lot on internet did not find fast way many thousand row. can has idea this, or knows api generating map using longitude , latitude data? thanks

mongodb - Predefined Term Mapping -

i have not yet used elasticsearch please excuse bad description. know if possible configure elasticsearch following - had issues in mongodb full text search functionalities seem little limiting. here's problem - when search term korea not want match north korea or n. korea in document. the assumption search korea south korea . different synonym kind of opposite. phrase search south korea out of question here isn't applicable in problem. possible? i accept answers either mongodb or elasticsearch. what if use query one: { "query": { "bool": { "should": [ { "match": { "some_field": "korea" } }, { "query_string": { "query": "-some_field:(\"north korea\")" } }, { "query_string": { "query": "-s

java - Spring MVC, Tiles2, ThymeLeaf and Natural Templating -

how use thymeleaf natural templating while using tiles2 template engine. have simple tiles definition: <tiles-definitions> <definition name="/**;layout:*" template="templates/{2}_layout"> <put-attribute name="header" value="templates/header"/> <put-attribute name="content" value="/{1}"/> <put-attribute name="footer" value="templates/footer"/> </definition> ... </tiles-definitions> and layout <html lang="pl" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.springframework.org/security/tags" xmlns:tiles="http://www.thymeleaf.org"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <link rel="stylesheet" type="text/css" th:href="@{~/css/bootstrap.m

Run JavaFX app with external libraries in Android? -

i developed javafx application use rxtx library serial communication , in future use bluecove bluetooth. understanding there ways run javafx app on android devices, began research. the first option running "jar" packaged app android app "java manager". problem here wouldn't know external libraries, since there isn't standard jvm on android devices place them. found project " http://v-lad.org/projects/gnu.io.android/ ", seems it's oriented android applications. so when found " http://javafxports.org/ ", tried make first steps it. project seems need, i'm newbie in android , find documentation little bit confusing, i'm not sure start. moreover, i'm still not sure use java libraries in android approach. does know if pretend doable?? in case, steps should follow?? you can try javafxports plugin. it's in continuos development, recent versions mature enough use without problems. have @ basic requirements

php - Save cropped image in different width and height -

i using jcrop crop images. this form upload image , crop. <form id="upload_form" enctype="multipart/form-data" method="post" action="upload.php" onsubmit="return checkform()"> <!-- hidden crop params --> <input type="hidden" id="x1" name="x1" /> <input type="hidden" id="y1" name="y1" /> <input type="hidden" id="x2" name="x2" /> <input type="hidden" id="y2" name="y2" /> <div><input type="file" name="image_file" id="image_file" onchange="fileselecthandler()" /></div> <div class="error"></div> <div class="step2"> <h2

c++ - cvCaptureFromFile- Opening Video from specific path - Raspberry Pi -

i have opencv-2.4.9 installed in raspberry pi. right trying load video specific path , tried both c , c++ api c api: cvcapturefromfile(path); c++ api: videocapture cap; cap.open(path) i getting error , says not open file. it works in windows , linux, not in raspberry pi. missing something? c++ code: #include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(){ videocapture cap("c:/users/nava/videos/file.mp4"); if (!cap.isopened()){ cout << "error opening video stream" << endl; return -1; } while (1){ mat frame; if (!cap.read(frame)){ cout << "no frame available" << endl; waitkey(); } imshow("output", frame); if (waitkey(33) == 27) break; } } c code: #include "highgui.h" int main(int argc, char** argv) { cvnamed

javascript - JS: How to use abbreviations for full named variables? -

i prefer declare global variables @ beginning of code using self-explanatory, full-named variables: var $interval_start_dates = []; // date intervals var $interval_end_dates = []; var $interval_start_milli = []; // convert dates milliseconds var $interval_end_milli = []; var $interval_start_milli_sorted = []; // sort millisecond dates var $interval_end_milli_sorted = []; this naming convention results in long variable-names find unhandy when using them in code. therefore prefer use abbreviations variables in code: var _isd = $interval_start_dates; var _ied = $interval_end_dates; var _ism = $interval_start_milli; var _iem = $interval_end_milli; var _isms = $interval_start_milli_sorted; var _iems = $interval_end_milli_sorted; my questions in regard following: (1) possible output intermediate variable (e.g. $interval_start_dates) using abbreviation (e.g. _isd)? (2) naming convention result in worse performanc

java - One line check if String contains bannedSubstrings -

i have string title , list<string> bannedsubstrings . want perform 1 line check if title free of bannedsubstrings . my approach: if(bannedsubstrings.stream().filter(bannedsubstring -> title.contains(bannedsubstring)).isempty()){ ... } unfortunately, there no isempty() method streams. how solve problem? there 1 line solution? sounds want read on anymatch : if (bannedsubstrings.stream().anymatch(title::contains)) { // bad words! } inversely, there's nonematch : if (bannedsubstrings.stream().nonematch(title::contains)) { // no bad words :d } this isn't efficient if title long string (but titles aren't supposed long, suppose).

javascript - AngularJS Downloadify bind data -

i try download word document receive base64 string web services. on html page, ask user enter data populate word , when user click on button download word document. button --> send web service --> create word document --> send base64 --> download base64 word document i using downloadify make possible in ie9 the probleme downloadify ask filename , data on page load. information after user enter data on same page. downloadify.create('downloadify', { filename: filename, data: data, oncomplete: function () { alert('your file has been saved!'); }, oncancel: function () { alert('you have cancelled saving of file.'); }, onerror: function () { alert('you must put in file contents or there nothing save!'); }, transparent: false, swf: 'js/lib/downloadify/media/downloadify.swf', downloadimage: 'js/lib/downloadify/images/download.png', width: 100, he

Angular-translate: Set custom loader option from controller -

today, have config translateprovider looking this: app.config(['$translateprovider', function ($translateprovider) { $translateprovider.preferredlanguage('en-us'); $translateprovider.useloader('translationloader', { versionidentifier : 127} ); $translateprovider.usemissingtranslationhandler('missingtranslationhandler'); }]); the problem don't know value of formidentifier-option @ configuration time. value after resolving first state in ui-route. i've tried set translationprovides loader in state's controller, realized that's not possible :) any ideas? angular-translate allows use service loader long meets desired interface. doesn't restrict in ways of how pass additional parameters loader. so, may pass them want. for example, can set additional parameters directly loader. implement setters them on top of loader: module.factory('loader', [ '$q', function($q) { var myparam; var load

for loop - Replace the value of a specific element that is either divisible by 2, 3, or 2 and 3 PHP -

i don't know how change value of element if divisible 2, 3, or 2 , 3. wanted output 2 if divisible 2. 3 if divisible 3. , 1 if divisible 2 , 3. <?php ( $i = 1 ; $i <= 50 ; $i++ ){ if( $i % 3 == 0 && $i % 2 == 0 ){ echo "1 = "; } else if( $i % 2 == 0){ echo "2 = "; } else if( $i % 3 == 0){ echo "3 = "; } echo $i.', '; } ?> this output. don't want print numbers divisible 2, 3, , 2 , 3. 1, 2 = 2, 3 = 3, 2 = 4, 5, 1 = 6, 7, 2 = 8, 3 = 9, 2 = 10, 11, 1 = 12, 13, 2 = 14, 3 = 15, 2 = 16, 17, 1 = 18, 19, 2 = 20, 3 = 21, 2 = 22, 23, 1 = 24, 25, 2 = 26, 3 = 27, 2 = 28, 29, 1 = 30, 31, 2 = 32, 3 = 33, 2 = 34, 35, 1 = 36, 37, 2 = 38, 3 = 39, 2 = 40, 41, 1 = 42, 43, 2 = 44, 3 = 45, 2 = 46, 47, 1 = 48, 49, 2 = 50, i wanted output 1 below! 1, 2, 3, 2, 5, 1, 7, 2, 3, 2, 11, 1, 13, 2, 3, 2, 17, 1, 19, 2, 3, 2, 23,

Swift save cutom class in settings exception: 'NSInvalidArgumentException', reason: '*** -length only defined for abstract class -

hello try store custom object nsuserdefaults. used helpful post saving custom swift class nscoding userdefaults but following exception when try out 2015-05-12 11:05:14.994 kirchnertime[4424:75095] * terminating app due uncaught exception 'nsinvalidargumentexception', reason: '* -length defined abstract class. define -[project length]!' import foundation @objc(project) public class projectjobentity: nsdata, nscoding { private let _barcode: string private var _projectnumber: string private var _projectdescription: string private var _jobdescription: string public var barcode: string { { return self._barcode } } public var projectnumber: string { { return self._projectnumber } set { self._projectnumber = newvalue } } public var projectdescription: string { { return self._projectdescription } set { self._projectdescription = newvalue } } public var jobdescription: string { { return self._jobdescription } set { self._jobdes

AngularJS - Pass parameter to filter in custom directive -

i'm trying pass parameter (true, false) filter in custom directive, 'undefined'. <job jobs="jobs" activatefilter="activatefilter"> in controller (outside of customdirective): $scope.activatefilter = true; this directive: ... restrict: 'e', scope: { jobs: "=jobs", activatefilter: "=activatefilter" }, controller: controller, templateurl: "/views/templates/job.html" ... and template: ... data-ng-repeat="job in jobs | customfilter:activatefilter ... any ideas i'm doing wrong? activatefilter undefined. thanks!! try set attribute name lower case , dash-delimited: <job jobs="jobs" activate-filter="activatefilter"> see this under normalization , isolating scope of directive note: these =attr attributes in scope option of directives normalized directive names. bind attribute in div bind-t

how to implement multiple(for different game levels) leaderboard in android libgdx game? -

i having 3 different game levels.so there 3 different high scores need posted leaderboard on google play services. dont understand this. did have created method public void submitscoregpgs(int score); { games.leaderboards.submitscore(gamehelper.getapiclient(),"id", score); } public void getleaderboardgpgs() { if (gamehelper.issignedin()) { startactivityforresult(games.leaderboards.getleaderboardintent(gamehelper.getapiclient(), ""), 100); } else if (!gamehelper.isconnecting()) { logingpgs(); } } for submitscore() calling method on game on @ each level , sending high score there. but when call getleaderboardgpgs() show last level high score. so dont know how can implement multiple leaderboard. you should create multiple leaderboards , use different id's in code. this: (untested) private static string leaderboard0_id = ""; private static string le

java - Can Cassandra LWTs have an IF part in terms of a PRIMARY KEY -

do cassandra lightweight transactions use implied set, , can not have if part in terms of primary key? i ask because datastax cassandra java driver (version 2.1.5) throws invalidqueryexception while i'm preparing statement. exception message clear enough: primary key part name found in set part except query preparing not attempt set primary key. query is update operator set password = :password name = :name if name = :name; as can see, query set password , not set name ; name primary key operator table. exception message make sense if if name = :name of lightweight transaction implemented using set name = ... . if remove if name = :name part query, driver not complain trying set primry key. here full stacktrace: org.springframework.dao.invaliddataaccessresourceusageexception: primary key part name found in set part; nested exception com.datastax.driver.core.exceptions.invalidqueryexception: primary key part name found in set part @ com.example.a

jquery - read the contents of a".sql" file display it on a web page -

i have sql file stored in local pc. need display contents of file on webpage using jquery.any code snippet can make work ? i have tried using .load(path) function not getting result. here have tried: $(document).ready(function () { $("#query").change(function () { var query = $("#query option:selected").text(); var path = "./resources/web-inf/sqlqueries/" + query + ".sql"; alert(path); $("#queryta").load(path); }); }); query combobox list of available queries. based on option selected, need read contents of corresponding .sql file , display contents inside textarea id: queryta try this $(document).ready(function () { $("#query").change(function () { var query = $("#query option:selected").text(); var path = "./resources/web-inf/sqlqueries/&qu

tibco - Applying colors to Spotfire Table Headers -

how apply custom colors spotfire table/cross table headers? able apply colors table cells not table headers. appreciated. the alternative can imagine using label rendering, , replace text headers images. you'll need create image each possible value of axis...

activerecord - yii2 inserting 2 params as text inside dropdownlist -

here yii2 drop down list. <?php echo $form->field($model, 'param1')->dropdownlist( arrayhelper::map(model::find()->all(),'param1','param2'); it makes drop down list values of param1s , text choose of param2s. see param2 texts , choose 1 , corresponding param1 value goes server. no problem want same show user not param2 text want text constructed param2+ param3 . example of want. hidden value___________text 1_____________________alpha 2_____________________bravo 3_____________________lima hidden value___________text 1_____________________alpha- red 2_____________________bravo- white 3_____________________lima- blue is possible ? one of ways using built-in arrayhelper toarray() method. put in model: use yii\helpers\arrayhelper; ... public static function getlist() { $initialmodels = static::find()->all(); $models = arrayhelper::toarray($initialmodels, [ 'app\models\yourm

matlab - Errors in linking fortran code that imports a MAT-file -

this question has answer here: reading data matlab files c 1 answer i have import mat-file in fortran program. followed example file facing problems while linking. compilation happens fine. minimal code: #include "fintrf.h" program main use ssa use dmotifs use param implicit none ! mat-file declarations ! integer matopen, matgetdir integer matgetvariableinfo integer mp, dir, adir(100), pa integer mxgetm, mxgetn, matclose integer ndir, i, clstat character*32 names(100) !===========================! if(all(fnames(:)%fn .ne. argfun)) write(*,*) "no such motif: ",argfun write(*,*) "input format-> main <motifname>" stop else fin=fchton(argfun) y0=nm2m*analys(p,argfun) ! ==> open mat-file <== ! mp=matopen('./prms_lxr_29apr15.mat','r') if (mp .eq. 0) wr

c++ - How to define CWinThread in MFC? -

i have set int variable "editbox" control in c++/mfc . want change value in thread. i define thread bellow : cwinthread *pthread(); uint functionthread(cthdlg& d) { dword result = 0; int = 0; while (1) { if (i == 5000) = 0; d.m_text1 = i; i++; d.updatedata(false); } return result; } void cthdlg::onbnclickedok() { // todo: add control notification handler code here pthread = afxbeginthread(functionthread, thread_priority_normal); } where's problem? you should run code in debug mode , under debugger, see assertion. the problem mfc allows access window thread created window. in case means main thread can access windows, worker thread can not. updatedata accessing windows, not work in worker thread. so need signal worker thread main thread new value available , shall displayed. signaling can post window message dialog window ( postmessage ). sure not use sendmessage because block

r - constructing an error bar with compositional data -

Image
i have problem , there me. i have data set compositional data, each weekday of 160 weeks ratio of cars measured. sum of 3 ratios sum 1. there 3 types of cars in research. my task construct mean , 'error bar'. used following lines of code in r: day = rep(c("sunday","monday","tuesday","wednesday","thursday","friday", "saterday"),3) cars = c(rep("nissan",7),rep("toyota",7),rep("bmw",7)) y <- colmeans(datadag,na.rm=true) delta <- apply(datadag,2,sd,na.rm=true) df=data.frame(day,cars,y,delta) p<-ggplot(df,aes(x=day,y=y,group=device,color=device))+ geom_point() + geom_errorbar(aes(ymin=y-delta,ymax=y+delta),width=.6) print(p) the code above give following plot: the problem face error bounds exceeds 0 , 1 not possible because of compositional data. can tell me did wrong? your problem statistical, not r. assuming standard deviation "know" da

ruby - While I try install 'gem install watir' I get this error -

while try install watir, have following error, can please guide me how resolve problem? c:\>gem install watir -v 4.0.2 error: while executing gem ... (gem::remotefetcher::fetcherror) errno::econnreset: existing connection forcibly closed remote host. - ssl_connect (https://api.rubygems.org/api/v1/dependencies?gems=watir-webdriver) i using ruby 2.1.5 , watir 4.0.2. whenever see following error: errno::econnreset: existing connection forcibly closed remote host. but can access internet normally, has high possibility request has been blocked chinese governments' great firewall . in such case, can try changing dns settings 8.8.8.8 (google) if not in china, or can use taobao's mirror otherwise. see ruby.taobao.org details, if understand chinese. the worst case ip of server serving gem blocked great firewall. intercept tcp handshakes send rst packets both browser/client , server. in such case, have use proxy or vpn job done.

c++ - How to disable cout output in the runtime? -

i use cout debugging purpose in many different places in code, , frustrated , comment of them manually. is there way suppress cout output in runtime? and more importantly, let's want suppress cout outputs, still want see 1 specific output (let's final output of program) in terminal. is possible use ""other way"" of printing terminal showing program output, , when suppressing cout still see things printed using ""other way""? don't use cout debugging purposes, define different object (or function, or macro) calls through it, can disable function or macro in 1 single place.

How to distinguish changed data in CSV transferred over FTP using SymmetricDS -

i trying transfer changed data ftp server using symmetricds. and, able transfer successfully. csv file generated contains changed row_data i.e in case of 'update' event, row updated values there , 'insert' event, there row new values. here few points wondering about:- how distinguish between 'updated' row , 'inserted' row in csv file? also, 'delete' event, there no corresponding row in csv file. so, how fetch rows deleted? can please me out on one. if there's row old_data operation update , otherwise operation insert . not forget on target side symmetricds fallback update if there's row same primary key though old_data empty, i.e on source node there insert , vice versa. are on_delete triggers declare @ all? easiest check list of defined triggers in db , find out if on_delete present. other way delete row, commit , select * sym_data order data_id desc verifying delete data has been captured on delete .

Python datetime.strptime - Converting month in String format to Digit -

i have string contains date in format: full_date = "may.02.1982" i want use datetime.strptime() display date in digits like: "1982-05-02" here's tried: full_date1 = datetime.strptime(full_date, "%y-%m-%d") when try print this, garbage values built-in-67732 going wrong? strptime() method not accept string values? your format string wrong, should this: in [65]: full_date = "may.02.1982" import datetime dt dt.datetime.strptime(full_date, '%b.%d.%y') out[65]: datetime.datetime(1982, 5, 2, 0, 0) you need call strftime on datetime object string format desire: in [67]: dt.datetime.strptime(full_date, '%b.%d.%y').strftime('%y-%m-%d') out[67]: '1982-05-02' strptime creating datetime format string, not reformat string datetime string. so need create datetime object using strptime , call strftime create string datetime object. the datetime format strings can found in docs explanatio

c# - Making one function instead of two -

i have 2 functions: public list<string> getallproperties1() { list<string> output = new list<string>(); foreach (myitem item in getitems()) { if (!output.contains(item.property1) && item.property1 != null) { output.add(item.property1); } } return output; } public list<string> getallproperties2() { list<string> output = new list<string>(); foreach (myitem item in getitems()) { if (!output.contains(item.property2) && item.property2 != null) { output.add(item.property2); } } return output; } i renamed functions, items , properties make things more simple. want 1 function, may more simple - instead of these two. how achieve this? property1 , property 2 both string properties. do need methods this: list<string> alluniqueprop1 = getitems() .select(x => x.property1)

excel vba - VBA: copy whole column content starting for a specific and and the data below it -

the thing want copy column want copy data on specific cell , data below it. let example, want copy cell c5 , below, disregard c1 c4. possible? further comments below question, here 1 way. work in scenarios. whether have blank cells or not... option explicit sub copycells() dim ws worksheet dim rng range dim srow long, lrow long '~~> change relevant worksheet set ws = thisworkbook.sheets("sheet1") srow = 5 '<~~ starting row ws '~~> find last row in col c lrow = .range("c" & .rows.count).end(xlup).row '~~> if last row < start row if lrow < srow msgbox "start row cannot greater last row" else '~~> create range set rng = .range("c" & srow & ":c" & lrow) '~~> copy rng.copy ' ' want copied data

javascript - how to imelement node.js WebSocket support? -

i read node.js can worked websocket client. my question how support websocket api in node.js server side? need install support that, or imepements build-in functions? you can use socket.io , has both library client side , server side (node.js)

FIX API quickfix multithreading -

what proper way of connecting mulitple servers/acceptors using quickfix? create thread each session under fix application create seperate application each session, create multiple initiators, start each initiator in seperate thread and related issue - how multithreadedinitiator class fits in...? quickfix allows multiple sessions. have defined in configuration file. on can track messages using sessionid. i think multithreadedinitiator ensures each session created in different thread.

Unity3d and probably NGUI causing crash on nexus 6 (5.1) -

i getting following crash on nexus 6(5.1 os) device. unable make out causing kind of crash , how approach it. appreciate help. unity3d version : 4.6.5f1 ngui version: 2.6.4 crashlog device: 05-12 11:22:02.401: e/chromium(7468): ### webview version 42.0.2311.138 (code 2311138) 05-12 11:22:02.401: e/chromium(7468): --------- beginning of crash 05-12 11:22:02.401: a/libc(7468): fatal signal 11 (sigsegv), code -6, fault addr 0x1d2c in tid 7489 (main) 05-12 11:22:02.474: i/debug(353): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 05-12 11:22:02.474: i/debug(353): build fingerprint: 'google/shamu/shamu:5.1/lmy47i/1767468:user/release-keys' 05-12 11:22:02.474: i/debug(353): revision: '33696' 05-12 11:22:02.474: i/debug(353): abi: 'arm' 05-12 11:22:02.474: i/debug(353): pid: 7468, tid: 7489, name: main >>> com.xxx.xxxx <<< 05-12 11:22:02.474: i/debug(353): signal 11 (sigsegv), code -6 (si_tkill), fault addr 0xc 05-12 11:22:0

how to inactivate user in wordpress -

i want inactivate user in wordpress , block him login. have updated user_status 2 in wp_users table. , working fine. following article shows user_status has no value in wordpress. [link] https://wordpress.org/support/topic/what-is-the-status-of-user_status so, can suggest how inactivate user block him login use word press plugin account locker lite provide facilities block user out delete user account in word press , inactivate user block him logging.

Facebook not scraping the url on doing manual request still returns status 200 OK -

i'm sending request on graph endpoint manually clear facebook graph cache url, whenever page's sharable content (image specially) changed, using: post: https://graph.facebook.com?id=http://www.merainstitute.com/vibrant&scrape=true (source: https://developers.facebook.com/docs/sharing/opengraph/using-objects#update) adround 10-12 days ago working perfect. whenever changed image , ran url facebook cleared cache , show latest image. but not working . i've changed nothing in code, i've checked og meta properties, checked og:image url accessible , pointing latest image, same , according specification. you can check meta tags on embedded url maybe i'm doing wrong. please help. well bug in facebook platform api , reported as: https://developers.facebook.com/bugs/1565027973760906/ and best part have fixed it.

algorithm - locality sensitive hashing for infinite feature space -

i'm trying wrap head around locality-senstive hashing in case when can not enumerate possible features (e.g. facebook likes when comparing users). there solutions adressing problem? the locality-sensitive hashing algorithms i've seen far depend on finite vectors of length k k total number of features (e.g. words). in case, not know total set of features beforehand, still want find n-nearest neighbours new item in database. given targeted size of database, re-calculating pairwise similarity each insert not feasible. how can tackle problem? has encountered similar problem , found solution?

java - How to login in JIRA using REST API and POST issue -

actually task post bug in jira excel sheet. now able post bugs in bugzilla. please 1 me java code how login , post bug using rest api. have example in perl, in java. i tried following code, i'm able login perform tasks using jira rest api. httppost httpost = new httppost("https://id.atlassian.com/login?continue=https://jira.atlassian.com/secure/dashboard.jspa&application=jac"); list<namevaluepair> nvps = new arraylist<namevaluepair>(); nvps.add(new basicnamevaluepair("username", "sxxxxxxx@live.com")); nvps.add(new basicnamevaluepair("password", "xxxxxxxxxn")); nvps.add(new basicnamevaluepair("csrftoken", xcrftokenval)); nvps.add(new basicnamevaluepair("continue", "https://jira.atlassian.com/secure/dashboard.jsp")); nvps.add(new basicnamevaluepair("application", "jac")); httpost.setentity(new urlencodedformentity(nvps));

ruby - Decode a signed cookie in rails? -

so have signed cookie has following value ijvvvgdiow1puu44qkk5nfzzul9udnci--a3c3b748fd207ba1c537b590dd458b4855677146 i need decode , following value 5otgh9miqn8bi94vyr_tvw i tried base64.decode64(cookie_value.split('--').first) but gives me wrong value, adds these damn slashes in string end "\"5otgh9miqn8bi94vyr_tvw\"" but gives me wrong value, adds these damn slashes in string end with "\"5otgh9miqn8bi94vyr_tvw\"" its not adding slashes. issue here returned string included between double quotes " . \" here escape character. here: base64.decode64 "ijvvvgdiow1puu44qkk5nfzzul9udnci" # => "\"5otgh9miqn8bi94vyr_tvw\"" puts base64.decode64 "ijvvvgdiow1puu44qkk5nfzzul9udnci" # "5otgh9miqn8bi94vyr_tvw" as problem unwanted " s. can remove them follows: base64.decode64(cookie_value.split('--').first).chomp('"'

ios - What sort of regex is this? -

i found using regex this: nsstring *pattern = @"i[\\p{alphabetic}&&\\p{uppercase}][\\p{alphabetic}]+"; [nsregularexpression regularexpressionwithpattern:pattern options:0 error:null]; // source: http://www.objc.io/issue-5/getting-to-know-textkit.html // tested. works. the regular expression looks pretty cool , readable (supposedly more compatible unicode). can find more info on kind of regex? cocoa-only kind of thing? edit : found comprehensive answer here . i guess (might totally wrong), kind of regularexpression used unicode property name expression, mentioned. can use nsregularexpression class. references can found here apple developer page. , secondly unicode.org page. hope helps.

c++11 - C++ dynamic array ADT -

what trying create dynamic array keep track of annual salary increase rate since year of employment. have finished dynamic array. not sure if guys need header file too, here's i've got far. #include "employee.h" #include <string> #include <iostream> #include <sstream> //default constructor employee::employee():person() { years_employment = 0; annualsalary_increaserate = null; } employee::employee(int newid, string newname, dayofyear date, int day, int month, int year, int employ_years, double bsalary, double asalary): person(newid,newname,date), eday(day), emonth(month), eyear(year), years_employment(employ_years), basesalary(bsalary), annualsalary(asalary), annualsalary_increaserate(null) { } //destructor employee::~employee() { if (annualsalary_increaserate !=null) { delete [] annualsalary_increaserate; annualsalary_increaserate = null; years_employment = 0; } } //call copy constructor of