Posts

Showing posts from April, 2012

windows - VB6 program interacting with AutoCAD, is not longer able to create, or bind to the ACAD object -

stack, to start, website fantastic, you've helped me through lot of issues in past; thanks. moving forward, program has been in existence, , in use, since autocad 2000. current version of software compatible acad 2017. i work small team, , out of nowhere, pc struggling vb6/autocad combination; other developers still working no issues... late binding used get, or create, object; depending on whether acad running... e.g. set oautocad = getobject(, "autocad.application") if err.number err.clear set oautocad = createobject("autocad.application") if err.number msgbox ucase$("unable launch autocad session") end else oautocad.visible = true end if end if there 2 different executables (using same binding technique) work acad different things. both of them, software fails on both createobject , getobject " run time error 429 - activex component cannot create object . however, adding '.20...

javascript - Submit calls function two times -

when submit form enter, works without problems. can log in. when submit form button, logs in on firefox, not on chrome. problem is, repeats function twice , sends different hashed password. how can make work on chrome too? button: <div id="submit" name="submit" value="login" class="ui fluid large pink submit button" onclick="submitform();">login</div> form: <form id="form" autocomplete="off" class="ui large form" id = "form" name="form" method="post" action="php/verify.php" onsubmit="submitform();"> i added onsubmit="submitform();" form, call function when submit form enter . javascript function: function submitform(){ var form = document.getelementbyid("form"); var pwd = document.getelementbyid('pwd'); var hash = new jssha("sha-256", "text", {numrounds: 1}); ...

angular - Firebase query if child of child contains a value -

the structure of table is: chats --> randomid -->--> participants -->-->--> 0: 'name1' -->-->--> 1: 'name2' -->--> chatitems etc what trying query chats table find chats hold participant passed in username string. here have far: subscribechats(username: string) { return this.af.database.list('chats', { query: { orderbychild: 'participants', equalto: username, // how check if participants contain username } }); } a few problems here: you're storing set array you can index on fixed paths set vs array a chat can have multiple participants, modelled array. not ideal data structure. each participant can in chat once. using array, have: participants: ["puf", "puf"] that not have in mind, data structure allows it. can try secure in code , security rules, easier if start data structure implicitly matches model bet...

angular - Angular2 Trigger form.valueChanges manually -

i'm subscribing form changes with: this.form.valuechanges.subscribe(formdata => { // data saved here. }); when click button in form changes 1 of input values. somehow valuechanges subscribe not being triggered. can manually? i believe need map valuechanges before subscribing like: this.physicalform.valuechanges .map((value) => { return value; }) .subscribe((value) => { this.selectedphysical.activitylevel = this.physicalform.value.activitylevel; });

webpack - HtmlWebPackPlugin is unable to resolve fields -

i've changed configuration files in order able use webpack@2.1.0-beta.27 . after having changed issues according migration between webpack@2.1.0-beta.22 , last 1 goes wrong according htmlwebpackplugin : plugins: [ new htmlwebpackplugin({ template: 'src/index.html', chunkssortmode: 'dependency' }) ] after having performed webpack command seems htmlwebpackplugin unable resolve fields. index.html file: html webpack plugin: <pre> typeerror: cannot read property 'title' of undefined - index.html:77 d:/projects/living/user-platform/project/src/index.html:77:33 - index.html:94 module.exports d:/projects/living/user-platform/project/src/index.html:94:3 - index.js:255 [project]/[html-webpack-plugin]/index.js:255:16 - util.js:16 trycatcher [project]/[html-webpack-plugin]/[bluebird]/js/release/util.js:16:23 - promise.js:510 promise._settlepromisefromhandler [project]/[html-webpack-plugin...

mysql - sql query: BETWEEN -

this question has answer here: mysql: select data between 2 dates 6 answers i trying execute query between data values. i have seen questions here query more complicated. this query: select calendar.datefield date, ifnull( count( lead.insertdate ) , 0 ) task lead right join calendar on ( date( lead.insertdate ) = calendar.datefield ) , lead.lpid = '40' insertdate between '2016-01-05' , '2016-01-23' group date i think problem in query syntax, query works until add where row. you have placed condition outside where clause. try this. select calendar.datefield date, ifnull( count( lead.insertdate ) , 0 ) task lead right join calendar on ( date( lead.insertdate ) = calendar.datefield ) insertdate between '2016-01-05' , '2016-01-23' , lead.lpid = '40' group date

How does Windows know to set daylight savings time even though PC is not connected to Internet? -

i have pc hasn't been connected internet years , did not have windows updates years well, how pc know set clock forward/backward 1 hour? thanks. from wikipedia: of united states , canada observe dst second sunday in march first sunday in november. similar rules in place in europe. when set windows pc, tell live, , calculates daylight savings based on date. regardless of whether or not you're connected internet, first sunday in november first sunday in november.

javascript - Leaflet.contextmenu callbacks -

i'm struggling problem in leaflet.contextmenu library. i got number of different maps, saved in global array. i'm using contextmenu options have contextmenu in maps. when want define callback functions, can't access arrmap[id] , because function doesn't know id i'm using. my question here is: how can give object (the id , example) callback function of leaflet.contextmenu library? function x(){ arrmap[id] = new l.map('map'+id,{ contextmenu: true, contextmenuwidth: 140, contextmenuitems: [{ text: 'messung dieser position einfügen', callback: newmeasurement }, { text: 'zeige koordinaten', callback: showcoordinates }, { text: 'karte hier zentrieren', callback: centermap }] }); } function newmeasurement(e){ //do e , id } i thought like: //function x(){... callback: newmeasurement(e,id) //...} ...

git - Which is the right way to duplicate a repository and get rid of any dependency with it's parent? -

Image
i need duplicate repository without forking since not make pr parent repository. have found this docs github , follow steps in there. the original repository docker-nginx-php , have created duplicated in account under another-lamp-docker what expect see duplicate of repository without reference previous commits, contributors, authors, etc , yes, not stolen work, people know on readme new work based on original repository. as result seeing following behavior: the image below shown main screen of duplicated repository: the image below shown branches tab, showing 4 branch original repository showing kind of dependencies. even on contributors tab seeing old owners is expected behavior duplicating repository? can rid of history (i believe it's) information? if how? if want remove past history: clone repository. remove .git directory ( rm -rf .git ) initialize new git repository ( git init ) commit files ( git add .; git commit -m ...

python - How to perform a function between specific columns of multi-indexed data using Pandas -

how can calculate correlation between 1st column (a) of , 1st column (d) of jp , extend creating loop calculates correlation between (b,e) , (c,f) defined in desired output. sample input: import pandas pd columns = pd.multiindex.from_arrays([['us', 'us', 'us', 'jp', 'jp', 'jp'], ['a', 'b', 'c', 'd', 'e', 'f']], names=['cty', 'tenor']) hier_df = dataframe(np.random.randn(12, 6), columns=columns) hier_df desired output: a d 0.8 b e 0 c f 0.2 if want use loop, can use zip iterate on 2 sub frames: data = [] col1, col2 in zip(hier_df['us'], hier_df['jp']): data.append((col1, col2, hier_df['us'][col1].corr(hier_df['jp'][col2]))) data = pd.dataframe(data) data.to_csv(filename, sep='\t', index=false, header=f...

excel - VBA search column heading in a sheet and return SUM in another sheet -

Image
i datas sheet 1 sheet 2 reference column headings vba. example:(excel file) so if want find sum of fun1 person criteria 1 command have go , find heading “sum of fun 1” in sheet 1 , choose datas under criteria 1 , sum in sheet 2 cell d5. (by using column heading reference instead of cell reference. table range a2 : u80. thanks. public sub match() thisworkbook.sheets("sheet1").activate range("sheet2!b3") = application.sum(application.index(range("a:g"), 0, application.match("crit1" & "fun1persona", range("a2:g2"), 0))) end sub i have tried codes failed. know havnt include row reference crit1 , iam not sure how apply formula. can me ? in advance you formula. i'll assume table in example covers range a1:e10. first we'll need find correct column using match formula: =match("fun2persona",$1:$1,0) - return 3 fun2persona in column c. next need know how many rows in table. ass...

php - Attribute data options not being applied when created programmatically -

i'm using data array create attributes through setup script. $data = array ( 'attribute_model' => null, 'backend' => 'eav/entity_attribute_backend_array', 'type' => 'varchar', 'table' => '', 'frontend' => 'eav/entity_attribute', 'input' => 'select', 'label' => $data_get_label['name'], 'frontend_class' => '', 'source' => 'eav/entity_attribute_source_table', 'required' => '1', 'user_defined' => '1', 'default' => '', 'unique' => '0', 'note...

spark conditional replacement but keep filed values -

i want fill nan values in spark conditionally (to make sure considered each corner case of data , not filling replacement value). a sample like case class foobar(foo:string, bar:string) val mydf = seq(("a","first"),("b","second"),("c",null), ("third","foobar"), ("somemore","null")) .todf("foo","bar") .as[foobar] +--------+------+ | foo| bar| +--------+------+ | a| first| | b|second| | c| null| | third|foobar| |somemore| null| +--------+------+ unfortunately mydf .withcolumn( "bar", when( (($"foo" === "c") , ($"bar" isnull)) , "somereplacement" ) ).show resets regular other values in column +--------+---------------+ | foo| bar| +--------+---------------+ | a| null| | b...

Does Rust's memory management result in fragmented memory? -

does rust programming language's automatic memory management need reclaim fragmented memory? if so, how this? my understanding type system (ownership types, borrowing, rc , arc ) allows deterministically know @ compile-time when chunk of allocated memory can freed. but isn't possible memory chunks allocated in 1 order, , freed in different order, resulting in fragmentation? if prevented, how? if happen, how memory fragments managed efficiently? if defragmented, what's methodology used? tl;dr: programs never have worry fragmentation in c, c++ or rust. have handle themselves. does rust programming language's automatic memory management need reclaim fragmented memory? rust not have automatic memory management; has manual memory management compiler checks correctness. difference might sound theoretical, important because means memory operations map directly source code, there no magic going on behind scenes. in general, language needs have compa...

json - Cannot update pre indexed data via SOLR/CURL -

i've performed following indexation via solr/curl curl http://localhost:8983/solr/wiki/update -h 'content-type:application/json' -d ' [ {"id" : "book1", "title" : "american gods", "author" : "neil gaiman" } ]' error appears while updating data curl http://localhost:8983/solr/wiki/update -h 'content- type:application/json' -d ' [ {"id" : "book1", "cat" : { "add" : "fantasy" }, "pubyear_i" : { "add" : 2001 }, "isbn_s" : { "add" : "0-380-97365-0"} } ]' this error {"responseheader":{"status":400,"qtime":0},"error":{"metadata":["error-class","org.apache.solr.common.solrexception","root-error-class","org.apache.solr.common.solrexception"],"msg":"undefined field: \"ca...

Problems in the Android Studi - .gradle - git.exe - Failed to sync Gradle project -

when start android studio there's message 1. can't start git: git.exe path git executable not valid. fix it. 2 . failed sync gradle project 'app-android' error:unknown host 'jcenter.bintray.com'. may need adjust proxy settings in gradle. enable gradle 'offline mode' , sync project learn configuring http proxies in gradle 3 . in addition error in .gradle picture

jquery - Pure HTML form works, same query with Ajax fails -

this html forms send request, , google authentication works : <form action="/auth/google" method="get"> <button type="submit"> login google </button> </form> however, content of response (json) displayed in browser, html page, , replaces current page, reason. if prevent form submitting (i.e. e.preventdefault() ), nothing happens @ all. don't know how catch json. so i'm trying make same call using ajax <button type="submit" id="btngoogle"> login google </button> <script> $('#btngoogle').click( (e) => { $.ajax({ type: "get", url :"/auth/google", datatype : "json", crossdomain : true, // no effect headers : { // tried many headers, no effect } }) .success( (data) =...

Schedule a job to run only if another job is not currently running in Microsoft SQL Server Management Studio -

Image
currently have 2 jobs can't run in parallel. there way can defer execution based on status? mag_logicar_d3_h should not run if mag_logicar_d3_m running , vice versa using microsoft sql server management studio ? on way accomplish using maintenance plan. add two: execute sql server agent job task . configure jobs. link both jobs. force execution of second job after success or completion of first one.

javascript - jquery on() method Maximum call stack size exceeded -

why getting error: uncaught rangeerror: maximum call stack size exceeded here code: $(document).on('keypress focusout', '.checklist-item-input', function (e) { if (e.which == 13 || e.type == 'focusout') { $('.checklist-item').removeclass('edit'); $(this).siblings('.checklist-item-detail').text($(this).val()); $(this).blur(); $('.checklist-item-detail').each(function () { if (!$(this).text().length) { $(this).closest('.checklist-item').parent().remove(); } }); } }); as others mentioned cause recursive call. 1 simple fix add sentinel variable stop going recursive: var busy = false; $(document).on('keypress focusout', '.checklist-item-input', function (e) { if (!busy && e.which == 13 || e.type == 'focusout') { busy = true; $('.checklist-item').removeclass('edit'); $(this).siblings('.checklist-...

sql - Iterate temp table in batches -

i have temp table set of data ----------------------------------------------------- | col1 | col2 | col3 | col4 | status| ----------------------------------------------------- | | a12 | dd | ff | 1 | ----------------------------------------------------- | b | b43 | dd | ff | 2 | ----------------------------------------------------- | c | fe3 | dd | ff | 3 | ----------------------------------------------------- | d | fd2 | gg | hh | 1 | ----------------------------------------------------- | e | sf2 | gg | hh | 1 | ----------------------------------------------------- | f | vd2 | ii | jj | 3 | ----------------------------------------------------- | g | cd3 | ii | jj | 3 | ----------------------------------------------------- i need process tabl...

windows installer - WiX Condition works in MSI but not in Bundle -

when i'm building msi file, , use basic condition, expected happens. example, let's have in setup file: <property id="myproperty" value="0"/> <condition message="value of myproperty [myproperty], , should 1."> <![cdata[installed or myproperty = "1"]]> </condition> if build , run msi file, works -- is, displays error message , quits. working condition when running msi however, if put msi bundle, doesn't work. is, when put bootstrapper ("properties" below name of setup project -- bad name, realize): <chain> <msipackage sourcefile="$(var.properties.targetpath)"/> </chain> and run setup file, error. when installation starts, checks condition, gives me expected message box (same above), , error message: setup failed looking @ log, 3 error messages: error 0x80070643: failed install msi package. error 0x80070643: failed execute msi pack...

Changing UTC Time to Local Time using scalar-valued function with Select statements SQL -

i've been trying work on 2 days , still stuck. assistance or tips appreciated. creating function date conversion: create function localdatefromutctime ( @utcdatetime datetime ) returns datetime begin declare @diff int; set @diff = datediff(hh,getutcdate(), getdate()); return dateadd(day, datediff(day, 0, dateadd(hh, @diff, @utcdatetime)),0); end then select sql statement i'm trying use function above below: select o.number 'order#', o.[guid] 'guid', dbo.localdatefromutctime(o.settlementdate) 'closing date' pf.order o doing displays settlement date no timestamp. 2015-07-15 00:00:00.000 how change show correct local time? thanks your date conversion returning difference in days. dateadd adding number of days between date 0 (which 01-01-1900 ) , utc date onto different date 0 . means hours , minutes ignored. if want include hours , minutes need drop dateadd(...datediff( part: ...

html5 - Center login box to the page responsively with a footer at the bottom -

i getting frustrated in past few days of attempts trying make login box center on page. want responsive device size, went bootstrap. me though, have centering responsively on page @ top, need move down center on entire page. also have footer goes underneath. here have <%@ page language="vb" autoeventwireup="false" codebehind="login.aspx.vb" inherits="login" %> <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="content/bootstrap.min.css" rel="stylesheet" /> <script src="scripts/jquery-1.9.1.min.js"></script> <link href="https://fonts.googleapis.com/css?f...

Why does my deep array copy change it's value outside for loop in Java? -

this question has answer here: java: recommended solution deep cloning/copying instance 8 answers i'm creating genetic algorithm written in java. mutation function flips bits in array @ assigned probability. mutation function not retaining mutated population of arrays (individuals). public static void mutation(individual[] population, individual[] mutatedoffspring, double mutationrate) { // iterate through gene, randomly select whether // or not change value of genome // system.out.println("\nmutation\n"); random mutant = new random(); individual[] offspring = new individual[population_size]; system.out.println("mutated offspring array"); (int = 0; < (population.length); i++) { (int j = 0; j < population[i].gene.length; j++) { // flip bits in array @ preset probability (0.1) ...

xsd - XML Schema for collection of components of any of defined type -

i have defined components of types inputtexttype , inputemailtype (their definitions not important here). need have components collection of number inputtext and/or inputemail, in order (example: text, email, text, text). i've tried: <xs:complextype name="componentstype"> <xs:choice> <xs:element name="inputtext" type="inputtexttype" maxoccurs="unbounded" minoccurs="0"/> <xs:element name="inputemail" type="inputemailtype" maxoccurs="unbounded" minoccurs="0"/> </xs:choice> </xs:complextype> but when validating xml <components> <inputtext> <label>label 1</label> <name>as</name> </inputtext> <inputtext> <label>label 2</label> <name>ghyyy6</name> </inputtext> <inputemail> <label>...

dataframe - Datewise grouping data in R -

i have sample dataframe: date item1 item2 item3 17-11-2016 2a hp cnf 12-11-2016 1a bp wl 13-11-2016 3a sp dl 14-11-2016 1a hp cnf 16-11-2016 2a bp cnf 10-11-2016 1a sp wl 17-11-2016 2a hp wl i want group data based on columns date, item1 , item2, particular column same value come same group. expected output: date item1 item2 item3 grp 17-11-2016 2a hp cnf 1 17-11-2016 2a hp wl 1 12-11-2016 1a bp wl 2 13-11-2016 3a sp dl 3 14-11-2016 1a hp cnf 4 16-11-2016 2a bp cnf 5 10-11-2016 1a sp wl 6 you can way: df <- data.frame(date = c("17-11-2016","12-11-2016","13-11-2016","14-11-2016", ...

python - gensim Latent Dirichlet Allocation minimum_probability vs print_topics -

my question related post, document topical distribution in gensim lda , documentation gensim.models.ldamodel states "minimum_probability controls filtering topics returned document (bow)." however, ldamodel[corpus] returns possible topics probability (even below number set in minimum_probability). difference between these two? python 2.7.5 gensim 0.13.3 thank you my understanding of the documentation minimum_probability can both parameter of model generation (applied queries afterwards) , querying interface, e.g. get_document_topics(bow, minimum_probability=none, ....) . unless trained minimum_probability parameter model[doc_bow] not trim on probability.

Dynamics CRM Online 2016 Web API - Get user by Auzure AD Object ID -

is possible user object dynamics crm online 2016 web api users objectid azuread. i able user windowsliveid (as in example below) cannot find guid user shared between azure ad , crm online. /api/data/v8.1/systemusers?$filter=windowsliveid eq 'user.name@contoso.com' maybe isn't possible? you looking azureactivedirectoryobjectid attribute of systemuser entity. msdn reference the below code should work. /api/data/v8.1/systemusers?$filter=azureactivedirectoryobjectid eq guid note: guid without single quotes

sas - Defining a new field conditionally using put function with user-defined formats -

Image
i trying define new value observation user defined format. however, if/then/else statement seems work observations year value of "2014". put statements not working other values. in sas, put statement blue in first statement, , black in other two. here picture of mean: does know missing here? here complete code: data claims_t03_group; set output.claims_t02_group; if year = "2014" test = put(compress(lookup,"_"),$g_14_prod35.); else if year = "2015" test = put(compress(lookup,"_"),$g_15_prod35.); else test = put(compress(lookup,"_"),$g_16_prod35.); run; here example of mean when process seems "work" 2014: as can see, when year value 2014, format lookup works correctly, , test field returns value expecting. however, years 2015 , 2016, test field returns lookup value without formatting. your code utilises user-defined formats, $g_14_prod. - $g_16_prod. . guess there problem...

Open urls from list of urls using urllib -

new python , stackoverflow. i'm trying scrape data number of links on page. have collected urls , placed them in list (list_of_urls_edit). i know want iterate through list can scrape information off each page. trying in way: for in list_of_urls_edit: page_1 = urllib.request.urlopen(i).read() soup_1 = beautifulsoup(page_1,'html.parser') this returning following error: recursionerror: maximum recursion depth exceeded while calling python object every method i've tried iterating through list has given me same error. any tips on might cause of ? sorry if has been answered on here before

manifest - Why does my chrome extension ask for history permissions? -

Image
in manifest.json file, have nothing explicitly listed reading user's history, however, warning comes when try install extension. here manifest file: { "manifest_version": 2, "name": "queuetube youtube!", "short_name": "queuetube", "description": "search youtube without stopping video, , make own playlists!", "version": "1.5", "author": "dara javaherian", "permissions": ["tabs", "*://*.youtube.com/*"], "background": { "persistent":true, "scripts": [ "bg/socket.io.js", "bg/background.js" ] }, "icons": { "128": "icons/youtube-128.png" }, "browser_action": { "default_icon": "icons/icon.png", "default_popup": "popup/popup.html" }, "web_ac...

sqlite - How to select comments by date (with a DATETIME) field -

i have comments table store date , time comment posted, in datetime field. i'd know, how pull out comments 1 day. obviously, comments have been posted @ time during day. so far, best come either using between 'yyyy-mm-dd 00:59:59' , 'yyyy-mm-dd 23:59:59' , both dates day want or like 'yyyy-mm-dd%' . surely, there's better way this? many in advance. in order records 1 day can use date() function in 'where' part of query, serve 2 purposes: - truncate time portion datetime records - parse 'yyyy-mm-dd' value of desired day here create table 2 records, 1 timestamped of january 1st, 2007 , timestamped today datetime. select 2 records separately: bash-3.2$ sqlite3 some.db sqlite version 3.8.10.2 2015-05-20 18:17:19 enter ".help" usage hints. sqlite> create table mytable (txt varchar(25), timestamp datetime); sqlite> insert mytable (txt, timestamp) values ('asdf',datetime()); sqlite> ins...

extract data from https site into python using urllib (your request cannot be completed error) -

i've been attempting extract contents of https website python using urllib. i've used 4 lines of code. import urllib fhand = urllib.urlopen('https://www.tax.service.gov.uk/view-my-valuation/list-valuations-by-postcode?postcode=w1a&startpage=1#search-results') line in fhand: print line.strip() the connection appears working page being opened python. i'm getting few different error messages in output in title, heading , paragraph headings below. had expected output series of html tags containing data available on website such address, base rates , case number (ie html available if go elements on google chrome developer). can guide me towards getting data python please? thank & regards <!doctype html> <html class="no-branding"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta charset="utf-8"> <meta name="viewport" content="width...

Having trouble converting a filtered query into a bool query for Elasticsearch 5 -

i'm in process of upgrading elasticsearch 1.7 5.0. 1 of changes removal of filtered query in favor of bool query. example, have search hash being used in older version of es: { "sort": [ { "updated_at" => "desc" } ], "query": { "filtered": { "filter": { "bool": { "must": [ { "term": { "account_id" => 2 } }, { "bool": { "should": [ { "missing": { "field": "workgroup_ids" } }, { "term": { "visibility": 2 } } ...

java - JUnit testing lines drawn by user -

i'm having problem writing test code , don't have clue how it. this code draws line when 1 of key pressed length of 1. when holding shift down create line length of 5. need test draw line correct length parameter each case. class sketchpanel extends jpanel { private point2d last; private final arraylist<line2d> lines; private static final int small_increment = 1; private static final int large_increment = 5; public sketchpanel() { super(); last = new point2d.double(100, 100); lines = new arraylist<>(); keyhandler listener; listener = new keyhandler(); addkeylistener(listener); setfocusable(true); } public void add(final int dexx, final int dexy) { point2d end; end = new point2d.double(last.getx() + dexx, last.gety() + dexy); line2d line; line = new line2d.double(last, end); lines.add(line); repaint(); last = end; } @override public void paintcomponent(final graphics graph) { sup...

sql - Insert statement with nested Select and inner join -

Image
for clock machine. this automatically set clock record in table @ midnight people forgot clock out in evening. want insert clock record same clock in time employee table has usual, employeeid, employeename, clocktypeid clocktypeid quick reference employees current status (working (1) or not working (2)) clock table has clockid, clocktypeid, employeeid, clockdate, clocktime at moment have (and want do) insert dbo.clock(employeeid, clocktypeid, clockdate, clocktime) select employeeid, 2, getdate(), [mininum clock time current day current employee] employee employee.clocktypeid <> 2; thanks in advance! edit: bit more info i want to, when query run in evening; insert row clock table each of employees has clocktypeid of '1' (indicating still clocked in) row want insert, want date current date , time time of first clock in (clocktypeid 1) of day. end clock-in time , date being same clock-out time , date. meaning system have worked 0...

Undefined Variable PHP + MySQL -

this question has answer here: php: “notice: undefined variable”, “notice: undefined index”, , “notice: undefined offset” 23 answers i know stackoverflow disapproves of repeat questions, bear me have scanned many similar questions without finding specific resolutions me. (mostly mention things avoiding database insertions) i encounter these error messages: here db connection success notice: undefined variable: firstname in c:\xampp\htdocs\practice_connection_app\submit.php on line 10 notice: undefined variable: lastname in c:\xampp\htdocs\practice_connection_app\submit.php on line 10 notice: undefined variable: conn in c:\xampp\htdocs\practice_connection_app\submit.php on line 11 fatal error: call member function exec() on null in c:\xampp\htdocs\practice_connection_app\submit.php on line 11 the first result shows have ...

caching - Map server not using Lizard Tech cached tiles -

i using lizard tech serve satellite image tiles have processed myself...i have turned caching on in lizard tech doesn't seem mapserver using cached imaged tiles...is there configuration or else missing happen? here map file looks like... map imagetype png24 config "proj_lib" "path to/projlib/" extent -180 -90 180 90 size 256 256 fontset "path to/fontset.txt" imagecolor 255 255 255 transparent on projection "init=epsg:4326" end web metadata "wms_title" "water" "wms_enable_request" "*" end end layer name "aerial" debug 5 status on type raster connection "http://path lizard tech/ows?" connectiontype wms metadata "wms_title" "sometitle" "wms_srs" "epsg:4326" "wms_name" "aerial...

Refresh Tokens in Kubernetes when using an OpenID Provider -

with kube configured point external opendid provider seems through browsing through code kube makes call opendid provider refresh token. when comes expects id_token come back. seems through tracing through code kube respect expire time bearer token , not make call opendid provider until bearer token expires. is correct description of how refresh tokens work in kube? kubernetes doesn't have concept of refresh tokens because kubernetes api server isn't client of openid provider, validates id_token s issues specific client. clients of openid provider wish talk api server on end user's behalf must manage refresh tokens issue more id_token s current 1 expires. api server wont you.

javascript - A collision function is not allowing my missile to move -

http://pastebin.com/29ctcnee inside drawmissile() function make moves missile's y position 5 pixels each frame! there function being called: missilecollision() inside missilecollision() function checks if touching bowl, if is, give point , reset position! if missile misses bowl , goes bottom of screen, lose life! here problem, when calls "missilecollision()" function, won't move down 5 pixels! tried taking out "missilecollision()" function, worked should! why calling "missilecollision()" function stops missile moving? i had tried removing "missilecollision()" function entirely , cut , pasted code "drawmissile" function didn't work :( -thanks in advance! i haven't check code line (86) looks bad: if (missiley = playery-missileythick .. you're doing assignment here. use === (instead of = ) compare 2 variables of same type.

caching - VLD3.u16 takes a lot longer than VLD3.u8 -

i benchmarking vld3.u8 , vld3.u16 , noticed interesting result. input array of 1200*1048*3 vld3.u8 , 1200*1048*3*2 vld3.u16 , iterated 1000 times. vld3.u8 : 2.70 sec vld3.u16 : 16.68 sec sample code pld [r1, #64] pld [r1, #64*2] pld [r1, #64*3] .loop: pld [r1, #64*3] vld3.u8 {d0, d1, d2}, [r1]! vst3.u8 {d0, d1, d2}, [r0]! subs r2, r2, #1 bne .loop pop { r4-r5, pc } looking @ cycle counter ( http://pulsar.webshaker.net/ccc/result.php?lng=us ) takes 4 cycles each operation (vld3.u8 , vld3.u16). my expectation vld3.u16 take twice long compute since input vld3.u16 double compared of vld3.u8. is cache miss issue happening vld3.u16, causing vld3.u16 take long time load values arm registers neon registers ? can please me :) ?

jenkins - How do I get/set property on loaded scripts in Jenkinsfile -

i have jenkinsfile load external files, not know how manage fields on it: main script: node { deletedir() git credentialsid: 'git-credentials', url: 'git@git-hostname:project/ci-cd.git' load 'pipeline.groovy' }() pipeline.groovy: def pipe = load 'pipeline-utils.groovy' pipe.deployat << env.branch_name echo "foo -> ${pipe.deployat}" { -> echo 'hello there' pipe.deploy() } pipeline-utils.groovy: def deployat = [] def deploy() { echo 'do it' } it says groovy.lang.missingpropertyexception: no such property: deployat class: groovy.lang.binding , if echo ${pipe.class} says script2 , , if remove deployat lines says do it expected. not right, if can call methods why can not access fields? my jenkins version 2.19.1.

python - How can I print a plot in matplotlib either from the plot window or with a command? -

is there way print plot matplotlib,either command or plot window ? know save , print,but looking more automated.thanks. you save figure pdf, use subprocess print pdf. on *nix, lpr used: import matplotlib.pyplot plt import numpy np import subprocess import shlex n=20 x=np.linspace(0,np.pi,n) y=np.sin(x) plt.plot(x,y) fname='/tmp/test.pdf' plt.savefig(fname) proc=subprocess.popen(shlex.split('lpr {f}'.format(f=fname)))

string - Python - Generating all combinations of Hexadecimal values -

i have encryption key 32-bits in hexadecimal format. i'm given 22 bits. have find plaintext. thought process brute-force attack , find other 10 bits. given ciphertext. encryption used aes in 128-bit ecb mode. using python, started learning not expert yet. my approach take 22-bit key , concatenate other 10 bits, feed aes along ciphertext , decrypt check if 1 of resulting phrases resembles proper sentence. part stuck on generating 10 bit hexadecimal string. this output want: 0000000000 0000000001 0000000002 ... 000000000f ... ffffffffff what approach use this? tried making dictionary , assigning numerical values hexadecimal values stuck on how write loop give sequence want output. def gen_all_hex(): = 0 while < 16**10: yield "{:010x}".format(i) += 1 s in gen_all_hex(): print(s) result: 0000000000 0000000001 0000000002 0000000003 0000000004 0000000005 0000000006 0000000007 0000000008 0000000009 000000000a 000000000b 00...

Genetic Algorithm in Matlab with Non-linear Constraints: -

according documentation on ga , program not demand trial points satisfy non-linear constraints satisfied in generation g. question this: how ga select elite children -- possible select points violate non-linear constraints? specifically, how non-linear constraints imbedded in fitness function? fitness funciton of form: obejctive function + penalty, where penalty = sum_k max(g_k(x),0)^2 + sum_k h_k(x)^2 where g_k(x) non-linear inequality constraints, , h_k(x) non-linear equality constraints. if fitness function of form, can user change penalty function to, say, sum_k max(g_k(x),0) + sum_k |h_k(x)|?