Posts

Showing posts from August, 2015

excel - Finding if a value is located in a range of cells in a corresponding column, to a row with the same value as a given cell in a given row -

Image
given column contains directory paths, , column b contains actions on these paths; i'd resultant cell contain specific string if specific string located in column b (per column a). granted can sort column, believe can use offset , know how locate ending index of cells can search range returned offset . for example: path operation /share/admins accessed /share/admins removed /share/admins added /share/admins changed /share/network accessed /shared/projects accessed in case, want search path unique value (in case /share/admins , /share/network , , /shared/projects ), , given range in path , i'd search corresponding operation , , if operation matches removed , added , changed exists, i'd cell value write ; , if values aren't found, "read". in case, expect column (with header result ) read: path operation result /share/admins accessed write /share/admins remov

MATLAB spending an incredible amount of time writing a relatively small matrix -

i have small matlab script (included below) handling data read csv file 2 columns , hundreds of thousands of rows. each entry natural number, zeros occurring in second column. code taking incredible amount of time (hours) run should achievable in @ seconds. profiler identifies approximately 100% of run time spent writing matrix of zeros, size varies depending on input, in usage smaller 1000x1000. the code follows function [data] = datahandler(d) n = size(d,1); s = max(d,1); data = zeros(s,s); = 1:n data(d(i,1),d(i,2)+1) = data(d(i,1),d(i,2)+1) + 1; end it's data = zeros(s,s); line takes around 100% of runtime. can make code run changing out s's in line 1000, sufficient upper bound ensure won't run errors of data i'm looking at. obviously there're better ways this, being bashed code format data wasn't concerned. said, fixed replacing s 1000 purposes, i'm perplexed why writing matrix bog matlab down several hours. new code runs instantaneously

swagger - Choose a tools to documents REST API -

i use doxygen document php rest application , discover apiary & swagger witch seem tools document api...i want know if there way generate documentation automatically using 1 of tools (apiary or swagger ) based on code comments? using swagger-php can generate documentation automatically collection of php scripts documented using annotations. swagger-php decently documented here: http://zircote.com/swagger-php/ working example can found on github: https://github.com/zircote/swagger-php/tree/master/examples/petstore regarding generation of json file containing documentation check answer here: https://stackoverflow.com/a/31178997/2853903

multithreading - Ada Thread Switching Using GtkAda -

a task created doesn't appear relinquishing control main thread run. i'm not sure why. since first attempt use multithreading in ada (under gnat gtkada), sure missing basic principle here. my main looks this: procedure main begin test_gui.gui_task.gui_initialize; test_gui.simple_switch_test; msg("done"); end; in package test_gui, spec , body code this: task type gui_type entry gui_initialize; entry gui_reset_switch_to_1; entry gui_display_message(message : string); entry gui_write_debug; end gui_type; gui_task : gui_type; and task body gui_type begin loop select accept gui_initialize initialize; end gui_initialize; or accept gui_reset_switch_to_1 reset_switch_to_1; end gui_reset_switch_to_1; or accept gui_display_message (message : in string) display_message(message); end gui_display_message; or accept gui_w

javascript - Dynamic calculations and validation in tabular form in ORACLE APEX 5.0 -

i building tabular form in oracle apex need validate start date , end date . i have date picker field in tabular form both start date , end date , start date should not accept date less 45 days system date(today's date) , should not greater system date. i getting error though have given start date today's date. need alert, when start_date less (today's date - 45 days) i using oracle apex 5.0 version on page have defined function in "function , global variable declaration" section: function f_validate_sd(pthis) { var row_id = pthis.id.substr(4); var start_date = $('#f10_'+row_id).val(); //var end_date = $('#f11_'+row_id).val(); var currentdate = new date(); var dy = currentdate.getdate(); var month = currentdate.getmonth() + 1; var year = currentdate.getfullyear(); var sd = ( dy + "-" + month + "-" + year); var subdate = new date(sd); var numbero

c# - Runtime Error in creating JSON Array ASP.NET -

runtime error in creating json array asp.net my source code public class outputjson { public list<entity> android { get; set; } } public class entity { public string name { get; set; } public string version { get; set; } } outputjson = new outputjson{ android = new list<entity> { new entity { name = "aaa", version = "123"}, new entity { name = "bb", version = "34"}, new entity { name = "cc", version = "56"}, } var output = new system.web.script.serialization.javascriptserializer().serialize(outputjson); string yourjsonarray = output; response.clear(); response.contenttype = "application/json; charset=utf-8"; response.write(yourjsonarray ); response.end(); am receiving following error runtime error description: application error occurred on server. current custom error settings application prevent details of application error being viewed remotely (for security reasons). cou

html - CSS border-width of 0px still rendering 1px in Internet Explorer? -

Image
i have following: .icon { border-style: solid; border-width: 2px 2px 0 0; transform: rotate(-45deg); } the bottom border set 0px in image below border still rendering @ 1px. negative values not option. as suggested somethinghere add border-bottom:none .icon this: .icon { border-style: solid; border-width: 2px 2px 0 0; border-bottom: none; transform: rotate(-45deg); } or: .icon{ border-top: 2px solid #454545; border-right: 2px solid #454545; transform: rotate(-45deg); } please try see page in ie , check if problem solved. .box{ width:100px; height:100px; margin: 100px auto; } .icon{ border-top: 2px solid #454545; border-right: 2px solid #454545; transform: rotate(-45deg); } <div class="box icon"></div>

Excel VBA update fill of cells based off of criteria -

my code in vba , updates value of cell based off of 2 criteria. i've commented code extensively, i'll paste below first. i've changed comments adding 2 more apostrophes make bit easier tell difference between comments , code on platform. sub highlightvalues() '''shortcut key: ctrl + w '''highlights values of corresponding left-most cell, if 2 conditions met: '''the part in "l" class , of rightmost cells empty dim ws worksheet dim long, lastrow long, lastcolumn long, c long, d long, j long, count long, k long, report long set ws = sheets("qap") lastrow = ws.cells(rows.count, 1).end(xlup).row lastcolumn = ws.cells(1, ws.columns.count).end(xltoleft).column '''searches column titles "analysis task count" '''where start searching filled boxes on each row = 1 lastrow if instr(ws.cells(1, i), "analysis task count") '''c number of column analysis

How to get an XML node using a SSIS XPATH XML task -

i trying use xml task in ssis session id value xml: <?xml version="1.0" encoding="utf-16"?> <authenticationresult xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <authenticated xmlns="[link]">true</authenticated> <sessionid xmlns="[link]">0000-0000000-00000000000-000000</sessionid> <loginid xmlns="[link]">000000</loginid> <login_name xmlns="[link]">[username]</login_name> <user_nbr xmlns="[link]">0000</user_nbr> <partition_id xmlns="[link]">3</partition_id> <is_parent_mail_user xmlns="[link]">0</is_parent_mail_user> <parent_user_id xmlns="[link]" /> <user_id xmlns="[link]">[username]</user_id> </authenticationresult> however cant task return sess

Javascript number of object by different property values in array -

best way count number of objects in array different object property p values. function([{"p":"a"},{"p":"b"},{"p":"a"}]){ // code } // in case return 2 you can use array.prototype.filter() keep values want. in case, must create variable temp storing duplicate values , within filter function returns true if not exist in case. have new array of unique values . var arr = [{"p":"a"},{"p":"b"},{"p":"a"}], temp = []; var arruniques = arr.filter(function(obj){ return temp.indexof(obj.p) === -1 ? !!temp.push(obj.p) : false }); alert(arruniques.length)

objective c - Which pod should we use instead of GoogleAnalytics-iOS-SDK? -

i using pod googleanalytics-ios-sdk in application. see deprecated now. 1 replacement existing functions. in advance. open podfile created application , add following: pod 'google/analytics', '~> 1.0.0' https://developers.google.com/analytics/devguides/collection/ios/v3/

All falsey values in JavaScript -

what values in javascript 'falsey' , meaning evaluate false in expressions if(value) , value ? , !value ? there some discussions of purpose of falsey values on stack overflow already , no exhaustive complete answer listing falsey values are. i couldn't find complete list on mdn javascript reference , , surprised find top results when looking complete, authoritative list of falsey values in javascript blog articles, of had obvious omissions (for example, nan ), , none of had format stack overflow's comments or alternative answers added point out quirks, surprises, omissions, mistakes or caveats. so, seemed make sense make one. falsey values in javascript false 0 , -0 "" , '' null undefined nan document.all - weird one, it's falsey object, typeof undefined . microsoft-proprietory function in ie before ie11, , added html spec "willful violation of javascript specification" sites written ie wouldn't break

javascript - jQuery getting data attribute not working -

i have script produces number of buttons class , want alert data attribute on click it's not working. here output of html <button class="request box-button" data-value="18492500814">request</button> jquery code $(document).ready(function(){ $('.request').each(function () { var photoid = $(this); photoid.click(function () { alert($(this).data('value')); }); }); }); since elements don't exist when page loads, event won't bound them. fix using event delegation : $(document).ready(function(){ $(document).on('click','.request', function () { alert($(this).data('value')); }); }); js fiddle demo dynamically generated elements note: here, used $(document).on() because don't have page's structure. if insert buttons in container exists in html, use instead: $('#mycontainer').on() . won't noticeable, be

hadoop - Does Spark not support arraylist when writing to elasticsearch? -

i have following structure: mylist = [{"key1":"val1"}, {"key2":"val2"}] myrdd = value_counts.map(lambda item: ('key', { 'field': somelist })) i error: 15/02/10 15:54:08 info scheduler.tasksetmanager: lost task 1.0 in stage 2.0 (tid 6) on executor ip-10-80-15-145.ec2.internal: org.apache.spark.sparkexception (data of type java.util.arraylist cannot used) [duplicate 1] rdd.saveasnewapihadoopfile( path='-', outputformatclass="org.elasticsearch.hadoop.mr.esoutputformat", keyclass="org.apache.hadoop.io.nullwritable", valueclass="org.elasticsearch.hadoop.mr.linkedmapwritable", conf={ "es.nodes" : "localhost", "es.port" : "9200", "es.resource" : "mboyd/mboydtype" }) what want document end when written es is: { field:[{"k

java - How to customize the binding expression in Netbeans? -

Image
i have jcheckbox, when select it, must disable jcombobox. i try negate binding expression in mode: ${!enabled} but doesn't work, java application doesn't start. what's trouble? you have go selected property not enabled property of checkbox. and have bind combobox's enabled property checkbox's selected property. ${!selected}

java - Math from extended class being ignored? -

have been working code couple days , cannot figure out why skills not using math assigned in attributes.java if allocate 5 points intelligence, science should compute 60. instead science computing 30. think program using original 5 points set @ calculation, instead of upgraded 10? attributes.java public class attributes { static int strength = 5; static int perception = 5; static int endurance = 5; static int charisma = 5; static int intelligence = 5; static int agility = 5; static int luck = 5; static int hitpoints = ((endurance * 4) + (strength)); static int armorclass = (endurance + 1); static int actionpoints = (agility + 1); static int carryweight = ((strength * 30) + 5); static int meleedamage = (strength / 2); static int damageresis = (endurance + 1); static int poisonresis = (endurance * 5); static int radresis = (endurance * 2); static int sequence = (perception + agility); static int healingrate = (

php - duplicate database name won't echo else condition -

this code create database in sql using input forms. <?php //connect sql $conn = new mysqli('127.0.0.1','root',''); if( $conn -> connect_error ){ echo $conn -> connect_error; die('connection unsuccessful'); } echo 'connection sucessful'; ?> <!-- ==================================================================== --> <form action="" method="post"> <input type="text" name="db_name"> <input type="submit" value="create database"> </form> <?php //create database if( isset( $_post["db_name"] ) && $dbname = $_post["db_name"] ) if( $conn -> query("create database if not exists " . $dbname ) === true ) echo 'database created sucessfully'; else echo 'database ' . $dbname . ' exists. please try name'; //this line won't execute ?>

How to save json info to an array every 3 hours with php? -

i have access api under link: https://api.adform.com/services/security/login?username=api_user&password=mypassword&callback=jsonpcallback it gets me ticket id in such manner: jsonpcallback({ "ticket": "gezdimzrhftdezrygvstemjngm2dmlkmngrrwgmznha4dimrnge4dazrtmvrtkmjxmuzsytkxlezeetsqjq3dinkbgrdtmmshjfbumqksgnldkm2pkffvitcg" }) the issue every 3 hours expires. how make php script regenerate evey 3 hours , save ticket into: $config = array( "ticket" => "gezdimzrhfrwgmzqgjswkzrngyytcoldmdnrswczrnmiytimjnmnswgztbha2dgylbgi4cyn2cjnbdiu2kivbuewsukzhtoskbirkuyu2eivlfur2wkrbfkwci" ); thanks! you can following similar managing oauth access token refresh: whenever retrieve soap authentication ticket, calculate expiration time adding 3 hours (or less) current time. save expiration time along soap authentication ticket. before each subsequent request, compare current time expiration time. if current time past a

Unable to display date in Arabic in VB6 -

i trying display date in arabic language in vb6. showing date in english language. have set following things in "region , language" window: current language non-unicode programs : arabic (egypt), format : arabic (egypt), location : egypt in " region , language " window, date display correctly in arabic. i using following code display date in arabic: msgbox date vb6 doesn't out-of-the-box. if want date formatted dd/mm/yyyy use msgbox format$(date, "dd/mm/yyyy") or msgbox formatdatetime(date, vbshortdate) as explained here , "short date" indicated arvo

eloquent - Record Not Being Deleted In Laravel -

hello having weird issue not understand, trying delete record in laravel . destroy method in resource controller: public function destroy($id) { $ins = institution::find($id); $success = $ins->delete(); return [ 'success' => $success ]; } this model : namespace app\models; use illuminate\database\eloquent\model; use illuminate\database\eloquent\softdeletingtrait; class institution extends model { use softdeletingtrait; protected $dates = ['deleted_at']; protected $table = 'sys_institutions'; } now success returns true indicating record indeed has been deleted when check db not case. i have tried returning $ins after delete well, column deleted_at seems have date not saved database. in database table deleted_at null . now did not create tables migrations dunno if might have current problem. i have checked $id , indeed correct. i have tried using: $success = institution::destroy($id);

angularjs - How to protect a route from being accessed when logged in? -

i have error handling function responds errors in routing, , redirects user landing page if user not authenticated: core.run(['$rootscope', '$location', function($rootscope, $location) { $rootscope.$on('$routechangeerror', function(event, next, previous, error) { if (error === 'auth_required') { $location.path('/'); } }); }]); now want reverse this, if user authenticated, route not available: .when('/', { templateurl: 'views/pages/landing.html', resolve: { 'isauth': ['fbrefs', function(fbrefs) { return fbrefs.getauthobj().$waitforauth(); }] } }) how alter resolve above check if user is authenticated , if so, redirect /home instead of / ? i tried manually rejecting promise returned resolve makes route disabled no matter if user authenticated or not. you handle manually $q .when('/', { templateurl: 'views/pages/landing.html', resol

plsql - How to write a program to print the wishes based on the sys time? -

in pl/sql block, print 'good morning','good noon','good eve' based on system time have given input. if time 6 12 pm has print morning else if lies between 12 pm 2 pm has print noon else if has print eve. can give me idea? advance gives me guidance. i think, know how anonymous block looks (reminder below): declare -- variables' / constants' / types' / etc. declarations begin -- logic end; / you can create date variables or constants follows: l_in_date <constant> date := to_date(<date>,<date_mask>); then can use if..then statement , print out result according conditions ( http://www.techonthenet.com/oracle/loops/if_then.php ): if <condition> -- logic elsif <condition> -- logic else -- logic end if; i believe, should able create anonymous block using information above.

asp.net mvc 4 - Can I Write Two Partial Models In Single View -

Image
i want add 2 partial models in 1 view because want add fields of mstdepartmentmaster on view of mstcitymaster <%@ page language="c#" inherits="system.web.mvc.viewpage<auto_increment.models.mstcitymaster>" %> <%@ page language="c#" inherits="system.web.mvc.viewpage<auto_increment.models.mstdepartmentmaster>" %> it's not possible inherit single view multiple different classes. if use 2 partial in view can use both different class in different partials , use them in view.

typeahead.js - Pass value from DOM element into typeahead with bloodhound -

i pass value hidden input field search remote url parameter in bloodhound. the variable dynamic , updated every time modal popup gets open. initial value null , believe that's why not working @ all: url: url + 'equipment/getsuggestions/' + $('#equipment-type-input').val() + '/%query', as can see i'm getting jquery value empty. because getting once when plugin initialized? here full script: // instantiate bloodhound suggestion engine var suggestions = new bloodhound({ datumtokenizer: function (datum) { return bloodhound.tokenizers.whitespace(datum.value); }, querytokenizer: bloodhound.tokenizers.whitespace, remote: { url: url + 'equipment/getsuggestions/' + $('#equipment-type-input').val() + '/%query', wildcard: '%query', filter: function (movies) { // map remote source json array javascript object array return $.map(movies, function (movi

python - How to print output of for loop on same line -

here code: def missing_ch(number, string): in range(len(string)): if i==number: continue else: print(string[i], end=' ') return string='hello' num=int(input("enter position of char")) missing_ch(num, string) how output characters printed in same line? i see 3 issues in program - in for loop in second line , have missed closing bracket - for in range (len(str): , should - for in range (len(str)): there no casting in python, convert input string, have use int function, int(...) , line (int)(input(...)) should - int(input(...)) . in loop, defining index i , using ch inside loop, should using i instead of `ch. example - in range (len(str): if(i==num): continue print(str[i],end=' ') return the print statement print items without appending newline fine, should working. a working example - >>> def foo(): ... print(&q

java - Influence the order of digits and charachters in compare method -

i have wicket web application, sorts table rows in following order: ascending: first charachters (a-z) then numbers (1-9) now i'm writing webunit test test sorting mechanism, seems switch order of charachters , numbers like: ascending: first numbers (1-9) then charachters (a-z) so code fail, when sorting ascending , encounters 2 entries: ... zzz 111 ... my simplyfied sorting code: protected int compare(string val1, string val2) { return val1.compareto(val2); } what's "java way" of telling test code test order web application produces it? may collator ? prefer jre solution on selfwritten comparator on 3rd party library. you try using rulebasedcollator this: string rule = "<a,a<b,b<c,c<[...]<'1'<'2'<'3'<'4'[...]"; rulebasedcollator collator = new rulebasedcollator(rule); return collator.compare(val1,val2);

sql server - The current transaction cannot be committed and cannot support operations that write to the log file. Rollback the transaction -

i'm encountering error when running script in sql server 2008. when restore database in sql server 2012, runs , did not encounter errors. thanks in advance! here stored procedure: create procedure updatedependentviews ( @tablename nvarchar(128), @alldependents bit = 1 ) set nocount on; create table #dependencies ( [counter] [int] identity(1,1) not null, [view_name] [nvarchar](128), ) on [primary]; create index counter on #dependencies(counter); /* first degree dependent views. */ insert #dependencies(view_name) select v.[name] [view_name] sys.sql_expression_dependencies sd inner join sys.views v on sd.referencing_id = v.object_id inner join sys.objects d on sd.referenced_id = d.object_id sd.referenci

javascript - How Select Table Row -

Image
how select table row based on table header , first column values. can please me using javascript or jquery . please find attache image reference. $(document).ready(function () { var json = {1: 'aoc', 2: 'bas', 3: 'cts:ele', 4: 'coe:dev'}; $('table#xss tr').each(function () { var type = $(this).find('td:nth-child(2)').text(); var res = type.split(";"); var thisrow = $(this); $.each(json, function (key, val) { (var = 0; < res.length; i++) { if (val == res[i].trim()) { var cc = parseint(key) + 2; thisrow.find('td:nth-child(' + cc + ')').html('****') } } // }); }); });

regex - How to get sentences from a paragraph with custom list of words in Python -

i trying read paragraph , capture sentences in words matching dynamic list of words. the python pre-processing steps identify list of words. want use list of words , identify sentences in paragraph has @ least 1 of words list. identified sentences appended new variable. input: "machine learning science of getting computers act without being explicitly programmed. machine learning pervasive today use dozens of times day without knowing it. many researchers think best way make progress towards human-level ai." list of words: computer, researcher output: machine learning science of getting computers act without being explicitly programmed.many researchers think best way make progress towards human-level ai. what best way accomplish ? based partially on this answer : import nltk tokenizer = nltk.data.load('tokenizers/punkt/english.pickle') text = "machine learning science of getting computers act without being explicitly programmed. machine

linux - What is the functionality of ## and %% in bash -

disk="/dev/sda" local dev_node=${disk##*/} dev_node assigned "sda". also, partition="/dev/sda3" echo ${partition%%[0-9]*} it returns /dev/sda , remove 3. i did not understand functionality of ##*/ , %%[0-9]*in above commands. tried searching not enough information. please explain , provide links tutorial related this. this manual / tutorial . concerns question: ${string##substring} deletes longest match of $substring front of $string. and ${string%%substring} deletes longest match of $substring back of $string. applied example: removing longest substring matching */ /dev/sda results in sda

java - Generate an HTML report with BIRT from an HTML Template -

in project i'm working on, we're using birt generate html reports xml traces. however these reports pretty simple , ugly , wish improve them. made mockup/template in html/css (and javascript want embedded in each reports) we're happy design, there seem problem (that should have seen before): can use template birt? afaik, have design birt template using birt's tools ; , it'll lot of (useless) work so, , we're not sure we'll able obtain same design birt tweaked things tightly css. you can give bookmarks of visualizations in birt report , use javascript api display content in template. alternatively, if building visualization in html template, can use rest api extract data json format , visualize in html pages. you load external css file birt report.

reactjs - Integrating React to a build flow with module transpilation with Babel -

i having trouble module transpilation babel. when transpiling code amd modules babel, can make work in browser including requirejs library. when try introduce react equation experiencing troubles, react not play nice amd. having mismatch errors ( http://requirejs.org/docs/errors.html#mismatch ) cause react loaded synchronously in vendor.js file. if tried other way around, using commonjs default module spec babel uses, have no idea how make work in browser. without library requirejs in former example, browser giving errors "exports not defined". tried include stuff es6-module-loader or babel browerser polyfill, without success. ps: build flow using broccolijs. it seems answer in webpack. after using babel transpile code es5 in broccoli, used broccoli webpack plugin make transpiled code browser ready.

c++ - Unable to stop a windows service with net stop command -

i have created windows service running fine doing following. sc_handle hservice = ::createservice(*m_serviceconfig, // scm database name.c_str(), // name of service displayname.c_str(), // service name display service_all_access, // desired access service_win32_own_process | service_interactive_process, // service type (interactive debug) service_auto_start, // start type service_error_normal, // error control type path.c_str(), // path service's binary nullptr, // no load ordering group

go - Cannot use some type in function call -

currently, i'm having 2 files in 2 packages. file somepkg/something.go package somepkg // ---------------------------------------------------------------------------- // interfaces // ---------------------------------------------------------------------------- type interface { // other methods handle(handler *handler) } type somethingimpl struct { handlers []handler } type handler interface { incomingcall(request *incomingrequest) } // ---------------------------------------------------------------------------- // somethingimpl implementation // ---------------------------------------------------------------------------- func newsomething() { u := new(somethingimpl) // more operations u return u } func (l *somethingimpl) handle(handler *handler) { fmt.printf("handler: %s", handler) } file main.go package main import ( "fmt" ) type myhandler struct {} func (h *myhandler) incomingcall(request *somepkg.incomingrequest) { fmt.p

Optimizing Powershell Script to find old files and delete them on DFS replicated folders -

here story. have fileshare replicated between 2 servers located in different places in world. dfs not replicate file if has been viewed, wouldn't want delete file/folder because used within time period have set (7 days). make sure don't remove still used files have check both locations lastaccesstime. i have this set-executionpolicy remotesigned $limit = (get-date).adddays(-7) $pathone = "firstpath" $pathtwo = "secondpath" $tobedeletedpathone = get-childitem -path $pathone -recurse -force | where-object { !$_.psiscontainer -and $_.lastaccesstime -lt $limit } $tobedeletedpathtwo = get-childitem -path $pathtwo -recurse -force | where-object { !$_.psiscontainer -and $_.lastaccesstime -lt $limit } $diffobjects = compare-object -referenceobject $tobedeletedpathone -differenceobject $tobedeletedpathtwo -includeequal $tobedeletedoverall = diffobjects | {$_.sideindicator -eq "=="} after this, loop through , delete files marked deletion both locat

node.js - Socket io Client Side connection Failure -

Image
i trying write simple code client server communication,my server starting when start client throws error,i have posted code below please solve this. server.js express = require('express'); var app = express(); var server = require('http').createserver(app); var io = require('socket.io')(server); io.set('transports', ['xhr-polling']); app.use(express.static(__dirname + '/bower_components')); app.get('/', function(req, res,next) { res.sendfile(__dirname + '/index.html'); }); io.on('connection', function(client) { console.log('client connected...'); client.on('join', function(data) { console.log(data); }); }); server.listen(8080,function() { console.log("server conected"); }); index.html <!doctype html> <html lang="en"> <head> <

angularjs - InnapBrowser in Ionic not working -

i using inappbrowser plugin open site pages in application. problem when touch item, inappbrowser no return, or adb error logs, while in web browser, testing ionic serve, works ... here code: html: <ion-item ng-repeat="item in posts | filter: query" class="item-thumbnail-left item-text-wrap item-icon-right item-noticia" ng-click="urlchange('{{item.permalink}}')"> <img class="thumb-noticia" data-ng-src="{{item.thumbnail}}"> <h2> {{item.title}} </h2> <p>{{item.excerpt | limitto: 100}}...</p> <ion-option-button class="button-dark button-facebook" ng-click="shareanywhere()"> <i class="icon ion-social-facebook icon-facebook"></i> </ion-option-button> <ion-option-button class="button-dark button-whatsapp" ng-click="shareanywhere()">

.htaccess - Apache server loads page instead of applying rewrite rule -

i'm trying make website add trailing slash , rewrite uri html page. redirect xy.com/abc xy.com/abc/ , , load xy.com/abc.html . my .htaccess file looks this: rewriteengine on rewritebase / rewriterule ^([a-z]+)$ $1/ [r] rewriterule ^([a-z]+)/$ $1.html [l] when try going xy.com/asd (non-existing page) redirects xy.com/asd/ , gives me proper 404 error. when try page exists ( xy.com/about ), loads xy.com/about.html without redirecting @ all. try code: options -multiviews rewriteengine on rewritebase / rewriterule ^([a-z]+)$ $1/ [r,nc,l] rewritecond %{document_root}/$1.html -f rewriterule ^([a-z]+)/$ $1.html [l,nc]

xquery - XDMP-MODNOTFOUND: (err:XQST0059) Module /c/code/lib-multipart-post.xqy not found -

i quite new marklogic user. developed pipeline runs following module: xquery version "1.0-ml"; import module namespace cpf="http://marklogic.com/cpf" @ "/marklogic/cpf/cpf.xqy"; import module namespace local="http://marklogic.com/ps/lib-multipart-post" @ "/c/code/lib-multipart-post.xqy"; import module namespace util = "http://marklogic.com/xdmp/utilities" @ "/marklogic/utilities.xqy"; declare variable $cpf:document-uri xs:string external; declare variable $cpf:transition node() external; if (cpf:check-transition($cpf:document-uri,$cpf:transition)) try { let $basename := util:basename( $cpf:document-uri ) let $rosokaresultpath :=util:basepath( $cpf:document-uri ) let $docname := substring-before($basename, '.') let $newpath := fn:concat($rosokaresultpath ,'/',$docname,'_rosoka.xml') let $rosokaconn := local:multipart-post( "http://localhost:8080/rosok

uilabel - Swift, Label not refreshing while in callback function -

i want change/reload label on activity indicator while running on loop. not reloading because of “self.netutil.callwebservice(urlstr) {(data)” presume. my code below ————————————— if netutil.isconnectedtonetwork() == true { self.showactivityindicator(self.view,message: "synch progress...") //logic toc web service var urlstr: string = "\(constants.server_url)" self.container.addsubview(self.lblprocess) self.netutil.callwebservice(urlstr) {(data) -> void in self.filemgr.createfiledirectory("/surveyor") self.filepath = self.filemgr.createfile(self.filemgr.getsurveyourproplistxmlname("")) self.filemgr.writefile(data, filenamepath: self.filemgr.getsurveyourproplistxmlname("")) self.xmlnsdata = data.datausingencoding(nsutf8stringencoding)! self.beginparsing() self.loadpropertymap()