Posts

Showing posts from May, 2015

python 2.7 - How to use StreamXmlRecordReader to parse single & multiline xml records within a single file -

i have input file (txt) below <a><b><c>val1</c></b></a>||<a><b><c>val2</c></b></a>||<a><b> <c>val3</c></b></a>||<a></b><c>val4-c-1</c><c>val4-c-2</c></b><d>val-d-1</d></a> if observe input carefully, xml data record after third '||' split across 2 lines. i want use streamxmlrecordreader of hadoop streaming parse file -inputreader "org.apache.hadoop.streaming.streamxmlrecordreader,begin=<a>,end=</a>,slowmatch=true which unable parse 3rd record. i getting below error traceback (most recent call last): file "/home/rsome/test/code/m1.py", line 13, in <module> root = et.fromstring(xml_str.getvalue()) file "/usr/lib64/python2.6/xml/etree/elementtree.py", line 964, in xml return parser.close() file "/usr/lib64/python2.6/xml/etree/elementtree

java - How to display AlertDialog on List Adapter -

contactsdatalist array list contains data of contacts. i have written following code pass data list adapter adapter= new contactsadapter(getapplicationcontext(), contactsdatalist); listview = (listview) findviewbyid(r.id.lv_contacts); listview.setadapter(adapter); on list view, want launch call_action event, whenever user clicks on item in list. i have written following code in adapter, giving me error message java.lang.illegalstateexception: need use theme.appcompat theme (or descendant) activity. contactsheading.setonclicklistener(new view.onclicklistener() { @override public void onclick(final view v) { alertdialog alertdialog = new alertdialog.builder(context).create(); alertdialog.settitle("alert"); alertdialog.setmessage("are sure want call "+contactsheading + "?" ); alertdialog.setbutton(alertdialog.button_positive, "ok", new dialoginterface.onclicklistener()

preg replace - Remove div and contents of given class in PHP -

i using javascript package called medium editor allows replicate medium.com's text editor. to adds button content editable div class. button has + symbol , acts button adding images etc. the issue when posting content of div posting div , contents. i wish div class , remove before run through html purifier. this example of html wish remove string: <div class="medium-insert-buttons" contenteditable="false" style="dislollay: none">\r\n <a class="medium-insert-buttons-show">+</a>\r\n <ul class="medium-insert-buttons-addons" style="dislollay: none">\r\n <li><a data-addon="images" data-action="add" class="medium-insert-action"><slolan class="fa fa-camera"></slolan></a></li>\r\n <li><a data-addon="embeds" data-action="add" class="medium-insert-action"><slol

amazon web services - Specifying resource group name when creating resource group in aws cli -

i'm trying figure out how specify resource group name when creating resource groups via aws cli, when @ cli documentation create-resource-group command see option specify tags, how specify name? , noticed when access console don't see resource groups created using cli. ideas?

Azure VM IIS unreachable from public IP / cloudapp.net domain -

Image
i setup windows server vm on azure space, reason iis configured on isn't available publicly... i can open iis welcome page trough localhost on server, no trough visiting external ip or cloudapp.net domain. something note can reach server trough mstsc external ip adress... i tried: shutting off windows firewall opened endpoints on non-classic management azure system i binded ip's cloudapp host checked online azure documentation so resolved it... don't know if it's supposed way, sure in azure "source port" defined * , not 80, or other. that absolutely not work if you're not defining "*". screenshot of azure here

c# - Print files modified in the last 24 hours to the console -

i'm taking c# course, , current assignment create console application transfers new files (modified in last 24 hours) directory "customer orders" directory "home office". at point i'm trying come way figure out files new. see if works, i'm using console.writeline print new files console window. however, print "system.linq.enumerable+wherearrayiterator'1[system.io.fileinfo]". i'm incredibly new language, , i'm worried i'm going wrong way. here code far (after hour of googling , getting ideas stackoverflow): class modifiedfiles { public string your_dir; public ienumerable<fileinfo> modified() { your_dir = @"c:\users\student\desktop\customer orders"; var directory = new directoryinfo(your_dir); datetime from_date = datetime.now.adddays(-1); datetime to_date = datetime.now; var files = directory.getfiles()

Why does SQL Server GEOGRAPHY allow longitudes between -15069° and +15069°? Why ±15069°? -

i using microsoft.sqlserver.types dll in projects validating latitudes , longitudes. the library validates longitude values between -15069 , 15069 degrees instead -180 180. can explain significance or reason microsoft checking longitude values between -15069 , 15069 degrees? microsoft has listed standards geo spatial standards on website mentions longitude values must between -15069 , 15069 degrees, inclusive. https://msdn.microsoft.com/en-us/library/ee301753(v=sql.105).aspx your inputs in understanding concept appreciated! why longitude not restricted [-180°..+180°]? here's brief thought experiment. of following 3 lines linestring (-180 0, 180 0) represent? a line going around whole globe along equator in eastward direction. a line going around whole globe along equator in westward direction. a line of length 0, since -180° latitude denotes same meridian +180° latitude. as decide on of 3 possibilities, find have no way of modelling other 2 cases li

javascript - Matching and writing data between 2 directories with node.js -

so i'll try , make sound simple possible, because don't understand im doing. basically have 2 directories, sake of example call them 'a' , 'b'. 'a' directory other directories inside of it(inside files). 'b' directory itself, files in it, contain data. i need match files , b, , write data b a. this example code, not best because im extremely confused, tried make simple possible read var id = [] function match(){ var = fs.readdirsync(__dirname+"/x/") var b = fs.readdirsync(__dirname+"/y/") id.push(a) for(o in id){ fs.readdirsync(__dirname+"/x/"+id[o]) // got confused, heres example if(file names in id[o] match b){ write data b, id[o] } } } match() edit: aside moving files, need copy files. directory have files a,b,c. , directory b have a,b,d. , b being copied, , file d being left alone. posit labs suggestion of a duplicate question

actionscript 3 - Movement not working AS3 -

i'm working on game, , new as3. i'm stuck on character movement: following guide , ended following code. when test game plays character animation , can't control it. package { import flash.display.stage; import flash.events.keyboardevent; import flash.ui.keyboard; import flash.utils.proxy; import flash.utils.flash_proxy; dynamic public class keyobject extends proxy { private static var stage:stage; private static var keysdown:object; public function keyobject(stage:stage) { construct(stage); } public function construct(stage:stage):void { keyobject.stage = stage; keysdown = new object(); stage.addeventlistener(keyboardevent.key_down, keypressed); stage.addeventlistener(keyboardevent.key_up, keyreleased); } flash_proxy override function getproperty(name:*):* { return (name in keyboard) ? keyboard[name] : -1;

jsf 2 - FileLimit is not working in primefaces file upload when multiple="true" -

i trying set filelimit="4" in application in <p:fileupload> validate when user uploads multiple files not more four. not working. when checked primefaces showcase multiple=true scenario, there not working. , weird thing when try autocomplete in eclipse attributes inside <p:fileupload> don't see filelimit , filelimitmessage etc. using primefaces 3.5v.is bug in primefaces file upload? for reason, primefaces main showcase site showcasing current alpha/beta/rc version instead of latest stable version. can verify looking @ version information in footer of showcase site. indeed confusing. previously, primefaces alpha/beta/rc versions showcased on different showcase site (called primefaces labs). in particular case, filelimit attribute of <p:fileupload> indeed added in primefaces 4.0 , absent in 3.5. in order utilize attribute, you'd need upgrade primefaces 4.0. it's available snapshot (note: you're supposed report issues

javascript - Ajax post req of array item gives me a null response -

as title says, can send post request non array item using vue resource no problem. when comes sending array data response null array.why happening? submit:function(){ var customizedexercises = this.customizedexercises; this.$http.post('/api/customized-exercises', customizedexercises).then(function(response){ console.log(response); }, function(response){ return response; }) }, addselectbox: function(){ this.customizedexercises.push({ weight:'',sets_duration:'',name:'',reps:'',exercise_day_id:'' }) } }, data customizedexercises : [ { weight:'',sets_duration:'',name:'',reps:'',exercise_day_id:'' } ], html <button type="submit" @click="addselectbox">add select box</button> <div v-for=" customizedexercise in customizedexercises" class="input-group"&g

ruby - Recursive function for combinations -

i'm trying solve following problem : given 2 integers n , k, return possible combinations of k numbers out of 1 ... n. i'm doing in ruby , tried implement solution https://gist.github.com/safeng/8156755 , result empty . def combine(n, k) res = [[]] return res if k > n || n == 0 sol = [] comb(0, 0, k, n, sol, res) res end def comb(start, idx, k, n, sol, res) if idx == k res << sol else (start..n).to_a.each |i| sol << (i + 1) comb(i + 1, idx + 1, k, n, sol, res) sol.pop end end end print combine(4, 2) #[[], [], [], [], [], [], [], [], [], [], []] do have ideas ? thank you note (updated): code works: def combine(n, k) res = [] return res if k > n || n == 0 sol = [] comb(0, 0, k, n, sol, res) res end def comb(start, idx, k, n, sol, res) if idx == k res << sol.dup else (start..n - 1).to_a.each |i| sol << (i + 1) comb(i +

javascript - Rendering in MarkedJS -

Image
i have problem dosent render code odd reason, , ill show code. here code controller(angularjs) : $scope.$watch('creatorvalue', function(current, original) { var htmlval = document.getelementbyid('creatorvalue').innerhtml; console.log(original); htmlval = marked(original); }); and here minimal html: <div class="topic-sentence"> <p class="topic-text" id="creatorvalue">{{creatorvalue}}</p> </div> well can see logged original value , came correct result: well yeah, logs correct thing.... must show right display right? nope can see above, code in 1 line, , there nothing "marked". if guys want see more code, let me know in comments below. appreciated. here, have not put marked content dom. should work, please try. $scope.$watch('creatorvalue', function(current, original) { document.getelementbyid('creatorvalue').inner

xcode7 - Performing in command line what Xcode does when you run a build -

is possible perform on command line xcode when build , run against iphone hooked through usb. i trying automate upload , install iphone process without using play button. tho didn't try, can that. xcode front-end of xcodebuild command line tool , other things. here's link apple give basic info: https://developer.apple.com/library/ios/technotes/tn2339/_index.html#//apple_ref/doc/uid/dts40014588-ch1-how_do_i_build_my_projects_from_the_command_line_ to use command, check here: https://developer.apple.com/legacy/library/documentation/darwin/reference/manpages/man1/xcodebuild.1.html see -destination part.

python - Regex - Match each item between multiple occurrences of delimiter -

i match values between given delimiter using regex expression in python. ignore surrounding white space. example: the string 1, b cc, "a" and delimiter , return 3 matches of 1 , b cc , "a" the string 4 + 5 + 2 +1 , delimiter + return 4 matches of 4 , 5 , 2 , 1 you can re.split() method. import re re.split('\s*,\s*', '1, b cc, "a"') re.split('\s*\+\s*', '4 + 5 + 2 +1')

asp.net - How SignalR group works internally? Why it is faster to send message to group with multiple client? -

people recommend use signalr groups, when multiple clients interested in same kind of message. bit curious, how concept internally works. why sending message through signalr group multiple clients faster sending individually client? you can refer below link details on how signalr works - http://www.asp.net/signalr/overview/getting-started/real-time-web-applications-with-signalr

JavaScript nested loop doesn't work -

i'm doing assignment using nested loop ask user input information of 4 guess , print out alert. problem prompt repeat once. var myarray = new array(2); for(var i=0; i<2; i++){ for(var j=0; j<2; j++){ myarray[i][j] = prompt("enter guess first name."); myarray[i][j] = prompt("enter guess last name."); myarray[i][j] = prompt("enter guess phone."); myarray[i][j] = prompt("enter guess address."); } } alert("first person : " + myarray[0][0]); alert("second person : " + myarray[0][1]); alert("third person : " + myarray[1][0]); alert("fourth person : " + myarray[1][1]); try change this: var myarray = new array(); for(var i=0; i<2; i++){ myarray[i]=[]; // <- you're missing for(var j=0; j<2; j++){ myarray[i][j] = prompt("enter guess first name."); myarray[i][j] = prompt("enter guess last name."

javascript - Can we use the Latex to Display the math formula in android project? -

can use latex display math formula in android project? if yes how can use give suggestion. yes, there android library: https://github.com/kexanie/mathview able render latex syntax using webview.

google mobile ad banner ad view not showing in ios 9.3.2 -

i have integrated google mobile ad based on github banner sample , got working devices ios < 9.0. got problem devices running 9.3.2 ios. so in trying isolate possible , error can occur, downloaded github sample code banner ad. sample running remove code related firebase , added google mobile ads framework version 7.8.1. banner ads showed test ad comes sample code. then modify adunitid use have been using app. , sample code duplicated behavior i've seen app. banner ad got displayed devices running below 9.0 ios. since 9.0+ ios devices have running version 9.3.2, , none of these devices can display banner ad. can test ads display oh 9.3.2 devices when use via google's test adunitid or setting testdevice of ad request. to debug may different between devices running ios <9.0 , 9.3.2 when use adunitid, added gadbannerviewdelegate , breakpoint on adviewdidreceivead method of delegate. , devices running 9.3.2 show method did called. ads show being initialized. , found

c# - Only approve the row that is checked from asp gridview -

i have gridview looks wherein have several rows : name, contact#, company name etc. , have included check box can choose row approve or not. <asp:gridview id="gridview1" runat="server" autogeneratecolumns="false" cssclass="table table-hover table-striped" enableviewstate="false" onselectedindexchanged="gridview1_selectedindexchanged"> <columns> <asp:templatefield> <itemtemplate> <asp:checkbox id="chkrow" runat="server" /> </itemtemplate> </asp:templatefield> <asp:boundfield datafield="username" headertext="username" sortexpression="username" /> <asp:boundfield datafield="lastname" headertext="lastname" sortexpression="lastname" /> <asp:boundfield datafield="firstname" heade

google spreadsheet - Score calculation for two different teams -

how go counting scores between c1 , c8 , entering values a2 , b2 ? a1 = blue b1 = red a2 = team blue score b2 = team red score between c1 c8 = winning team & score (note: c1 = $a$1&" 1.25" ) c1 = blue 1.25 c2 = blue 2 c3 = red .5 c4 = draw c5 = blue 1.5 c6 = blue 1.75 c7 = red 2 c8 = draw so should is: a2 should = 6.5 b2 should = 2.5 you can total score of blue team =sum(arrayformula(if(left(c1:c, 4)="blue", value(regexreplace(c1:c, "[^0-9.]", "")), 0))) for red team, use left(c1:c, 3)="red" in formula. the conversion text number happens in 2 steps: regexreplace removes characters except . , 0-9; value converts text number. it better keep winning team , score in separate cells (team in column c, score in column d), simplify handling of data: you'd need =sumif(c1:c, "blue", d1:d) .

angularjs - Sending chunks of data sequentially on request from a Laravel api to Angular -

i trying show comments on frontend displayed facebook comments. see few comments , on scroll more comments displayed. using laravel backend , angular frontend. wondering how send frontend request next chunk of data until of comments displayed , make in laravel perform queries next chunk @ request? paginate data on server , when user gets on page, he/she see 10 comments example, when he/she clicks on view 10 more comments, show next page of comments, stored chunks of 10 inside paginator object. the same idea apply if wanna display comments on scroll down. build custom json response can work on front end. check out laravel paginator api: https://laravel.com/api/5.2/illuminate/pagination/paginator.html

javascript - problems with filter, RegExp and variables -

is there easier way test character, saw regexp other day it's applied diffently im doing now. piont example: if firstname contains a z return true if give count +1 , later 1 when count 8 or greater submit post. but it's not working when putin number in firstname. do of u find error im script or have done better? many thanks. var count = 0; function checkemail() { var email = document.getelementbyid('email'); // haalt record op en slaat op als variable var filter = /^([a-za-z0-9_\.\-])+\@(([a-za-z0-9\-])+\.)+([a-za-z0-9]{2,4})/; // hier wordt gecheckt of de records correct zijn ingevuld // hier staat als de test terug komt moet dingen die niet in de filter staat dan voer iets geldig in if (!filter.test(email.value)) { alert('voer geldig email adres in.'); email.focus;// hier wordt gelet als de muis of met die toetsenbord weg gaat van veld return false; } else { count = c

How to load json data into fragment in android -

i want show 3 fragments in activity , load data json in fragments ! want show each json data 1 fragment, in application load 3 fragments json datas in first enter application. for example : when first enter application load of fragments datas, want load data when show fragment ( swipe on fragment ). fragment 1 codes: public class free_fragment extends fragment { private recyclerview mrecyclerview; private free_recycler_adapter madapter; private recyclerview.layoutmanager mlayoutmanager; private list<datamodel> datamodels = new arraylist<datamodel>(); private context context; @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view view = inflater.inflate(r.layout.fragment_free_layout, container, false); context = getcontext(); loaddata(); ///----- recyclerview ----- mrecyclerview = (recyclerview) vie

ruby on rails - webrick using ssl whats to do? -

i've got rails 4 application , want run ssl on webrick. have do? i've added ssl certificate domain , startet this bundle exec rails s -e production -p 3001 --binding=0.0.0.0 now got error: internal server error server encountered internal error or misconfiguration , unable complete request. please contact server administrator @ inform them of time error occurred, , actions performed before error. more information error may available in server error log. additionally, 500 internal server error error encountered while trying use errordocument handle request. apache server @ domain.de port 443 thanks directives set apache https proxypreservehost on proxyrequests on servername domain.de serveralias *.domain.de proxypass / https://subdomain.domain.de:3001/ proxypassreverse / https://subdomain.domain.de:3001/ sslengine on most people solve switching webrick thin (or better, unicorn/puma/passenger). don't think webrick designed run in production.

Return the kind of an expression in C, i.e., whether it's an rvalue or lvalue -

can print how expression being evaluated? for example if wanted find out whether value being evaluated rvalue or lvalue i'd call hypothetical code: int main() { if(isrvalue(*(int *)4)) return 0; else return 1; } this creates problems we're discovering below 'type' of expression can depend on whether it's on right or left side of assignment operator. test more suited as supports_lvalue(*(int *)4) although again hypothetical , may left playing around basic examples. the reason experimentation might useful in debugging if it's possible. lvalue points storage location can assigned new values. variables including const variables lvalues. lvalues persist beyond expression uses it. on other hand, rvalue temporary value not persist beyond expression uses it. lvalues may appear on left or right side of assignment operator. rvalues can never appear on left side of assignment operator. in short: lvalues storage areas , rvalues values.

docker - kafka on kubernetes cannot produce/consume topics (ClosedChannelException, ErrorLoggingCallback) -

i run 1 kafka , 3 zookeeper-server in docker on kubernetes following instruction . cannot produce/consume topics outside pod(docker container). bin/kafka-console-producer.sh --broker-list 1.2.3.4:9092 --topic [2016-06-11 15:14:46,889] error error when sending message topic test key: null, value: 3 bytes error: (org.apache.kafka.clients.producer.internals.errorloggingcallback) org.apache.kafka.common.errors.timeoutexception: batch containing 3 record(s) expired due timeout while requesting metadata brokers test-0 bin/kafka-console-consumer.sh --zookeeper 5.6.7.8:2181 --topic test --from-beginning [2016-06-11 15:15:58,985] warn fetching topic metadata correlation id 0 topics [set(test)] broker [brokerendpoint(1001,kafka-service,9092)] failed (kafka.client.clientutils$) java.nio.channels.closedchannelexception @ kafka.network.blockingchannel.send(blockingchannel.scala:110) @ kafka.producer.syncproducer.liftedtree1$1(syncproducer.scala:80) @ kafka.producer.syncproduce

CakePHP: route with optional parameters -

suppose have action: public function index_by_date($year = null, $month = null, $day = null) { if($year && $month && $day) { //posts of day } elseif($year && $month) { //posts of month } elseif($year) { //posts of year } else { //exception... } } this shows posts of single day (all posts of 06/11/2016): mysite.com/posts/2016/06/11 this shows post of full month (all posts of june 2016): mysite.com/posts/2016/06 this shows post of full year (all posts of 2016): mysite.com/posts/2016 i think clear. now want write single route these cases. then, second , third parameter should optional. i have tried this, not work: $routes->connect('/posts/:year/:month/:day', ['controller' => 'posts', 'action' => 'index_by_date'], [ 'year' => '[12][0-9]{3}', 'month' => '(0[1-9]|1[012])?'

node.js - node require.cache delete does not result in reload of module -

i'm writing tests npm module. these tests require install multiple versions of npm module in order check if module validate them compatible or incompatible. somehow uncache libraries or function found on stackoverflow or npm database not working.. i install/uninstall npm modules using helper functions: function _run_cmd(cmd, args) { return new promise((res, rej) => { const child = spawn(cmd, args) let resp = '' child.stdout.on('data', function (buffer) { resp += buffer.tostring() }) child.stdout.on('end', function() { res(resp) }) child.stdout.on('error', (err) => rej(err)) }) } global.helper = { npm: { install: function (module) { return _run_cmd('npm', ['install', module]) }, uninstall: function (module) { decachemodule(module) return _run_cmd('npm', ['un

DPSET: Multiple connections in Ryu SDN Controller -

i install latest ryu controller pip install(python3) in ubuntu 14.04 on vm(vm-a), , nic configure bridge mode(192.168.88.252). i assume vm-a's host "host-a" and connect physical zodiac fx openflow switch, port4(reserve connect controller, 192.168.88.252) router(192.168.88.0/24) zodiac fx port3 connect router(192.168.88.0/24) and connect 2 rpi(aka host-b,c) on zodiac fx port 1,2(so, 2 rpi 192.168.88.250, 192.168.88.249) and connect controller host-a router(192.168.88.253) it work fine, , 2 rpi able connect internet. host-a able connect 2 rpi. if trying use vm-a kind of connect 2 rpi. hole controller stuck few minute, message: dpset: multiple connections {dpid} i wounder know there illegal when using sdn controller communicate openflow networking devices? in case, ryu app run simple_switch_13.py. thanks! if spread subnet(192.168.80.0/24) sdn switch communicate controller. this problem solved!, sdn controller need nic connect subne

javascript - How can I make the image smaller width? Masonry -

basically not know how change width of image looks in design. i'm new working library , want know how can change example in design. the middle image smaller other two. preserved , height three i have sample code html: <div class="grid"> <div class="grid-sizer"></div> <div class="grid-item item-1"> <img src="http://bagelhousecafe.ch/wp-content/themes/wp_bagel/assets/img/img-01.png" /> </div> <div class="grid-item item-2"> <img src="http://bagelhousecafe.ch/wp-content/themes/wp_bagel/assets/img/img-02.png" /> </div> <div class="grid-item item-3"> <img src="http://bagelhousecafe.ch/wp-content/themes/wp_bagel/assets/img/img-03.png" /> </div> </div> code css: * { box-sizing: border-box; } /* force scrollbar */ html { overflow-y: scroll; } body { font-family: sans-serif; } /* ---- gri

How to get multi-line parameters in c# -

is there way multiple lines of parameters parsed through main entry point in c# application? suppose have batch process: myapp.exe ( param1 param2 param3 ) how these parameters inside console application? myapp.exe: using system; namespace mynamespace { static class program { static void main(string[] args) // ^ parameters here { } } you can parameters : static void main(string[] args) { string param1 = args[0]; string param2 = args[1]; string param3 = args[2]; } and launch application : myapp.exe param1 param2 param3

decrypted value from mysql pdo php -

$stmt2 = $dbh-> prepare("select * encryptme ".decrypt('encryptedcolumn', $key)." = ?"); $stmt2 -> bindvalue(1, $dec, pdo::param_str); $stmt2 -> execute(); i have encrypt() , decrypt() save data after using encrypt() want select data not able because data encrypted. tried used function in column name not working error saying uncaught exception 'pdoexception' message 'sqlstate[42000]: syntax error or access violation: 1064 have error in sql syntax; check manual corresponds mysql server version right syntax use near '= ' how can decrypt column in query statement? you can not use php function decrypt value in database while querying. (you can use database function if supports entcryption method however) you can instead send encrypted parameter database compare encrypted stored value. after fetching data can decrypt value whatever need to. edit after new information: if can not reliably encrypt values

json - jmeter load testing , Parameterization -

i running http request test in jmeter send json input. example: { "id":"0", "fieldvalue":"sanket","source":"todays date" } i need parametrize each thread iteration different value id , fieldvalue , source chosen, possibly json file (not csv file). possible? everything possible. here options jmeter can read files. check out following functions: __filetostring() _stringfromfile() you can use http request sampler read file, use file protocol , unc path. values parametrization can obtained using json path postprocessor . see: jsonpath - xpath json - json path language overview , syntax advanced usage of json path extractor in jmeter - not obvious scenarios covered

php - Laravel 5.1 query string parameter not working in pagination -

i using laravel 5.1 pagination. not working. guess problem accessing query string parameter. routes.php route::get('blogs', 'front\frontcontroller@blog'); controller public function blog(request $request) { print_r($request->fullurl()); die; $blogs=blog::with('user')->where('flag','!=','0')->paginate(2); return view('front.pages.blog_list',['blogs'=>$blogs]); } for url http://localhost/myproject/blogs?page=2 result : http://localhost/myproject/blogs?blogs . should ?page=2 instead of ?blogs. have noticed query string parameters not working in others page. idea? in advance. use ->appends(\input::except('page')) return view('front.pages.blog_list',[ 'blogs'=>$blogs->appends(\input::except('page')) ]);

encryption - How to decrypt and divert traffic through L2 devices with Avi Networks? -

when using avi networks controller, possible receive ssl/tls traffic client, decrypt traffic (maybe selectively), divert traffic through active l2 device (such ips filtering) receive cleaned traffic back, re-ecnrypt it, send forward destination server? the decryption/encryption part referred ssl forward proxy. here's example of feature https://devcentral.f5.com/articles/divert-unencrypted-traffic-through-an-ips-with-local-traffic-manager after talking avi networks se, turns out feature not supported @ time.

javascript - Speedy setInterval -

i'm trying out setinterval (first time) increase score , it's working great, except reason keeps speeding up. in sample below, every time click button, score increases more quickly. it's 50 decreasing, why? any appreciated, thanks. var scoretimer; var myscore = 0; var scoreincrement = 0; function increasescore() { scorecountdown(10); } //scoring function scorecountdown(scoreamt) { scoreincrement = scoreamt scoretimer = setinterval(updatescore, 50); } //updates score on set interval function updatescore() { if (scoreincrement > 0) { myscore += 1 scoretext.innerhtml = "score " + myscore; --scoreincrement } else { clearinterval(updatescore) } } <button onclick="increasescore()">add score</button> <br> <span id="scoretext">000</span> it's because clearinterval wasn't called properly. fix that, change clearinterval(up