Posts

Showing posts from January, 2014

css - if you know an image's dimensions, how do you scale it without a reflow in a fluid container -

i know dimensions of image, it's located in fluid container (the red area, resize window width). want avoid reflows, meaning don't want size of red area ever change. http://codepen.io/anon/pen/afmfh how can setup html/css no reflow occurs? i think may looking overflow: hidden on div. down side if expand image won't fit in div. div { width: 50%; background-color: red; overflow:hidden; }

debugging - Reference - What does this error mean in PHP? -

what this? this number of answers warnings, errors , notices might encounter while programming php , have no clue how fix. community wiki, invited participate in adding , maintaining list. why this? questions "headers sent" or "calling member of non-object" pop on stack overflow. root cause of questions same. answers questions typically repeat them , show op line change in his/her particular case. these answers not add value site because apply op's particular code. other users having same error can not read solution out of because localized. sad, because once understood root cause, fixing error trivial. hence, list tries explain solution in general way apply. what should here? if question has been marked duplicate of this, please find error message below , apply fix code. answers contain further links investigate in case shouldn't clear general answer alone. if want contribute, please add "favorite" error message, warning or notic

c# - HttpPostedFileBase Stream Upload to AWS SDK Bucket has no Data -

i'm testing how upload aws using sdk sample .txt file web app. file uploads bucket, downloaded file bucket empty notepad document without text original uploaded file. i'm new working streams, i'm not sure wrong here. see why data wouldn't sent in transfer request? in advance! using (var client = new amazons3client(amazon.regionendpoint.uswest1)) { //save file bucket using (filestream txtfilestream = (filestream)uploadedhttpfilebase.inputstream) { try { transferutility filetransferutility = new transferutility(); filetransferutility.upload(txtfilestream, bucketlocation, uploadedhttpfilebase.filename); } catch (exception e) { e.message.tostring(); } } } edit: both transferutility , putobjectrequest/putobjectresponse/amazons3client.putobject saved blank text file. then, after having trouble instantiating new filestream, memorystream used after

c# - System.IO.File is a type not a namespace -

im tring create file using system.io.file namespace howeever im using on mvc witch im new , error when publish proyect "a using namespace directive can applied namespaces; 'system.io.file' type not namespace" this using statement: using system; using system.reflection; using system.data; using system.collections.generic; using system.linq; using system.web; using system.collections.generic; using system.linq; using system.web; using system.web.mvc; using newtonsoft.json; using system.collections; using system.componentmodel; using system.data; using system.io; using system.io.file; using system.text; using (var reader = system.io.file.createtext(@"c:\inetpub\wwwroot\procedimiento.txt")) { // starting outer json array reader.writeline("["); (var rowindex = 0; rowindex < mytable.rows.count; rowindex++) { var row = mytable.rows[rowindex];

c++ - Creating a plugin for Sublime Text 3 in a language other than Python -

i want create plugin sublime text 3 in language, say, in c++ or c or other compiled language. possible? preferably without python code or libraries @ except ones that's installed sublime text3. if not, there workaround? thing here want plugin compiled language. i'm aware python ".pyc" files that's not i'm looking for. no, it's impossible make sublime text plugin absolutely 0 python code. however, can call binary application python plugin , put of logic in there. for example, sublimelinter part of work in python, calls out binaries such flake8 , ruby -wc actual linting of file.

java - Accessing JWT nested claims with jose4j -

i having trouble accessing nested claims jwt using jose4j. have jwt claim set looks this: { "iss": "awesome.issuer", "iat": 1300819370, "exp": 1300819380, "clm": "string claim", "sub": "batman", "context": { "username": "mpdavis", "firstname": "michael", "lastname": "davis } } i running issues when try access , of nested claims inside context claim. can access top level claims getclaimvalue . private string qsh; qsh = jwtclaims.getclaimvalue("qsh", string.class); it seems have 2 options if want nested claim. the first option find way return context claim map<string,object> , pull each claim out of object. other option use flattenclaims flatten of claims map<string,list<object>> , grab first object off of map nested claims. neither 1 of thes

How to get active window and child's title on remote pc using vb.net -

i'm developing winform application can retrieve names of running excel document. can retrieve locally can't figure out how can retrieve remote pc. the way did on local pc searching excel.exe process there i'll find active window , child of it. i wondering if there's way can title of active window , child's on remote pc. i using code below find process local , remote. w = getobject("winmgmts:{impersonationlevel=impersonate}\\" & pc & "\root\cimv2") processq = "select * win32_process name = 'excel.exe'" i've search internet , couldn't find method so. please :( ps. don't know tags should add question, sorry.

Codenameone : Alternative to webBrowsers -

i m wandering if there alternative webbrowsers in codenameone. tried using webbrowser there issue tabs : github.com/codenameone/codenameone/issues/1711 i need enrich textareas filled dynamically thanks. that issue fixed , when existed triggered when tabs @ side , not when on top/bottom. fyi updates released every friday next week should work. as question can construct ui dynamically e.g. check out .

maven site plugin - Getting doxia-module-markdown to rewrite *.md links -

my goal generate site documentation browsable within github, i've written bunch of markdown pages. i'm using maven-site-plugin doxia-module-markdown generate project documentation. the problem i'm running links of form [foo](foo.md) show in generated html <a href="foo.md">foo</a> , not <a href="foo.html">foo</a> . changing link point foo.html make things unbrowseable github, , seems me .md → .html mapping integral how html generation works, link rewriting should happening here. below minimal case repro produces following output me am missing configuration option relative link rewriting apply source file path target file path translation? the translated html contains .md links. $ mvn clean site && cat target/site/a.html | grep -i banana ... <p>&#x2018;a&#x2019; apple, <a href="b.md">&#x2018;b&#x2019;</a> banana.</p> pom.xml <?xml version="

Reading from .txt file into two dimensional array in c++ -

so either i'm complete idiot , staring me right in face, can't seem find resources can understand on google, or here. i've got text file contains several lines of integers, each integer separated space, want read these integers array, each new line first dimension of array, , every integer on line saved second dimension. probably used worst terminology explain that, sorry. my text file looks this: 100 200 300 400 500 101 202 303 404 505 111 222 333 444 555 and want resulting array this: int myarray[3][5] = {{100, 200, 300, 400, 500}, {101, 202, 303, 404, 505}, {111, 222, 333, 444, 555}}; i believe that istream inputstream; int myarray[3][5]; for(int = 0; < 3; i++) for(int j = 0; j < 5; j++) istream >> myarray[i][j]; should need.

PHP remove last zero from integer by substr -

in php values database integer, want remove last 0 20000000 integer, me below code doesnt work. $payerd_amount = 20000000; $payerd_amount = substr((string)$payerd_amount,1,strlen((string)$payerd_amount) -1); how action? code seems correct after substring result: 000 if want remove last zero, divide 10 $payerd_amount = $payerd_amount / 10; this works, too: $payerd_amount = substr($payerd_amount, 0, -1);

encryption - How to generate unique 56 bit key for a given input string -

this part of homework question (but not actual question), in question professor asked me generate unique 56 bit key encrypt , decrypted message. both sender , receiver shares pass-phrase (password) only. there no key exchange here. how unique 56 bit key of pass-phrase?? can use hash? how 56 bit hash value ?? question : (relevant part) messanger app: 1) alice , bob share same password (or passphrase), must use password set tool correctly encrypt , decrypt messages shared between each other. 2) each message during internet transmission must encrypted using 56-bit key 3) donot directly use password key, have generate same key between alice , bob encrypt messages. ....... ..... the keyword key derivation functions

geometry - Perpendicular offset to a surface (triangular mesh) -

i need make perpendicular(not vertical) offset surface. surface represented triangular irregular network (tin, mesh). condition triangle before , after offset should parallel. i.e slope/aspect should preserved. could point me algorithms/articles/ or clues? thanks

scala - object orientechnologies is not a member of package com? -

i have orientdb database , want import scala within zeppelin. i'm following example provided here . when run following command on zeppelin's notebook import com.orientechnologies.orient.core.id.orecordid import com.orientechnologies.orient.core.sql.query.osqlsynchquery i got error: <console>:27: error: object orientechnologies not member of package com import com.orientechnologies.orient.core.id.orecordid but looks orientechnologies member of com . suggestion? the problem zeppelin not recognize of libraries , need add them separately. here code used add jar file in zeppelin: %dep z.load("/home/zeppelin/zeppelin-0.5.5-incubating-bin-all.orientdb-core-0.9.23.jar") make sure restart zeppelin before running code. these lines need inserted before spark initiation.

.net - TeamCity - MSBuild runner exits with not zero code -

i've had teamcity running long time, no problems. i upgraded teamcity 8, , .net projects fail when launching test build step. the error message see this: msbuild runner exits not 0 code the test part of log, looks this: [10:39:08][step 1/2] process exited code 0 [10:39:08]step 2/2: test (mstest) (20s) [10:39:08][step 2/2] starting: f:\teamcity\buildagent\plugins\dotnetplugin\bin\jetbrains.buildserver.nunitlauncher.exe #teamcityimplicit [10:39:08][step 2/2] in directory: f:\teamcity\buildagent\work\382c54c35fd97a3e [10:39:13][step 2/2] jetbrains dotcover console runner v2.2.515.44. copyright (c) 2009-2013 jetbrains s.r.o. rights reserved. [10:39:13][step 2/2] [10:39:28][step 2/2] [jetbrains dotcover] coverage session started [6/29/2013 10:39:28 am] [10:39:28][step 2/2] [jetbrains dotcover] coverage session finished errors: can't initialize profiler. [10:39:28][step 2/2] [10:39:28][step 2/2] product installation directory has no read access rights winrt applications

vb.net - UPDATE statement in VB connecting to Access -

i'm trying update position column in access database problem i'm having problem update column while rest of column not give out error message. the error message: syntax error in update statement, microsoft jet database engine... the code: dim myconnection oledbconnection = new oledbconnection dim ds new dataset dim da oledbdataadapter dim maxrows integer dim integer dim sql string private sub updatebutton_click(sender object, e eventargs) handles updatebutton.click using myconnection = new oledbconnection("provider = microsoft.ace.oledb.12.0; data source =c:\lecturerdetail.mdb") myconnection.open() dim str string str = "update lecturer " & _ "set [empname] = ?,[empid] = ?, [position] =?, [faculty] = ? " & _ " , [degree1] = ?, [degree2] = ?, [degree3] = ?,[degree] = ?, [emptype] = ? " & _ " ,[icno] = ?, [citizenship] = ?, [phoneno] =

java - Consume message only once from Topic per listeners running in cluster -

i'm implementing domain event infrastructure, project doesn't allow messaging infra(financial services client) found alternative in hazelcast topics , executorservice, but problem when running in cluster message shall delivered listeners going running in cluster, cluster of 2, have same listener running in 2 jvm, , message consume twice , acted upon, suppose domain event supposed perform non idempotent operation credit loyalty points, unless explicitly maintain trace of domain event acted upon , check against everytime receive event, end crediting twice, "any suggestion implementing without having write boiler plates possibly @ infralayer", or there known patter such implementation. edit: meanwhile i'm evaluating hazelcast executorservice suggested here the use case described can solved using hazelcast's queues instead of topics. main reason use topics if interested multiple (possibly independent) consumers same message. requirement sounds i

c# - Display Pop up Window -

in requirement have 1 dropdown , 2 buttons. • select config file - dropdown • create new • view config file - button • modify config file - button here select config file drop down.if user clicks drop down "create new" option come. if user clicks "create new", pop window should come. here code pop window under modelpopup.aspx, <asp:gridview id="gridview1" runat="server"></asp:gridview> <asp:button id="addrowbtn" runat="server" text="add new row" /> <asp:button id="savenewbtn" runat="server" text="save new" /> <asp:button id="savebtn" runat="server" text="save" /> </div> </div> <script type="text/javascript"> $(function () { $(&qu

jquery - How do i take sum by selecting checkbox and values in span and show total in another span -

i need select checkbox , grab values span , show sum in span having id of amount <div class="col1"> <div class="field"> <div class="label-wrap"> <label class="required" for="buy_form_pwd2">books required</label> </div> <div class="input-wrap"> <input type="checkbox" id="you-are" name="total">book name<span style="margin-left:10px;">price</span><span style="margin-left:10px;">no of books<input style="width: 45px;" type="number" placeholder="1"></span><span style="margin-left:10px;">250</span><br><hr style="margin:0;"> <input type="checkbox" id="you-are" name="total">book name<span style="mar

css - Why doesn't this Less compile? What can I do to fix it? -

as is, complains that: syntaxerror: error evaluating function darken : a.tohsl not function on line 24, column 1: it seems should work; doing wrong? how can effect want? @red2: #842211; @green2: #842212; @blue2: #842213; @colors: red2, blue2, green2; .color-style-helpers(@colors; @index) when (@index > 0) { .color-style-helpers(@colors; (@index - 1)); @colorname : extract(@colors, @index); @color : ~"@{@{colorname}}"; // @color : #ffffff; // uncomment line , work @darkcolor : darken(@color, 10%); .background-@{colorname} { border-color: @darkcolor; background-color: @color; } } .color-style-helpers(@colors; length(@colors);); you can see results here the problem below line of code in example. makes content of @color var treated string instead of color. because of this, less compiler couldn't convert color hsl value required darken function , results in error. @color : ~"@{@{colorname}}";

android - Native script support for Amazon AWS SNS (push notifications) -

i built app ( involves push notifications ) in native android code.for push notifications used amazon aws sns. i'm trying build same app using "native script" ,but i'm failed use aws sns in native script. seems there no support aws sns in "native script" yet. any ideas? thanks in advance. if have build app native - maybe can wrap notifications in plugin , reuse in native script: nativescript plugins

eloquent - Laravel: Two foreign keys to from Ticket Model to two instances of User Model -

i'm making small ticket booking service. goal link ticket model 2 user instances: 1. manager created ticket 2. user owns ticket. i have 2 models: user table id name email manager model public function myticket() { return $this->hasmany(app::ticket); } //this ticket owner public function createdticket() { return $this->hasmany(app::ticket); } //this manager created ticket ticket table id ticketcode $table->integer(user_id)->unsigned(); //the user owns ticket $table->foreign('user_id')->references('id')->on('users'); $table->integer(manager_id)->unsigned(); //the manager created $table->foreign('manager_id')->references('id')->on('users'); model public function user() { return $this->belongsto(app::user); } //this ticket owner public function createdby() { return $this->belongsto(app::user); } //this manager created ticket how can adjust code make eloquent compli

How to use socks with gradle for dependency resolving, in command line? -

when jcenter not accessible without proxy server, resolve dependencies, , want use socks instead of http proxy, how can use in commanad line? know how use http proxy: -dhttp.proxyhost=yourproxy -dhttp.proxyport=yourport -dhttp.proxyuser=usernameproxy -dhttp.proxypassword=yourpassoword i found answer, here can use: ./gradlew -dsocksproxyhost=yourhost -dsocksproxyport=yourhostport your-command using above can set socks host , port.

enforcing FTPS for Azure AppService WebApp -

for deployment or downloading web application logs both ftp & ftps can used. need ensure user can connect only using ftps . currently, it's user whether he/she uses ftp or ftps. so, how strictly enforce ftps azure appservice webapp? there documentation on enforcing https nothing on enforcing ftps. there no option disable ftp , enable ftps in azure websites, can check link: closing ftp pci dss compliance , using ftps details. also vote in link below request feature: option disable ftp (and force ftps) in azure web apps

python - Django serializers: validate function not called -

i trying override validate() function called serializers.is_valid() , not getting called. serializer.py class loginserializer(serializers.serializer): email = serializers.emailfield(max_length=255,required=true) password = serializers.charfield(max_length=128,required=true) def validate(self,data): ''' check invalid email. & blank email , password. ''' print 'hey in login' if data['email'] '': raise serializers.validationerror("email cannot empty.") if data['password'] '': raise serializers.validationerror("password cannot empty.") try: validate_email(data['email']) except validationerror: raise serializers.validationerror("the email not valid email address.") return data views.py class loginapi(apiview): permission_classes = (permissions.

ssl - how to download/uplaod file over HTTPS using Indy 10 and OpenSSL in delphi? -

i wish download file using indy. problem connecting ssl. please me using https or sftp. procedure tform1.bitbtn1click(sender: tobject); begin idftp1.iohandler := tidssliohandlersocketopenssl.create(idftp1); idftp1.usetls:=utuserequiretls; idftp1.dataportprotection:=ftpdpsprivate; idftp1.host := '127.0.0.1'; idftp1.username := 'ftp'; idftp1.password := '123'; idftp1.port:=21; idssliohandlersocketopenssl1.startssl; try idftp1.connect; idftp1.disconnect; idftp1.free; end; end; you correctly (except fact free component don't create in same code). same https. idhttp1.iohandler := tidssliohandlersocketopenssl.create(); idhttp1.get('https://...'); just note need openssl libraries https://indy.fulgan.com/zip/ssl.zip or version want https://indy.fulgan.com/ssl/ also there difference between sftp , ftps. indy's idftp supports ssl (ftps). can't work sftp (ftp using ssh). if want use sftp, have use

ios - Get button click on UITableView in Swift -

Image
i have simple table view looks each button overflows part next cell (part of requirement). i want overflowing button's click event . how ? by default taking cell click rather button click if click on overflowing part. i have created dummy code changes button color on click, easy try out. same layout. thanks edit below original image , trying , simplicity sake scaled down button lets assume req u cant change height , cant play around table view separator you have implement 'tableview:heightforrowatindexpath:` method , return greater value has now. cells don't have enough height display buttons fully, , because of part of button hides behind of next cell. can convinced checking "clip subviews" checkbox of cell prototype in interface builder, , if see buttons clipped. edit check this: https://github.com/arturdev/test

Android UnsatisfiedLinkError with libicudata after update ndk to r11 -

i update ndk version r11c. meet unsatisfiedlinkerror when try load shared library. project work fine when use old version of ndk r9c. , didn't use library libicudata.so. don't know why says dlopen failed: library "libicudata.so" not found. i know ndk removed library, i'm not sure if caused problem. btw, i'm using sqlite.so in project. can me explain why happened?

html - list items nested within another list items . how to bring them one below another -

hi want make nested <li> below above <li> . codepen. add following css file: #a ul { margin:0; padding:0; } also need change text-align:center; text-align:left; in #b li

eclipse - The import org.apache.http.entity.mime cannot be resolved in Android -

after adding slidemenu library in project getting problem "the import org.apache.http.entity.mime cannot resolved" please me solve one. download jars apache commons site , add them project. or add these 2 dependency compile "org.apache.httpcomponents:httpcore:4.2.4" compile "org.apache.httpcomponents:httpmime:4.3"

java - How to get Inner array child element in XML using ximpleware -

autopilot searchproperties = new autopilot(); searchproperties.selectxpath("/batchitemsearchresultanswer/result/searchproperties/content/item"); searchproperties.bind(nav); searchpro searchoption = new searchpro(); while (searchproperties.evalxpath() != -1) { //reuser name.resetxpath(); name.selectxpath("name"); searchoption.id = id.evalxpathtostring(); searchoption.name = name.evalxpathtostring(); log.e("searchid", id.evalxpathtostring()); log.e("searchname", name.evalxpathtostring()); image.resetxpath(); image.selectxpath("/batchitemsearchresultanswer/result/searchproperties/content/item/values/propertyvalue"); searchoption.propertylist = new arraylist(); while (image.evalxpath() != -1) { property pro = new property(); pro.id = id.evalxpathtostri

javascript - first box still at top other box below the first box using jquery -

first box @ top other boxes below first box step step. ** [jsfiddle]https://jsfiddle.net/baloch007/9jo8tka5/14/** have @ this: var = 2; $('input[type=button]').click(function() { $('#wrapper').append("<span>box " + + "</span>"); i++; if(i >= 8){ $(this).hide(); } }) span { width: 40px; background: red; border: 1px solid black; display: block; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="wrapper"> <span>box 1</span> </div> <input type='button' value='+' />

linux - How to stop v4l2-ctl streaming? -

suppose run v4l2-ctl --stream-mmap=3 --stream-to=/dev/null , how stop recording without pressing ctrl + c interrupt, shell console example? unless have added better functionality, have signal process outside. either v4l2-ctl ... & v4l2_ctl_pid=$! , kill -term $v4l2_ctl_pid or maybe killall v4l2-ctl .

c# - How to implement System.currentTimeMillis() method in WPF? -

i'm trying create unique tranactionid using ${=system.currenttimemillis()} in wpf textbox following : writer.writestartelement("transactionid"); writer.writestring(textbox22.text); <textbox x:name="textbox22" horizontalalignment="left" height="23" margin="388,392,0,0" textwrapping="wrap" text="${=system.currenttimemillis()}" verticalalignment="top" width="120"/> any idea how implement correctly? if want make time transaction id can use builtin functionality of core .net framework. one: datetime.now.millisecond.tostring();

wix - Run an exe from CURRENTDIRECTORY before installation begins -

<property id="testdestination" value="currentdirectory" /> <customaction id="stopall" property="testdestination" execommand="[currentdirectory]\stopall.exe" execute="deferred" return="ignore" impersonate="no"> </customaction> <installexecutesequence> <custom action="stopall" before="removefiles" /> </installexecutesequence> i want start job before installation begins. tried different kind of executesequences. exe didn't start. appreciated.

uiviewcontroller - How to determine which scene is the current by using Swift syntax? -

i have 2 scenes need scrolled when keyboard appears. works fine when need 1 scene so. technically, think, need judgement statement in viewcontroller.swift determine scene on right now. example: func textfielddidbeginediting(textfield: uitextfield) { // if current scene scene_a, on scene_a { scrollview.setcontentoffset(cgpointmake(0, 220), animated: true) } //else if current scene scene_b, on scene_b { scroll.setcontentoffset(cgpointmake(0, 200), animated: true) } or, if have smarter way solve this, please tell me. big, big here. i've been stuck hours. lot!

.net - Investigate Exception Object at runtime -

i need debug .net 3.5 application on production system of customer. randomly application throwing strange interop.sehexceptions. take @ .net objects in memory @ time of crash. example i'd see inner exception property of exception or errorcode property. best option without installing visual studio (i'm not allowed so). i'm bit confused multiple possibilities. found things like dbgclr memory dumps intelli trace remote debugging what easiest way @ objects in memory @ time of crash on production machine? thank help

html - How to move image on canvas using arrow keys in javascript -

i've tried few different ways have seen on here, can't quite image move. whenever try adapting code arrow key presses, seems make canvas shrink , player model (spaceperson) disappear. here "drawing board" keep returning to, , have far. // canvas , context var canvas = document.getelementbyid("space"); var ctx = canvas.getcontext("2d"); canvas.width = 1920; canvas.height = 700; // create image object var spaceperson = new image(); // add onload event handler spaceperson.onload = function () { // done loading, can use image ctx.drawimage(spaceperson, 280, 300); }; // artwork harrison marley (using make8bitart.com) spaceperson.src = "http://i.imgur.com/eh9dpq2.png";` i quite new javascript, , trying work out how can move specperson image using arrow keys. trying make class space person access x,y values, can't seem draw image without using .onload here more complete example: //just utility function image(

jquery click() not working on certain buttons -

i'm new jquery , stuck code. hoping can me understand why below functions aren't working: $(function(){ console.log('document ready begin'); /*add cart frontpage*/ $('.featured_li a.ajax_add_to_cart_button').click(function(){ console.log('frontpage start'); var s = s_gi(s_account); s.linktrackvars='products,events'; s.linktrackevents=s.events='scadd'; s.products = ';' + $(this).parent().find('h5').text(); s.tl(this, 'o', s.events + ':' + s.pagename); console.log('frontpage request sent'); }); /*newsletter signup*/ $('input[name="submitnewsletter"]').click(function(){ console.log('newsletter start'); var s = s_gi(s_account); s.linktrackvars='events'; s.linktrackevents=s.events='event1'; s.tl(this, 'o', $(this).attr("name") + ':' + s.pagename); console.log('ne

vb.net pass folder path as commandline argument -

Image
i'm trying pass folder path via commandline argument application. problem: folder path contains space " " in it's string. when read commandline arguments in application path chopped pieces on space " " sub main() dim arguments string() = system.environment.getcommandlineargs() each arg string in arguments console.writeline("argument : " & arg) next console.readline() end sub edit: added code build argument private sub btn_copy_click(sender object, e eventargs) handles btn_copy.click dim args(3) string args(0) = """" & tb_copyfrompath.text & """" args(1) = """" & tb_copytopath.text & """" args(2) = """" & tb_itemtag.text & """" args(3) = """" & tb_prefix.text & """" dim argument string

excel - Use VBA union function to conditionally add cells to range -

i trying add cells respective ranges depending on interior colour using union method. code using follows: for each cell in entirepossiblerange if cell.interior.color = rgb(132, 151, 176) set accessabilityrange = union(accessabilityrange, range("b" & cell.row) else if cell.interior.color = rgb(244, 176, 132) set consistencyrange = union(consistencyrange, range("b" & cell.row) else if cell.interior.color = rgb(255, 217, 102) set efficacyrange = union(efficacyrange, range("b" & cell.row) else cell.interior.color = rgb(191, 191, 191) set widerimpactsrange = union(widerimpactsrange, range("b" & cell.row) end if next cell end sub however code won't run , throws syntax error. cannot figure out syntax error though. you can add separate function avoid repeating same code checks each time: function joinranges(r1 range, r2 range) range if r1 nothing se

Jquery change enter key press to tab key -

i made page data entry. page has several input boxes. presently, when user press return key after entering data in input box, form gets submitted. want enable form submission on pressing return key if focus on submit button. other wise should move next input. tried several method, nothing worked. please suggest way <?php session_start(); require_once('connections/hari.php'); $dateindian = date('d-m-y'); $dateus = date('y-m-d'); if (isset($_session['empno'])) { $ecno = $_session['empno']; mysql_select_db($database_hari, $hari); $auth_sql2 = "select pdw users emp_no='$ecno'"; $result2 = mysql_query($auth_sql2)or die(mysql_error()); $row2 = mysql_fetch_array($result2); $count = mysql_num_rows($result2); $_session['pdw_priv'] = $row2['pdw']; mysql_free_result($result2); if ($count == 0 or $_session['pdw_priv'] == 'n') { header('location:u