Posts

Showing posts from May, 2012

java - how to set multiple token in MultiAutoCompleteTextview Android -

i need set different adapters different token (i.e when type '@' should call atmentionedadapter , when type '#' should call hashadapter , both has in same multiautocompletetextview please find sample code have used working @ not hash multitextview.settokenizer(new multiautocompletetextview.tokenizer() { @override public charsequence terminatetoken(charsequence text) { int = text.length(); while (i > 0 && text.charat(i - 1) == ' ') { i--; } if (i > 0 && text.charat(i - 1) == ' ') { return text; } else { if (text instanceof spanned) { spannablestring sp = new spannablestring(text + " "); textutils.copyspansfrom((spanned) text, 0, text.length(), object.class,

c# - MSSQLLocalDb - How to create custom authentication with localDb connection in ASP.Net MVC? -

i'm trying make own authentication service using mssqllocaldb. have used connection string instantiate local instance of identitydbcontext class. connectionstring="data source=(localdb)\mssqllocaldb;attachdbfilename=|datadirectory|\aspnet-verisystems-20161025123601.mdf;initial catalog=aspnet-verisystems-20161025123601;integrated security=true;multipleactiveresultsets=true but whenever i'm publishing project iis localhost i'm unable execute login service. , error a network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name correct , sql server configured allow remote connections. (provider: sql network interfaces, error: 50 - local database runtime error occurred. cannot create automatic instance. see windows application event log error details. ) stack trace: [sqlexception (0x80131904): network-related or instance-specific error occurred while establishing con

angularjs - How to fix this Access-Control-Allow-Headers error -

i'm using angularjs post localhost api. got error message: xmlhttprequest cannot load "...api link..." request header field authorization not allowed access-control-allow-headers in preflight response. i can post api when use "allow-control-allow-origin" chrome extension. temporary, way works when use extension on borwser. users got problem when use in own browser. how fix client side. i don't think can fix issue client side. api server controls can access (using allow-control-allow-origin header) have change there.

cron - quartz scheduler to run on specific day and time, run every hour and should continue from there -

is possible fire job start on specific date , time run every hour 1:00 from there should continue till next 3 months for days ex: start job on feb 12 2017, 1:00 am, runs every hour i.e 2:00am, 3:00am and continue till april 12 2017 for days assuming current date 10 nov 2016 any solution unix cron fine below schedule on 12th of feb, mar , april 2017. |------------------------------------------------------------------| | seconds | minutes | hours | dayofmonth | month | dayofweek | year| | | | | | | | | | 0 | 0 | */1 | 12 | 2-4 | ? | 2017| |------------------------------------------------------------------| it can achieved using 3 cron jobs programatically . first job :- register second cron job on day should start. triggered(run) once. second job :- run every hour. triggered multiple times third job :- de-register second cron job . triggered once. explanantion:-

Find and replace text in all files using PHP -

hi everyone, i have list of php files in project.if want replace index.php text home.php , save it. change in php file in directory how can code this. i can find , replace in single file don't know way search in whole directory , replace kindly me know way. im new section.thanks in advance. you can use glob files in directory, glob(__dir__.'/*.php') give php files in current directory. if need in production server use if can run command line function since web server not should have write access files

android - Why PNG forms black edges around the image for PNG format? -

Image
i select image gallery, convert base64 , sends server. jpeg image, works fine; image upload gallery on server same gets shown in server folder. however, when upload png format image mobile gallery, doesn't show same on server; instead creates black edges around it. don't know what's going wrong? also, actual image equal given jpeg image. reference images: jpeg: png: i want rid of black borders should not appear png format images. below code snippet fileinputstream mfileinputstream = null; try { mfileinputstream = new fileinputstream(imagepathfromsdcard); bytearrayoutputstream bos = new bytearrayoutputstream(); byte[] b = new byte[1024]; int bytesread = 0; while ((bytesread = mfileinputstream.read(b)) != -1) { bos.write(b, 0, bytesread); } bitmap bitmap = safeimageprocessing.decodefile(uri); bitmap.compress(bitmap.compressformat.png,

mongoose - group collection data by multiple fields mongodb -

collection structure order = new schema index: { type: number, unique: true } number: date status: { type: string, enum: ['success', 'failure'] } created_at: { type: date, default: date.now } updated_at: { type: date, default: date.now } i need query returns me array of objects having data success count , failure count grouped date. ex- orders = { 28-10-2016:{ success_count: 10, failure_count: 10 }, 29-10-2016: { success_count: 10, failure_count: 10 } } with aggregation framework, result different "desired" output instead of having hash keys, array of objects _id key having value represents group field. instance, instead of { "28-10-2016":{ "success_count": 10, "failure_count": 10 }, "29-10-2016&qu

How to enable HTML tags on Wordpress Visual Editor -

Image
[ how can make html tags behave on visual editor. click on "text" near visual (top right side in screenshot) , put html there, visual used see visual formation of html. edit: in case can use alternate way, replace &lt; (html code of <) < , &gt; (html code of >) > in post content on save_post hook. hopes resolve problem.

openam - Opensso support for Apache 2.4 and Tomcat 7+ -

we using opensso in of our legacy applications , few applications want use either web/jee policy agents opensso. since opensso dead project have support apache 2.4 or tomcat 7 or 8? i know can migrate openam, not allowed so. i don't believe there supported opensso agents containers. should try switch openam, agents support apache 2.4, , tomcat 7/8. alternatively can attempt use agents opensso, such setups never tested forgerock.

android - PageTransformer with infinite viewpager -

Image
i've been combining tablettransformer (use source code here ) infinite view pager looping. results not expected. has no compiling error, blank page happened when swipe between pages. main activity public class mainactivity extends appcompatactivity { public viewpager mpager; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); toolbar toolbar = (toolbar) findviewbyid(r.id.toolbar); setsupportactionbar(toolbar); // initialize viewpager mpager = (viewpager) findviewbyid(r.id.container); infiniteviewpageradapter adapter = new infiniteviewpageradapter(getsupportfragmentmanager()); list<fragment> pagerfragments = createpagerfragments(); adapter.setpagerfragments(pagerfragments); mpager.setadapter(adapter); mpager.setpagetransformer(true, new tablettransformer()); mpager.

dplyr - Ignore first four characters from tibble in R -

this question has answer here: getting , removing first character of string 6 answers i have tibble want remove first 4 letters. unable it. tried substr() , substring() tend merge rows. here's data: dput(a) structure(list(value = c("abc-efgh-1234ijk-45k", "ijk-lokk-tiu" )), .names = "value", row.names = c(na, -2l), class = c("tbl_df", "tbl", "data.frame")) expected output: "efgh-1234ijk-45k" "lokk-tiu" here's tried: try #1: substr(as.data.frame.array(a),4,nchar(as.data.frame.array(a))) but output is: "t(`c(\"abc-efgh-ijk\", \"ijk-lokk-tiu\")` = 1:2)" try#2: stringr::str_sub((as.data.frame.array(a)),start = 4, end = nchar((as.data.frame.array(a)))) the output is: "t(`c(\"abc-efgh-ijk\", \"ijk-lokk-tiu\&q

maven - How can I import robot-file from external java library? -

Image
i use java + robot framework test micro services. have created several test projects each service. testing create few java classes keywords work http , json on low level. separated these classes library plan add test project maven dependency. also want add common keywords robot-file external library. but problem cannot import robot-files in tests. please pay attention first picture external project, , second picture project tests. does faced such problem , if decision have come with? i managed apply hack maven plugins. copy resources in current project. <build> … <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-dependency-plugin</artifactid> <executions> <execution> <id>unpack</id> <phase>prepare-package</phase&g

c# - teststack White, how to get/check a value from combobox -

Image
i need check/get value combobox. in inspection looks this: i want check assert.areequal value expecting. possible? is it? if(!string.isnullorwhitespace(combobox.selectedvalue.tostring())) { string value = combobox.selectedvalue.tostring(); }

ios - GroupChat Push Notification on XMPP -

we developing xmpp application on ios , android. using ejabberd xmpp server , using mod_interact ( https://github.com/adamvduke/mod_interact ) inform our webservers send push notifications clients offline messages: flow this: sender sends message ejabberd ejabberd receives message , check if receipant online if receipant offline ejabberd saves offline message mod_interact works when offline message received ejabberd , deliver message our webservers web server finds push notification informations clients , sends push notification its working on 1 1 chat. in group chat(muc) mod_interact doesnt work , cannot send push notification group receipants. know other solutions fix problem on both 1 1 , group chat. thanks look ejabberd_mod_offline_post , supports both one2one , muc. first config room must member-only room, , add users members right after created it, able total. add above model ejabberd models. implement callback service handle callback post. the i

javascript - how to keep value of variable after making it null -

i know sounds silly asking, there way of keeping value of b variable after delete a variable? var = 'some string or number'; var b = a; delete a; b still = 'some string or number'; or other way keep b value? delete not delete values or variables, deletes properties on object (mdn: https://developer.mozilla.org/en-us/docs/web/javascript/reference/operators/delete ). for instance: var myobj = { a: 1, b: 2 }; delete myobj.a; // myobj === { b: 2 } of course can keep reference value in variable: var copy = myobj.a (before delete property). variable hold value (for primitives basic numbers, strings, booleans) or reference (for objects etc.). either way, copy hold value still after original property has been deleted: var obj = { a: "hello" }; var copy = obj.a; delete obj.a; console.log(copy); // "hello"

ios - Return or other Warning were not prompted in CocoaPods Development Pods file (Xcode 8) -

as title describe, many dangerous warning aren't prompted in source code. example: return warning, missing match type convert warning , on. but, situation of none warning prompt occur in xcode 8 env. warning working fine in xcode 7 env. it's weird. ps: had checked warning settings in "building settings". of settings of warnings had been mentioned "true". i have use xcode 7 check warning due xcode 8 isn' prompt key warning. does encounter same case me?

rx java - Can each subscriber get different values from one Flowable? -

when subscribers subscribe 1 flowable , flowable emit items subscribers, can each subscriber different value? for example, if flowable emits 0, 1, 2, 3... one observer gets 0, 2 , other observer 1, 3, , on, load balancer. how solution ? @test public void testflowableloadbalancer() { intstream stream = intstream.iterate(1, -> + 1); flowable<integer> flowable = flowable.create(e -> stream.foreach(i -> { try { thread.sleep(1000); } catch (interruptedexception ignored) { } e.onnext(i); }), backpressurestrategy.drop); connectableflowable<integer> cf = flowable.publish(); cf.filter(i -> % 2 == 0).subscribe(i -> { logger.info("[even] = {}" , i); }); cf.filter(i -> % 2 == 1).subscribe(i -> { logger.info("[ odd] = {}" , i); }); cf.connect(); } the output : 2016-11-11 18:15:57,884 info data.rx2test - [ odd] = 1 2016-11-11 18:15:

objective c - i am not able to increase the xib view size on button click in it, -

on clicking of button not able see view(xib ie vpprocessnewjobdatavc ) increased in size , have been tried priorities,layoutifneeded , . have written button action in same vpprocessnewjobdatavc.m file this method in 1 class: -(void)menuitemqarequest: (id) sender { vpacontroller=[[vpprocessnewjobdatavc alloc] initwithnibname:@"vpprocessnewjobdatavc" bundle:[nsbundle mainbundle]]; vpacontroller.modaltransitionstyle = uimodaltransitionstylecoververtical; vpacontroller.delegate=self; vpacontroller.modalpresentationstyle = uimodalpresentationformsheet; //[vpacontroller.view settranslatesautoresizingmaskintoconstraints:no]; vpacontroller.preferredcontentsize=cgsizemake(600, 400); nslog(@"view frame %@", nsstringfromcgrect(vpacontroller.view.frame)); [self.jobssplitvc presentviewcontroller:vpacontroller animated:yes completion:nil]; } this method in xib class: -(ibaction)okbtnaction:(id)sender { self.tableview.hidden=no; cgrect thef

How can I make my countdown timer loop in C# using virtual studio? -

i reading book on c# in spare time (very new programming , pardon inexperience) , have made far making timer afking on game play. cant figure out how make countdown timer reset without having re run program manually. suggestions appreciated! thank much. (first time poster) public class afktimer { public void startprogram() { snapsengine.settitlestring("afk timer"); snapsengine.delay(3.0); snapsengine.speakstring("twenty minutes remaining"); snapsengine.delay(600.0); snapsengine.speakstring("ten minutes remaining"); snapsengine.delay(300.0); snapsengine.speakstring("five minutes remaining"); snapsengine.delay(240.0); snapsengine.speakstring("one minute remaining"); snapsengine.delay(60.0); snapsengine.speakstring("timer resetting"); } } you can pass delay input parameter function. example: using system.colle

javascript - Creating a ConvexGeometry hangs the page, in three.js -

i want create convex geometry hull around geometry lots of vertices make collision detection/ray casting easier. when add above 60 vertices convexgeometry page hangs. is not possible or have missed something? know of better way handle this? here's parts of code. var x, y, z, max = 1.0,min = 0.1,points = []; (var = 0; <= 20; i++) { // <-- alter value above 60- hangs page x = math.floor(math.random() * (max - min + 1)) + min; y = math.floor(math.random() * (max - min + 1)) + min; z = math.floor(math.random() * (max - min + 1)) + min; points.push(new three.vector3(x, y, z)); } var geometry = new three.convexgeometry(points); here's fiddle rest. not hang page :) http://jsfiddle.net/arpo/e45zhryk/

knowledge management - KB articles directly pointing to external link - Servicenow -

i have got requirement: kb article should directly link/point external url. details: when end user clicks on kb article in knowledge base, should directly redirected external link rather opening kb article in servicenow. i have provided external link inside article, end user can open article , click link re-direct. user not want open article, wants go directly external url. i know requirement bit weird. let me know if has experience this. redirect user via client script external url: user clicks on knowledge article knowledge articles opens and on load client script executing url call. if can call url enough, user not see article.

mysql - How to add a word to a row in crystal Report in C# -

i doing application in have print data using crystal report, data using mysql. in database, have field shows numbers of months this: table user------- prevision test------- 3 months so, in database column prevision shows number of months , need add months field in crystal report... ps: don't want add "months" in database show in crystal report. can in datagrid in crystal report didn't make it. thank you. just add concatenation in sql query, return '3 months' instead of '3' something this select prevision + ' months ' test your_table_name

Cannot run ASP.net service on IIS (Windows 10) - error 404 (not found) -

Image
here's scenario: windows 10, vs2015 update 3. create new blank 'empty' asp.net project, .net 4.5.2, , add dummy 'index.html'. run project iis express (the default): runs fine. change server iis: http error 500.19 - internal server error, error code    0x80070021. suggests invalid section 'modules' in web.config. comment out section , run again. gives 404 error. my javascript working fine on iis, appears iis not starting asp.net service - every ajax call service results in error 404. guess there's missing web.config. have in system.servicemodel <services> <service behaviorconfiguration="servicebehavior" name="webmap.webmap"> <endpoint address="" behaviorconfiguration="endpbehavior" binding="webhttpbinding" contract="webmap.iwebmap" /> <endpoint address="mex" binding="mexhttpbinding" contract="imetadataexchange" />

rendering - Create height map/shadows from 3d model or image -

Image
i trying obtain image 1 above. looking around think called "height map" not sure. i've tried in photoshop remove saturation or add grey scale output in not same. basically trying image or 3d model layer contain shadows. is can done in photoshop? software? correct term type of image? thank you a height map contains distance of surface given point. in 3d program surface map used on flat plain make appear raised resemble jumper or more create terrain. if use 3d model render image in 3d program have ability access various passes used create final image. using blender example, can access various passes in compositor combine them in different ways or can output each pass separate image. you can find several tutorials explaining how blender combines various passes final image this , this

angular - AngularFire2 how to use your own custom key instead of the auto generated one -

currently using: this.af.database.list('users').push(user); how can make key of object submitted custom. want able set node of object same uid of registered user. have access id need able know how make custom user objects node not auto generated id when pushing. thanks use method below angularfire2 addcustomkey (key, value) { const tosend = this.af.database.object(`/users/${key}`); tosend.set(value); }

java - HTTP status 500 - org.apache.jasper.JasperException: Unable to compile class for JSP -

i getting http status 500 exception. can tell me why issue persist? http status 500 - org.apache.jasper.jasperexception: unable compile class jsp type exception report message org.apache.jasper.jasperexception: unable compile class jsp description server encountered internal error prevented fulfilling request. exception javax.servlet.servletexception: org.apache.jasper.jasperexception: unable compile class jsp org.apache.struts2.dispatcher.dispatcher.serviceaction(dispatcher.java:515) org.apache.struts2.dispatcher.filterdispatcher.dofilter(filterdispatcher.java:419) root cause org.apache.jasper.jasperexception: unable compile class jsp org.apache.jasper.jspcompilationcontext.compile(jspcompilationcontext.java:672) org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:357) org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:390) org.apache.jasper.servlet.jspservlet.service(jspservlet.java:334) javax.servlet.htt

Java JNI: How to set String [ ] field Of Java class from native method of C++ -

i have class : processsolution public class processsolution { private string processid; private string processname; private string processsolutionsteps []; private string processremark; private string processnote; } and want set 1 of field processsolutionsteps native method , here step_name nothing processsolutionsteps jniexport jobjectarray jnicall java_nativeclass_jmain_getprocesssolutions (jnienv *env, jobject jobject) { clientlist *cl = new clientlist(); jmp_buf jmpb; int i, j , k; int listcount = 0, steps = 0; jobjectarray arrps = null; jobject clsobj; struct process *list = null; struct procdtl *pdtl; char *remark, *note, *step_name; list = (struct process *)calloc (sizeof(process) , 1); pdtl = (struct procdtl *)calloc (sizeof(procdtl) , 1); remark = (char*) calloc(201 ,1); note = (char*) calloc(201 ,1); step_name = (char*) calloc(201 ,1); cl->get_proc_list ( &listcount, &

php - How to differentiate profiles? -

i have 2 types of user: client , manager . stored in separated tables. each of have unique nickname. so, need open profile nickname . for client is: $client = client::where("nickname", $nickname) for manager is: $manager = manager::where("nickname", $nickname) so, try make universal function dewtect client , manager , execute appropriate query. how can improve code , detect type of user nickename? you should use 1 model this, guess best way handle clients , managers. if reason want use 2 models, can create method , put in client model since of queries clients: public function getclientormanagerbynickname($nickname) { $client = $this->where('nickname', $nickname)->first(); return is_null($client) ? (new manager)->where('nickname', $nickname)->first() : $client; } this code create 1 query if client found , return client. or create 2 queires , return manager. if there no client , manager nickname,

Python - Replace a given percentage (%) of characters (randomly) in a String? -

i have string e.g. x = "aaaaaaaaaa" i replace e.g. 20% of "a" "b" . tried: x_new = ''.join(i if random.randint(0, 1) else 'b' in x) but random.randint(0,1) not know how e.g. 20% replacement. the following code keeps original a character probability 80%, otherwise, replaces b from random import random x = "aaaaaaaaaa" rand_replace = lambda c: c if random()<0.8 , c=='a' else 'b' x_new = ''.join([rand_replace(c) c in x]) and if want total probability of replacement 20% stringwise: rand_replace = lambda c: c if random()<0.8**(1.0/len(x)) , c=='a' else 'b'

python - Kmeans: Terms occurring in more than one cluster? -

using kmeans tf-idf vectorizer possible terms occurring in more 1 cluster? here dataset of examples: documents = ["human machine interface lab abc computer applications", "a survey of user opinion of computer system response time", "the eps user interface management system", "system , human system engineering testing of eps", "relation of user perceived response time error measurement", "the generation of random binary unordered trees", "the intersection graph of paths in trees", "graph minors iv widths of trees , quasi ordering", "graph minors survey"] i use tf-idf vectorizer feature extraction: vectorizer = tfidfvectorizer(stop_words='english') feature = vectorizer.fit_transform(documents) true_k = 3 km = kmeans(n_clusters=true_k, init='k-means++', max_iter=100, n_i

runtime error - akka.dispatch.Dispatcher IllegalStateException in scala.concurrent internal callback -

i'm trying use akka 2.4.12 play 2.5.4 (scala 2.11.7). i'm injecting actorsystem using guiceapplicationbuilder().injector() with system = injector.instanceof[actorsystem] or @inject()(implicit val system: actorsystem) to instance of actorsystem. i'm using these 2 mechanisms (the first 1 in scala objects , second 1 in controllers ) substitute deprecated default akka actor system ( akka.system ). can't understand why error: [info] a.e.s.slf4jlogger - slf4jlogger started [debug] p.a.l.c.actorsystemprovider - starting application default akka system: application [debug] a.e.eventstream - logger log1-slf4jlogger started [debug] a.e.eventstream - default loggers started [info] play.api.play - application started (dev) [info] application - resolving database... [debug] [11/09/2016 12:30:22.182] [netty-event-loop-4] [eventstream(akka://reactivemongo)] logger log1-logging$defaultlogger started [debug] [11/09/2016 12:30:22.182] [netty-event-loop-4] [eventstream

Choose between either condition using if with logical OR in java -

this might seems bit foolish, has caught me. i want throw error if charstring doesn't contain word "hi". so wrote if(!charstring.contains("hi")) /// throw error on screen now, requirement changed. want throw error if charstring not contain "hello". so, requirement should not throw error if charstring contains either hi or hello so wrote: if(!charstring.contains("hi") || !charstring.contains("hello")) /// throw error on screen to horror, realized terribly wrong in writing above code. how can write in single if statement then? the requirement is: "if charstring contains either hi or hello, not throw error" a very clear way (at expense of superfluous block requires comment) write if (charstring.contains("hi") || charstring.contains("hello")){ // nothing } else { // throw error } this equivalent less eyebrow-raising if (!(charstring.contain

documentation - Java 8 LocalDate displaying in swagger -

i have dto contains field of java 8 localdate type. jackson annotations it's possible set format iso.date , works good. swagger (i have version 2.+) see localdate.class object localdate { month (integer, optional), year (integer, optional) } (that's true but...) want dipsay string format works util.date . how can solve it? i facing same problem, added @bean public docket docket() { return new docket(documentationtype.swagger_2) .groupname("name") .directmodelsubstitute(localdatetime.class, string.class) .directmodelsubstitute(localdate.class, string.class) .directmodelsubstitute(localtime.class, string.class) .directmodelsubstitute(zoneddatetime.class, string.class) .apiinfo(apiinfo()) .select() .paths(paths()) .build(); } in docket configuration. directmodelsubstitute makes swagger treat localdat

sql server - Condition to COMPARE TWO DATE From parameter and ADD if it Satisfies -

this procedure , im getting from , date in procedure have check if difference between , date greater 2 if condition satisfies have add 2days in days , set todate alter procedure [dbo].[sp_tu_avgstddev_report] @fromdate datetime, @todate datetime, @recipecode varchar(8000), @grade varchar(10), @wcid int begin -- set nocount on added prevent result sets set nocount on; if (condition check if @fromdate - @todate > 2) --if satisfies set @todate @fromdate+2days please me in figuring out... you need used date functions this. alter procedure [dbo].[sp_tu_avgstddev_report] @fromdate datetime, @todate datetime, @recipecode varchar(8000), @grade varchar(10), @wcid int begin if (datediff(day,@fromdate,@todate)>2) set @todate = dateadd(day,2, @fromdate)

java - Best way to ensure a principal information is not edited with javascript -

i have react app , api send links user has access to. from them, creates menu. i might still need role of principal client side choose display or not information. i thinking create checksum of principal object in java , send principal object serialized react client. i need able evaluate checksum client using javascript user cannot use modified principal information (and modified role). what appropriate way so?

Python 2.7.12 socket.send with Timer -

i wanna set timer send data socket but error occur first picture in ubuntu 14.04 timer(len(p.pkt)/router.bandwidth, router.socket.send, (p.pkt)).start() i wrote 1 argument(p.pkt). error 'there no argument' how can set timer socket.send function? i use site timer class https://docs.python.org/2/library/sched.html if want program stop set amount of time before performing next step can use time function. import time time.sleep(seconds) for example import time print('text a') time.sleep(2) print('text b') the program print 'text a' wait 2 seconds print 'text b'. i hope managed help.

magento - Saving a custom customer attribute in observer -

i have created observer customer registration. inside have following code segment. public function customerregistrationsuccess($observer) { $customer = $observer->getevent()->getcustomer(); $devicename="web"; //log written $customer->setdevice_used($devicename); $customer->save(); //log written again } and have install file code: <?php $installer = $this; $installer->startsetup(); $this->addattribute('customer', 'device_used', array( 'label' => 'device used', 'visible' => 1, 'input' => 'text', 'type' => 'varchar', 'required' => 0, "unique" => 0, 'position' => 120, 'sort_order'=> 80, )); $attribute = mage::getsingleton('eav/config')->getattribute('customer', 'device_used'); $attribute->setdata('used_in_for

HAproxy redirect all root requests to www -

i have installed haproxy on server should nothing serve redirection endpoint of incoming naked domain request (http , https), www. -version. service wwwizer.com. cfg: global log /dev/log local0 log /dev/log local1 notice chroot /var/lib/haproxy stats socket /run/haproxy/admin.sock mode 660 level admin stats timeout 30s user haproxy group haproxy daemon # default ssl material locations ca-base /etc/ssl/certs crt-base /etc/ssl/private # default ciphers use on ssl-enabled listening sockets. # more information, see ciphers(1ssl). list from: # https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/ ssl-default-bind-ciphers ecdh+aesgcm:dh+aesgcm:ecdh+aes256:dh+aes256:ecdh+aes128:dh+aes:ecdh+3des:dh+3des:rsa+aesgcm:rsa+aes:rsa+3des:!anull:!md5:!dss ssl-default-bind-options no-sslv3 defaults log global mode http