Posts

Showing posts from August, 2010

php - auto search the keyword in textarea -

this coding. coding allows me search keyword in database , worked fine. how can search keyword without click search button? want same search function in google search. can automatically search , review without hit button. <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>search contacts</title> </head> <p><body> <h3>search contacts details</h3> <p>you may search either first or last name</p> <form method="post" action="search.php?go" id="searchform"> <input type="text" name="question"> <input type="submit" name="submit" value="search"> </form> <?php if(isset($_post['submit'])){ if(isset($_get['go'])){ if(preg_match("/^[ a-za-z]+/", $_post[

java - Why can't a static nested class access "this" pointer of outer class? -

Image
the thing bothers me second point. i thought might have fact "this" pointer isn't static , inner class can't access it. i'm not sure if that's right explanation though. this raised question me "where "this" pointer defined?" the difference between static nested class , 1 isn't static precisely instance of non- static inner class associated specific instance of enclosing class, while static inner class isn't. there is no a.this instance of static inner class associated with.

python - How do I fix a tuple in list error -

so have bit of code: points = [ [400,100],[600,100],[800,100] , [300,300],[400,300],[500,300],[600,300] , [200,500],[400,500],[600,500],[800,500],[1000,500] , [300,700],[500,700][700,700][900,700] , [200,900],[400,900],[600,900] ] and produces error: line 43, in <module> points = [ [400,100],[600,100],[800,100] , [300,300],[400,300],[500,300],[600,300] , [200,500],[400,500],[600,500],[800,500],[1000,500] , [300,700],[500,700][700,700][900,700] , [200,900],[400,900],[600,900] ] typeerror: list indices must integers, not tuple what can fix it? you forgot 2 commas: [500,700][700,700][900,700] now python sees attempt index list on left-hand side (700, 700) tuple: >>> [500,700][700,700] traceback (most recent call last): file "<stdin>", line 1, in <module> typeerror: list indices must integers, not tuple the second [900, 700] 'list' give same problem doesn't yet come play. fix adding commas bet

Form input as parameters Laravel Eloquent -

i want dynamically query using dynamic values form inputs my form looks this <form action="{{url('search')}} method="post"> <input name="min" type="number"> <input name="max" type="number"> <button type="submit">submit</button> routes route::post('search', 'searchcontroller@search'); action public function search($min, $max) { $max = //this should form $min= //this should form $result = $this->users->showresultbyageminmax($max,$min);//some code repository } how whould pass data form values min, max parameters? $min = 15;//works $max = 100;//works// but want dynamically populated form user there few methods that. 1. request object (recommended). public function search(request $request) { $max = $request->input("max"); $min= $request->input("min"); $result = $this->users->

Tooltipster jQuery load issue in Wordpress -

i'm trying add tooltipster script wordpress site , have issue jquery loading. the instruction site says code should added head tag (links files modified site): <link rel="stylesheet" type="text/css" href="http://oopsbox.me/wp-content/uploads/js/tooltipster.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="http://oopsbox.me/wp-content/uploads/js/jquery.tooltipster.min.js"></script> <script> $(document).ready(function() { $('.tooltip').tooltipster(); }); </script> then adding .tooltip class element should show nice tooltip on hover etc. this works when try on separate page. example here test page . but when try add same code wordpress header.php head tag display tooltips on main page site stops working. i think it's because of jquery load line

node.js - NodeJS - Wait like express.listen -

in application have schedule multiple cron task , application should run "forever" (in few words, have stop when kill it). express framework use app.listen run indefinitely. how can this? wait not "active", because cron must continue work. i cant use (i think) setinterval . i've tried search lot havent find anytning this. thanks you may use setinterval() prevent app terminating. hope link provides more info on issue: https://stackoverflow.com/a/23354058/3359432

encode javascript array in php? -

i tried encode javascript array in php doesn't work... don't understand problem: this javascript code var reports = [ ["grup",24.5,101.6,"680 c.","680 c.",0,"n"], ["vul-aca",4.501,-9.876,"192 c.","192 c.",0,"n"] ]; and tried encode in way: $file= "jsfolder/array.js"; //here there js array $file_contents = file_get_contents($file); $json_string_array = substr($file_contents,strpos($file_contents,'['),-1); $array_php = json_decode($json_string_array); but think mistake :( thank lot , sorry english you have rid of semicolon end of string too. php > var_dump(json_decode("[];")); null php > var_dump(json_decode("[]")); array(0) {}

html - Strange thing with onmousemove javascript -

Image
hi guys:)if pass on div in example mouse's pointer function print in console 2 times,this menans onmousemove event triggered 2 times.i have printed coordinates of mouse's pointer , how can see in image below,i don't move verticallylly horizontally.how possible onmousemove event triggered considered div 1 pixel width?how possible onmousemove event triggered 2 times considered div 1 pixel width? <div id="div1"> </div> #div1{ height:200px; width:1px; background:red; } document.getelementbyid("div1").onmousemove= function(){ console.log("in mousemove function"); console.log(event.clientx); console.log(event.clienty); }; you bind onmousemove called every time mouse moved on element. when hover div move mouse down resolving in additional calls handler. it more clear if add more width div. what wants onmouseenter called once when enter div: documen

How to set a three color gradient in a qooxdoo widgets decorator? -

i want set 3 color gradient in qooxdoo widgets decorator. relevant css linear-gradient(rgba(255,255,255,0.2) 0, rgba(255,255,255,0.8) 30px, rgba(255,255,255,0.6) 100%); i wan't achieve hover effect in icons in page http://njdesktop.nagyervin.eu/ what tried far: in theme.color file defined 3 colors "desktop-icon-top": qx.core.environment.get("css.rgba") ? "rgba(255, 255, 255, 0.2)" : "white", "desktop-icon-middle": qx.core.environment.get("css.rgba") ? "rgba(255, 255, 255, 0.8)" : "white", "desktop-icon-end": qx.core.environment.get("css.rgba") ? "rgba(255, 255, 255, 0.6)" : "white" but qx.ui.decoration.mlinearbackgroundgradient has properties gradient start , gradient end. not middle. i tried set directly in styles of theme.decoration "desktop-icon-hovered": { style: {

python - How to remove everything after the last occurence of a character in a Dataframe? -

i have dataframe df looks (this sample): eq1 eq2 eq3 0 apple.fruit oranage.eatable.fruit nan 1 pear.eatable.fruit banana.fruit nan 2 orange.fruit tomato.eatable potato.eatable.vegetable 3 kiwi.eatable pear.fruit cabbage.vegetable <and on.. large dataframe> i remove after last occurrence of dot . in every element of df , save under different name,say df_temp . desired ouput: eq1 eq2 eq3 0 apple oranage.eatable nan 1 pear.eatable banana nan 2 orange tomato potato.eatable 3 kiwi pear cabbage <and on> this tried: df_temp=".".join(df.split(".")[:-1]) . unfortunately seems work strings , not dataframe. have tweak line bit achieve want? please help! you do: df_temp = df.apply(lambda

html - Safari Browser.. Paragraph Tag Issue -

i building website friend. been through issues debugging. of these sorted out in terms of being compatible internet explorer ran problems alignment. then, moving onto safari, have huge bunch of problems. start off 1 , hope guys kind enough me. below code: <div id = "welcome_note_cnt_pic"> <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit. aenean commodo ligula eget dolor. aenean massa. cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. nulla consequat massa quis enim. donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. </p> <p>in enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. nullam dictum felis eu pede mollis pretium. integer tincidunt. cras dapibus. vivamus elementum semper nisi. aenean vulputate eleifend tellus. aenean leo ligula, porttitor eu, consequat vitae,

c# - Selecting the newest entry of each day -

consider simple class public class data { public datetime date; public object content; } now have ienumerable<data> called datas , want linq sort older items of each day out. such if there items of same day, interested in latest item of day. is possible linq? here how can it: var result = datas //group day (we don't include time here) .groupby(x => x.date.date) //for each group (day), recent item (we include time here) .select(g => g.orderbydescending(x => x.date).first()) .tolist(); for more readability, use x.timeofday instead of x.date in select statement.

notepad++ - Regex - remove similar strings -

i have these lines http://dawn-ofthe-dead.blogspot.com/2008/02/amenra-hitch.html http://dawn-ofthe-dead.blogspot.com/2008/0...enra-hitch.html https://yadi.sk/mail/?hash=r041opeqcstt3kmodt3qxciamcxox1p78e1pqdoqjr8%3d https://yadi.sk/mail/?hash=r041opeqcstt3kmo...78e1pqdoqjr8%3d https://mail.yandex.ru/message_part/2011%20-%20amenra%20%26%20oathbreaker%20(split).rar?name=2011%20-%20amenra%20%26%20oathbreaker%20(split).rar&amp;hid=1.3&amp;ids=2440000004701735584 https://mail.yandex.ru/message_part/2011%20..000004701735584 http://mediaboom.org/mp3/127749-amenra-mass-i-prayer-i-vi-2003.html http://mediaboom.org/mp3/127749-amenra-mas....-i-vi-2003.html i want remove strings with .. ... .... because similar duplicate strings. i want output http://dawn-ofthe-dead.blogspot.com/2008/02/amenra-hitch.html https://yadi.sk/mail/?hash=r041opeqcstt3kmodt3qxciamcxox1p78e1pqdoqjr8%3d https://mail.yandex.ru/message_part/2011%20-%20amenra%20%26%20oathbreaker%20(split).rar?name=2011%

java - Good JSP code structure for header and footer -

i have following code structure of jsp pages: mypage.jsp <jsp:include page="header.jsp"/> specific page content <jsp:include page="footer.jsp"/> however, means header , footer code not have correct html structure. example, simplified header , footer code: header.jsp <!doctype html> <html lang="en"> <head> <title>${param.pagetitle}</title> </head> <body> <div class="container" style="margin-top: 80px;"> footer.jsp </div> </body> </html> as result, ide gives warning "missing start tag" / "missing end tag". don't feel disabling warning entirely since may find legitimate issues html structure. is there cleaner way structure jsp code can still reuse header , footer code in way? might helpful. please have look. \home.jsp // base page \parts\meta.jsp

vb.net - Get specific text in HTML code using webbrowser and VB -

i want in vb using webbrowser somehow text : 00:15 html code : <div id="stop15" class="sec"> <div class="sec">00:15</div> </div> i tried : dim elements htmlelementcollection = webbrowser1.document.getelementsbytagname("div") each htmlelement in elements if he.outerhtml.toupper.contains("sec") checkedlistbox1.items.add(he.getattribute("class")) 'or he.innertext() end if next , not work. help. load page in vairable string use regular expressions @ < div class="sec">.+< /div> extract text

swift - App crash after turning off on iCloud Settings -

i have working core data/icloud app. problem having when testing/searching bugs, found 1 can´t solve don´t know at. happens when go icloud settings , turn off app. app crashes error: 'thread 1: signal sigkill' , no log output. can me that? any code need ask me , post.

Laravel Eloquent Self Join Parent Child -

laravel eloquent self join parent child relationship class product_category extends model { // protected $table='product_categories'; public $timestamps = false; public function getparentcategory() { return $this->hasone(self::class, 'id', 'parent_id'); }. public function getchildcategories(){ return $this->hasmany(self::class, 'parent_id','id'); } i able retrieve child records of table making use of getchildecategories not able retrieve parent of particular category. gives me null. it's called one-to-many relationship, inverse of hasmany relationship belongsto method, getparentcategory() should be: public function getparentcategory() { return $this->belongsto(self::class, 'parent_id'); } public function getchildcategories(){ return $this->hasmany(self::class, 'parent_id'); }

ftp - Strange GET request in Apache Log -

i'm monitoring website apache log , saw stranges requests, see: 51.255.65.74 - - [28/may/2016:11:48:02 -0300] "get /insert/xahanave.html http/1.1" 404 1035 "-" "mozilla/5.0 (compatible; ahrefsbot/5.1; +http://ahrefs.com/robot/)" 207.46.13.128 - - [28/may/2016:11:49:13 -0300] "get / http/1.1" 200 14188 "-" "mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" 66.249.64.87 - - [28/may/2016:11:49:32 -0300] "get /css/kin8tengoku-1144-may.html http/1.1" 404 1039 "-" "mozilla/5.0 (compatible; googlebot/2.1; +http://www.google.com/bot.html)" well, ftp don't have folder "/insert/xanahave", neither file 'kin8tengoku' in folder css. possibile make request non existen file/folder ? important: days ago site hacked , "insert" folder created without permission in ftp, clean , folder "insert" don't exist anymore. big question is, why

docker - Migrating dockerized redis to another server -

i new both docker , redis. have configured servera run redis inside docker. redis database has been pre-seeded thousand key/value pairs. can confirm data has been persisted in container. created new docker image container, uploaded docker repository. on serverb, pulled redis image "redis-preseeded" , got started. using redis-cli tool when connect , issue 'info keyspace' command, keyspace empty, suggesting none of data made across. doing wrong? are using official image redis? https://hub.docker.com/_/redis/ dockefile redis:3.2.0-alpine release it has volume declared: .. volume /data workdir /data .. volumes described in documentation . in nutshell authors doing configuring redis store data on external disk volume maintained docker engine. not more efficient allows users keep data separate container using it. labouring point snapshot of image contain no data (if think thing). once understand these concepts becomes more obvious how dat

scala - scalaz Foldable compose -

i have next code val listoption: list[option[int]] = list(1.some, none, 2.some) i want fold elements, write next code val result = listx.fold(0.some)((acc, el) => { (acc, el) match { case (some(a), some(b)) => some(a + b) case (some(a), _) => some(a) case (_, some(b)) => some(b) case _ => el } }) println(result.getorelse(0)) // => 3 this workds fine, see in scalaz sources next tric val composefold = foldable[list] compose foldable[option] composefold.fold(listoption) // => 3 but not understand how correct work, , why scalaz not mix methods listoption instance, , differenct between scala fold , scalaz fold the scalaz fold function uses monoid instance of elements, don't have supply start value , function combine elements. a monoid has 2 functions zero / empty , append / combine . int : val intmonoid = new monoid[int] { def 0 = 0 def append(a: int, b: => int) = + b } using monoid[int] can write s

Run a polymer command like `polymer help`, it always throws an error -

i trying follow polymer tutorial: https://www.polymer-project.org/1.0/start/toolbox/set-up when run polymer command polymer help , allways throws following error: c:\(...)\npm\node_modules\polymer-cli\bin\polymer.js:19 let lib = path ? require(path) : require('..'); ^^^ syntaxerror: unexpected strict mode reserved word @ exports.runinthiscontext (vm.js:73:16) @ module._compile (module.js:443:25) @ object.module._extensions..js (module.js:478:10) @ module.load (module.js:355:32) @ function.module._load (module.js:310:12) @ function.module.runmain (module.js:501:10) @ startup (node.j

raspberry pi - Building a .deb package of Mono itself -

i'm compiling latest version of mono github on original version raspberry pi, on latest raspbian. this time consuming process, when it's complete not have repeat. can compiled mono installation packaged .deb to, example, allow me re-install latest raspbian, dpkg -i my-mono-build.deb? sure, , it's easy if choose proper tool don't need master on debian packaging. me, chose fpm this. (note: install via gem , not apt-get .) and here have an example of script of how build mono .deb this , copy+paste here posterity (just in case delete github repo mistake, or github stops being thing in future): #!/bin/bash set -e die () { echo >&2 "$@" exit 1 } [ "$#" -eq 1 ] || die "please specify version of mono want build argument. (check versions in tarball list here: http://download.mono-project.com/sources/mono/)" fpm > /dev/null || (echo "please install fpm (from gem, not apt-get)" && exit 1) i

Changing axes labels for biplot() in R -

i trying visualize results of pcoa{ape} making biplot in r. axes default labels axis 1 , axis 2, want edit this. this code have tried: biplot(pcoa.ntk, y=null, plot.axes=c(1,2), rn=ntnames, xlabs="pc1 (%)", ylabs="pc2 (%)") but labels don't change. can tell me i'm doing wrong here? , edit title, tips this? my data: ntk <- matrix( c(0.00000, 0.01500, 0.01832, 0.02061, 0.01902, 0.01270, 0.02111, 0.01655, 0.01520, 0.01691, 0.01667, 0.00000, 0.01175, 0.01911, 0.01759, 0.01127, 0.01854, 0.01041, 0.00741, 0.02007, 0.02432, 0.01404, 0.00000, 0.02551, 0.01972, 0.01838, 0.02505, 0.01484, 0.01391, 0.02687, 0.01501, 0.01252, 0.01399, 0.00000, 0.01442, 0.01294, 0.01402, 0.01132, 0.01239, 0.01455, 0.02343, 0.01951, 0.01830, 0.02440, 0.00000, 0.01727, 0.02470, 0.02021, 0.01699, 0.02482, 0.01320, 0.01054, 0.01439, 0.01847, 0.01457, 0.00000, 0.01818, 0.01366, 0.00977, 0.01394, 0.02468, 0.01950, 0.02206,

java - How to find a certain criteria from various text fields and display a match off from a text file? -

i supposed make inventory program gui. code can far open file. however, need make displays files match criteria. main problem text file sorted in weird way necessary decode. so if put: bmw in make field, 21123 serial number, muffler name, 119.99 price, , 0 stock. should first 5 lines in text area. how find criteria various text fields , display match off text file? bmw muffler 21123 119.99 0 chevy muffler 20911 52.99 2 ford muffler 26854 129.59 2 honda muffler 23319 159.99 2 toyota muffler 27813 199.29 1 bmw catalytic converter 900122 132.33 2 chevy catalytic converter 902391 69.59 1 ford catalytic converter 905778 61.23 4 code package lib; import java.io.bufferedreader; import java.io.file; import java.io.filenotfoundexception; import java.io.filereader; import java.io.ioexception; public class show extends javax.swing.jframe { /** * creates new form show */ public show() { initcomponents(); } /** * method called within constructor initialize form. * warning:

java - How to delete firebase data after "n" days -

i want delete old data friebase. knew question asked lot here, have still hard time make work. i try solution found here: firebase chat - removing old messages but ist deprecated. so try way: childeventlistener childeventlistener = new childeventlistener() { @override public void onchildadded(datasnapshot datasnapshot, string s) { calendar calendar = calendar.getinstance(); calendar.add(calendar.day_of_month, -30); log.d(tag, "onchildadded:" + datasnapshot.getkey()); string key = datasnapshot.getkey(); marker retrievemarker =datasnapshot.getvalue(marker.class); calendar t3 = new gregoriancalendar (c.get(calendar.year), c.get(calendar.month), retrievemarker.getsavedate()); int date1= calendar.get(calendar.date); int date2= t3.get(calendar.date); log.d("date1",""+date1); log.d("date2",""

python - Im getting an error in the shell whenever enter is pressed when I'm changing the board size -

have @ changeboardsize() it'll part of while loop have change i'm not sure change or change to. appreciate done in anyway. ignore because trying character count can post this. import random def setupgameboard(board, boardsize, playerinitials, computerinitials): row in range(1, boardsize + 1): column in range(1, boardsize + 1): if (row == (boardsize + 1) // 2 , column == (boardsize + 1) // 2 + 1) or (column == (boardsize + 1) // 2 , row == (boardsize + 1) // 2 + 1): board[row][column] = computerinitials elif (row == (boardsize + 1) // 2 + 1 , column == (boardsize + 1) // 2 + 1) or (column == (boardsize + 1) // 2 , row == (boardsize + 1) // 2): board[row][column] = playerinitials else: board[row][column] = " " def changeinitials(playername): print("enter initials for", playername, "'s piece") playerinitials = input() playerinitials = playerinitials.upper() pri

javascript - Bootstrapping offline a web application with npm -

i know sound weird asking start developing offline application (probably) web oriented, specially nowadays live on allways connected world, i'm tired of situation. every time want start project using modern web technologies , tools (webpack, gulp, node, express, , on...) need internet connection. no matter if have installed gulp globally or if have express installed on dozens of projects allways have type npm install , wait whole thing download, once again. in other language (seriously, any) install sdk, or runtime, or whatever required , ready go, no more downloads required. how can achieve similar in npm world? before asking why, there dozens of reasons want this: restrictive proxy developing while traveling poor internet connection mobile data plan what alternatives have? possible setup kind of offline repository, or cache or that? thanks in advance. .... the best solution found far sinopia: https://github.com/rlidwka/sinopia/ it npm registry can r

c# - Ajax returning error 401 ("Unauthorized") in jQuery -

newbie here. have issue ajax. situation this: have multiselect dropdownlist of managements, , want bring managers managements, , attach them on dropdownlist (i did not finish that). here, call function , send selected values: getmanagersbymanagement($("#ddlmanagement").val()); for now, want return data getmanagers, on jsongriddataprovider.svc. function getmanagersbymanagement(managementids) { $.ajax({ type: "get", contenttype: "application/json; charset=utf-8", url: "../../jsongriddataprovider.svc/getmanagers", data: { 'id': json.stringify(managementids) }, datatype: "json", success: function (data) { $.jstorage.set($rpt.pageidentifier + "-managers", json.stringify(data)); alert($.jstorage.get($rpt.pageidentifier + "-managers"));

javascript - Inlining SVG files in html using webpack -

im building web app, using .svg 's icons. time i've been using loader: https://github.com/appedemic/inline-svg-loader inline svgs in html, seems of hack, , doesn't work when using minifying. i've spend hours try come fix. want this: <button> <svg src="../../assets/icons/music_note.svg"> </button> to turn this: <button> <svg>...</svg> </button> now syntax doesn't have way, of course, know of loaders or solutions problem?

html - Redirect user back to original site after successful contact form PHP and get successful message -

i want redirect user original site after successful contact form want show success message, because when contact form success blank page... thank in advance help.. this html form: <form id="form" class="blocks" action="validateform.php" method="post" onkeyup="foo();" name="newform"> <p style="color: #ff0000;padding: 0 0 0 6.4%">required fields(*)</p> <p> <label>name *:</label> <input type="text" class="text" name="name" /> </p> <p> <label>e-mail *:</label> <input type="text" class="text" name="email" /> </p> <p> <label>subject :</label> <input type="text" class="text" name="phone" />

Live chat system using jQuery and PHP -

i created chat box jquery , ajax problem chat box not live. if want newest record have refresh page. code quite simple , know best way make live. this jquery script : $('#textbox').keypress(function(event) { if(event.which == 13){ $('#sendbutton').click(); event.preventdefault(); } }); $('.chatwindow').load('load.php'); $('#post').submit(function() { var userid = "<?php echo $_session["userid"]; ?>"; var username = "<?php echo $_session["username"]; ?>"; var message = $('#textbox').val(); $.post('post.php', { message: message, username: username, userid: userid }, function(data){ $('.chatwindow').append('<span class="msg" >' + username + ': </span>' + data + '</span><br>'); $('#textbox').val(""); $('.chatwindow').s

javascript - Fetch Jenkins information from a website -

i building website want display specific information open jenkins server. how can php or javascript code? you can use xml api or json api of jenkins. type: /api/xml or /api/json to end of url type in browser see info need jenkins , result in format. , can parse result script.

javascript - A invisible cookiewhy? -

Image
i'm wanting cookies habbo.com.br site consists of _gads _utma _utmb _utmc _utmt _utmz _ga _gat browser_token session.id , ypf8827340282jdskjhfiw_928937459182jax666 when give comanto alert (document.cooki) returns me values except browser_token session.id , why? when load webpage, web server may decide set cookie httponly . means web server, when load new pages, can read cookie, , it's inaccessible scripts in browser (including code run developer console or address bar). if can read cookie extension, not script (such alert(document.cookie) , seems explanation. this commonly done session identifying cookies (i.e., cookies contain information necessary stay logged in). reason if these, "copy" them own machine , logged in you. typically don't want these cookies accessible through scripts, relatively common place attack visitors of webpage.

Power-of-two textures performance benefits with modern WebGL -

we're using pixi.js games internally uses webgl rendering. every , i'm stumbling across mentions of power-of-two , possible performance benefits of avoiding npot textures ( https://developer.mozilla.org/en-us/docs/web/api/webgl_api/tutorial/using_textures_in_webgl#non_power-of-two_textures , https://github.com/pixijs/pixi.js/blob/master/src/core/textures/basetexture.js#l116 ). confusingly there mentions doesn't make difference anymore ( opengl - power of 2 textures ). webgl , browser development moving fast it's hard tell of these bits of information accurate. specifically i'm wondering whether overhead of padding images create pot textures (longer downloads, increased memory usage) worth performance benefits (if indeed exists). couldn't find comparison or performance benchmarks comparing pot vs npot textures , sadly don't know how go creating 1 myself. does have experience in regard or up-to-date numbers? there way of measuring webgl performance?

sql - Comma-delimited fields in a csv file in plsql -

i have while instr (l_buffer, ',', 1, l_col_no) != 0 which checks whether l_buffer comma delimited , enters loop. now have file values candidatenumber,rnumber,title,organizationcode,organizationname,jobcode,jobname 10223,1600003b,admin officer,00000004,"org land, inc.",orga03,orga03 hr & admin in file considering "org land, inc." 2 words because of , in between. there way treat 1 using instr or anything? horrible idea. if forced use character-delimited strings, least should able require delimiter character guaranteed not appear in regular field values. the problem raised can solved. show below solution - not close efficient, @ least shouldn't difficult follow logic. intentionally chose example (the fifth string) demonstrate how can fail. assumed commas between pair of double-quotes (an opening 1 , closing one) should become "invisible" - treated if not delimiters, part of field value. breaks if double-quote us

command line - Need batch file to print the IPV4 Address, Subnet, Gateway and DNS Servers to a text file please -

i trying automate task work - doing screenshots of ipconfig /all screen need ipv4 address, subnet, gateway ad dns servers. i can ip address print using following: echo ipaddress is: >> admin.doc /f "tokens=1-2 delims=:" %%a in ('ipconfig^|find "ipv4"') set ip=%%b set ip=%ip:~1% echo %ip% >> admin.doc i have several tasks need automate , updating document each task. for /f "tokens=1-5 delims=," %a in ('wmic nicconfig ipaddress^,ipsubnet^,dnshostname^,defaultipgateway /format:csv') echo %a - %b - %c - %d - %e or perhaps for /f "tokens=2-5 delims=," %a in ('wmic nicconfig ipaddress^,ipsubnet^,dnshostname^,defaultipgateway /format:csv') echo %a - %b - %c - %d or wmic nicconfig ipaddress^,ipsubnet^,dnshostname^,defaultipgateway /format:csv > file.txt or wmic /output:"file.txt" nicconfig ipaddress^,ipsubnet^,dnshostname^,defaultipgateway /format:csv see wmic /? , wmic /n

Import Text File into Excel with fixed width -

i'm new vba , i've been asked fix code don't know commas right after open "{filename}". can explain? thanks! sub fixed_width_test() set objexcel = createobject("excel.application") objexcel.visible = true objexcel.workbooks.opentext _ `enter code here`"c:\users\gcosta1\desktop\bdtf\daily_activation_txn_ca_071113.txt", , , xlfixedwidth, , , , , , , , , array(array(0, 1), array(2, 1), array(27, 1), array(77, 1), array(92, 1), array(108, 1), array(128, 1), array(153, 1), array(178, 1), array(203, 1), array(211, 1), array(217, 1), array(249, 1), array(179, 1), array(287, 1), array(293, 1), array(301, 1), array(317, 1), array(334, 1), array(337, 1), array(353, 1), array(383, 1), array(386, 1), array(392, 1), array(393, 1), array(410, 1), array(421, 1)) end sub open text method in vba takes arguments below opentext(filename, origin, startrow, datatype, textqualifier, consecutivedelimiter, tab, semicolon, comma, space, other, othe

c# - Custom authorization filter logs twice -

i created custom authorization filter checks in it. when check fails writing log file. strange thing every fail writes error text twice log. how make sure logs error once? public class authorizationfilter : filterattribute, iauthorizationfilter { public void onauthorization(authorizationcontext filtercontext) { var key = “wrong key”; if (key != “correct key”) { datetime datetime = filtercontext.httpcontext.timestamp; string path = path.combine(appdomain.currentdomain.basedirectory, @"logs\log.txt"); using (streamwriter sw = file.appendtext(path)) { sw.writeline(datetime + “| error xyz”); } filtercontext.result = new httpunauthorizedresult(); } } } assuming have filter registered globally... public class filterconfig { public static void registerglobalfilters(

javascript - What am i doing wrong in my toggle visibility -

i made html page using simple bootstrap , have linked database using php. want page simple @ beginning, 2 sections, , complete inputs , press next, section becomes visible. tried doing toggle visibility in javascript reason either doesn't switch between display: none or block, doesn't take on inputs or nothing. below 2 sections, if can explain why , how not work. /*contect style*/ input, textarea { padding: 10px; border: 1px solid #e5e5e5; width: 200px; color: #999999; box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px; -moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px; -webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px; } textarea { width: 400px; height: 150px; max-width: 400px; line-height: 18px; } input:hover, textarea:hover, input:focus, textarea:focus { border-color: 1px solid #c9c9c9; box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px; -moz-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px; -webkit-box-shadow: rgba(0, 0, 0, 0.2)