Posts

Showing posts from May, 2015

javascript - want to update dropdown in each row in the database using Ajax -

Image
here ui screenshot. highlighted dropdown what want? as select option in dropdown should updated particular row in database using ajax below codes i've written. i'm beginner, please excuse if code not neat!! i'm using codeigniter front end <?php if( is_array( $fbrecords ) && count( $fbrecords ) > 0 ) foreach($fbrecords $r) { ?> <tr> <td><?php echo $r->fullname; ?></td> <td><?php echo $r->email; ?></td> <td><?php echo $r->mobile; ?></td> <td><?php echo $r->message; ?></td> <td><?php echo $r->jtime; ?></td> <td> <?php $data=array( 'name'=>'status', 'row' => '12px', 'id' => 'status', 'selected'=>'none', 'class'=>'statusclass' ); $data_status = array( 'none' => '...

c++ - Shared library debug/Traps Modes while C/Cpp Development/Running -

say have application uses 2 shared libraries liba.so , libb.so. application calls liba.so { user library } call libb.so { should called liba.so}. make changes liba compared application or libb.so? there way can trap calls libb stack traces liba , application? in short want trap calls in chained shared libraries? note libb not system calls, strace not of help.

java - how to create an empty project folder (fragment plug-in type) on eclipse programmatically -

i need create empty folder while using postperformfinish function activated after finish button wizard, need considered empty project (fragment plug-in type). i have tried 1 simple way have found on internet create folder seems have done mistake. below code : file fragmentproject = new file(resourcesplugin.getworkspace().getroot().getlocation()+datamodelfacetcreationwizardpagefragment.fragmentprojectname); try { fragmentproject.createnewfile(); } catch (ioexception e1) { // todo auto-generated catch block e1.printstacktrace(); }

java - jax-ws change or wrapp WSServlet -

we used jax-ws standard expose web services. web services works fine. now want controls before jax-ws servlet take request , send response. example: disable \servicename?wsdl shows wsdl disable \servicename shows service information table do not allow web service available ip in time. we have searched lot , thing found wsservlet entry point of requests, don't know how can changed or wrapped. public class wshandler implements soaphandler<soapmessagecontext> { ///implement methods }

Unable to override spring boot's (default) security configuration -

i trying secure spring boot rest application using spring security basic authentication. the default basic authentication works plugging in following dependency <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-security</artifactid> </dependency> the next step override default authentication credentials provided spring boot custom credentials (username, password). i have tried using: @configuration @enablewebsecurity @enableglobalmethodsecurity(prepostenabled = true) public class securityconfiguration extends websecurityconfigureradapter { @override @autowired public void configure (authenticationmanagerbuilder authbuilder) throws exception { authbuilder.inmemoryauthentication() .withuser("aide").password("aide").roles("user").and() .withuser("pervacio").password("pervacio").roles...

php - Get a certain part of a changing string -

i have this: "https://example.com:443/commonauth/?sessiondatakey=2aeeaf42-83d8-4b90-b8b4-39c1856c7de2&type=oauth2" now want string sessiondatakey. how extract part string if length of string different every time? if want sessiondatakey string can way <?php $string = "https://example.com:443/commonauth/?sessiondatakey=2aeeaf42-83d8-4b90-b8b4-39c1856c7de2"; preg_match("/sessiondatakey=([a-z0-9\-]*)(&|$)/", $string, $result); echo $result[1]; ([a-z0-9-]+) - match 1 or more characters a-z, numbers 0-9 , dash (&|$) - after previous match comes character & or end of string if want sessiondatakey url can way <?php $sessiondatakey = $_get['sessiondatakey']; echo $sessiondatakey; this classic way of getting parameters url. more here .

Get emails from each docx file in directory using php -

this question has answer here: how extract text word file .doc,docx,.xlsx,.pptx php 5 answers hi, making job portal in user upload multiple resumes contain emails , phone numbers there way email .docx file using php first u must read docx file.please refer reading doc file in php then using $emailreg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; $match = preg_match($emailreg, $your_text); the matches give desired output.

javascript - Clone a vuejs component, retaining the props and other characteristics of the original component -

i have component this <jesus> <bread flavour="fishes"></bread> </jesus> i want take bread before compilation, multiply it, , put back. this have done moment: beforecompile () { // take away because don't want compiled yet this.breadel = this.$options._content.queryselector('bread') this.$options._content.removechild(this.breadel) }, compiled () { var jesusel = this.$el var breadstampel = this.breadel.outerhtml // return options prototype component // el duplicate html every time (maybe cache it?) var breadstampoptions = object.assign({}, {el () { let el = document.createelement('div') jesusel.appendchild(el) el.outerhtml = breadstampel el = jesusel.queryselector('bread') return el }}) var bread1 = new this.$options.components.bread(breadstampoptions) var bread2 = new this.$options.components.child(breadstampoptions) jesusel.queryselector('#bread1').appendchi...

facebook - web hooks face books how to bypass a secure website -

Image
i setting webhooks facebook application, , required call url, url must in https i have server call website not https, in http protocol any idea bypass that? (work around? ) there's no way bypass it. however, if don't want buy ssl certificate domain, can configure domain name cloudflare , use universal ssl . have used facebook webhooks , works well. it's free , easy configure. the free plan allows use flexible ssl. per docs : flexible ssl: secure connection between visitor , cloudflare, no secure connection between cloudflare , web server. don't need have ssl certificate on web server, visitors still see site being https enabled.

How to load external fonts via javascript before page ready -

i'm using typekit on website load fonts , typekit gives me 2 links. <script src="https://use.typekit.net/xxxx.js"></script> <script>try { typekit.load({ async: false }); } catch (e) { }</script> i put these links in head tag when enter website fonts loaded after content. wonder how can load before page ready or before content load. ps: tried async: true , false.. both of them gave same result. one thing can use font evens hide content while fonts load. https://helpx.adobe.com/typekit/using/font-events.html

java - Calling a shell script using SSH exec channel, but it ignores calls to other shell scripts -

i managing execute shell script on remote server using jsch exec using helpful examples provided here. can see echoes being returned script , exit status @ end 0 - looks @ first glance. however, problem script calls out other scripts, , these appear ignored, skipped over. the script calls other scripts directly. i.e. first line of script like: script_two.sh could advise of way overcome this? did start "shell" channel instead of "exec", may tricky in case because before giving user access system, server presents form fill in (name, number, why logging in, etc) - haven't yet been able to programmatically fill in , submit form, stick exec if possible. i new this, help/advice welcome! code snippet below. said, appears work, sh script represented "scriptfilename" int code calls other sh scripts, , these not executed. many in advance help, j jsch jsch = new jsch(); jsch.setconfig(filetransferconstants.strict_host_key_checking, "no...

swift - logging into fb from iOS app -

i using below methods login fb through app. navigating login page printing error follows: **-canopenurl: failed url: "fbauth2:/" - error: "(null)" ** using swift 2.1.1 , facebook sdk 4.13.1 let fbloginmanager = fbsdkloginmanager() fbloginmanager.loginwithreadpermissions(["email"], fromviewcontroller: self) { (result, error) -> void in if (error == nil){ let fbloginresult : fbsdkloginmanagerloginresult = result if fbloginresult.grantedpermissions != nil && fbloginresult.grantedpermissions.contains("email") { self.getfbuserdata() // fbloginmanager.logout() } } } } func getfbuserdata(){ if((fbsdkaccesstoken.currentaccesstoken()) != nil){ fbsdkgraphrequest(graphpath: "me", parameters: ["fields": "id, name, first_name, last_name, picture.type(large), email, gender"]).startwithcompletionhandler({ (connection, resul...

javascript - PhantomJS bug in basic script -

this script pretending log in google account (i've made). obviously, doesn't work. there no particular objective here, make work. var page = require('webpage').create(); page.onconsolemessage = function(msg) { console.log('console: ' + msg); }; page.open('https://google.com/', function() { page.injectjs('jquery-2.2.1.min.js'); page.evaluate(function() { function include(arr,obj) { // functions not part of scraping return (arr.indexof(obj) != -1); } function add(a, b) { return + b; } array.min = function( array ){ return math.min.apply( math, array ); }; function dofirst() { $('#gb_70').click(); main(1, 0); } function dosecond() { document.getelementbyid('email').value = 'myemail@gmail.com'; $('#next').click(); main(2, 0); } ...

Cascade delete model in rails -

class car < activerecord::base end class city < activerecord::base has_many :cars_available, dependent: :destroy end class carsavailable < activerecord::base belongs_to :car belongs_to :city end i have 2 models car , city, , third model carsavailable stores particular cars available in particular city. how set destroy association between car , carsavailable when car removed corresponding carsavailable entry deleted. i figured out city little ambiguous how apply car. this trick: class car < activerecord::base has_many :cars_available, dependent: :destroy end add association car , tell destroy association, did city .

html - Glyph icon vertically down next to image -

Image
i want place glyphicon next image close bottom, comes mid of image. <div class="col-xs-3"> <img src="@url.content(model.defaultimagepath)" alt="image" height="150" width="150"/> <span class="glyphicon glyphicon-pencil" style="color: #292929; background-color: #e3dac9;"></span> <span class="glyphicon glyphicon-plus" style="color: #292929;background-color: #e3dac9"></span> </div> how rendered: this how want: use vertical-align:bottom span { vertical-align: bottom; } <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" /> <div class="col-xs-12"> <img src="http://www.fillmurray.com/150/150" alt="image" height="150" width="150" /> <span c...

java - Gradle Build problems in Android Studio -

my colleague worked on android application on api 21 in android studio 1.4 classpath 'com.android.tools.build:gradle:1.1.0' . also, used java jdk1.7.0_75. and need continue work on project. i'm having android studio 2.1.1 , want work on api 22 or 23. gradle version classpath 'com.android.tools.build:gradle:2.1.0' , i'm using java jdk1.8.0_91. if try 'run' app on same android device did, error: executing tasks: [:app:assembledebug] configuration on demand incubating feature. incremental java compilation incubating feature. :app:prebuild up-to-date :app:predebugbuild up-to-date :app:checkdebugmanifest :app:prereleasebuild up-to-date :app:preparecomandroidsupportappcompatv72100library :app:preparecomandroidsupportrecyclerviewv72100library :app:preparecomandroidsupportsupportv42100library :app:preparedebugdependencies :app:compiledebugaidl :app:compiledebugrenderscript :app:generatedebugbuildconfig up-to-date :app:mergedebugshaders up-to-date :...

Counting the distance between similar values by rows using excel-vba/udf -

Image
i having trouble in counting distance between values similar because there’s no function in excel achieve , deal 2000 row of values. prefer excel-vba this, button perhaps generates distances in example. array formulas lags excel when there's many values. counting them 1 1 waste of time. please want have done. appreciate if genius out there pull off. example bellow shows how far specific value other: you try this option explicit sub main() dim cell range, f range dim rowoffset long worksheets("gaps").range("a2:f10") '<--| change actual range of interest each cell in .specialcells(xlcelltypeconstants, xlnumbers) rowoffset = 1 set f = .find(what:=cell, after:=cell, lookin:=xlvalues, lookat:=xlwhole, searchdirection:=xlprevious) if not f nothing , f.row <= cell.row rowoffset = cell.row - f.row + 1 cell.offset(, .columns.count + 1) = rowoffset '<--| "+1" ...

postgresql - Can I disable dictionary in postgres ts_vector / ts_query full text search? -

i need text search on machine language. if use of available text search dictonaries, ts_vectors messing up. ex. move -> becomes mov , searching failing. any idea how index non- lingual words? thanks! have tried simple dictionary empty stop word file? create empty stop word file $(pg_config --sharedir)/tsearch_data/empty.stop , run: create text search dictionary machine ( template = pg_catalog.simple, stopwords = empty ); create text search configuration machine ( parser = default ); alter text search configuration machine add mapping asciiword, word, numword, asciihword, hword, numhword, hword_asciipart, hword_part, hword_numpart, email, protocol, url, host, url_path, file, sfloat, float, int, uint, version, tag, entity, blank machine; then can get: test=> select * ts_debug('machine', 'move'); alias | description | token | dictiona...

javascript - Datepicker in Facebook pagetab (Page Facebook) -

i want create booking engine, first, need select dates datepicker. i use demo example doesn't works, so, how can use datepicker in facebook? can create submit form, but, datepicker fails. <link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script> $(function() { $( "#datepicker" ).datepicker(); }); </script> <h1>test</h1> <p>date: <input type="text" id="datepicker"></p> solved, in website create view page tab , in app created, linked view create.

node.js - How can I modify and test javascript source code for a project which uses minified javascript code in production? -

i'm working on project uses js source files multiple directories , compiles them common dist/ directory used in production. 1 way can test changes js code make changes source code , reinstall entire project generate new dist/ directory. there easier , more practical way this? as production , development environments (mostly) equal use source maps issue. way build js: js hint generate source maps concat js 1 file uglify using gulp , plugins. shouldn't hard find. the benefits of aproach are: serving small js file no difference between dev , prod readable js source debugging no redeploy needed

php - Connecting/directing user to its page -

i want make web facebook, twitter, etc. every user has own page. is there easy way without bothering internet security. from search on net, thought php, mysqli, html5,css way do. don't know how can done. first try.... i made database , put uid..username...password..uurl(userurl) -- phpmyadmin sql dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- host: 127.0.0.1 -- erstellungszeit: 11. jul 2016 um 14:12 -- server version: 5.6.17 -- php-version: 5.5.12 set sql_mode = "no_auto_value_on_zero"; set time_zone = "+00:00"; /*!40101 set @old_character_set_client=@@character_set_client */; /*!40101 set @old_character_set_results=@@character_set_results */; /*!40101 set @old_collation_connection=@@collation_connection */; /*!40101 set names utf8 */; -- -- datenbank: `demos` -- -- -------------------------------------------------------- -- -- tabellenstruktur für tabelle `users` -- create table if not exists `users` ( `uid` int(11) not null au...

ios - how to generate IPA file as a developer role in Apple developer Account -

Image
my manager had apple developer account, , added me in account developer role. have give him ipa file. possible me generate ipa file signing in apple id(not developer account) in xcode 7..?? have tried this, showing me free role in preference instead of developer role. export button not enabled after archive done. yes, in xcode 7 above there no opting export ipa. can other ways generate ipa file. follow below steps: select product --> archive option and right click on wifilist , select show in finder it open folder , right click on folder option " show package contents " now can on file can drag , drop on itunes. drag , drop desktop. i hope, you.

angularjs - Stripe popup showing wrong currency -

Image
i've setup stripe checkout using noodliopay example ( here ) using ionic framework , angularjs. i've set currency pounds on charging amount, popup button still showing dollar symbol. below code snippet factory self.chargeuser = function(stripetoken, productmeta) { var qcharge = $q.defer(); var chargeurl = noodlio_pay_api_url + "/charge/token"; var param = { source: stripetoken, amount: math.floor(productmeta.pricegbp*100), // amount in penny currency: "gbp", description: "", stripe_account: stripe_account_id, test: true }; $http.post(noodlio_pay_api_url + "/charge/token", param) .success( function(stripeinvoicedata){ qcharge.resolve(stripeinvoicedata); } ) .error( function(error){ console.log(error) qcharge.reject(error); } ); return qcharge.promise; } can me this?is there ...

c# - Visual Studio automatically updating assembly references -

solution has project builds assembly, referenced project in solution b. solution builds c:\bob, , solution b references assembly c:\bob\assembly1.dll, , builds c:\kate\, copying assembly1.dll c:\kate\ if solution rebuilt (whilst solution b open in visual studio), reference assembly1.dll in solution b temporarily broken, , visual studio tries automatically resolve updating reference c:\bob\assmebly1.dll, c:\kate\assembly1.dll (which incorrect reference). can behaviour disabled? the projects cannot hosted within same solution, must use assembly references due size , complexity of project.

swift - stream video from Raspberry PI to native iOS app? -

i wondering if there way stream video raspberry pi native ios app. i not asking if it's possible stream on web server since know how that. however, if there way capture stream web , display in native ios application without being directed quicktime or safari work fine. e.g. if stream playing on 192.168.0.1:8080 display inside iphone app. i working on raspberry pi 3 model b+ raspberry pi camera module xcode 8.0 (beta) , swift 3. many in advance.

git - Why checkout -b does work only after second attempt? -

$sudo git clone sample.git cloning 'sample'... warning: appear have cloned empty repository. done. $ cd sample $ echo "hello world" > readme $ git add readme $ git checkout -b switched new branch 'a' $ git branch $ git checkout master error: pathspec 'master' did not match file(s) known git. $ git checkout error: pathspec 'a' did not match file(s) known git. $ git checkout -b b switched new branch 'b' $ git branch $ git commit -am . [b (root-commit) 12b8434] . 1 file changed, 1 insertion(+) create mode 100644 go $ git branch * b $ git checkout error: pathspec 'a' did not match file(s) known git. $ git checkout -b switched new branch 'a' $ git branch * b what wrong first checkout -b a , why branch not created? well, told git create branch in empty repository. there no commit yet, , branch "sticky note" pointing commit. git supposed do... at least stores new branch in hea...

Laravel 5 get data from multiple(3) tables -

i have 3 tables: employees, employeeprofiles, employeeskills. model relationship follows 1. employee model public function employeeprofile(){ return $this->hasone('app\employeeprofile', 'employee_id'); } public function employeeskill(){ return $this->hasmany('app\employeeskill', 'employee_id); } 2. employeeprofile model public function employee(){ return $this->belongsto('app\employee', 'employee_id'); } 3. employeeskill model public function employee(){ return $this->belongsto('app\employee', 'employee_id'); } employee table has columns id, fname, lname, email. employee profile table has id, employee_id foreign key referencing employee table, join_date , others. employeeskills table has columns id, employee_id foreign key referencing employee table , skill_name. 1 employee can have many skills. want access employees in employee table profiles(employeepr...

osx - NKE Socket Filter failed to register -

im working in kext, socket filtering when use sflt_register failed load saying. _sflt_register symbol unresolved kext. ( libkern/kext ) link error. please help. have run kextlibs command on kext? you're missing bsd kpi list of dependencies in info.plist.

jquery - Customise FullCalendar -

i have full calendar displayed on page show when people on holiday or off sick. however, instead of showing bar spread across days, have persons initials displayed on day in question. have idea how may go this? my current code is: function initialisecalendar(data) { $('#calendar').fullcalendar({ events: data, weekends: false, theme: false, height:600, eventlimit: true, eventclick: function (event) { window.open(event.url); return false; }, eventafterrender: function (event, element, view) { var startdate = event.start._i; var timeindex = startdate.indexof("t"); var startsub = startdate.substring(timeindex + 1, timeindex + 3); if (startsub == "12") { var e = $('a[href="' + event.url + '"') ...

angularjs - Should i use ng-change to save changes to a database record? -

i've been using angularjs build website/business system mum's business. i'm not quite sure best practice bit i'm working on now. i'm using pdo handle data on database i need implement option change client details. i first instinct use ng-change data saves it's changed. i'm not sure if that's best way (think of number of requests have sent when making note. had though of saving changes when user leaves text box, or adding save button. which way best?... or not matter? yes correct - using ng-change increase number of requests. but developers @ google have made sure logic behind ng-change optimised best performance. check these articles further explanation http://www.codelord.net/2015/06/11/using-ng-change-instead-of- $watch-in-angular/ how data binding work in angularjs?

c++ - Compile generate 0 byte files on OS X -

i working on project little bit hard me because don't have extensive knowledge of mac os. i have project works on windows , have compile on mac os, qt. the problem when build project, generates me empty files : .dylib .o .cpp , .h am missing special command in .pro file ? here 1 .pro (others identical) : #------------------------------------------------- # # project created qtcreator 2016-04-18t21:12:51 # #------------------------------------------------- qt += widgets target = mddimension template = lib defines += mddimension_library \ _toolkit_in_dll_ \ includepath += ../mdcore \ ../mdwidgets \ ../include \ ../include/teigha \ ../include/extensions/exservices \ ./gui \ release { destdir = ../release } debug { destdir = ../debug } sources += mddimensionmodule.cpp \ widgets/mddimstylecombo.cpp \ gui/mddimstyletoolbar.cpp headers += mddimensionmodule.h\ widgets/mddimstylecombo.h \ gui/mddimstyletoolb...

Photoshop scripting move one group inside of other -

i'm trying move 1 layerset other layerset in photoshop scripting. here's code: // source var srcgroup = app.activedocument.layersets.add(); srcgroup.name = 'source'; // target var targetgroup = app.activedocument.layersets.add(); targetgroup.name = 'target'; srcgroup.move(targetgroup, elementplacement.inside); this gives error "error 1220: illegal argument". if change second argument elementplacement.placeafter , error gone not quite doing want. as found out not values of elementplacement valid object types. decided make workarround adding dummiegroup , place source before dummy. @ end dummy removed. var srcgroup = app.activedocument.layersets.add(); srcgroup.name = "source"; var targetgroup = app.activedocument.layersets.add(); targetgroup.name = "target"; //adding dummy inside target layerset var dummiegroup = targetgroup.layersets.add(); dummiegroup.name = "dummy"; srcgroup.move(dummiegroup, elem...

.net - Datatable.Select gives wrong results depending on focus of Datagridview -

i'm using select on datatable , getting unexplainable results. using visual studio 2013 , vb.net. i have dataset datasource of datagridview. dataset has column contains boolean values, represented checkbox datagridview. i'm using solution jsturtevand in thread make sure dgv updated after user moves mouse away checkbox. each time user changes checkbox value, corresponding row updated in database. in form user can click on apply , bunch of actions executed depending on checkboxes checked. code use find selected items is: dim rows() datarow rows = dsfiles.tables(0).select("isactive = true") when user selects checkboxes, action changes focus , presses apply, correct results. if user changes checkbox , presses apply select statement won't find last change. if has 2 items selected, selects third , presses apply, select statement finds 2 items. here weird part : if check dataset before executing select, contains correct data , if use loop this each ...

Kafka entries to DynamoDB -

i want records coming in kafka topic inserted in dynamodb. there open source plugin available can same. or there other better way can within dynamodb itself. pls suggest lokesh narayan storing kafka messages in dynamodb great use case kafka connect. unfortunately don't know of off-the-shelf sink connectors dynamodb. can see list here . now, you'll need either build own sink connector (and open source it!) or build custom consumer writes dynamodb.

type conversion - Change datatype of multiple columns in dataframe in R -

i have following dataframe: str(dat2) data.frame: 29081 obs. of 105 variables: $ id: int 20 34 46 109 158.... $ reddit_id: chr "t1_cnas90f" "t1_cnas90t" "t1_cnas90g".... $ subreddit_id: chr "t5_cnas90f" "t5_cnas90t" "t5_cnas90g".... $ link_id: chr "t3_c2qy171" "t3_c2qy172" "t3_c2qy17f".... $ created_utc: chr "2015-01-01" "2015-01-01" "2015-01-01".... $ ups: int 3 1 0 1 2.... ... how can change datatype of reddit_id , subreddit_id , link_id character factor? know how 1 column column, tedious work, searching faster way it. i have tried following, without success: dat2[2:4] <- data.frame(lapply(dat2[2:4], factor)) from this approach . end giving me error message: invalid "length" argument another approach way: dat2 <- as.factor(data.frame(dat2$reddit_id, dat2$subreddit_id, dat2$link_id)) result: error in sort.list(y): "x" ...

ios - How to change the language on GoogleMap? -

i use gmsmapview google maps ios sdk in application. can change app language in settings page. how change language on map in runtime? i can reload or recreate map on method (void)preparemap { [self.viewformap removeallsubviews]; gmscameraposition *camera = [gmscameraposition camerawithlatitude:latitude longitude:longtitude]; gmsmapview *mapview = [gmsmapview mapwithframe:rect camera:camera]; [self.viewformap addsubview:mapview]; } as answered in using google maps apis - how can google maps apis display in language other english? : by default api attempt load appropriate language based on users location or browser settings. apis allow explicitly set language when make request. from there, may add language parameter in https request in google maps apis. however, apis doesn't allow this, have first determine current location use of core location framework suggested in post - iphone default map app open different language .

jquery - Javascript file download in Firefox -

i have tried download file using jquery : window.location.href = "docs/earesponseesomar-28.docx"; it working in chrome not in firefox. google didnt find satisfing answer. how pragmatically give download link work in every browser? should done?

windows - PHP Pthreads latest version 3.1.6 (64bit) not installing on Apache -

i trying install latest pthreads extension 3.1.6 64bit php. as per author advice of pthreads, on http://github.com/krakjoe/pthreads i have placed 2 dlls desired locations. add pthreadvc2.dll (included windows releases) same directory php.exe eg. c:\apache24\php add php_pthreads.dll php extention folder eg. c:\apache\php\ext and in windows\system32 directory and added loadfile in [apache http.confd][1] and have added added extension php.ini php.ini but apache won't start , when check apache error.log, have below [tue jun 28 11:38:31.184618 2016] [ssl:warn] [pid 8640:tid 352] ah01909: localhost:443:0 server certificate not include id matches server name [tue jun 28 11:38:31.215819 2016] [core:warn] [pid 8640:tid 352] ah00098: pid file c:/apache24/logs/httpd.pid overwritten -- unclean shutdown of previous apache run? i have moved php_pthreads.dll extension top of extension list , bottom no joy. won't start pthreads dll. if comment ;exten...

python - Unable to Process an image transformed in OpenCV via scikit-image -

i want skeletonize image using scikit-image module skeletonization. image pre processed opencv library. given image 'feb_16-0.jpg', convert gray scale, perform morphological transformation of opening image, apply gaussian blur , adaptive thresholding using opencv , python: import cv2 import numpy np matplotlib import pyplot plt skimage.morphology import skeletonize skimage.viewer import imageviewer img = cv2.imread('feb_16-0.jpg',0) kernel = np.ones((1,1),np.uint8) opening = cv2.morphologyex(img, cv2.morph_open, kernel) blur = cv2.gaussianblur(opening,(1,1),0) ret3,th4 = cv2.threshold(blur,0,255,cv2.thresh_binary+cv2.thresh_otsu) i want skeletonize image using scikit-image skimage.morphology.skeletonize. have tried writing code performing erosion , dilation manually skeletonize image using opencv , python. but, proved highly inefficient processing decided switch scikit-image library @ point. however, when pass numpy array preprocessed opencv scikit-image module ...

visual studio - How to convert .docm to .doc file? c# -

is there easy way convert docm-file doc-file in visual studio? googled forit while cant find solution issue. found docm docx conversion. i hope can me. then try convert docx , use link convert .doc link

Using JavaScript in Less -

@root: "/images"; @app-root: `"@{root}".touppercase()`; #form { background: url("@{app-root}/back.jpg"); } running in less2css error: syntaxerror: javascript evaluation error: unexpected string ""/images"".touppercase() on line 2, column 12: 1 @root: "/images"; 2 @app-root: "@{root}".touppercase() ; 3 supposedly need run js in less set of backticks. so, why fail? remove double quotes, , go: @app-root: `@{root}.touppercase()`; check here

excel - Sum values in columns with variable number of Columns -

i have 'item demand' table have 3 different things: a column part number of object, several columns dates titles, , quantities values in them. part number | date1 | date2 | date3 | date4 ... | lead time 2003032.........201.........63.......54..........63.............3 2145631..........54.........21........53..........21............2 4563214.........23..........121.......12.........31.............5 but here's need , have no clue how. so if lead time 3 months, need take today's date , sum 3 months, select column correspond result of sum (only same month not same date), take value in column , columns before , sum all. i'm not sure if have made self clear, i'm sorry if did not. i'll try explain further if there questions. hope help. excel 2002 fim. don't need vba situation, formulas sum , offset should do. made simple sheet make clear: printscreen

javascript - How to pass arguments to mix browserify compiled file -

i'm using laravel elixir compile js files this in gulpfile.js elixir(function(mix) { mix.browserify([ './compile.js' ], '../public/build.js' ); }); question: in compile.js possible have like: var = require('./views/a/component.vue'); if(custom_variable_passed_from_gulpfile_task){ var b = require('./views/b/component.vue'); } the simple solution make compile.js file second situation.. don't want modify both files everytime have something. can't find mix.browserify in pass arguments file..

javascript - angular checkbox does not bind to model -

in controller have member: $scope.sameoptionsonreturn = true; and in view: <input type="checkbox" ng-model="sameoptionsonreturn" ng-checked="sameoptionsonreturn" ng-value="true" ng-change="setreturnoptions" /> but input not bind checkbox; it's true. wrong? note: removing ng-value="true" doesn't make difference. since work in snippet below, have assume there's wrong elsewhere in code. function supercontroller($scope) { $scope.sameoptionsonreturn = true; } angular.module('myapp', []); angular .module('myapp') .controller('supercontroller', supercontroller) <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script> <div ng-app="myapp"> <div ng-controller="supercontroller s"> <input type="checkbox" ...

slick.js - ken wheeler's slick carousel down start normally with jquery steps -

Image
sorry broken english. i'm using ken wheeler slick jquery steps . add new step jquery steps this: $("#wizard").steps("add", { title: data.title, content: '<div id="slickdemo3"">'+data.content+'</div>' }); after that, use slick script , starting slick function this: $('#slickdemo3').slick({ infinite: false,slidestoshow: 4,slidestoscroll:4}); adding step succesfully done, slick don't display normally, display this: jsfiddle example: https://jsfiddle.net/cw38qpc5/ but start slick javascript settimeout function slick start , display succesfully. like this: settimeout(function(){ $('#slickdemo3').slick({ infinite: false,slidestoshow: 4,slidestoscroll:4}); }, 1000); it normal. jsfiddle example: https://jsfiddle.net/raowd335/ thanks our advice sorry english again. because there isn't event dynamically added or removed steps far, have use onstepchanged event ...

sitecore - Custom MVC Views in WFFM -

i in process of fitting sitecore web forms marketers solution. work need 3 things: the ability inject javascript rul rewriting generated code use foundation (instead of bootstrap) be able read submittet data of "changed" form. ie. form there injected field through javascript. my initial questions second point: how write these views? i have followed article: http://www.hhogdev.com/blog/2015/september/customizing%20wffm%20in%20sitecore%208.aspx unfortunately not elaborate on how generate proper names/ids fields , form. can point me in right direction that? the blog post linked written based on sitecore 8.0, , although module same implementation of wffm has since changed (unfortunately worse imo). we using wffm foundation, possible have them both working there few things have do. i config disable bootstrap css, mean bootstrap markup without css files being included. suggest style around given settings as possible save future upgrade issues: <se...

react native - Lineheight in HTMLView -

somehow not working android works on ios: <htmlview value={itemdetail.description} stylesheet={htmlstyle}/> const htmlstyle = stylesheet.create({ p:{ lineheight:28, fontsize:16, color:'#444343' } }); you can find component here: https://github.com/jsdf/react-native-htmlview the description this: <p>hello, world!</p> on android color , fontsize change, not lineheight. on ios emulator works. if there's alternative set lineheight , please let me know. have tried plugging in android device usb , going chrome://inspect/#devices in chrome browser? check computed styles on device in inspector, might give insight going wrong or react debugger in case: https://facebook.github.io/react-native/docs/debugging.html#chrome-developer-tools

c++ - What is an undefined reference/unresolved external symbol error and how do I fix it? -

what undefined reference/unresolved external symbol errors? common causes , how fix/prevent them? feel free edit/add own. compiling c++ program takes place in several steps, specified 2.2 (credits keith thompson reference) : the precedence among syntax rules of translation specified following phases [see footnote] . physical source file characters mapped, in implementation-defined manner, basic source character set (introducing new-line characters end-of-line indicators) if necessary. [snip] each instance of backslash character (\) followed new-line character deleted, splicing physical source lines form logical source lines. [snip] the source file decomposed preprocessing tokens (2.5) , sequences of white-space characters (including comments). [snip] preprocessing directives executed, macro invocations expanded, , _pragma unary operator expressions executed. [snip] each source character set member in character literal or string literal, e...

java - How to run custom appender in separate thread -

i created own appender base of logback document chapter 4 (see writing own appender section). whatever being logged @ info level in application, appender gets invoked , post message http message servlet running on other end. these kind of logic makes application slow down. because appender runs on same thread application running. how make appender run in separate thread ? since logback based on log4j, should able used asynchronous logging option. see here makes sure logging process runs in separate thread.

javascript - Setting global variable in callback -

tried simplify code show problem. var rp = require('request-promise'); var ids = []; runmyfunction(); runmyfunction(); function runmyfunction() { var id = 5; console.log("runmyfunc: "+ids); if (ids.indexof(id)==-1){ myfunction(id); } } function myfunction(id) { var options = { uri: 'someuri' , headers: { 'user-agent': 'request-promise' } , json: true }; rp(options) .then(function (response) { ids.push(5); console.log("myfunc: "+ids); }) .catch(function (err) { console.log(err); }); } basically have function runmyfunction , should execute myfunction if there not id 12345 in it. if run 10 times , 11th id 12345 returned, should stop running function. problem id never gets pushed in array if request succeeded. similar problems had request being asynchronous. cause in code well? ...

android - Navigation drawer not working on activities using fragments -

i've been trying add nav drawer app. have mapsactivty main activity. public class mapsactivity extends fragmentactivity implements onmapreadycallback { public googlemap mmap; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); supportmapfragment mapfragment = (supportmapfragment) getsupportfragmentmanager() .findfragmentbyid(r.id.map); mapfragment.getmapasync(this); } @suppresswarnings("statementwithemptybody") public void onmapsearch(view view) { edittext locationsearch = (edittext) findviewbyid(r.id.edittext); string location = locationsearch.gettext().tostring(); list<address> addresslist = null; if (location != null || !location.equals("")) { geocoder geocoder = new geocoder(this); try { addresslist = geocoder.getfromlocationname(location, 1); } catch (ioexception e) { e.printstacktrace(); } ...