Posts

Showing posts from March, 2012

Why can't use the newly installed TensorFlow library using python 3? -

this question has answer here: 'library not loaded: @rpath/libcudart.7.5.dylib' tensorflow error on mac 3 answers i upgraded python 3.5 , trying use tensorflow. followed instructions https://www.tensorflow.org/versions/r0.10/get_started/os_setup.html , installed tensorflow gpu enabled: # mac os x, gpu enabled, python 3.4 or 3.5: $ export tf_binary_url=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow-0.10.0rc0-py3-none-any.whl however, when tried using tensorflow threw strange error: >>> import tensorflow traceback (most recent call last): file "<stdin>", line 1, in <module> file "/users/user/path/venv2/lib/python3.5/site-packages/tensorflow/__init__.py", line 23, in <module> tensorflow.python import * file "/users/user/path/venv/lib/python3.5/site-packages/tensorflow/python/__ini...

html - ng-show through controller is not working -

i have page 3 elements. first search bar, second search result area , third form. here use case like, default search bar , form div showing , hiding search result div. if enter keys on search bar client data , want hide form bar , show search bar result. in search var result if click 1 of item(client) hide search result , show form div. , want fill clicked client name in form field, new in angularjs please me out. <ion-view title="client details" id="page5" ng-init="issearch=false;isform=true;" style="background-color:#f1f8e9;"> <ion-content padding="true" class="has-header"> <label class="item item-input"> <i class="icon ion-search placeholder-icon"></i> <input type="search" ng-model="str" ng-change="searchbyname(str)" placeholder="search client"> </label> <ion-list ng-show="{{issearch}}" ...

python - Error when updating function-based views to class-based views in Django Rest Framework -

i've been in process of running through tutorials on django rest framework build simple todo list app. when transitioned function-based view class-based view, started getting stack trace django , http calls started failing. i'm using virtualenv isolate dependencies, , using python 3.5.2. anyone have ideas what's going on, or how resolve error? i'm chalking configuration error or version mismatch, i'm not sure start. /views.py: from django.http import http404 list.models import list list.serializers import listserializer rest_framework.views import apiview rest_framework.response import response rest_framework import status class listsview(apiview): """ list lists. """ def get(self, request, format=none): lists = list.objects.all() serializer = listserializer(lists, many=true) return response(serializer.data) ... /urls.py from d...

Teamspeak 3 PHP Framework Client ID -

i'm searching whole day , can't find how client id if have teamspeak name user. my current code (just works identity id): function tsverification($verification) { require_once("../ts3phpframework-master/libraries/teamspeak3/teamspeak3.php"); $ts3_virtualserver = teamspeak3::factory("serverquery://serveradmin:xxxxxx@xxx.xxx.xxx.xx:10011/?server_port=9987&nickname=poker"); $client = $ts3_virtualserver->clientgetbyuid("$verification"); $ts3_virtualserver->clientpoke($client, "poke message"); } i found solution myself: function tsverification($verification) { require_once("../ts3phpframework-master/libraries/teamspeak3/teamspeak3.php"); $ts3_virtualserver = teamspeak3::factory("serverquery://serveradmin:xxxxxx@xxx.xxx.xxx.xx:10011/?server_port=9987&nickname=poker"); if (substr($verification, -1, 1) == "=" && strlen($verification...

mysql - Hibernate allow foreign key to be one of many classes? -

i'm trying implement hashtag functionality in database, allowing me assign hashtag different classes. possible have foreign key inside tags class, 1 of many different classes (article, video, image)? mean having discriminator column. e.g @entity @table(name="tags") public class tags { private string tagname; // hashtag name; e.g cool-photo private <article, video, photo> relatedobject; private string type; // can either article, video, photo } in example i'd able run simple query: select t.* tags t type = 'article' , tagname = 'tag-searching-for' inner join article on t.relatedobject = a.articleid; this return bunch of <type-requested> objects type requested (in case, articles)! is there built in way of doing hibernate or have build own solution (which im happy do, i'd rather check see if theres concret 1 first). there 2 ways, can use super entity - inheritance. create taggable , new super en...

WSO2 Publisher/Store api-manager.xml config GatewayEndpoint with gateway clustering -

if have multiple gateway worker nodes, how can config gatewayendpoint? i read post of setup gateway endpoint , case has 1 gateway worker node. had nginx node before wso2 clustering, need display final endpoint url in store end users. serverurl, can config url: " https://mgt.gw.devzone.com/services/ " . <apigateway> <environments> <environment type="hybrid" api-console="true"> <name>production , sandbox</name> <description>this hybrid gateway handles both production , sandbox token traffic.</description> <serverurl>https://<api-gateway-host>:9443/services/</serverurl> <username>${admin.username}</username> <password>${admin.password}</password> <gatewayendpoint>http://<api-gateway-host>:8280,https://<api-gateway-host>:8243</gatewayendpoint> ...

javascript - Issues with if-statement adding players with `is-inactive` class to input -

problem the maximum number of players each position is: 2 out of 4 goalies 6 out of 15 defencemen 12 out of 31 forwards i've gotten point i'll click on hockey player , name gets added input field in form, if have 2 goalies selected, ie has class of is-active , click on 1 of other 2 unselected players default is-inactive class, name still added input when there should only 2 goalies max. , unfortunately, case defencemen , forwards too. goal when starredgoaltenders === maxgoaltenders or starreddefencemen === maxdefencemen or starredforwards === maxfowards names of players do not have not been selected of specific position , not have is-active class should not added input in form. scripts.js function countselected() { $(".player").on("click", function(){ // checks if maximum number of players have been selected // if so, return false , nothing // if not, class toggle `is-inactive` `i...

python - Failed to append an element to a numpy array -

i'm trying add values generated function calc_class , not working , don't know reason. i've tried use numpy.append , numpy.insert , built-in python function append unsuccessfully. this piece of code: def calc_class(test): expec = [] new in test: prob_vector = np.zeros((len(voc)), dtype=bool) #define 'true' array store class probabilities words_in_new = new[0].split() #split new email words words_in_new = list(set(words_in_new)) #remove duplicated words = 0 voc_word in voc: #for each element in voc if voc_word in words_in_new: prob_vector[i] = true #set ith element of prob_vector true, if voc element in word else: prob_vector[i] = false #set ith element of prob_vector false, otherwise += 1 prob_ham = 1 in range(len(prob_vector)): if prob_vector[i] == true: prob_ham *= ham_class_prob[i] e...

typeahead.js - Retrieve value from tagsinput with typeahead -

i'm stumped. first input eg x y z demonstrates pulling values tagsinput. second input eg alaska using typeahead. third combines them eg belgium on clicking button can't values in countryselection input. ideas? in advance. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- bootstrap --> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <!-- jquery --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <!-- tagsinput --> <link rel="stylesheet" href="http://bootstrap-tagsinput.github.io/bootstrap-tagsinp...

java - No option to reimport dependencies in Maven (IntelliJ) -

Image
i added dependency pom.xml file cannot find option import dependency. i'm not able use library in program. i've looked online , many suggest going settings -> maven -> .... option not exist me. i have seen other solutions of right clicking pom.xml -> maven -> reimport. again, don't have option. pretty sure maven project. does know might problem? you might need configure auto-import maven projects. can enable such feature going file > settings > maven > importing . there checkbox says "import maven projects automatically". if can't find option, try using ctrl+shift+a helps find actions name. write "maven" , check alternative suits best. if not work, open "maven project" panel. find @ right side of ide. there have reimport button. edit: a few weeks ago, faced same problem when reimporting project. due intellij didn't remember setting maven setting file. needed override default "user se...

asp.net mvc - C# MVC - Send message with SignalR from server to Caller -

i have request client server using signalr-2.2.1 . after request, server send results caller. here javascript code : $(document).ready(function () { var myhub = $.connection.signalhub; myhub.client.receive = function (tmp) { var obj = $.parsejson(tmp); //do }; $.connection.hub.start().done(function () { $('#xxxxx').click(function () { var form = $("form"); form.submit(); myhub.server.sendsomething(); }); }).fail(function (reason) { //do }); }); and here code server side public partial class signalhub : hub { public void sendsomething() { clients.all.receive(myjson); } } when use clients.all function, works fine. want server send result caller (the 1 send request). change clients.all.receive(myjson) clients.caller.receive(myjson) . after change it, client doesnt update content. need specify receive function in client side receive differ...

node.js - 401 Error with post request Stormpath Express + React + Node + Gulp -

when attempting login user, following post error results: xmlhttprequest cannot load https://api.stormpath.com/v1/applications/[app_href]/login. no 'access-control-allow-origin' header present on requested resource. origin 'http://localhost:8080' therefore not allowed access. response had http status code 401. in server.js file, have put following: var express = require('express'); var stormpath = require('express-stormpath'); var cors = require('cors'); var app = express(); app.use(stormpath.init(app, { apikey: { id: 'xyz', secret: 'abc' // using unsafe inline option example purposes }, application: { href: `[app_href]` }, web: { produces: ['application/json'] }, debug: 'info' })); app.use(cors({ origin: 'http://localhost:8080', credentials: true })); app.post('/', stormpath.loginrequired, function (req, res) { function writeerror(message) { ...

Can Elasticsearch suggest range for query on number fields? -

for example have list of person have age property. on search page, allow user query list base on range of age: "mus" : { "range" : { "age" : { "from" : 60, "to" : 80 } } }, let above query return 0 result (since list include person 20 50), es support method return suggestion range query (in case [20, 50])? yes, can use histogram aggregation in order retrieve these counts. { "post_filter": { "bool": { "must": { "range": { "age": { "from": 60, "to": 80 } } } } }, "aggs": { "ages": { "histogram": { "field": "age", "interval": 10 } } } } the above query return: all documents age field between 60 , 80 the number of documents age field within 10-ye...

android - Handling back key for navigation drawer and fragment page -

i working on app have few fragment pages have navigation drawer menu. when on fragments page , click on key, application exit dialog working fine. when on fragment page , @ same time if click navigation menu, navigation menu top position. if click on key, application exit button coming want navigation menu should disappear first not exit dialogue box. code onbackpressed(): public void onbackpressed() { final fragmentmanager fm = getsupportfragmentmanager(); if(fm.getbackstackentrycount() != 1){ super.onbackpressed(); } else { alertdialog.builder alertdialogbuilder = new alertdialog.builder(this); alertdialogbuilder.settitle("exit application?"); alertdialogbuilder .setmessage("click yes exit!") .setcancelable(false) .setpositivebutton("yes", new dialoginterface.onclicklis...

angularjs - ng-repeat not copying correctly over -

i have ng-repeat working within different template, however, can not album.html template display content. here have. app.js ... .state('album', { url: '/album', controller: 'albumctrl album', templateurl: '/templates/album.html' }) ... albumctrl.js (function() { function albumctrl() { this.albumdata = angular.copy(albumpicasso); }; angular .module('blocjams') .controller('albumctrl', albumctrl); })(); fixture.js (where object want copy lives) var albumpicasso = { title: 'the colors', artist: 'pablo picasso', label: 'cubism', year: '1881', albumarturl: 'assets/images/album_covers/01.png', songs: [ { title: 'blue', duration: 161.71, audiourl: 'assets/music/bloc_jams_music/blue' }, { title: 'green', duration: 103.96, audiourl: ...

How to change html of div in angularjs? -

i have page displays comments (using ng-repeat) . each comments edit button. here client's requirement. on clicking on edit, comment div should swapped form . on submitting form, form should swapped comment div . at time, 1 comment can updated. so per angularjs knowledge, can single form comments. i'm getting confuse how should do? ng-swap, template directive or else. , have basic knowledge of angularjs, if can me demo/example, appreciated. edit: html <div id="comment_{{$index}}" ng-repeat="comment in blog.comments track $index"> <div class="replace-with" ng-if="hidecomment != $index"> <h2> <b>comment</b> added <b>{{comment.user.fullname}}</b>, <span><span>{{comment.datetime}}</span></span> <div> <a href="javascript:void(0)" ng-click="openeditform($index, comment.unique_id)"...

javascript - Using Three.js (r78), how to transition line material color between two values along a path? -

i thought understood example , attempt @ applying code produces solid black lines. please me understand why might not working? function(ptarray) { var geometry = new three.buffergeometry(), material = new three.linebasicmaterial({ color: 0xffffff, linewidth: 4, vertexcolors: three.vertexcolors }), linepositions = new float32array(pts), linecolors = new float32array(pts), visible = new float32array(pts / 3); visible.fill(1.0); (var p = 0; p < pts; p ++) { linepositions[p] = ptarray[p]; linecolors[p] = new three.color(0xffffff).sethsl(p/pts, 1.0, 0.5); } geometry.addattribute('position', new three.bufferattribute(linepositions, 3)); geometry.addattribute('vertcolor', new three.bufferattribute(linecolors, 3)); geometry.addattribute('visible', new three.bufferattribute(visible, 1)); scene.add(new three.linesegments(geometry, material); }

r - Saving Table Counts as a Vector -

i trying loop through sequence of values , save table count results in separate vector or matrix. i'm new programming please excuse poor attempt. here problem: pred_test <- seq(0, 1, length=1000) test$purchaser_flag <- sample(c(0,1), size=1000, replace= true) crit = seq(from=0, to=1, by=.01) list <- matrix(0, nrow=101, ncol=2) (i in 1:length(crit)) { list[i,] <- as.numeric(table(pred_test >= i, test$purchaser_flag)[2,]) } i want loop through values of crit , save results of each associated table count row in new vector called 'list'. pred_test probability score 0-1 , purchaser flag associated class of 0 or 1. want save these counts each associated critical thresholds in crit. please let me know if there easier way this. use sapply , ensure dimensions of tables generate same (2 x 2) in case: library(dplyr) library(tidyr) # generate data df_foo = data_frame( pred_test = runif(1000), purchaser_flag = sample(c(0, 1), size = 1000,...

ibm mobilefirst - How to change the War file for same project in a Bluemix -

i migrating mobile first server bluemix, facing 1 issue: whenever try change war file same project,every time have create new container , upload new image that. i running script: initenv.properties prepareserverdbs.properties prepareserver.properties startserver.properties and in startserver.sh , getting error container same exists if using same container change war file. any advice on how update war file same project? the error see because old container same name still running. needs recreated. the project (.war file) on mobilefirst platform 7.1 artifact goes container. recreating image required. if there changes project war file, have replace .war in ./usr/projects directory (or if using project_loc variable in args/prepareserver.properties , make sure points latest project directory) , run following: recreate docker image new .war file: prepareserver.sh stop , delete running container: cf ic stop your-container-name , cf ic rm your-contain...

networking - Algorithm for spatially-based notifications -

i have app connects many clients, each having 2d coordinates , visibility radius assigned. each client can change state should broadcast clients, have him in visibility radius. there algorithm takes list of changed clients , computes list of clients should receive state change notifications? thinking of quadtree-based approach, don't know if that's sufficient.

tfs - Initialize VSS.SDK from TS class -

i need initialize vss.sdk .ts class (outside html page). have analyzed examples microsoft , initialize under html page.is possible outside html page? yes, outside html , put in javascript file or other (e.g. ts), add reference corresponding js file html page. for example: vss.init(); $(document).ready(function () { vss.notifyloadsucceeded(); }); <!doctype html> <html> <head> <title>hello word</title> <meta charset="utf-8" /> <script src="node_modules/vss-web-extension-sdk/lib/vss.sdk.js"></script> <script src="scripts/vssinit.js"></script> </head> <body> <!--<script type="text/javascript"> vss.init(); </script>--> <h1>hello word</h1> <!--<script type="text/javascript"> vss.notifyloadsucceeded(); </script>--> </body> </html> ...

dataframe - Apply a list for 3 ways frequency table in R -

this question has answer here: three dimensional array list 3 answers i have 3 ways frequency table, want combine them list, write listoftable <- list(table[,,1],table[,,2],table[,,3],table[,,4],table[,,5]) , table long, there way can apply lapply combine list without doing manually. df <- data.frame(id = c(rep(c("a","b","c"),5)), n = c(rep(c("1","2","3"),5)), m = c(rep(1,3),rep(2,3),rep(3,3),rep(4,3),rep(5,3))) applyalist <- table(df$id,df$n,df$m) listoftable <- list(applyalist[,,1],applyalist[,,2],applyalist[,,3],applyalist[,,4],applyalist[,,5]) we can lapply looping through sequence of third dimension , subsetting 'applyalist' based on sequence. lapply(seq(dim(applyalist)[3]), function(i) applyalist[,,i]) as op wants list output, lapply give...

java - RxJava: dynamically create Observables and send the final resut as Observable -

i using rxjava in want dynamically create number of observables based on condition. once i'm done creating, want processing on different values returned observables , send single observable can subscribe on. here how code : list<string> valuelist = .... list<observable<string>> listofobservables = new arraylist<observable<string>>(); for(int =; <valuelist.size(); i++){ listofobservables.add(new someclass.dooperation(valuelist(i))); // someclass.dooperation return observable<string> } return observable.merge(listofobservables); but here , want operation on values emitted different observables in listofobservable , return single observable<string> like in observable.zip() , can return observable.zip(observable1, observable2, (string1, string2) -> { // joining final string here return string1 + string2; but know number of arguments here. please let me know how can achieve th...

validation - QRegExp for IP Address of QlineEDit in QT -

how can validate qlineedit control when want enter ip address qlineedit control, control should allow ip address . don't allow alphabets ,characters except dot(.) parts should in range of 0-255 ip address contain 4 parts , must 3 dots(.): first part should contain 3 digits.(must) second part should contain min 1 digit , max 3 digits.. third part should contain min 1 digit , max 3 digits. 4 part should contain minimun 1 digit. ex: 122.234.245.211 121.112.112.44 255.255.136.132 133.231.123.2 255.0.0.0 121.0.0.23 below address should not accept: should give errormessage box ex: 24.253.321.422 442.445.552.444 23535.35.353.33 3532.333.332 you can make use of qregexpvalidator class. , regex this: [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3} after use qlineedit::setvalidator () function set validator. hope helps...

foldLeft method in scala -

i using following code count of words in text .foldleft(map.empty[string, float]){ (countssource, wordsource) => countssource + (wordsource -> (countssource.getorelse(wordsource, 0) + 1))} i getting error 1 should string. if put in quotes, says should float. what doing wrong?? in advance getorelse 's signature follows: def getorelse[b1 >: b](key: a, default: => b1): b1 which means doesn't return type of map's value ( b ), potentially superclass b1 . in case, using literal 0 doesn't inform compiler you're interested in float . using 0f instead fix it: l.foldleft(map.empty[string, float]){ (countssource, wordsource) => countssource + (wordsource -> (countssource.getorelse(wordsource, 0f) + 1))}

Visual Studio 2015 Cordova Windows 10 > Blank/white screen after associated with the existing windows store app -

without associating app store, can run , debug cordova app on devices (all works fine). after associating app store (or after built package store), app starts , white screen, no errors in visual studio! i have installed update 3 , tried run in release mode, no success. no errors occur. i use: - visual studio 2015 update 3 - node version 4.5.0 - cordova version 6.3.1 - , release app windows 10 ======================== i found out package name changed after assocating store. changed package name @ start page option new 1 in appxmanifest. after app starts , see page, many errors, cant interact now. here errors: javascript runtime error: 'windows' undefined cordova.js (1559,13) deviceready has not fired after 5 seconds. channel not fired: onpluginsready channel not fired: oncordovaready from debugger: "wwahost.exe" (skript): "skriptcode (msapphost/3.0)" geladen. es wurde eine ausnahme ausgelöst: in zeile 596, spalte 9 in ms-appx-web:...

java - Can't refresh FrameLayout? -

i'm starting studies android development , can't refresh app's framelayout correctly. this framelayout (panela) holding streetviewpanorama fragment , every time after remove fragment framelayout , try add one, entire framelayout freezes showing last fragment image. you can see code below package com.example.shanx.project_track_it_v001; import android.support.v4.app.fragmentactivity; import android.os.bundle; import android.util.log; import android.view.view; import com.example.shanx.utilities.maphandler; import com.google.android.gms.maps.cameraupdatefactory; import com.google.android.gms.maps.googlemap; import com.google.android.gms.maps.onmapreadycallback; import com.google.android.gms.maps.onstreetviewpanoramareadycallback; import com.google.android.gms.maps.streetviewpanorama; import com.google.android.gms.maps.supportmapfragment; import com.google.android.gms.maps.model.latlng; import com.google.an...

bash - How to continually process last lines of two files when the files change randomly? -

i have following simple snippet: #!/bin/bash tail -f "data/top.right.log" | while read val1 val2=$(tail -n 1 "data/top.left.log") echo $(echo "$val1 - $val2" | bc) done top.left.log , top.right.log files other processes continually write. bash script subtracts last lines of both files , show result. i make script more efficient. in pseudo-code this: #!/bin/bash magiccommand "data/top.right.log" "data/top.left.log" | while read val1 val2 echo $(echo "$val1 - $val2" | bc) done so whenever top.left.log or top.right.log changes echo command called. i have tried various snippets stackoverflow rely on fact files not change or both files contain same amount of lines not case. if have inotify-tools can use following command: inotifywait -q -e modify file1 file2 description: inotifywait efficiently waits changes files using linux's inotify(7) interface. suitable waiting chang...

rest - Restful versioning -

in restful or application versioning see versioning done adding version url of endpoint, e.g.: http://app/api/customers/1234 http://app/api/v3/customers/1234 http://app/api/v4/customers/1234 does mean app deployed different servers , 3 maintained or how achieved? it depends. may handled twofold: via proxy server (e.g. nginx, apache) using domain. in scenario proxy server recognizes url , using version part of domain decides forward request. basically, far know, if version located in path (e.g. http://app/api/v3/customers/1234 ) scenario used. it's used more if version located in domain (e .g. http://v3.app/api//customers/1234 ) in application itself. application exposes endpoints , handles version resolution internally. no matter how it's handled still need synchronize resources internally - in db e.g.

Project creation failed in Visual studio 2013 -

Image
i can not create project in visual studio 2013 here screen of problem when create project this seems problem related uac , administrative rights.

iOS Swift fetching more data for collection view after having navigated to detail view not working -

i working on assignment job interview. have finished of assignment. there's bug can't figure out. have been trying 3 days now. i had make client app flickr api allows users search photos using specific words. display results in collection view infinite scroll. , when photo selected should show details of photo in detail view. the bug: working if stay in collection view. can search on , on again , infinite scroll working.as specific index in index path hit. new request sent same search term. if select photo , navigate collection view , try new search nothing comes , error handeling returns error. (the error not console error).also when navigating detail collection. can still scroll until index triggers new request throws error. i hope explaining well. getting desperate @ moment. tried think of: request url still works when try in browser. please help! if need more info ask. collection view controller: import uikit // global variable holding search term. var sear...

Google Charts : How do I change the order of pie chart slices? -

Image
how change order of pie chart slices generation? here code. var default_pie_chart_options = { theme: 'material', titletextstyle: { fontsize: 12 }, is3d: false, pieslicetext: 'label', colors: ['#8e142e','#c3ca21','#8a972b','#6ff522','#167d13'], fontsize: 12, piehole: 0.6, piestartangle: 180, height: 600, chartarea: { width: '100%', height: '100%', left: 0, top: 100 }, legend: { position: 'top', maxlines: 1, textstyle: { fontsize: 12, bold: true, italic: false } } }; var chartoptions = default_pie_chart_options; chartoptions.colors = null; var chartoverallpmmlevelcalculated = new google.visualization.chartwrapper({ 'charttype': 'piechart', 'containerid': 'chartoverallpmmlevelcalculatedhtml', options: chartoptions }); func...

javascript - Import external html file with image -

here html code: <input id="file" type="file"> <div id="preview">preview</div> and javascript codes: function handlefileselect(evt) { var file = evt.target.files[0]; var reader = new filereader(); reader.onload = function(e) { document.getelementbyid('preview').innerhtml = e.target.result; }; reader.readastext(file); }; document.getelementbyid('file').addeventlistener('change',handlefileselect, false); fiddle : https://jsfiddle.net/8te1hyv9/4/ i trying load external html file local drive div id preview. working fine image src url on server.. how display image local drive preview.is possible convert image url base 64 when importing html file.

css3 - How can I make the box for contenteditable text disappear? -

i using contenteditable on web pages. works fine browser puts ugly border around editable section when activated. also, of these borders not erased when focus changed element on page. safari creates light blue border, firefox uses thin black line, there browser interpretation @ work here. i have tried explicitly setting border on editable sections none , making css property important, not change browser's behavior. my question: is there way influence styling of page element overrules border property when user has clicked inside start editing? add style ( jsfiddle ): [contenteditable="true"]:active, [contenteditable="true"]:focus { border:none; outline:none; } to let contenteditable elements not use border , outline when focuesed. edit: found excellent tutorial

git - Delete commit which is merged into main branch -

Image
how delete purple commit , "merge branch..." commit. try using "git rebase -i head~x" not work. you can kind of magic git fast-export (after made backup of working copy): run git fast-export --no-data --all --full-tree > all_commits in working copy. open file all_commits in text editor, , search "initial commit". environment around should this: commit refs/heads/master mark :110 author foo bar <foobar@example.org> 1462192582 +0100 committer foo bar <foobar@example.org> 1462192582 +0100 data 14 initial commit deleteall m 100644 b346ed4d2db0c8110fe3104bd155a413b878527c some/file commit refs/heads/master mark :111 author foo bar <foobar@example.org> 1462192582 +0100 committer foo bar <foobar@example.org> 1462192582 +0100 data 21 merge branch 'master' :109 merge :110 deleteall m 100644 b346ed4d2db0c8110fe3104bd155a413b878527c some/file m 100644 4d9af842ccf23b883b234f5ae93d71f11fa285de some/other_file com...