Posts

Featured post

javascript - IE11 incompatibility with jQuery's 'readonly'? -

the code i'm running has no issues in firefox, or chrome. user typing 1 textbox, tabs next , can continue typing that. when run webpage on ie11, user tabs next textbox , can't type in. textbox has double-clicked before user can insert anything. i've googled , seems ie give problems when using older jquery (i.e. prefers 'prop' 'attr' ). in code below jquery's readonly keyword being used in way ie11 no longer recognise/accept? i assume issue readonly , removeclass('ignore') working expected. //when focus on textbox 1 $("#field1").focus(function() { //remove readonly property textbox 1 $('#field1').prop('readonly', false).removeclass('ignore'); //add readonly property other textboxes $('#field2, #field3, #field4') .prop('readonly', 'readonly').addclass('ignore').val(''); }); i'm using jquery 2.1.3

php - Negate a $regex for mongodb in Yii2 -

i use $regex inside aggregation pipeline $match instruction in php. need find record "does not contain" string. i'v found out online $not operator used such cases, if try this: $regex = "/.*".$sometext.".*"; $use['$not'] = $regex; also 1 not work: new \mongoregex("/.*".$sometext.".*") $use['$not'] = $regex; in short need find text not contain string

c - Saving regex matched strings to an array of strings -

so im starting pick c end goal write function searches string regular expression , returns array of matches. the biggest problem i'm having saving strings memory can return or referenced in pointer passed in parameter. i'd way tell how many matches there c# equivalent; if(matches.count() > 0) { /* have match! */ } resulting string of each match group depending on pattern i'll pass in. i know isn't correct , has other errors in practice here code walked away trying figure out reading on pointers, structs, char arrays..etc typedef struct { char *match; } matches; int main() { regex_t regex; int reti; char msgbuf[100]; int max_matches = 10; regmatch_t m[max_matches]; char str[] = "hello world"; reti = regcomp(&regex, "(hello) (world)", reg_extended); if( reti ) { fprintf(stderr, "could not compile regex\n"); exit(1); } reti = regexec(&regex, str, (size_

dart - Weird DartEditor behavior / bug? -

Image
i'm working on little website using dart. have 1 project server, , client app (see picture below) in server app serve client app client project this runserver() { var statichandler = createstatichandler(r"c:\users\lukasz\dart\linkshepherdclient\web\", defaultdocument: 'linkshepherd.html',servefilesoutsidepath: true); var handler = new cascade() .add(statichandler) .add(routes.handler) .handler; io.serve(handler, internetaddress.loopback_ip_v4, 8080).then((server) { print('listening on port 8080'); }).catcherror((error) => print(error)); } everything worked fine. changes in client project stopped affecting site served server (a site still loads, older version, different styling, importantly older .dart script file). when run client directly it's project date. opening , closing editor not help. dart editor creating sort of cache? the cache might dart:

mysql - How to get last 3 data of last 3 week days from a table -

i have table consisting of stock market's daily data. consists of various number of rows each day.i have column named 'high' in table. need calculate max(high) last 3 week days. ex:- if today wednesday need calculate max of last week's friday , week's monday,tuesday. know can if know date manually using query this. select max(high) table_name date>='date' but don't want want automate program written in php. how can achieve in both either php or sql appreciable. table has 6 columns date,time,open,high,low,close say suppose if table this date time open high low close 2015-05-06 09:30:00 2012.50 2020.5 2016.5 2014.0 2015-05-06 09:31:00 2013.50 2021.5 2014.5 2016.0 2015-05-06 09:32:00 2014.50 2021.75 2017.5 2013.0 2015-05-07 09:30:00 2011.50 2019.5 2018.5 2014.0 2015-05-07 09:31:00 2014.50 2022.5 2016.5 2015.0 2015-05-07 09:32:00 2012.50 2026.5 2017.5 2016.0 2015-05-08

unix - Calling python scripts from anywehre -

i have collection of python scripts import each other. if want use these in location scripts not physically present, how can this. tried adding path of dir scripts $path got no joy. appreciated, thanks. python doesn't share own path general $path , able you're looking for, must add scripts in $pythonpath instead.

java - archive for required library can not be read -

i created first maven project , java build path problem in it. description resource path location type archive required library: 'c:/users/simran/.m2/repository/org/glassfish/extras/glassfish-embedded-web/3.1.1/glassfish-embedded-web-3.1.1.jar' in project 'restfulmessenger' cannot read or not valid zip file restfulmessenger build path build path problem this jar present in location mentioned, tried deleteing there , cleaning project , updating maven nothing fixed error. what seems wrong? you should try doing maven -> update project , make sure check force update of snapshots/releases