Posts

Showing posts from September, 2010

javascript - Automatically Add Class To Subchild & Parent LI With jQuery -

i have been searching hours solution problem , none of them seem work way like. need jquery automatically add class "active" main li , child li if on page. first code block simple structure, second code block how needs if on "billing_forecast.php" page. <aside id="sidebar"> <!--| main menu |--> <ul id="side-menu" class="side-menu"> <li> <a href="index.php"> <i class="zmdi zmdi-home"></i> <span>home</span> </a> </li> <li class="sm-sub sms-bottom"> <a href=""> <i class="zmdi zmdi-money zmdi-hc-fw"></i> <span>billing</span> </a> <ul>

xcode - How to call a method defined in a UIView controller from a UIView placed within the ViewController -

how call method defined in uiview controller uiview placed within viewcontroller. if isn't possible how make button placed within uiview call segue? spent hours trying figure out. so took me day managed find simple workaround. in uiview.h create uiviewcontroller property , in viewcontroller set uiviews property .self . having done within uiview can access property , there call prepare segue.

android - Multiple SQLite Tables not working correctly -

i attempting create 2 sqlite tables. 1 holds "todoitem"s , other holds "detailitem"s. when creating them , logging them this: i/todos: [todoitem [id=1, todoitemname=1], todoitem [id=2,todoitemname=2]] i/detailitems: [todoitem [id=1, todoitemname=["1.1","1.2","1.3"]], todoitem [id=2, todoitemname=[]]] as may notice, seems both tables contain todoitems 1 supposed holding "detailitem"s. here code of databasehelper: public class sqlitehelper extends sqliteopenhelper { private static final int database_version = 1; private static final string database_name = "productdb.db"; public static final string table_products = "products"; public static final string table_details = "details"; //common columns public static final string column_id = "_id"; //todoitem columns public static final string column_productname = "productname"; //detailitem columns public sta

jquery - CSS with background image and a little content -

i have background image going overlay testimonial in near lower right. having hard time work responsive design. have image 930x454 want show entire image. tried set min-width , min-height , can work when shrink window wider screen. ideally want image not exceed 100% width of screen size. content 3 sentences not come close taking 930x454. do need write resize function or there easy css solution this. two key concepts important here: positionin g (in case relative on parent , absolute on text box), , background-size . i'll leave google those. .background { background-image: url('http://lorempixel.com/930/454/nature'); background-size: cover; height: 0; padding-bottom: 56.25%; max-width: 100%; position: relative; } .text { position: absolute; right: 20px; bottom: 20px; background: rgba(255,255,255,.3); padding: 20px; } <div class="background"> <div class="text">some text.</

Allow CORS in Wordpress getting meetup API -

im having trouble allowing cross site. adding meetup api wordpress pages. added header , .htaccess, respectively. header("access-control-allow-origin: http://domain.com"); header set access-control-allow-origin: http://domain.com i have themes , other plugins installed. there particular place suppose insert headers? not sure else should look.

php - Fatal Error Exception in Laravel app -

i have problem laravel 5.1 app. php version 5.6.16. doing wrong? fatalerrorexception in d4c2ea460399317ac416d4c481ae27fb line 75: syntax error, unexpected ')', expecting identifier (t_string) or variable (t_variable) or '{' or '$' <?php $__env->startsection('content'); ?> <?php /**/ usort($tablegrid, "sitehelpers::_sort") /**/ ?> <div class="page-content row"> <!-- page header --> <div class="page-header"> <div class="page-title"> <h3> <?php echo e($pagetitle); ?> <small><?php echo e($pagenote); ?></small></h3> </div> <ul class="breadcrumb"> <li><a href="<?php echo e(url::to('dashboard')); ?>"> dashboard </a> </li> <li class="active"> <?php echo e($pagetitle); ?> </li> <

How should HTTP server implementation handle internal errors? -

i'm implementing simple http server. since expect amount of data per request quite large, make sense me send response in smaller chunks, clients able process data continuously stream , don't need wait last bit. eager may try out, there 1 thing troubling me: should when server encounters error after portion of response has been transmitted client? there http mechanism tell client discard part of response has arrived far? thanks in advance, pete. http doesn't have here, tweak your stream's format/protocol send status/error codes on it. example, start every chunk status code.

javascript - Information not saving into Local Storage -

java script function getid() { 'use strict'; var pass1, pass2; pass1 = document.getelementbyid("pass1").value; pass2 = document.getelementbyid("pass2").value; if (pass1 !== pass2) { window.alert("passwords not match"); document.getelementbyid("pass1").value = ""; document.getelementbyid("pass2").value = ""; } else { logininfo[index] = { fname: document.getelementsbyname("firstname").value, lname: document.getelementsbyname("lastnane").value, student: document.getelementsbyname("studentn").value, password: document.getelementsbyname("password2").value }; index++; localstorage.setitem("login", json.stringify(logininfo)); window.location = "login.html"; } } html <form> <div class="login-c

ruby on rails - Has_many through association not working -

in node model have association below, 2 nodes linked in link model: has_many :first_links, class_name: "link", foreign_key: "first_node_id" has_many :second_links, class_name: "link", foreign_key: "second_node_id" belongs_to :organization i want have links associated node, irrespective whether node first_node or second_node . therefore have method below in node model: def links first_links + second_links end if try node.first.links in console, works , list of links node, irrespective if node first or second node of link. relationship seems working. in organization model have: has_many :nodes has_many :links, through: :nodes, source: :links however, organization.first.links in console generates error: could not find source association(s) "link" or :links in model node. what doing wrong through association? update: understand need custom method co

How do I create a Python Placeholder for Elements that are Empty parsed from an XML File? -

i want start off saying new python, love language. problem: provided large juniper configuration file in xml format. using elementtree library parse through file. file has 5 main roots (parents) , several nested children. trying append text several list several element tags , display data. have verified paths each. think problem elements empty, when display data each of list, corresponding data output not match within xml document. there way tell elementtree when parsing document , appending element list, if element text empty append "none" string? element placeholder speak. hope when display data of several lists, match within xml document because same number of elements accounted in iteration each list. thank you! code example: import xml.etree.elementtree et # file parse, submit memory tree = et.parse('juniperxmlconf-name-newsslvpna.xml') root = tree.getroot() #defining relevant root tag. children of root tag user_realms = root[3][0] user_roles =

In elasticsearch, how to group by value inside nested array -

say, have following documents: 1st doc: { productname: "product1", tags: [ { "name":"key1", "value":"value1" }, { "name":"key2", "value":"value2" } ] } 2nd doc: { productname: "product2", tags: [ { "name":"key1", "value":"value1" }, { "name":"key2", "value":"value3" } ] } i know if want group productname, use terms aggregation "terms": { "field": "productname" } which give me 2 buckets 2 different keys "product1", "product2". however, should query if group tag key? i.e. group tag name==key1, expecting 1 bucket key="value1"; while if group tag name==key2, expecting result 2 buckets keys "value2", "value3". what sho

Facebook Game Application Flash CS6 AS3.0 -

i'm planning on creative facebook app college project i'm unsure how go specifics. i have been working within flash (animation, general as3.0 coding) close 3 years i'm pretty comfortable working within program. have looked lot of information using facebook sdk actionscript etc. i'm not sure i'm doing in relation this. is possible create entire game within flash cs6 , add necessary php additions (for posting timelines etc.) afterwards? sorry not having clue extremely welcome! you can examples http://code.google.com/p/facebook-actionscript-api/ thanks dhiraj

firewall - How are do I specify both source and destination flags in the iptables FORWARD chain? -

since have iptables running on router, seems chain works forward chain block traffic between lan , internet. in these forward chain rules, like... iptables -i forward 1 -d 198.41.16.0/17 -j reject ...but since router doesn't understand direction of traffic, need 2 rules, this... iptables -i forward 1 -d 198.41.16.0/17 -j reject iptables -i forward 1 -s 198.41.16.0/17 -j reject is there way combine them? or missing something? to knowledge, not possible have iptables command (effectively) or match in it. expect way desired outcome 2 separate statements. best of luck!

javascript - is it possible to generate art with PHP or JS? -

like our avatars: possible create simple avatar can use placeholder users? , extending that: how far can go art preferences: colors, shape etc. link answers frowned upon think i'll take risk: there several libraries called identicons sampson linked to. code there java (or looks similar). pure javascript implementation seems jdidenticon . have more possibilities php (you can use e.g.: imagemagick , similar) javascript cheaper load ;-)

java - apache sshd public key authentication -

i trying set ssh server using apache mina sshd. want use public key authentication, , want know how implement package org.apache.sshd.server; import java.security.publickey; import org.apache.sshd.server.session.serversession; public interface publickeyauthenticator { boolean authenticate(string username, publickey key, serversession session); } i see passed public key. assume supposed compare public key given in param public key server has. don't know how that. one thing have found this implementation. seems pointless, seems compare modulus of public key itself. assuming implementation has bug, , should comparing moduli of each public key, enough authentication - moduli agree? surely if fed publicly available public key function, authenticated? i think found answer in source of org.apache.sshd.server.auth.userauthpublickey#auth . class actual auth key. think confused me name of method - authenticate() . happens follows: the server asks public key of clie

android - Retrieving Parse ObjectID in OnTimeClickListener method -

i want retrieve objectid of item (to specific, it's class called "room" in our parse model) clicked within listview . , after that, want pass retrieved objectid class using intent . i tried parse docs' getobjectid(); method seems won't work. how should retrieve it? here's code. button createbtn; button searchbtn; button mygroupbtn; button settingbtn; string[] courses; list<string> listitems; arrayadapter<string> adapter; listview listview; textview textview; // when creat button tapped public void createbtn(view view){ intent = new intent(getapplicationcontext(), create.class); // removes animation i.addflags(intent.flag_activity_no_animation); startactivity(i); } // when setting button tapped public void settingbtn(view view) { intent = new intent(getapplicationcontext(), setting.class); // removes animation i.addflags(intent.flag_activity_no_animation); startactivity(i); } @override protected void oncre

Is there a utility for Bulk SVN commits? -

i use svn commits through command line , tortoise . times task download large .jar file 3rd party distribution, unpack .jar (which has bunch of files , directory structure) , commit code svn . the problem commits repository limited around 70mb individual commits, , .jar contains several hundred mb of data. i'm forced commit batches of files manually in large chunks, long annoying manual task open human error (several times people miss files find out later). means sifting through individual folders , synchronizing them - ends taking half days effort. this .jar updated on semi-regular basis (maybe every 3 months or so), need overwrite old files , of files have changed, deleted, or not changed. is there smarter way task? i see @ least 3 possible ways: ask svn-admin disable (size-check) pre-commit hook special single user , update under user's credentials split files big permanent set of predefined changelists ( svn cl ), commit changelists keeping chan

Can I add elements to the aps payload sent by the Bluemix IBM Push Notifications service? -

i'm using bluemix push send notifications via rest interface ios app simple string alert message. works fine. now send more complex message alert dictionary , has sibling "category" element per the remote notification payload . is possible bluemix push? whenever try deviate basic structure, "bad request - invalid json" . after head-scratching, picked hint https://www.ng.bluemix.net/docs/services/mobilepush/t_advanced_notifications.html#t_push_badge_sound_payload , figured out since category field unique apns, needed send is "settings" : { "apns" : { "category" : "mycategory" }

html - Adding background-color on TD made my border disappear -

Image
this how looked after adding background-color for table , css involved : .styletable td,th { padding: 10px; text-align:left; font-size:10pt; } .tdcolorgrey { background-color:#b8b8b8 ; font-weight:bold; border:1px; } and table style: <table class="styletable" style="width: 80%;background-color:white;" border="1"> the borders appear without tdcolorgrey disappear once added it. the problem border:1px; is shorthand property, literally means border-width:1px; border-style:none; border-width:currentcolor; see description on mdn . if assign class td , have border-style of none instead of inheriting table. so possible solutions, mentioned in comments, are write style explicitly in css: border:1px solid black; (whatever style , color need, is) or, remove border property css altogether, border inherit normally!

javascript - Unbind a tooltip from a svg>rect element -

in contributions calendar heatmap @ https://github.com/ben174?tab=contributions&from=2015-01-27 - can't seem figure out how unbind tooltip mouseover. it's it's showing without event bindings, can't figure out how that's possible. some things i've tried: $("svg rect").unbind("mouseover") $("svg").unbind("mouseover") if @ parent <div> <svg> , <div class="js-calendar-graph ...etc..."> there mouseover , mouseout events attached that. disabling mouseover stopped tooltips appearing me.

web scraping - How to scrape using Python a link from a html class -

i attempting grab link website. sound of word. website http://dictionary.reference.com/browse/would?s=t so using following code link coming up blank. weird because can use similar set , pull data stock. idea build program gives sound of word ask spelling. kids pretty much. needed go through list of words links in dictionary having trouble getting link print out. i'm using urllib , re code below. import urllib import re words = [ "would","your", "apple", "orange"] word in words: urll = "http://dictionary.reference.com/browse/" + word + "?s=t" #produces link htmlfile = urllib.urlopen(urll) htmltext = htmlfile.read() regex = '<a class="speaker" href =>(.+?)</a>' #puts tag pattern = re.compile(regex) link = re.findall(pattern, htmltext) print "the link word", word, link #should print link this expected output word http://static.sfdict.com

angularjs - Possible to turn off predective text in IOS Webview? -

Image
i have hybrid app devices , works part. ios, when user have predictive text turn on , when type on input box, input box shift , down match predictive words. there way programmatically disable keyboard predictive text webview? add autocomplete="off" autocorrect="off" to input field. disable checkbox.

javascript - Calling another prototype method after promise completed -

i have following code in node.js file; gamehelperauth.prototype.getuserviaapi = promise.method(function (authcookie, callback) { // user api }); gamehelperauth.prototype.getobjectfromcache = promise.method(function (authcookie, callback) { // user cache }); gamehelperauth.prototype.getuser = function (authcookie, callback) { // check cache this.getobjectfromcache() .then(function (result) { if (result) { return callback(null, result); } else { // not found in cache, api // **not working here - undefined error** this.getuserviaapi(authcookie) .then(function (apiresult) { return callback(null, apiresult); }).catch(function (err) { throw err; }); } }) .catch(function (err) { throw err; }); i access instance meth

c# - MongoDB, trying to import json which has been serialized using TypeNameHandling.Objects -

i'm receiving error trying import json mongodb. 2016-01-15t14:57:09.682-0800 error inserting documents: document can't have $ prefixed field names: $type the json serialized using json.net var settings = new jsonserializersettings(); settings.typenamehandling = typenamehandling.objects; string output = jsonconvert.serializeobject(o, formatting.indented, settings); see mongodb documentation talks restrictions on field names. field names cannot contain dots (i.e. .) or null characters, , must not start dollar sign (i.e. $). if using mongo shell import you'll have change $type else. alternately, use c# driver import documents , handle serializing concrete type name automatically.

c# - Object reference not set to an instance of an object in Page declaration -

Image
i having issue existing site functioning until last week. when open site in vs 2013 "object reference not set instance of object" error/warning on page declaration of .aspx pages , .master pages. website builds correctly when run displays blank page , no errors. i have verified code behind file exists , it's namespace , class entered page declaration. adding new page project gets same error , have verified references present. website 3.5 framework. appreciated. thanks. clayton since wasn't making headway in getting resolved decided create new web project , move existing files new project. decided 1 file @ time see if nail down page or setting causing issue. files copied on , site ran expected until started tweek web config file match of settings old project. worked until added line <identity impersonate="true" username="domain\username" password="password" /> once saved , ran webpage started getting same err

Vim key mapping for emmet-vim -

ok here want accomplish: in insert mode emmet autocomplete tab key here have tried let g:user_emmet_expandabbr_key = '<tab>' (only works in normal mode) though above code useful, need work in insert mode i transferring on sublime text vim , miss having emmet functionality accessible. ideas how can achieve this? thanks in advance. solved problem including following lines in .vimrc file. let g:user_emmet_expandabbr_key='<tab>' imap <expr> <tab> emmet#expandabbrintelligent("\<tab>") now can use tab key both indent , activate emmet snippets in insert mode :d

javascript - How do I delete a key-value pair using Cradle in CouchDB/Node.js? -

i've been working lot cradle, couchdb client. however, have document filled key-value pairs, , i'm trying delete specific row in there. in documentation, cannot find way deletion doesn't include deleting entire document or updating null value. can point me in right direction? feel simple issue lots of people run into. in couchdb, there no support partial document updates (support discussed every once in while, since there no accepted way patch json, never gets far), have update entire document copy unwanted key/value pair removed.

mysql - Find all employee who have worked on at least two projects -

table: projectressources idproject idemployee numhours priceperhr 1 1876 500 65 1 4354 2000 31 2 2231 250 55 3 2231 500 65 3 1212 3000 35 3 1876 2000 35 i come following research syntax can't figure how filter indicate 2231 , 1876: select idemployee, count (*) ‘number of projects’ projectressources group idemployee; you're headed in right direction. missing piece having clause allows filter aggregate expression, such count(*) : select idemployee, count (*) ‘number of projects’ projectressources group idemployee having count(*) > 1 -- here!

c++ - Cartesian to quaternion glm -

i have vector pointing in direction need rotate, need convert quaternion first. cannot find converting cartesian coordinates quaternions in glm. such function exist? maybe these out. can found on website in api documents v0.9.6: glm_func_decl tvec4<t, p> glm::rotate( tquat<t,p> const &q, tvec4<t,p> const &v ) rotates 4 components vector quaternion. see glm_gtx_quaternion glm_func_decl tquat<t, p> glm::rotation( tvec3<t,p> const &orig, tvec3<t,p> const &dest ) compute rotation between 2 vectors. param orig vector, needs normalized param dest vector, needs normalized see glm_gtx_quaternion and template<typename t, precision p> glm_func_decl tvec3<t,p> rotate( tquat<t,p> const &q, tvec3<t,p> const &v ) template<typename t, precision p> glm_func_decl tvec4<t,p> rotate( tquat<t,p> const &q, tvec4<t,p> const &v ) template<t

cmake - How to use clang to generate all ast files for a project with makefile or cmakelist? -

i have developed static analyze tool based on clang reads ast files generated clang -emit-ast option , analysis on them. when testing tool, it's convenient generate ast files multiple c or cpp files. can use command 1 one: clang -emit-ast test.c -o test.ast but when comes large project build make or cmake, don't know how can generate ast files. there convenient way manage that? you can use add_custom_target cmake. something this: add_custom_target(ast) foreach(sourcefile ${sourcefiles}) add_custom_command(target ast pre_build command clang -emit-ast ${sourcefile} -o ${cmake_binary_dir}/${sourcefile}.ast)

How to update URL in redux simple router from action? -

according redux simple router docs, can update route action. don't see how in documentation. have example of this? you can import history singleton passed root component action , operate on directly, or, if you've installed router middleware, can use action creators provided react-router-redux . from docs : what if want issue navigation events via redux actions? react router provides singleton versions of history (browserhistory , hashhistory) can import , use anywhere in application. however, if prefer redux style actions, library provides set of action creators , middleware capture them , redirect them history instance. import { routermiddleware, push } 'react-router-redux' // apply middleware store const middleware = routermiddleware(browserhistory) const store = createstore( reducers, applymiddleware(middleware) ) // dispatch anywhere normal. store.dispatch(push('/foo')) the following actions supported : push(l

php - Array push to end keeping format -

i'm making automated system send out emails. have array containing info registered users: email , forum name/nickname: $array = [ ['jane.apples@gmail.com', 'jane apples'], ['jdoe@gmail.com', 'john doe'], ]; to send emails uses each loop: foreach ($array list($email, $name)) { echo "$email&nbsp;&nbsp;&nbsp;$name<br>"; } this yield: jane.apples@gmail.com jane apples jdoes@gmail.com john doe in final code this: foreach ($array list($email, $name)) { email($email, $name); } also, please note array in different file like: array.php , include file. please me this, , in advance. update: i've found solution while messing around little bit here code: <?php $result = array(); $file = fopen("mail.txt", "r"); while(!feof($file)){ $line = fgets($file); list($email, $name) = explode(":", $line); echo $email . ':' . $name .'&l

php - Codeigniter ajax get data from mysql and display in html form -

i have list of names display , when user clicks on edit, opens dialog html form. form show values of data retrieved mysql table. confused how can achieve that. have far. view <table class="table"> <thead> <tr> <th>no.</th> <th>organisation</th> <th>first name</th> <th>last name</th> <th>privilege level</th> <th>date added</th> <th></th> <th></th> </tr> </thead> <tbody> <?php $offset = $this->uri->segment(4,0)+1; ?> <?php foreach($user $row): ?> <tr data-id="<?php echo $row->id; ?>"> <td><?php echo $offset++; ?></td> <td><?php echo $row->company; ?></td> <td><?php echo $row->firstname; ?></td> <td><?php echo $row->lastname; ?></td> <td><?php echo $row->privilege; ?></t

java - jdb stop at given line or method -

as cli-inclined programmer, i'd ask if java command line debugger jdb capable of running current position , stopping @ given line? for instance, 200 public trade create(tradecreatereq req) { 201 validatepayments(req); 202 => trade t = new trade(outbiztype.of(req.getoutbiztype()), req.getouterid()); 203 204 builditem 205 .andthen(buildbuyer) 206 .andthen(buildtoaddress) 207 .andthen(buildinvoice) 208 .andthen(buildpaytools) 209 .accept(req, t); 210 211 if (!t.issecured()) 212 t.setsecured(true); 213 214 return t; 215 } i'd advance line 211 single jdb command rather typing 7 'next' commands or set break point @ 211. cursory @ 'step', 'next', 'cont' not give me answer. i know perl cli debugger can job nicely 'c' command. thanks! read documentation: http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jdb

math - Java method Point rot90() -

i trying figure out how implement following method in java; ** point rot90()** query new cartesian point equivalent cartesian point rotated 90 degrees i have no idea how go creating method. however, believe pulling point (x,y) , outputting new point (y,x*-1) equivalent rotating 90 degrees. old y coordinate becomes nee x coordinate , new y coordinate old x coordinate multiplied negative 1. thoughts on how set method appreciated. thanks. this have far public point rot90(){ point rotated = new point(); rotated.ycoord = xcoord*-1; rotated.xcoord = ycoord; return rotated; } i know doesn't work pointed out when try compile it. suggestions? your method needs argument. public point rot90(point p){ point rotated = new point(); rotated.ycoord = -p.xcoord; rotated.xcoord = p.ycoord; return rotated; } if point class has constructor can take coordinates can make shorter. public point rot90(point p){ return new point(p.ycoord, -p.xco

node.js - How do I upgrade my npm installation? -

i've been unable upgrade npm installation. i tried installing new version of npm : 1.step npm install npm -g npm install npm --save-dev 2.step npm outdated package current wanted latest npm 3.5.3 3.5.4 3.5.3 package.json { "name": "tiko", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"error: no test specified\" && exit 1" }, "author": "", "license": "isc", "devdependencies": { } } npm update npm warn ebundleoverride replacing bundled node_modules\npm\node_modules\init-pa ckage-json new installed version npm warn ebundleoverride replacing bundled node_modules\npm\node_modules\npm-ins tall-checks new installed version npm warn ebundleoverride replacing bundled node_modules\npm\node_modules\node-gy p n

design - SQL - Chat database schema to delete conversation for one side or both -

i designing chat database next requirements: only private messages, b. no groups nor rooms. when user send message b, if user deletes conversation, user b still able view conversation until user b deletes it. messages not erasable individually. able delete full history conversation. and have this: when user send message user b, 1 message register created, id. foreign key conversation table. in conversation table, 2 registers created same message id. 1 user sends message, , other user receives message. each register has field called in-out, specify if message send or received. example: /* conversation_table messages_table +--------------------------------------------+ +----------------------------------------+ | user_id | participant_id | in-out | msg_id | | msg_id | body | +--------------------------------------------+ +----------------------------------------+ | | b | 0 | 101

how to get currency sign to display in a view panel xpages -

i have column in xpage want display currency symbol value. in underlying notes view displaying. have tried both view panel , dynamic view neither display $ symbol. displays number. if integer number ($100.00) displays 100. want display trailing zeros after decimal place along currency symbol in view control can set view column's "display type" "number" , "display format" "currency". enable set currency symbol of choice , format accordingly. view column's code this: <xp:viewcolumn columnname="price" id="viewcolumn4"> <xp:this.converter> <xp:convertnumber currencysymbol="$" minfractiondigits="2" type="currency"></xp:convertnumber> </xp:this.converter> <xp:viewcolumnheader value="price" id="viewcolumnheader4"></xp:viewcolumnheader> </xp:viewcolumn> in above example price stored number.

terminal - Vim: Difference between t_Co=256 and term=xterm-256color in conjunction with TMUX -

i testing various different terminals tend use ssh linux boxes have tmux set on. basically noticed behavior, , hoping offer explanation of what's going on. may case specific behavior affects prompt app. i using vim within tmux, , on panic's prompt app on iphone5 having behavior 256 colors not enabling when .vimrc set colors using set t_co=256 directive. here, vim correctly displaying colors when not run through tmux. also, os x's terminal.app correctly rendered colors (i did not test putty on windows unfortunately) vim in tmux. then swapped out set t_co=256 set term=xterm-256color , colors work when using vim through tmux. note tested both set -g default-terminal "xterm-256color" , set -g default-terminal "screen-256color" settings tmux , change had no effect on behavior. when don't use tmux or screen , need configure terminal emulators advertise "capable of displaying 256 colors" setting term xterm-256color or

About moving transparent, boderless wpf c# -

Image
i making window windowstyle="none" allowstransparency="true" background="transparent" windowstartuplocation="centerscreen" resizemode="noresize" then made button other move window, using this.dragmove(); , put event: mousedown (of button), leftbutondown (of button) , leftbutondown (of form), still can not move form. function: private void btcurdate_mousedown(object sender, mousebuttoneventargs e) { this.dragmove(); } (the button defined click event else). running form:

memory - Accessing the vm areas of a process -

i trying write lkm have read vm areas address process. using pid_task() pointer task_struct, getting compiling error when try use start address of vmarea. struct task_struct *ts; ts = pid_task(find_vpid(pid_t)pid,pidtype_pid); printk(kern_info "%lu",ts->mm->mmap->start); and getting error "error: dereferencing pointer incomplete type" i linux noob , noob in lkm. i'd appreciate help. thank i have test on kernel source tree(2.6.35) following codes, compilation okey: struct task_struct *ts; pid_t pid; ts = pid_task(find_vpid(pid),pidtype_pid); printk(kern_info "%lu",ts->mm->mmap->vm_start); could try above codes in kernel source tree? think maybe have include header files needed, such as: #include <asm/uaccess.h> #include <linux/errno.h> #include <linux/time.h> #include <linux/proc_fs.h> #include <linux/stat.h> #include <linux/init.h> #include <linux/capability.h> #i

angular - Angular2 Exception: TypeError el.createShadowRoot is not a function (Safari/Edge) -

Image
i have angular2 app works great in chrome , firefox, in safari error: typeerror el.createshadowroot not function and in edge: object doesn't support property or method 'createshadowroot' @ browserdomadapter.prototype.createshadowroot ( http://localhost:5000/lib/angular2/bundles/angular2.dev.js:22893:7 ) more edge: is there shim or polymer missing? createshadowroot() should called if use viewencapsulation.native . either use viewencapsulation.emulated or ensure polyfills loaded (i can't guide how, because don't use ts toolchain, dart)

php - How to change the wordpress footer background color? -

i creating website in wordpress. using lifeline webanine charity theme. header style using header social icon.i trying change both background color of top bar , footer black other color. can me out? code of header , footer given bellow header.php <?php $settings = get_option( sh_name ); ?> <!doctype html> <html <?php language_attributes(); ?>> <head> <?php echo ( sh_set( $settings, 'site_favicon' ) ) ? '<link rel="icon" type="image/png" href="' . sh_set( $settings, 'site_favicon' ) . '">' : ''; ?> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title> <?php if ( is_home() || is_front_page() ) { echo get_bloginfo( 'name' ); } else { wp_title( '' ); } ?> </title> <meta name="viewport" content="

How can I format a negative currency using a Thymeleaf attribute processor? -

i need display negative currency-formatted values in table, using thymeleaf. currently, i'm using #numbers.formatdecimal achieve this, follows: <td th:text="${'$' + #numbers.formatdecimal(value, 1, 'default', 2, 'default)}" /> for value greater zero, works fine: <td>$34.50</td> but negative value , get: <td>$-12.75</td> this isn't correct - need currency symbol moved right of minus sign. how can achieve this? personally i'd use decimalformat apply formatting need: <td th:text="${new java.text.decimalformat('$#,##0.00;$-#,##0.00').format(value)}" />

javascript - Hide clicked element and show the element right after it using jQuery -

i want put questions in html text, answers hidden until user clicks on button/link/etc, disappears, , showing answer. answer replaces space used disappearing button/link. have questions go down page in article, not one. so example, "[my thoughts]" button or link: text text text abc need anything? [my thoughts] text text text, text, text. clicking on [my thoughts] becomes: text text text abc need anything? abc needs a lot of def, , abc if things taken slowly. additionally, abc needs lot of sleep. text text text, text, text. per comment: closest thing found, isn't right, want keep using going down page: thanks per gothdo, i'm working with: <!doctype html> <html> <head> <title>test3</title> <script> $("button").click(function() { $(this).hide(); $(this).next().css("visibility", "visible"); }); </script> <style typ