Posts

Showing posts from May, 2010

Eclipse icons are very small on high resolution screen - Windows 8.1, Lenovo Yoga Pro 2 -

i trying work eclipse on laptop - 3200x1800 resolution. a majority of icons practically invisible. i found 2 discussions on topic: eclipse interface icons small on high resolution screen in windows 8.1 eclipse icons small on high resolution screen where can seen open issue in eclipse bug system, yet fixed: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382972 i tried workarounds suggested in both discussions: using windows xp compatibility mode didn't work me since removed in windows 8.1 eclipse version). setting lower resolution results in ugly result since laptop configured work high resolution applications. the solution suggested here - eclipse interface icons small on high resolution screen in windows 8.1 seemed promising one. however, when observed there new forks github project, , tried newest 1 - https://github.com/phantomydn/eclipse-icon-enlarger it failed me: managed create jar file instructed , run on eclipse, resulting eclipse.exe fails run

javascript - Text on the image in multiple DIVs -

i have simple css container , 3 different divs inside aligned center. in each div, there image , text above of each image . far working fine. however, put text on each image of possible (center inside image). tried play instruction ( here ), couldn't work. please help! here css: .containercurve1 { width:90%; border:0px solid black; text-align:center; margin-left:auto; margin-right:auto; background-color:white; border-radius: 25px; padding:20px; max-height: 80%; height: 80%; height:80vh; } .imglevel1 { margin-right:15px; width:300px; height:260px; background:#b2b4b3; padding:12px; border:2px solid #ffb652; } .linkimage { text-decoration: none; } here html: <div class="containercurve1"> <div style='display: inline-block; vertical-align: top;'> <a href="page1.html" class="linki

How to prevent Unicode characters from rendering as emoji in HTML from JavaScript? -

Image
i'm finding unicode special characters fileformat.info's search . some characters rendering classic black-and-white glyphs, such ⚠ (warning sign, \u26a0 or &#x26a0; ). these preferable, since can apply css styles (such color) them. others rendering newer cartoony emoji, such ⌛ (hourglass, \u231b or &#x231b; ). these not preferable, since cannot style them. it appears browser making change, since i'm able see hourglass glyph on mac firefox, not mac chrome nor mac safari. is there way force browsers display older (flat monotone) versions display? update : seems (from comments below) there text presentation selector , fe0e , available enforce text-vs-emoji. selector concatenated suffix without space onto character's code, such &#x231b;&#xfe0e html hex or \u231b\ufe0e js. however, it not honored browsers (eg chrome , edge). i got way prevent case. append piece of code &#xfe0e; after character, force define text rather emo

arrays - Search through a JavaScript object and its nested properties looking for something in underscore -

Image
i looking use .where or .find through array of objects like: looking user inputs might match. so imaging, have expanded object have array of them. can see here, there relationship between object (user) , profile (the expanded node). if enter in (into search box) "ca", should matching elements because see here: user.profile.data.country === 'ca' evaluates true. now if enter in "kyle", again should object because middle_name kyle. the question is, how use where or find search array of objects, going deep nesting goes search value matches? an example of how deep nesting can go: - user - profile - contact_info - id_verification - investments (array) - offering - company if type in "shoppers" , shoppers company return object. ideas? you can use recursion find property given value; added path attribute indicate nested object found var data = { user: { profile: {}, contact_info: {},

javascript - Set size of image from canvas -

so i'm using protractor in project , in test want convert canvas element image specific size. have conversion down can't seem change size of image. here's code: it('should save image', function(done) { //because of protractor browser.driver.executescript(function () { var can = document.queryselector('#workspace-canvas'); var data = can.todataurl("image/png"); var image = new image(); image.width = 500; image.height = 500; image.src = data; console.log(image.height, image.width); //1122 1888 var link = document.createelement('a'); link.href = image.src; link.download = 'study-chart.png'; link.click(); return data; }).then(function (result) { browser.sleep(2000); done(); }); }); i'm not able change size of canvas. in fiddle can see image size changed in dom, when download it, image 200x200 pixels because of canvas size. missing? the problem adjus

php - Undefined function mcrypt after update OSX to "El Capitan" -

i have problem mcrypt extension after update "yosemite" "el capitan". fatal error: call undefined function mcrypt_decrypt() in /users/pilipe/sites/prestashop-test/classes/rijndael.php on line 68 in php.ini, added line : extension="/usr/local/cellar/php56-mcrypt/5.6.13/mcrypt.so" when launch command line : php -i | grep 'mcrypt' i have : additional .ini files parsed => /usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini registered stream filters => zlib. , bzip2. , convert.iconv. , string.rot13, string.toupper, string.tolower, string.strip_tags, convert. , consumed, dechunk, mcrypt. , mdecrypt. php warning: unknown: not safe rely on system's timezone settings. required use date.timezone setting or date_default_timezone_set() function. in case used of methods , still getting warning, misspelled timezone identifier. selected timezone 'utc' now, please set date.timezone select timezone. in unknown on l

javascript - Uploading same file into text box after clearing it, is not working in Chrome -

i trying work example: http://jsfiddle.net/200eoamf/1/ that code in part, can see code in jsfiddle: var onfilereadfn = $parse(attrs.onreadfile); var reader = new filereader(); reader.onload = function() { var filecontents = reader.result; // invoke parsed function on scope scope.$apply(function() { onfilereadfn(scope, { 'contents' : filecontents }); }); }; reader.readastext(element[0].files[0]); the following issue occurs in chrome browser, not in firefox : if choose file, myfile.txt , appear in text box. however, if manually clear window selecting entire text , deleting it, , trying upload same file myfile.txt again, won't upload. why happening , how fix it? thanks. you have 2 options, 1 use clear button user can manually it, option clear value of previous file when user clicks on input. here later: http://jsfiddle.net/200eoamf/12/ element.bind('click', function() { element.val(null); });

Install Distribution on Existing Drupal INstallation -

how install distribution on existing drupal installation, wanted install openenterprise on newly installed drupal softtacolous? tried going through themes route did not work. don't use softacolous , manual install , solves it.

java - NQueens with Stacks -

my assignment find number of solutions nqueens problem n. i'm having real tough time doing n other 5. honestly, don't know problem code anymore , it's due in 5 hours. really love help/advice. (my teacher wrote main method , printsolution method , i'm allowed use stacks) my code: import java.util.stack; public class nqueens { public static int solutions = 0; public static stack<integer> queens = new stack<integer>(); public static int col = 0; public static int row = 0; public static boolean done = false; public static boolean check(int n) { int rd = 1; (int = row - 1; >= 0; i--) { if (queens.get(i) == col + rd++) return false; } //checks diagonally right system.out.println("right " + "col: " + col + " row: " + row); int ld = 1; (int = row - 1; >= 0; i--) { if (queens.get(i) == col - ld++) return false; } //checks diagonally left system.out.println("left "

osx - Grey out tray icon in Swift on click. -

i have created simple tray application doing background checks. have added submenu tray application. want icon of tray application greyed out when click "stop" item of menu. with statusitem.enabled = false; can grey out tray icon disabling whole application. is there other possibility grey out icon or have add icon , change icon on click?? i found solution problem. 2 icons needed let statusitem = nsstatusbar.systemstatusbar().statusitemwithlength(-1) let icon = nsimage(named: "statusicon") let icongrey = nsimage(named: "statusicongrey") then have change whatever like statusitem.image = icon statusitem.menu = statusmenu or statusitem.image = icongrey statusitem.menu = statusmenu

c - Debug Macro strange behaviour -

i have file such: #include <stdio.h> #include <string.h> #include <stdlib.h> #define debug int main(void) { #ifdef debug printf("we in debug mode"); #endif } i told use ifdef , endif (for this). problem occurs when compile this, using makefile(which i'm not allowed edit). happens print statement (debug one) prints, shouldn't because i'm not in debug mode. tried use command (on ubuntu 14.04) make -debug but did different, , output file, prints ifdef statement, despite not being in debug mode. doing wrong? you explicitly defining debug in source file #define debug remove line not overriding definition build environment.

javascript - Merge two onLoad scripts into one -

i have 2 onload scripts <body onload=" (function($){ $(document).ready(function(){ $(window).scroll(function() { if ( $(window).scrolltop() >= ($('body').height() - $(window).height()) ) { $(window).scrolltop(1); } else if ( $(window).scrolltop() == 0 ) { $(window).scrolltop($('body').height() - $(window).height() -1); } }); }); })( jquery );"> and <body onload="window.scroll(0, 1500)"> i need them in same onload="" , still working. can me this? thank you!! <body onload=" $(window).scroll(function() { if ( $(window).scrolltop() >= ($('body').height() - $(window).height()) ) $(window).scrolltop(1); else if ( $(window).scrolltop() == 0 ) $(windo

objective-c : if statement not working properly -

this isn't whole code i'm trying textview box , see if value has been put in. if not want first bit if not want go else... whatever crashes or doesn't work. -(ibaction) sendpressed{ if((youtubeurl.text = @"")){ //if doesnt have value nslog(@"no youtube clip"); youtubelink = @""; } else{ //if youtube url has been entered nslog(@"youtube clip found"); completeurl = youtubeurl.text; youtubelink = [completeurl substringfromindex:16]; } your if statement performing assignment. intend performing comparison. also, should not use == comparison of nsstring s. try this: - (ibaction)sendpressed { if([youtubeurl.text isequaltostring:@""]) { //if doesnt have value nslog(@"no youtube clip"); youtubelink = @""; } else{ //if youtube url has been entered nslog(@"youtube cli

ios - Conditional cast from 'UIButton' to 'UIButton' always succeeds -

i'm newer on ios , when download other workspaces xcodes, give warnings on project,anyone helps ? thanks!!! don't decrease score, has been time newer? code let button = uibutton(type: uibuttontype.system) as? uibutton you don't need cast. swift can deduce type in case. enough: let button = uibutton(type: .system)

numpy - Python: Printing elements in the defaultdict based on the order in the OrderedDict -

import string collections import namedtuple collections import defaultdict collections import ordereddict matrix_col = {'11234':0, '21234':2, '31223':0, '46541':0, '83432':1, '56443':2, '63324':0, '94334':0, '72443':1} matrix_col = ordereddict(sorted(matrix_col.items(), key=lambda t: t[0])) trans = defaultdict(dict) trans['11234']['46541'] = 2 trans['11234']['21234'] = 1 trans['11234']['31223'] = 2 trans['11234']['83432'] = 1 trans['21234']['31223'] = 2 trans['21234']['46541'] = 1 trans['21234']['72443'] = 1 trans['21234']['83432'] = 1 trans['56443']['72443'] = 1 trans['56443']['83432'] = 1 u1, v1 in matrix_col.items(): u2, v2 in matrix_col.items(): w1 in trans.keys(): w2, c in trans[u1].items(): if u1 == str(w1

java - Why am I getting Dark theme when I have declared it to be light? -

i'm developing app material design. i have added toolbar activity & have set it's theme light here: app:popuptheme="@style/themeoverlay.appcompat.light" , still i'm getting dark theme after running it. here's activity_about.xml file's code: <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.abc.xyz.aboutactivity"> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" android:background="?attr/colorprimary" app:layout

haskell - How do I use `break_` in the package "loops"? -

looking package loops , found interesting , useful. however, there's 1 part package don't understand: how supposed use break_ ? let's have function get' :: io (maybe int) , each call return number read file, , returns nothing if eof reached. i'm trying construct simple loop print each number , break upon eof. now, know loop indefinitely can use forever : import control.monad.loop ml import control.monad m main = m.sequence . loop $ ml.forever return $ mx <- get' case mx of nothing -> ??? x -> print x but put break_ ? loopt io int , can put in loopt monad, isn't supposed called mid interation, instead of when defining loops? confuses me. loopt monad transfomer, need liftio print x statement. here usage examples: import control.monad import control.monad.trans (liftio) import control.monad.loop ml -- infinite printing loop foo :: loopt io () f

windows 8.1 - Microsoft Visual Studio Community 2015 Version is slow -

here technical details dell inspiron 15 3000 series computer: -microsoft visual studio community 2015 version 14.0.23107.0 d14rel -microsoft .net framework version 4.6.00081 -windows 8.1 -intel(r) core(tm) i3-4005u cpu @ 1.70ghz -ram: 4.00gb -64-bit operating system, x64-based processor the computer new dell inspiron 15 3000 series. problem starting visual studio slow, , running visual studio applications in debug mode takes long time. update: also, @ microsoft's recommended system requirements microsoft visual studio community 2015, seems system should meet necessary requirements. why slow? https://www.visualstudio.com/en-us/downloads/visual-studio-2015-system-requirements-vs.aspx#1 visual studio community 2015 for additional information on operating system support, see visual studio 2015 compatibility page. hardware requirements •1.6 ghz or faster processor •1 gb of ram (1.5 gb if running on virtual machine) •4 gb of available hard disk space •5400

android - How to set app background from phone gallery -

i'm sure there answer out there somewhere can't seem find anything. trying make when user clicks on item on app menu start intent phone's gallery choose image of choice change background of app rather pre-set background image. there way of doing this. here code have when run on phone, app crashes. @override public boolean onoptionsitemselected(menuitem item) { // handle action bar item clicks here. action bar // automatically handle clicks on home/up button, long // specify parent activity in androidmanifest.xml. int id = item.getitemid(); //noinspection simplifiableifstatement intent sendintent = null; if (id == r.id.action_settings) { sendintent = new intent(); sendintent.setaction(intent.action_send); sendintent.putextra(intent.extra_text, "try out new app..."); sendintent.settype("text/plain"); startactivity(sendintent); } packagemanager packagemanager = getpacka

C Linked List segmentation fault 11 -

i keep getting segmentation fault: 11 error , don't know why. my code: typedef struct node* nodeptr; struct node { nodeptr next; void *val; }; struct list { nodeptr head; }; typedef struct list* listptr; int compare(void *one, void *two) { if(*(int*)one < *(int*)two) return -1; else if(*(int*)one > *(int*)two) return 1; return 0; } listptr create() { listptr blah = malloc(sizeof(struct list)); memset(blah, 0, sizeof(struct list)); return blah; } nodeptr scan(nodeptr head, void *obj) { nodeptr previous, current; previous = head; current = head->next; // segmentation fault here!! while(current != null && (compare(curry->val, obj) == -1)) { previous = current; current = current->next; } return previous; } int insert(listptr llist, void *obj) { nodeptr newobj = malloc(sizeof(struct node)); nodeptr prevnode, nextnode; prevnode = searc

odoo - Domain Filter is not working on many2many field in OpenERP 7.0 -

i have added new many2many fields wizard view , put invoice filed of many2many fields field on py file : 'sup_inv_entries':fields.many2many('account.invoice', 'sup_inv_rel', 'sup_inv_id1', 'sup_new_inv_id', 'invoice entries'), field on xml view file: <field name="sup_inv_entries" nolabel="1" domain="['|',('period_id','in',period_ids),('&amp;',('date_invoice','&gt;',date_from),('date_invoice','&lt;',date_to)),'&amp;',('type','=','in_invoice'),('state','=','open')]"> i want make filter invoice ids based on periods or date_invoice (from date , date ) based on user selected scenario wizard.

javascript - change color of special characters in HTML -

i've unicode html page (saved in db), there anyway can programmatically change color of "." , ":" characters in text (please pay attention html content has inline css may contain "." or ":" characters, want change color of mentioned characters in real text. what options? 1 way can finding these characters in text , put them in tag, can styled, other suggestion? (if i'm going use method, how can distinguish between html/css characters , real characters in text?) i'm using asp.net/c# try utilizing string.prototype.replace() regexp /\.|:/g , returning i element style attribute set specific color var div = document.getelementsbytagname("div")[0]; div.innerhtml = div.innerhtml.replace(/\.|:/g, function(match) { return "<i style=color:tomato;font-weight:bold>" + match + "</i>" }) <head> <meta charset="utf-8" /> </head> <body>

mysql - How to get the count of season subscribed from wordpress -

i have query select um.user_id wp_season_user_trans ut left join wp_usermeta um on um.meta_value='member' , ut.user_id = um.user_id group um.user_id. i want count of subscribed persons members usermeta table. from usermeta table getting 10 members. when join other table not getting same result.

linux kernel - not understand the mechanism of free_netdev -

i study network-device-driver recently. somehow not understand free_netdev function. i have read following link: possible de-reference of private data using net_device the answer says when free network device, private data free. after checking function, found call following function: void netdev_freemem(struct net_device *dev) { char *addr = (char *)dev - dev->padded; kvfree(addr); } but cannot understand why call function free net_device memory, , private data? or understanding wrong... just wondering if can guide me understand mechanism of free_netdev. thanks in advance. check out alloc_netdev() function definition in net/core/dev.c alloc_size = sizeof(struct net_device); if (sizeof_priv) { /* ensure 32-byte alignment of private area */ alloc_size = align(alloc_size, netdev_align); alloc_size += sizeof_priv; } /* ensure 32-byte alignment of whole construct */ alloc_size += netdev_align - 1; p = kzalloc(alloc_size, gfp_kerne

javascript - Video is no working in safari(from Windows) but working in Mozilla and chrome -

i working in this site. video in home page working fine in mozilla , google chrome , safari in mac not working in safari in windows. code using , joy christian academy click here play <div class="popmain_video" style="display: none;"> <span class="button b-close">x</span> <video id="embed_container" class="video-js vjs-default-skin" poster="http://joychristianacademy.com/wp-content/uploads/2015/07/slider1.png" preload="" controls="controls" width="80%" height="360"> <source src="http://joychristianacademy.com/wp-content/uploads/2015/09/jo(h.264).mov"> <source src="http://joychristianacademy.com/wp-content/uploads/2015/09/409838752.mp4"> </video> please me find solution. thanks safari windows doesn't officially support html 5.0 or above. might helpful you, https://superuser.com/questions/870133/html5-vi

Node.js & three.js load Texture on cube -

essentially, generating static scene using three.js module node.js. unfortunately, scene being rendered without browser, can not use three.imageutils.loadtexture . i given error when using - understand document not exist rendering server side. var materials = [ new three.meshlambertmaterial({map: three.imageutils.loadtexture('url here'')}), new three.meshlambertmaterial({map: three.imageutils.loadtexture('url here'')}), new three.meshlambertmaterial({map: three.imageutils.loadtexture('url here'')}), new three.meshlambertmaterial({map: three.imageutils.loadtexture('url here'')}), new three.meshlambertmaterial({map: three.imageutils.loadtexture('url here'')}), new three.meshlambertmaterial({map: three.imageutils.loadtexture('url here')}) ]; returns /usr/src/node-v0.10.40/node_modules/three/three.js:13028 var image = document.createelement( 'img' ); ^ referenceerr

mysql - Python sql statement error -

i've run problem while trying execute insert statement python. here function definition: def fill_course(param_string): ar = param_string.split("|") db = connect() sql = ( "insert course(`name`, `duration`, `dept`) " "values (%s, %s, %s)" ) data = ar[0], ar[1], ar[2] cursor = db.cursor() cursor.execute(sql, data) db.commit() if cursor.rowcount == 0: res = 0 elif cursor.rowcount == 1: res = 1 db.close() print(res) return res i've followed this link reference. the error getting : file "database.py", line 25 "insert course "values (%s, %s, %s)" ^ syntaxerror: invalid syntax i not able understand part of syntax wrong here? please write following string "insert course(`name`, `duration`, `dept`) " "values (%s, %s, %s)" like below: "insert

C++ const string literals and custom string class -

in c++ string literals "hello" const , immutable. wanted make custom string class strings not const chars, can changeable here snippet of code might illustrate i'm trying do: #include <iostream> class string { public: char * p_start; string(char * strsourc) // constructor { p_start = strsourc; } }; int main() { string mystring("hello"); // create object mystring, send "hello" string literal argument std::cout << mystring.p_start << std::endl; // prints "hello" *mystring.p_start = 'y'; // attempt change value @ first byte of mystring.p_start std::cout << mystring.p_start << std::endl; // prints "hello" (no change) mystring.p_start = "yellow"; // assigning string literal p_start pointer std::cout << mystring.p_start << std::endl; // prints yellow, change works. thought mystring "hello" const chars

c - undefined reference to `_doFormatMessage' using i586-mingw32msvc-gcc -

i using:linux kali 3.18.0-kali3-586 #1 debian 3.18.6-1~kali2 (2015-03-02) i686 gnu/linux i have executed below command: i586-mingw32msvc-gcc 1197.c -lws2_32 -o 1197.exe get output: 1197.c:112:43: warning: multi-character character constant 1197.c: in function ‘explorerexecution’: 1197.c:112: warning: overflow in implicit constant conversion 1197.c:115:43: warning: multi-character character constant 1197.c:115: warning: overflow in implicit constant conversion 1197.c: in function ‘main’: 1197.c:173: warning: return type of ‘main’ not ‘int’ /tmp/ccaflcqw.o:1197.c:(.text+0x3d6): undefined reference `_doformatmessage' collect2: ld returned 1 exit status header of 1197.c: #include <stdio.h> #include <string.h> #include <winsock2.h> #pragma comment(lib, "ws2_32.lib") please give suggestion why had this: /tmp/ccaflcqw.o:1197.c:(.text+0x3d6): undefined reference `_doformatmessage'

Where is Private resources like icons in Android studio? -

i trying add search icon in actionbar , it's had problem can see in below: how add actionbar white icon in android so, problem was in android studio , i'm using android:icon="@drawable/abc_ic_search_api_mtrl_alpha" but, can't find name in sdk/platforms/res so, icons in actionbar, need these icons name adding in app. where should these files/material icons can ? you can find icons here: https://github.com/google/material-design-icons each icon has png , svg version in sizes. clone repo , browse using file explorer.

Can't get pywin32-219 to work with python 3.5 -

it seems install without error using exe (in case pywin32-219.win-amd64-py3.5.exe) when run python interpreter , try "import win32api" following error: traceback (most recent call last): file "<stdin>", line 1, in <module> importerror: dll load failed: specified module not found. if download zip file , try run "setup3.py install" following output: converting... executing... building pywin32 3.5.219.0 traceback (most recent call last): file "setup3.py", line 16, in <module> exec(str(got)) file "<string>", line 1929, in <module> file "<string>", line 587, in __init__ file "c:\python35\lib\ntpath.py", line 113, in join genericpath._check_arg_types('join', path, *paths) file "c:\python35\lib\genericpath.py", line 143, in _check_arg_types (funcname, s.__class__.__name__)) none typeerror: join() argument must str or bytes, not 'non

How do default and static methods work in java 8 interfaces? -

i have been trying head around on how default , static methods work in java 8? consider following interface: public interface car { default void drive() { system.out.println("default driving"); } static int getwheelcount(){ return wheelcount; } int wheelcount = 7; } and following implementation: public class benz implements car { } now if go main method , write: public static void main(string[] args){ car car = new benz(); car.drive(); system.out.println(car.getwheelcount()); system.out.println(car.wheelcount); } i know going on under hood: does default method called upon instance of car in way similar how abstract classes work? what new features/modifications did language need in order support default , static methods in interfaces? i know default, fields in interface default public static final , in way related above questions. with introduction of default methods, have need of abstract classes anymore? p.s. please

html - Alternative to Grayscale filter CSS3 -

Image
i have created menu have colored logo in each section. have given sections grayscale filter when not on hover problem, said in here , each image appears in different shade of gray, have understood normal behavior of css filter. so looking similar css solution allows me have logos in same shade of gray when no in hover , once hover them go original color. this code when not in hover: .li.logo-menu-seccion { -webkit-filter: grayscale(1); filter: grayscale(1); } and code when hover: -webkit-filter: grayscale(0); filter: grayscale(0); i showing picture can see talking about. this filter convert non-transparent content constant grey on hover. if have white background in image, need knock out first. there way knock out white background inside filter, it's complicated - easier offline. #box-container:hover { filter: url(#constantgrey); } <div id="box-container"> <svg width="200px" height="200px">

node.js - Ionic won't install -

i ask help. have problem installatio of ionic. tried admin rights. my steps: npm uninstall ionic -g npm uninstall cordova -g npm cache clean npm install minimatch -g npm install cordova -g npm install ionic -g this output of bash: $ npm install -g ionic@latest c:\users\michal\appdata\roaming\npm\ionic -> c:\users\michal\appdata\roaming\npm\node_modules\ionic\bin\ionic npm err! path c:\users\michal\appdata\roaming\npm\node_modules\ionic\node_modules\nan\package.json npm err! code eperm npm err! errno -4048 npm err! syscall unlink npm err! error: eperm: operation not permitted, unlink 'c:\users\michal\appdata\roaming\npm\node_modules\ionic\node_modules\nan\package.json' npm err! { error: eperm: operation not permitted, unlink 'c:\users\michal\appdata\roaming\npm\node_modules\ionic\node_modules\nan\package.json' npm err! stack: 'error: eperm: operation not permitted, unlink \'c:\\users\\michal\\appdata\\roaming\\npm\\node_modules\\ionic\\node_m

mysql - MariaDB refusing remote connections -

i using digitalocean ubuntu 16.04 . new version because used older versions before. i have problem in connecting database remotely when logged in phpmyadmin ok. by way followed tutorial in article dan costinel https://askubuntu.com/questions/763336/cannot-enter-phpmyadmin-as-root-mysql-5-7 sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf find line in file bind-address = 127.0.0.1 change ip address server ip adress example: bind-address = 101.10.14.16 and restart service sudo service mysql restart also might have open firewall ports if have ufw firewall enabled take @ article talk in detail https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-16-04#step-5- —-allowing-other-connections

javascript - WebRTC peer connection for more than two client -

i developed video conferencing application 2 clients using webrtc.now required video conferencing more 2 clients. i tried popular muaza khan library rtcmulticonnection https://rtcmulticonnection.herokuapp.com/demos/video-conferencing.html in that, not getting many many video connections.say, using 3 connections 3 different computers , 3 different webcams. #1 opens room, #2 joins, #3 join. #1 sees , can speak #2 , #3. #2 sees #1 not #3. #3 sees #1 not #2. so, #2 , #3 cannot see 1 , # 1 can see everyone.i required can see , communicate each other i checked version v2 of rtcmulticonnection https://www.webrtc-experiment.com/rtcmulticonnection/videoconferencing.html#8268706028321296 working on same network didn't work on different network , version v3 explain above worked on different network didn't give me expected output i checked https://webrtc.github.io/samples/src/content/peerconnection/multiple/ 3 peers. want more 3 peers. can suggest resources or tutorial build

apache camel - onCompletion handler with route scope fires in the middle of route -

i have issue camel 2.19.1. , oncompletion handlers route scope. runtime java 8, karaf 4.0.9. camel context built blueprint. i have defined 3 routes oncompletion handler each: <oncompletion mode="beforeconsumer" parallelprocessing="false" oncompleteonly="true" useoriginalmessage="false"> <log message="<route_name> success." logginglevel="info" logname="policy-repository-adapter" /> </oncompletion> the 3 routes call each other via direct endpoint so: pra-soap-endpoint -> direct:xacml-policy-query -> direct:send-to-pas-endpoint the top-level route pra-soap-endpoint looks (pseudo code, obviously): route pra-soap-endpoint process log "route checkpoint 1" direct:xacml-policy-query log "route checkpoint 2" process end route the log output top-level route , oncompletion handlers looks this: route checkpoint 1 send-to-pas-endpoint success.

r - How to encode a word report from knitr? -

i built function r markdown creates report in word (in hebrew), report comes out hebrew, symbols , numbers comes out formatted english. makes document inconsistent through entire document. an example of r markdown code follows: --- title: "3.5.17" fig.align: "right" output: word_document: reference_docx: desin_word_documents.docx params: n: na konan: na --- ```{r example, include=false} eg_heb <- "שלום עולם" num_heb <- 123 sym_heb <- "!" ``` בתכנות נוהגים לתת לתלמידים כמשימה ראשונה להדפיס על המסך את הביטוי ```r eg_heb``` לעיתים עם הסימן ```r sym_heb``` או עם המספרים ```r num_heb``` i know direction of text reverse, that's okay, solved it, , in end of code comes out okay. also, didn't include "params" in example is included in original code. i work with: r version 3.3.3 (2017-03-06) platform: x86_64-w64-mingw32/x64 (64-bit) running under: windows >= 8 x64 (build 92

How to get SecurityContext in spring security webflux -

in traditional spring web applications, easy securitycontext securitycontextholder , when used spring-security-webflux (spring security 5.0.o.m3) in spring-webflux application, seems spring security did not store securitycontext securitycontextholder every requests. or in other words, there easy way current authentication info outside of webhanlder/controllers? wan implement auditoraware interface auditing(auto fills current user) spring data mongodb.

gnuplot - Gnuplot_i date/time formatting error -

i using gnuplot_i library (version 2.11) in c -code generates png -pictures. time/date column not format correctly. source: gnuplot_ctrl * h0 ; h0 = gnuplot_init() ; gnuplot_set_xlabel(h0, "header") ; gnuplot_cmd(h0, "set terminal png size 800,480") ; gnuplot_cmd(h0, "set output 'picture.png'") ; gnuplot_cmd(h0, "set xdata time") ; gnuplot_cmd(h0, "set timefmt '%y-%m-%d-%h:%m'") ; gnuplot_cmd(h0, "set format x '%h:%m' ") ; gnuplot_cmd(h0, "set grid") ; gnuplot_cmd(h0, "plot \"datafile.tsv\" u 1:2 w l t \"title\" "); gnuplot_close(h0) ; datafile.tsv contains: 2017-09-08-18:03 12.69 2017-09-08-18:04 12.69 2017-09-08-18:05 12.69 2017-09-08-18:06 12.69 ... unfortunately command gnuplot_cmd(h0, "show timefmt"); produces error: warning: empty x range [1.48323e+09:1.48323e+09], adjusting [1.4684e+09:1.49806e+09] defaul

arduino ide - Set board manager as ATmega16 - Arduino Stack Exchange

Image
i tried download atmega16 board in arduino. have set below url under file->preference->additional board manager url https://mcudude.github.io/mightycore/package_mcudude_mightycore_index.json i getting below attach images. how can resolve error , install atmega16 board manager? i using arduino version 1.6.9. don't have issue in opening mightycare , arudino url chrome browser. thanks here. i have resolved few steps. 1) file -> preference -> board manager url below. url seperated commas. http://arduino.esp8266.com/stable/package_esp8266com_index.json,https://mcudude.github.io/mightycore/package_mcudude_mightycore_index.json 2) deleted tmp file (package_index.json.tmp) in path c:\users\simbu\appdata\local\arduino15\ this helped me resolve issue.

osx - Batch file in MAC -

i've developed javscript application. can played online want give users possibility play offline. i've developed batch file on windows searches google chrome executable , calls flags allows application read local files, etc... bat: @echo off echo starting application if "%chromepath%"=="" /f "usebackq tokens=1,2,3,4,5" %%a in (`reg query hkey_local_machine\software\microsoft\windows\currentversion\ /s /f \chrome.exe ^| findstr application`) set chromepath=%%c %%d %%e if "%chromepath%"=="" ( echo cannot continue: google chrome must installed in order play offline version. please download , install , re-run file. set /p dummy=hit enter continue... ) else ( "%chromepath%" %cd%/index.html --allow-file-access-from-files --disable-web-security --enable-file-cookies --user-data-dir=c:\chromelocalwebeaser ) can me understand how same thing on mac computers? thanks

ios - How to send clicked item of Table View to other view controller when datasource and delegate are separate from View Controller -

i beginner ios coming android background , learned table view (for me it's android listview). trying separate data source & delegate view controller. found tutorials on how stuck @ figuring out how send clicked item view controller. code below: class picturetableviewcontroller: uiviewcontroller { @iboutlet weak var picturetableview: uitableview! private let picsdatasource: picturesdatasource required init?(coder adecoder: nscoder) { self.picsdatasource = picturesdatasource() super.init(coder: adecoder) } override func viewdidload() { super.viewdidload() picturetableview.datasource = picsdatasource picturetableview.reloaddata() picturetableview.delegate = picsdatasource } } class picturesdatasource: nsobject, uitableviewdatasource, uitableviewdelegate{ private var picturemodels = [picturemodel]() override init(){ let picmodelsdatacontroller = picturemodelsdatacontroller()

c# - Why is AutoFixture executed more than once? -

i've been using autofixture / automoqdata / nunit several months now, quite happily far. but i'm getting stuck on weird: if want run single test in test suite (using testdriven), seems automoqdata attribute launched several times (between 5 , 9, don't know why, , decides how many times runs). the problem if try freeze object instance in autofixture customizations, it'll end freezing 5 9 objects, using many fixture instances, , have no clue 1 injected in test. is there way avoid ? why happen in first place ? sample code : public class automoqdataattribute : autodataattribute { public automoqdataattribute() : base(new fixture() .customize(new automoqcustomization()) .customize(new frozenfoocustomization()) // freezing object .customize(new frozenfixturecustomization()) // freezing passed fixture have fixture instance available in test body .customize(new staticbindingcustomization()) // binding fr

symfony - Form as service not working -

i have problem load form service in symfony 3.2 created custom field as: class imagetype extends abstracttype { private $path; /** * imagetype constructor. */ public function __construct($path) { $this->path = $path; } /** * @return string */ public function getparent() { return filetype::class; } /** * @return string */ public function getname() { return 'image'; } /** * @param optionsresolver $resolver */ public function configureoptions(optionsresolver $resolver) { $resolver->setdefaults(array( 'image_name' => '' )); } /** * @param formview $view * @param forminterface $form * @param array $options */ public function buildview(formview $view, forminterface $form, array $options) { $view->vars['image_name'] = $options['image_nam

python - PYODBC to upload a file in a database from a webpage -

how create webpage can upload file , connected pyodbc upload directly database? below code path of file hard coded want make dynamic creating simple web page has option upload file , file should uploaded database using python odbc connection: import pyodbc conn = pyodbc.connect('driver={hdbodbc};servernode=xxyyy;serverdb=xxx;uid=xyxyxyx;pwd=xxxxx') cur = conn.cursor() **file = open('c:/pdf-sample.pdf','rb')** //this hard coded path of file, should changed , taken dynamically web page file uploaded. content = file.read() cur.execute("insert test.my_table_blob_test values(?,?)", ('1',content)) cur.execute("commit") file.close() cur.close() conn.close()

plugins - Second dropdown changes after select first dropdown in joomla xml -

i making these dropdown list in xml plugin:- category multi-select dropdown, subcategory multi-select dropdown .i want when select first category dropdown second dropdown list come under selected category on first dropdown. example:- <field name="category- list" type="sql" default="" label="category" sql_select="e.*" sql_from="#__category e" sql_group="category" sql_order="e.cat_id asc" key_field="cat_id" value_field="category" multiple="true" /> <field name="subcategory - list depend on category list" default="" type="sql" label="subcategory" sql_select="e.*" sql_from="#__subcategory e" sql_group="subcategory" sql_order="e.subcat_id asc" sql_filter="cat_id" key_field="subcat_id" value_field="subcategory" multiple="true" /> create table c

javascript - How to loop sql data into array and adding keys? -

this question has answer here: loop through array in javascript 34 answers i know how loop of sql datas (that parsed json table) array, adding key each of them. i know how can loop of data simple string : var dbstring =""; for(i = 0; < result.response.length; i++) { dbstring += result.response[i].names; } this var dbstring = "james michael alfred...."; but how can make : var dbstring = {"james":1, "michael":2, "alfred":3, .....} thanks. it's unique demand organise list of names want, here is: var dbstring = {}; var names = result.response; for(var = 0; < names.length; i++){ dbstring[names[i]] = + 1; }

networkx set node attributes from python dictionary -

i'm trying write general function creates graph takes list of nodes , edges. each node, there's set of default attributes, , set of optional attributes. optional attributes can anything, i'm thinking use dictionary store them. however, looks add_node() doesn't seems accept variable keyword. given below code snippet, import networkx nx optional_attrs = {'ned':1, 'its':'abc'} g = nx.graph() g.add_node('node1') k, v in optional_attrs.iteritems(): g.add_node('node1', k=v) print g.node(data=true) i nodedataview({'node1':{'k':'abc'}}) instead of, nodedataview({'node1':{'ned':1, 'its':'abc'}}) i wonder possible achieve that? in general in python if want use dict provide keyword arguments function prepend dict ** . g.add_node('node1', **optional_attrs) you can add/change node attributes after adding nodes: g.add_node('node1'

Unrar a file in custom folder -

am trying extract rar file directory (c:\autoexe\source). here "autoexe" folder name changes everyday. fullname not change, constant thing "auto" in string "autoexe", exe part changes. tried below for /f "delims=" %%a in ('dir /b "%cd%\samples\package.rar"') start "" "%programfiles%\winrar\winrar.exe" x -ibck "%cd%\samples\package.rar" *.* "%cd%\auto * \source" this commented batch code error handling should job: @echo off rem name of first non hidden subfolder starting auto in current folder. /d %%i in (auto*) set "foldername=%%i" & goto checkarchive echo error: there no auto* folder in: "%cd%" echo/ pause goto :eof :checkarchive if exist "samples\package.rar" goto extractarchive echo error: there no file "package.rar" in subfolder "samples" of echo folder: "%cd%" echo/ pause goto :eof :extractarch

Using ReactJS how do rows with input text fields maintain state after being sorted -

using reactjs: i have container 6 rows. each row has product name , input text field. if enter quantity input text field , sort list (ie a-z, or z-a) input text fields cleared. i've created example of problem on codepen. how can sort rows , have input text fields keep value? https://codepen.io/_d_v_/pen/brxqqq class row extends react.component { constructor(props) { super(props); this.state = { inputvalue: '' } } handleinputchange(e) { this.setstate({ inputvalue: e.target.value }); } render() { return (<div classname='row'> <span classname='product-name'>{this.props.placeholder}</span> <input type='text' classname='row__input-field' value={this.state.inputvalue} onchange={ e => this.handleinputchange(e) } /> </div>); } } class container extends react.component { constructor(props) { su