Posts

asp.net - Remove ASPX FILE Extention in Web.config But Negate Rewrite if URL Contains Period -

all right, of use standard rule below remove aspx extention in urls. <rule name="remove"> <!--removes .aspx extension pages.--> <match url="(.*)" /> <conditions logicalgrouping="matchall"> <add input="{request_filename}" matchtype="isfile" negate="true" /> <add input="{request_filename}" matchtype="isdirectory" negate="true" /> </conditions> <action type="rewrite" url="{r:1}.aspx" /> </rule> however modify rule prevent write rule catching url period in it. that way if tries type in http://www.domain.com/picture.jpg rule doesn't catch it. luckily isfile , isdirectory conditions prevent actual files being hit rule whenever have case types in file doesn't exist on server rule catches , asp.net this: http://www.domain.com/404error.aspx?aspxerrorpath=/pictur...

Mysql Select Where id<100 -

i'm trying query in php: $sql= "select pcampo6 productos id >= 100"; this error get: invalid query: have error in sql syntax; check manual corresponds mysql server version right syntax use near '= 100' @ line 1 i tried : $sql = "select `pcampo6` productos eliminado=0 , `id` >= 101"; $sql = "select 'pcampo6' productos eliminado=0 , 'id' >= 101"; $sql = "select pcampo6 productos eliminado=0 , id >= '101'"; there nothing wrong query posted. see demo if id column not integer type, try using single quotes around value the error coming elsewhere in code not showing us.

php - xcode ios split nsarray object into two separate objects -

hi im making mysql database user can search other users, when searching want return user "id" , "name" since there users same name, include id. here .php edit : since didn't answer wanted, thought didn't make clear enough, i'm thinking in other way try it. let's id in index 0 , name in index 1, , on.. see php edit comment. $result = mysql_query("select `id`,`name` `user` `name` '$search%'"); mysql_close($con); $numrows = mysql_num_rows($result); if ($numrows!=0){ while ($row = mysql_fetch_assoc ($result)){ $id = $row['id']; $name = $row['name']; echo ("$id,$name///"); above on first attempt, note: edit example, i'm thinking make id, , name separate, in xcode separate them again 2 different arrays lets say, id's in id array kinda jumping on 1 index every time "jumping on names", , names in name array again jumping on ids. // edit:...

input - While loop and if statement trouble -

when put in account number in terminal window error the data put correct, put string such as"ste251" accountand int such 500 balance. also when try stop loop when throws mismatch exeption get: java.util.inputmismatchexception: null (in java.util.scanner) java.util.inputmismatchexception @ java.util.scanner.throwfor(scanner.java:909) @ java.util.scanner.next(scanner.java:1530) @ java.util.scanner.nextint(scanner.java:2160) @ java.util.scanner.nextint(scanner.java:2119) @ writeaccountbalances.writetofile(writeaccountbalances.java:58) from the docs inputmismatchexception : thrown scanner indicate token retrieved not match pattern expected type, or token out of range expected type. that pretty says needs said. check unexpected input.

awk - Spliting a file into multiple files based on common line prefix -

suppose have file following format. prefix1: line 1 prefix1: line 2 prefix1: line 3 prefix2: line 4 prefix2: line 5 prefix3: line 6 prefix3: line 7 prefix3: line 8 prefix3: line 9 prefix3: line 10 i split 3 files names prefix1 , prefix2 , prefix3 , newlines intact part of whichever file either entirely contains them. in real file, there might n prefixes , not 3. i write python script implement functionality directly, wonder if there's shorter way in awk . this one-liner works job: awk -f: '{f=$1?$1:f; print > f}' file with example: kent$ cat file prefix1: line 1 prefix1: line 2 prefix1: line 3 prefix2: line 4 prefix2: line 5 prefix3: line 6 prefix3: line 7 prefix3: line 8 prefix3: line 9 prefix3: line 10 kent$ awk -f: '{f=$1?$1:f; print > f}' file kent$ head prefix* ==> prefix1 <== prefix1: line 1 prefix1: line 2 prefix1: line 3 ==> prefix2 <== prefix2: line 4 prefix2: line 5 ==> prefix3 <== prefix3: l...

c# - Conditionally creating new collections with output parameters -

this program purely illustrative purposes. wanted take integer input , if greater zero, create arraylist integer in arraylist. tried numerous (incorrect) ways , settled on see below. however, don't looks of it. using system; using system.collections.generic; using system.linq; using system.text; using system.collections; class program { static void main(string[] args) { console.write("enter in number of size of arraylist want: "); int arraysize = int.parse(console.readline()); if (arraysize > 0) { arraylist newlist = createlist(arraysize,out newlist); newlist.add(arraysize); console.writeline("the size of array {0}",newlist.count); console.readline(); } else { console.writeline("you did not create arraylist"); } console.writeline(...

oracle - Sql query using multiple left outer joins taking more time to complete -

create materialized view mv_sd_sipl_bomlevelsalt_5 refresh force on demand ( select 'id-' || rownum id, t1.l1 l0, t1.l0 l1, t1.alternateitem l1ai, t1.effstartdate l1sd, t1.effenddate l1ed, t1.qtyper l1q, t1.siteid l1s, t1.transittime l1tt, t2.l0 l2, t2.alternateitem l2ai, t2.effstartdate l2sd, t2.effenddate l2ed, t2.qtyper l2q, t2.siteid l2s, t2.transittime l2tt, t3.l0 l3, t3.alternateitem l3ai, t3.effstartdate l3sd, t3.effenddate l3ed, t3.qtyper l3q, t3.siteid l3s,t3.transittime l3tt, t4.l0 l4, t4.alternateitem l4ai, t4.effstartdate l4sd, t4.effenddate l4ed, t4.qtyper l4q, t4.siteid l4s,t4.transittime l4tt, t5.l0 l5, t5.alternateitem l5ai, t5.effstartdate l5sd, t5.effenddate l5ed, t5.qtyper l5q, t5.siteid l5s,t5.transittime l5tt, t6.l0 l6, t6.alternateitem l6ai, t6.effstartdate l6sd, t6.effenddate l6ed, t6.qtyper l6q, t6.siteid l6s,t6.transittime l6tt, t7.l0 ...