Posts

html - Can't get smooth egdes on a hexagon in css -

i've made hexagon container image, can't figure how add more smooth/curved edges on it. i hoping me. .hexagon { position: relative; width: 180px; height: 103.92px; background-color: #64c7cc; margin: 51.96px 0; } .hexagon:before, .hexagon:after { content: ""; position: absolute; width: 0; border-left: 90px solid transparent; border-right: 90px solid transparent; } .hexagon:before { bottom: 100%; border-bottom: 51.96px solid #64c7cc; } .hexagon:after { top: 100%; width: 0; border-top: 51.96px solid #64c7cc; } <div class="hexagon"></div> thanks help. you can achieve similar using divs z-index , radial-gradient: <div class="hexagon"></div> <div class="circle"></div> and css: body { background-color: #eeeeee; } .circle { width: 240px; position: absolute; top:15px; height: 240px; z-index: 2; backgro...

javascript - Scroll event on ExtJS combobox picker -

i want add handler scroll event on combobox's picker scroll, scroll event not fired. ext.define('test.mycombo', { extend:'ext.form.field.combobox', createpicker: function() { var me = this, picker = me.callparent(arguments); me.mon(picker, { 'afterrender' : function() { picker.gettargetel().on('scroll', function(){ console.log('scroll?'); }, me); }, scope: me }); return picker; }, }); you should listen on picker instead of targetel. ext.define('test.mycombo', { extend:'ext.form.field.combobox', createpicker: function() { var me = this, picker = me.callparent(arguments); picker.on('scroll', function(){ console.log('scroll...

java - Web service request (>8KB) failed with apache cxf client on JBOSS - HTTP response '411: Length Required' -

a web application using apache cxf client send requests remote web service. when web application deployed on tomcat ok. the requests failed sent when web application deployed on jboss , size of body (envelope) greater 8 kb; error below got generated: 17:57:15,387 warning [org.apache.cxf.phase.phaseinterceptorchain (connectorexecutor-21) interceptor xxx#{http://cxf.apache.org/jaxws/dispatch}invoke has thrown exception, unwinding now: org.apache.cxf.interceptor.fault: not send message. @ org.apache.cxf.interceptor.messagesenderinterceptor$messagesenderendinginterceptor.handlemessage(messagesenderinterceptor.java:64) @ org.apache.cxf.phase.phaseinterceptorchain.dointercept(phaseinterceptorchain.java:263) @ org.apache.cxf.endpoint.clientimpl.doinvoke(clientimpl.java:531) @ org.apache.cxf.endpoint.clientimpl.invoke(clientimpl.java:461) @ org.apache.cxf.endpoint.clientimpl.invoke(clientimpl.java:364) @ org.apache.cxf.endpoint.clientimpl.invoke(clientimpl.java:317) @ o...

ios - AES encrypt string appear \r\n -

Image
when use aes128 encrypt string, if encrypted string long contain \r\n in it. now have use empty string replace it. why encrypt-string contain \r\n , better way avoid or fix it. thanks. answers: it's caused base64 encoding process, every 64 characters insert \r\n . that base64 encoded string. actual encryption output array of 8-bit bytes, not characters. code base64 encoding encrypted data option insert line breaks every 64 characters, allow better printing of output. when decoded use nsdatabase64decodingignoreunknowncharacters option remove line breaks . in particular objective-c create base64 string nsdata is: - (nsstring *)base64encodedstringwithoptions:(nsdatabase64encodingoptions)options the options include: nsdatabase64encoding64characterlinelength set maximum line length 64 characters, after line ending inserted. which inserts "\r\n" (carriage return, new line) characters each 64 characters. if not want pass 0 option value. to d...

c# - Group objects in List by property in object that is List using LINQ -

i have list of objects (name of object ngramm) , object has property - list of strings (name of property rawngramwords). there property of rawngramwords - ngramcount - number of objects in list same rawngramwords (the same lists of strings in different ngramm). if there example 3 objects (ngramm) in list same rawngramwords need 1 ngramm object ngramcount property = 3. other 2 objects same rawngramwords lists should deleted list. used code: public static list<ngramm> countnwordsinngrams(list<ngramm> listofngramms) { list<int> indexesofngramsinlisttodelete = new list<int>(); for(int = 0; < listofngramms.count; i++) { for(int j = i+1; j < listofngramms.count; j++) { bool areequivalent = !listofngramms[i].rawngramwords.except(listofngramms[j].rawngramwords).any(); if(areequivalent == true) { indexesofngramsinlisttodelete.add(i); ...

java - Cannot use Components/Service/Repository in Controller class -

i have configurated dao layer(i've created test check it), , integrate project spring mvc. i've added configuration: @configuration @enablewebmvc @componentscan(basepackages = "com.szymon.controller") public class webmvcconfig { @bean public viewresolver viewresolver() { internalresourceviewresolver viewresolver = new internalresourceviewresolver(); viewresolver.setviewclass(jstlview.class); viewresolver.setprefix("/web-inf/views/"); viewresolver.setsuffix(".jsp"); return viewresolver; } } public class webinitializer implements webapplicationinitializer { public void onstartup(servletcontext container) throws servletexception { annotationconfigwebapplicationcontext ctx = new annotationconfigwebapplicationcontext(); ctx.register(webmvcconfig.class); ctx.setservletcontext(container); servletregistration.dynamic serv...

eclipse rcp - Custom Perspective Switcher Toolbar: How can I dynamically update it? -

i'm trying implement custom perspective switcher toolbar replace eclipse's built-in one. couldn't toolbar display, , it shown me due a bug dynamic elemen t in menu contribution, have use control element instead, described in the workaround dynamic bug . i have toolbar displaying following approach, cannot figure out how update dynamically. workaround instruction call contributionitem#fill(coolbar, int) workbenchcontrolcontributionitem 's update method instead of doing fill in createcontrol method. i don't know supposed call update , never gets invoked no matter do. have perspective listener knows when update toolbar, listener's callback call fill(coolbar, int) . wasn't sure how coolbar pass method, created 1 on current shell. the end result of toolbar displays correct number of items initially, when need add item, has no effect. call fill(coolbar, int) , adds new item toolbar, i've tried make coolbar , toolbar update not work. when re-lau...