Posts

Showing posts from April, 2010

tensorflow - ValidationMonitor triggered only once -

i trying use tensorflow's validationmonitor on dnnregressor.fit but gets triggered once when global_step = 1 . how fix it? the every_n_step setup 1 this validation_monitor = tf.contrib.learn.monitors.validationmonitor( test_dataset.data, test_dataset.target, every_n_steps=1) regressor = tf.contrib.learn.dnnregressor(feature_columns=feature_columns, hidden_units=[2], model_dir="/home/maciej/tf-logs") regressor.fit(x=train_dataset.data, y=train_dataset.target, steps=1000, monitors=[validation_monitor]) what on stdout logs loss , single 1 validation: info:tensorflow:saving dict global step 201: global_step = 201, loss = 5.50003 info:tensorflow:validation (step 201): loss = 5.50003, global_step = 201 info:tensorflow:global_step/sec: 96.1045 info:tensorflow:loss = 6.3935, step = 301 info:tensorflow:global_step/sec

xampp cannont use phpmyadmin ( mysql error ) -

i installed xampp on manjaro ( archlinux distribution ) cannot use phpmyadmin mysql seems not respond. use sudo xampp start output follows : xampp: starting apache...ok. xampp: starting mysql...ok. xampp: starting proftpd...ok. but when trying restart using sudo xampp restart , displays : xampp: stopping apache...ok. xampp: stopping mysql...not running. xampp: stopping proftpd...ok. xampp: starting apache...ok. xampp: starting mysql...ok. xampp: starting proftpd...ok. when connecting http://localhost/phpmyadmin/ welcome displayed 4 errors displayed in order : \#2002 - no such file or directory — server not responding (or local server's socket not correctly configured). mysqli_real_connect(): (hy000/2002): no such file or directory connection controluser defined in configuration failed. mysqli_real_connect(): (hy000/2002): no such file or directory after researching, did notice missing /opt/lampp/var/mysql/mysql.sock file not know how create , configure it. i t

Why Browserstack provides new IP everytime to POST and how to overcome that? -

we run scripts cli. required us. use services browserstack, have download binary , start tunnel using binary. executing binary , creates tunnel between local machine , system. execute binary “browserstacklocal.exe --key accesskey”. once tunnel created, can execute scripts. , in scripts try access site http://username:access key@hub.browserstack.com:80/wd/hub. actual command used in scripts “webdriver.remote(command_executor=' http://username:access key@hub.browserstack.com:80/wd/hub',desired_capabilities=desired_cap)”. that’s all. have do. rest whatever happens done browser stack binary internally. so when start script, fetches http://username:access key@hub.browserstack.com:80/wd/hub. test fails error displayed in command prompt : date: fri, 31 mar 2017 03:35:04 gmt source ip: ip url: post http://some ip address/wd/hub/session  ip changes of time category: uncategorized urls reason: user requested appliance: ip notification: err _continue_una

c# - 2 min delays on downloading Azure blobs -

i'm developing application in c# , use azure. noticed, when try load lot of blobs, requests take ~2 min. download time 1-15 sec. strange thing is, requests can take either 1-15 sec or 2 min (it never 30 sec, or 1 min etc.). me looks azure has kind of throttling or retry mechanism, i'm not sure. what causes 2 min delays? how avoid such delays? cloudblockblob blob = this.getblobreference(key); using(var msget = new memorystream()) { await this._ap.do(() => { var downloadtostreamasync = blob.downloadtostreamasync(msget); return downloadtostreamasync; }).configureawait(false); } looks azure problem. https://github.com/azure/azure-webjobs-sdk-script/issues/298 currently, there short idle timeout on function apps, if don't requests 5 minutes next request causes cold start takes longer. looking increasing timeout, make situation less common. and looks 1 solution keep server warm. think enougth run service make 1 call azu

mysql - Can't drop either add primary key -

i have table: create table `event_schedule_tag` ( `event_schedule_id` bigint(20) not null, `tag_id` bigint(20) not null, key `event_schedule_id` (`event_schedule_id`), key `tag_id` (`tag_id`), constraint `event_schedule_tag_ibfk_1` foreign key (`event_schedule_id`) references `event_schedule` (`id`) ) engine=innodb default charset=utf8 collate=utf8_czech

apache - Use more than 100 multi-domains with single ssl cerficate -

i have requirement of providing different domain each seller in e-commerce application shopify does. don't think using multiple ssl certificates(one ssl certificate each domain/seller) option. managing multiple domains, know far can use san multi-domain certificates can handle different domains upto 100 different domains. possible handle multiple san ssl certificates on single server? using load-balancer aws instances, how can manage load-balancer in case of multiple san ssl certificates. can 1 please answer?

c++ - Visual Studio 2017 can't find windows.h -

Image
hell'o i've installed visual studio 2017 (enterprise).i opened project whom created in visual studio 2015. project uses windows.h library vs2017 cannot find library. how repair this? i solved issue re-running visual studio installer , selecting "modify" button. once presented workloads screen clicked on "individual components" tab , selected of latest "windows 10 sdk" checkboxes(version 10.0.15063.0). guess entry "desktop c++ x86 , x64" 1 fixes speculation because none of options checked when ran installer , can see checked of them.

javascript - angular.forEach loop with $http.get -

i want create array containing objects firstly, first array server containing list of devices [ {accountid : "sysadmin",deviceid : "123"}, {accountid : "sysadmin",deviceid : "3"} ... ] then create second array containing objects each object represent device(deviceid) , contains array of events of device server i loop upon first array : $scope.myarrayofdevices = []; angular.foreach(response, function(device){ $scope.myobject={}; $scope.myobject.device = device.deviceid; $http.get('events') .success(function (data) { $scope.myobject.events = data; }); $scope.myarrayofdevices.push($scope.myobject); });//end loop i events data server correctly . but, when check $scope.myarrayofdevices array first object deviceid , no event array , second object deviceid , events array correctly like : [ {deviceid : 123, events:}, {deviceid : 3 , events : array

debian - blackscreen in blackmagic media express -

i'm trying check if blackmagic intensity pro 4k capture card works correctly.i installed drivers -version 10.8.6 debian,linux.i connected stb via hdmi capture in picture ,i see blackscreen in media express tool.i tried change input output formats didn't work.which formats should choose take capture? or solution this? thank much the problem hdmi input , output values.try find correct values according sysytem :)

c# - Best practice to integrate existing MSSQL db into Umbraco? -

this general umbraco architectural question, not specific-to-the-line-of-code-question. i new umbraco know way around .net , asp.net mvc well. for upcoming project considering using umbraco cms experience umbraco little, cannot quite oversee options when comes integrating existing mssql database. the database support umbraco installation has tables present, containing product information. best way expose data using umbraco api/models , subsequently integrate data in umbraco views? e.g. can create data models in umbraco admin , map existing tables or there way considered best practice? thank you. i don't have lot of first hand experience subject did umbraco bootcamp covers this, it's called " umbraco application integration ". the course talks route hijacking , contentfinders mapping external data umbraco request pipeline. to call external tables code, can umbraco's integrated lightweight orm called peta poco , little work entity framew

shell - what is tool like mycli or pgcli on oracle database? -

is there tool mycli or pgcli oracle database? because useful when i'm querying inside terminal, , autocomplete feature me lot. i use terminal, need kind of software tool. the command line tool comes bundled oracle sql*plus. find out more. sql*plus rather old tool doesn't we'd want in command line tool, or things in intuitive fashion. name looks old-fashioned. oracle realise , have new product, sqlcl . lots of neat things (command history, autocompletion, scripting, oh my!) standalone download , install. find out more .

javascript - How to visualize Data in a Webapplication? -

i implemented wireless sensor network own sensornodes, famous mqtt-protocol , raspberry pi. data, published nodes, stored in sqlite database on pi. except database, on rpi webserver located communication on http enddevices smartphones or laptops. created html-form user inputs bootstrap. users can decide between different nodes, parameters , timestamps plot charts, tables , gauges. on server side programmed php-application querys user input, database , calls webside. client side wrote short javascript file using ajax recieve userinput interactiv. far good, want viszualize charts, gauges , tables containing data php-application determines. searched long while dashbaords-examples , found many different, everytime fail handling of js sources. my question: can recommend me lightwight , easy handle dashboard following characteristics? beginner tutorials less js-knowledge extensive presentation possibilities (barcharts, linecharts, gauges etc.) able embed in existing webpage inter

processmodel - Is BPMN right for my purpose? -

Image
intro the company work in (it intern-like position though, until done university) implemented automated warehouse solution, goods transported means of autonomous shuttles. basic functions of shuttles controlled onboard electronics (microcontroller), routing through warehouse racking done software solution in turn communicates our erp solution. erp solution handles whole warehousing. task there documented processes every of 4 layers (operator loads the shuttles, shuttle itself, routing, erp) individually. since kind of puzzled 4 of them 1 solution (which kind of new of participating companies), there vague, on-the-flyish process descriptions involving 4 layers available. now have been tasked come solution illustrate processes @ work. example erp signals goods in demand @ assembly station a1 warehouse operator looks @ screen , starts loading boxes picked shuttle warehouse operator puts in details erp, such count/weight, box number, ... warehouse operator clears boxes

fast creating a graph from a text file in c++ -

i want make graph text file containing 36692 nodes , each line of text contains source , target node of edge of graph. used igraph library create graph. wrote following code slow. how can improve it? igraph_empty(&graph, 36692, 0); ifstream inputfile("email-enron.txt"); string line; while (getline(inputfile, line)) { istringstream ss(line); int v1, v2; ss >> v1 >> v2 ; igraph_add_edge(&graph, v1, v2); } if file read bottleneck (which should profile), i'd suggest rid of superfluous stringstream variable. if each line contains 2 numbers , nothing else, reading in numbers pairwise directly stream works well, because operator >> treats new line white space , ignores same way ignores blanks: igraph_empty(&graph, 36692, 0); ifstream inputfile("email-enron.txt"); int v1, v2; while ( (inputfile >> v1 >> v2) ) { igraph_add_edge(&graph

C++ creating a forest -

am new c++ , trying create burning forest simulator. have been trying call function forest class dont know how give argument, if great here code have @ moment. using namespace std; class forestsetup { private: const char tree = '^'; const char fire = '*'; const char emptyspace = '.'; const char forestborder = '#'; const int firex = 10; const int firey = 10; char forest[21][21]; public: void createforest() { // function create forest (int = 0; < 21; i++) // sets value of rows 0 20 { (int j = 0; j < 21; j++) // sets value of columns 0 20 { if (i == 0 || == 20) { forest[i][j] = forestborder; // creates north , south of forest border } else if (j == 0 || j == 20) { forest[i][j] = forestborder; // creates east , west forest border

ios - Querying multiple values with Alamofire -

i want check both username , password. i'm using mlab api. checking username query working when add password. doesn't work (whether give wrong value, returns ok (http 200)). api document; http://docs.mlab.com/data-api/ let parameters: parameters = ["q" : "{\"uname\" :\"\(tfusername.text as! string)\" }, {\"password\" :\"\(tfpass.text as! string)\"}", "apikey": "2abdhqty1gawiwfvskfjyezvfrheloqi"] alamofire.request("https://api.mlab.com/api/1/databases/mysignal/collections/cusers", method: .get, parameters: parameters,encoding: urlencoding.default, headers: nil).responsedata{ response in print(response.response?.statuscode)

html - Updating value which depends on changing of another value, and vice versa -

i have kind of problem. can't find solution on web. have value depends on modification of value. , vice versa. code <div class="panel-body"> <div class="row"> <label class="col-lg-2 label-margin"> fondo bucket 1 (eur)</label> <div class="col-lg-1 right-col-margin">{{::fondo.fnd1}}</div> ---> input <label class="col-lg-2 label-margin"> fondo bucket 2 (eur)</label> <div class="col-lg-7 right-col-margin">{{::fondo.fnd2}}</div> ---> input </div> <div class="row"> <label class="col-lg-2 label-margin"> fondo bucket 1 (div)</label> <div class="col-lg-1 right-col-margin">{{::fondo.fnd1div}}</div> ---> input <label class="col-lg-2 label-margin"> fondo bucket 2 (div)

Upload image in ASP.NET MVC 5 EF6 -

i've had @ other questions , tutorials, i'm struggling incorporate suggestions existing work. i want user able upload image in submission form new listing, listing model looks this; public class listing { public int listingid { get; set; } [display(name = "select category")] public int categoryid { get; set; } [display(name = "select vendor")] public int vendorid { get; set; } [required] [display(name = "listing name")] public string listingname { get; set; } [required] [display(name = "listing description")] public string listingdesc { get; set; } [required] [display(name = "maximum capacity")] public int capacity { get; set; } [required] [datatype(datatype.currency)] [display(name = "price")] public decimal price { get; set; } [required] [display(name = "fixed price?")] public bool isfixedprice { get; set; } [req

python - Stranger error with the .join function -

i've been trying write program finds roots of inputted mathematical function. i've started, show here start, , there unused variables. here wrote function supposed replace term 'x' in function value input, say, 100. here code: code = list(input("enter mathematical function: ")) lowbound = int(input("enter lower bound: ")) upbound = int(input("enter upper bound: ")) def plugin(mylist, value): in range(len(mylist)): if mylist[i] == 'x': mylist[i] = value #replaces x inputted value return ''.join(mylist) #supposed turn list of characters string print(plugin(code,upbound)) but when run program, error: traceback (most recent call last): file "python", line 11, in <module> file "python", line 9, in plugin typeerror: sequence item 0: expected str instance, int found (i'm using online programming platform, file called 'python') this doesn't make sense me. myli

javascript - Appium API in Nightwatch Test -

is there way use appium commands setcontext within nightwatch tests? i trying automate e2e tests ios devices. able run test , switch webview elements visible, struggling click not working on ios. i tried solutions set cursor: pointer or adding onclick=" int tag , none of them worked. i found below solution don't know how use appium commands inside nightwatch test. https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/hybrid.md does know how switch context within nightwatch test? or how work around click event? ps. click event works inputs , buttons, use divs ui-sref in our app , doesn't work on ipads , iphones. here settings nightwatch-conf.js ios" : { "selenium_start_process": false, "selenium_port" : 4723, "selenium_host" : "127.0.0.1", "silent": true, "desiredcapabilities" : { // "browsername" : "safari", "platformname&quo

javascript - Import local (on disk) KML file with Googlemaps js in web app -

i developing web application google maps js. googlemaps api allows import kml files server. var kmllayer = new google.maps.kmllayer({ url: url_kml_finale, map: map }); google.maps.event.addlistener(kmllayer, 'status_changed', function() {...}... i import kml file hard drive. possible? did not find function in api parse kml file. thanks in advance. this not possible. google.maps.kmllayer elements rendered server-side on google's infrastructure need accessible internet. one workaround - try load kml regular xml file , locally parse , draw markers, polylines, , polygons yourself. depending on complexity of kml file, bit of work. if can convert data geojson (maybe using togeojson ) use google.maps.data add map.

c# - Drawing a point over an ImageView in Android (using Xamarin) -

i building android app using xamarin , need able place points on map. said map image displayed using imageview (adding xml directly). tried making bitmap , canvas , displays black square red point (as wanted), actual map disappears. code: [activity(label = "map")] public class map : activity { protected override void oncreate(bundle savedinstancestate) { base.oncreate(savedinstancestate); setcontentview(resource.layout.map); imageview map = findviewbyid<imageview>(resource.id.imageview1); bitmap bitmap = bitmap.createbitmap(500, 500, bitmap.config.rgb565); paint paint = new paint(); paint.setargb(255, 255, 0, 0); canvas canvas = new canvas(bitmap); //draw image bitmap canvas canvas.drawbitmap(bitmap, 5, 5, paint); //draw want canvas canvas.drawcircle(50, 50, 10, paint); //attach canvas imageview map.setimagedrawable((new bitmapdrawable(bitmap)));

javascript - How to get the previous text node that is displayed before a given one? -

i´m trying implement own caret , when it´s @ start of text , go left should go previous text node in dom. problem not previous sibling find easiely. in @ bottom of tree of sibling of parent. should clarify problem: function getprevioustextelement(node) { var prev = $('.caret').closest(':text'); prev.css('color', 'green'); } #carot{ color:red; } <div> 1 <div> 2 <div>3</div> <div>4</div> <div>5 <div>6</div> <div> 7 <div>8</div> <div>9</div> </div> </div> </div> </div> <div> <span id="carot">|</span>10 </div> so when caret @ "10" , press left should go "9" how element? there js or jquery functions i´m missing? jquery closest(), prevall() or parents() doesn´t seem job. it ca

Jquery confirm() in an attached event handler -

i have delete buttons in list populated ajax call. these buttons suppose trigger confirm dialog, cannot confirm dialog display when called in click event handler. need separate handler? hope can direct me towards solution. $('#list').on('click', '.btnremovenote', function () { $(this).confirm({ msg: 'do want remove this?' }); }); this how list generated function funcloadlist(racodeid) { if (racodeid == null || racodeid == '') { console.log('bypassing list load, racodeid null'); return; } console.log("load list function initiated " + racodeid); $('.table-row').remove(); var url = '<%= url.action("membergetnotelist", "accesscodes") %>'; var downloadurl = '<%= url.action("memberdownloadnotedocument", "accesscodes") %>';

JAVA: How to join a HashTable with itself? -

what elegant way join 2 hashtables? i have hashtable , cannot use array or list or set instead, because messes dealing custom-class. @ least that's think. **hashtable<itemset, integer> frequentitemsetl1 = new hashtable<>();** (map.entry<itemset, integer> entry : candidateitemsetc1.entryset()) { if (entry.getvalue() >= supportthreshold) { frequentitemsetl1.put(entry.getkey(), entry.getvalue()); } which contains: key-value-pairs. key = number of itemset value = number of occurrences of itemset in data looks this: {1}, 3 {2}, 23 {3}, 7 {4}, 18 ..... i need keys of frequentitemsetl1 join themselves; result should be: {1, 2} {1, 3} {1, 4} {2, 3} {2, 4} {3, 4} i experimented 2 for-loops , keysets did not far. need fresh ideas. tried this: for (int = 0; < frequentitemsetl1.size(); i++) { integer item1 = frequentitemsetl1.get(i); (int j = + 1; j < frequentitemsetl1.size

c# - Generics T based parser for different properties within a string -

i have feed coming has different properties serialized comma separated values feed = "[{"high", "[235.76, 235.96, 235.97]"}, {"low", "[235.76, 235.96, 235.97'"}, {"date", "[20170410-10:21:34, 20170410-10:31:34, 20170410-10:43:34, 20170410-10:59:34]" } ..... ]" i have business need create entity out of containing different properties each of high /low /date etc. "high" , low of double whereas date of datetime type. splitting string following each tag , parsing each value corresponding property. however since property's datatype differ, require parse function each type. private void getfeeddata(string[] data, list<int> field) { (int = 0; < data.length; i++) { **int fieldvalue = int.parse(data[i]);** field.add(fieldvalue); } } i have ended different functions, 1 specific each datatype, differing

html - Clear button that clears checkboxes using CSS -

does know how create clear button clears checkboxes using css , html? reason being because clear function not work ie8, therefore css , html way go. thank you can achieve with: <button type="reset">reset</button> see live example: <form> <input type="checkbox" name="check" value="yes" /> option 1<br /> <button type="reset">reset</button> </form>

mysql - SQL Code - Cannot add or update a child row -

i have created database , added tables no bother, trying add data tables keep getting error: error 1452: (23000): cannot add or update child row: foreign key constraint fails ( music , track , constraint track_ibfk_1 foreign key ( genre_id ) references genre ( genre_id )) tables: create table genre ( genre_id int not null auto_increment, genre_name varchar(10), primary key (genre_id) ); create table artist ( artist_id int not null auto_increment, artist_name varchar(20), primary key (artist_id) ); create table track ( track_id int not null auto_increment, artist_id int not null, genre_id int not null, track_name varchar(50), primary key (track_id), foreign key (genre_id) references genre (genre_id), foreign key (artist_id) references artist (artist_id) ); create table location ( location_id int not null auto_increment, location_name varchar(25), primary key (location_id) ); create table user ( user_id int not null auto_increment, genre_id int not null, location_id i

python - selenium find_element_by_xpath returns NoSuchElementException -

i'm working selenium im having problems find_element_by_xpath method. having tag https://citizenportal.rld.state.nm.us/default.aspx website: <a title="permits" href="javascript:void(0);" module="permits">permits</a> im trying create click event click on permits tag doing: from selenium import webdriver selenium.webdriver.common.keys import keys selenium.webdriver.common.by import driver = webdriver.chrome() driver.get('https://citizenportal.rld.state.nm.us/default.aspx') driver.find_element_by_xpath('//a[@title="permits"]').click() however im getting error , cant figure out --------------------------------------------------------------------------- nosuchelementexception traceback (most recent call last) <ipython-input-25-ecbedf623e4f> in <module>() 6 driver.get('https://citizenportal.rld.state.nm.us/default.aspx') 7 ----> 8 driver.find_elemen

powershell - Moving resources between azure subscriptions -

i set area in azure contains cloud service, storage accounts, , webapp. need move separate subscription. i know how question is, there order need follow when moving resources? when go directly cloud service , click move new subscription tells me can't because it's classic service. i'm guessing it's because have classic storage account under service along rm storage account need move first?

html - Maximum size of canvas element -

i tried search didn't found suitable answer. want create canvas users can draw on it. read before there no option set canvas size in percent. need give fixed value in px , question is: which width size suite resulution without scrolling horzintally ? depends on users going use canvas , going used for. recommend following: @media (min-width: 300px) { .mycanvas{ width:300px; height:533px; } } /*large phone size*/ @media (min-width: 600px) { .mycanvas{ width:600px; height: 1066px; } } /*tablet , standard size*/ @media (min-width: 1920px) { .mycanvas{ width:1920px; height:1080px; } } unfortunately, above code won't work (which bummer) width , height need defined in html tag, can still use these sizes scaling purposes depending on you're designing canvas for.

reactjs - How do you debug react-native when it is running on device? -

how debug react-native when running on device ? you have 2 options: debug remotely ios: cmd + ctrl + z open menu , select "debug remotely" android: cmd + m open menu , select "debug remotely" or run 1 of these commands: react-native log-ios react-native log-android

Can you normalize data with embedded sections in excel? -

i provided data in excel i'm trying transform make filterable. data in specific order , looks this: group id rowtype name 1 section name1 1 row aaa 1 row bbb 1 row ccc 1 section name2 1 row ddd 1 row eee 2 section ... i want take name of row type "section" , transform constant in it's own column. final product like: group id section rowtype name 1 name1 row aaa 1 name1 row bbb 1 name1 row ccc 1 name2 row ddd 1 name2 row eee 2 ... i feel has done haven't been able put right terms search... appreciated.

css - Chrome not showing space after comma in webfont -

Image
i building new website organization part of. use custom webfont (waukegan ldo, see comments link) on our website. font renders correctly in firefox, chrome has issue spaces after comma not shown (except &nbsp; ). chrome example: firefox example: i have tried fix mentioned here no avail. problem font or issue chrome? update: after further investigation, have found chrome using .woff version of font render on site. uploaded waukeganldo.woff http://webfont-test.com , seems render on site. think may issue css on site. however, @ first glance seems "calculated" properties show both sites in devtools identical. solved: text-rendering: optimizelegibility 1 of css properties enabled site. un-setting resulted in desired behavior.

python - How to pass coordinates as arguments to a function? -

the following code , when executed get: typeerror: __init__() missing 1 required positional argument: 'y' this code: def drawuppercaset(win, location1): lettert = text(point(location1), "t") lettert.setsize(30) lettert.draw(win) def main(): #1. create graphics window win = graphwin("my initials", 600, 600) win.setcoords(0,0,100,100) location1 = (15,50) drawuppercaset(win, location1) #capture mouse close win.getmouse() win.close() main() when put code function in main method works. when try implement separately , pass location1 argument drawuppercaset , error. seems maybe y coordinate getting lost or something. can please explain need working? from can see ducking, point constructor doesn't take tuple. instead requires separate x , y parameters: point(x, y) you can either replace location parameter 2 individual parameters; so: def drawuppercaset (win, x, y): or extract tuple me

html - Pass the name and value to JavaScript onClick function? -

i have function should disable group of check boxes if not checked. function designed work onclick() , passing 1 argument onclick(this) check box element. need function triggered on page load , need pass value database. tricky part have more 1 group of check boxes. here example of html layout: <tr> <td> <input type="checkbox" name="o_outcomeck" id="o_firstoutcome" value="1" tabindex="1" <cfif trim(mydata.o_outcomeck) eq 1>checked</cfif> onclick="ckchange('o_outcomeck', 1)">first outcome </td> <td> <input type="checkbox" name="o_outcomeck" id="o_secondoutcome" value="2" tabindex="1" <cfif trim(mydata.o_outcomeck) eq 2>checked</cfif> onclick="ckchange('o_outcomeck', 2)">second outcome </td> </tr> <tr> <td> <input type=&quo

database - Creating an entity relationship diagram -

Image
i've created erd: but want add more information diagram, not how should that. i want modify previous erd, need register recipe made chef in each program. also, want identify ingredient , tool used in each step of recipe. i think implementing entity relationship diagram microsoft access can start. you've defined relations between each entity , have declared attributes each entity. first make each entity table in ms access add fields , set relationships , see how work together. make sure relationships working before start filling database records.

javascript - How to pass or create initial value in the fields of FieldArray? -

i want fields have 1 initial value 1 component render. having problem how pass initial value fields array. tried make condition - if fields empty add 1 answer it. believe because of getting warning http://i.imgur.com/fjecjd4.png . idea how fix ? found this, not sure if relevant me or how use https://github.com/erikras/redux-form/issues/2366 . import react 'react'; import { field, fieldarray } 'redux-form'; import answer './answer'; const answerstab = props => { const renderanswers = ({ fields, meta: { error } }) => { const addanswer = () => { fields.push(); }; const removeanswer = () => { if (fields.length === 1) { return; } fields.pop(); }; if (fields.length === 0) { addanswer(); } return ( <div> {fields.map((answer, index) => ( <field key={`answers[${props.number}].${props.type}[${index}]`} id={`sf-input-tab

javascript - Grunt, how to minify different folders (to include node_modules folder) -

i using npm in wp project. i have grunt task compiles separate scss files css files , minifies them 1 default.min.css file when running grunt (that's good.) my main issue include different npm packages such fontawesome, bootstrap etc. minified 1 minified min.css file, own files. i know how own *.js files uglify'd different packages i'm using (jquery-ui, owl-carousel, etc.) please find below gruntfile.js , first gruntfile.js feel free include constructive remarks. thanks, bud gruntfile.js module.exports = function (grunt) { grunt.initconfig({ sass: { dist: { files: [{ expand: true, cwd: 'resource/scss/', src: ['*.scss'], dest: 'resource/builds/css/', ext: '.css' }] } }, watch: { css: { files: '**/*.scss',

docusignapi - Documents restrictions within a package -

i have looked through docusign documentation, stackoverflow , google without success. when creating package, possible restrict signers able view pages of document ? let's borrower lisa smith should not allowed see pages 5 10 while second borrower can allowed see pages 1 5, possible within rest api ? thanks you can use docusign document visibility feature. if send document containing multiple files , want control files each recipient sees, can use document visibility accomplish this. common scenario want recipients see files need sign. document visibility, can create 1 document files intended individual recipients, rather having create separate document each recipient. using document visibility can set access @ document level. setting access @ page level not supported. see answer on how set documentvisibility using rest api. for more context, excludeddocuments property on page .

Start and terminate subprocess from python function -

how write function can start , kill subrocess in python?? this code far: import subprocess import signal import time def myfunction(action): if action == 'start': print 'start subrocess' process = subprocess.popen("ping google.com", shell=true) if action == 'stop': print 'stop subrocess' process.send_signal(signal.sigint) myfunction('start') time.sleep(10) myfunction('stop') when run code error: traceback (most recent call last): file "test.py", line 15, in <module> myfunction('stop') file "test.py", line 11, in myfunction process.send_signal(signal.sigint) unboundlocalerror: local variable 'process' referenced before assignment you need learn oop , define myclass constructor , destructor. assuming not need run many copies of process, , make more exotic can use class methods class myclass(object): @classmeth

data structures - Something is not working right with my java program -

i have developed average waiting time program has user enter processes, arrival time, etc. tells how long take looks has error , not sure how fix it. can me. error line of code is: scanner sc = new scanner(system.in); the error reads exception in thread "main" java.lang.error: unresolved compilation problem: duplicate local variable sc here code package project3; import java.util.random; import java.util.scanner; public class averagawaitingtime { static int min(int b[], int a[], int tbt, int r, int n,int large[]) { int j = 0; int min = tbt; int l=0;//finding larger number of process in queue (int = n - 1; >= 0; i--) { if (b[i] < min && b[i] > 0 && r >= a[i]) { min = b[i]; l++; j = i; } } if(large[0]<l) large[0]=l;

sql - Does VS 2015 rename the database after it gets accessed from VS? -

i created database in ssms 2012 , path set app_data folder in vs. after connect in vs , go database has been renamed , in caps.these localdb files. for example. name aaaa. after access database in vs , in ssms named c:\folder\folder\app_data\aaaa.mdf . i using vs 2015.

javascript - Get image url by class name NodeJS regex -

i'd know how upload image twitter url - let's found cool image url want upload directly twitter. should convert base64? saw in examples of twitter npm can load 1 own computer yet didn't see happen url. this i've tried: var data = require('fs').readfilesync('https://yt3.ggpht.com/-o-tcmgg50sw/aaaaaaaaaai/aaaaaaaaaaa/pgci_nql2jm/s88-c-k-no-mo-rj-c0xffffff/photo.jpg'); client.post('media/upload', {media: data}, function(error, media, response)

How do I imitate the behaviour of a pressed button in Android? -

i'm trying make custom button, behaves 'pressed button' in android own background images. pressing changes button's image (color darker), can't seem focussed / focussed&pressed states right. when release finger on default button there circle filling whole button won't happen mine. that's code: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/fertig_focussed" /> <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/fertig_focussed_pressed" /> <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/fertig_pressed"/> <item android:drawable=&quo

Polymer app-drawer, drawer-toggle not working -

i'm trying app-drawer working, closes automatically whenever select 1 of paper-items paper-menu. aka select different page, close drawer. i've tried: drawer-toggle (which seems working inside app-toolbar, close(), open() pages i've checked information: - https://www.polymer-project.org/1.0/toolbox/app-layout cheers! edit: found page, though can't work paper-item - http://jsbin.com/kutacafuve/1/edit?html,output <app-drawer-layout fullbleed force-narrow> <app-drawer> <app-toolbar> <paper-icon-button icon="menu" drawer-toggle></paper-icon-button> </app-toolbar> <div class="horizontal-section"> <paper-menu attr-for-selected="naam" selected="{{_routedata.subpagina}}" > <!-- <paper-menu attr-for-selected="naam" selected="{{_routedata.subpagina}}"> --> <paper-item naam="ho

eclipse - Linking port audio library to C project -

i'm trying use portaudio library start build audio programs in c. install have on ubuntu 16 , i've followed steps installing on linux. far i'm aware i've installed correctly using on here (including alsa). i've managed libportaudio.a , portaudio.h file copied workspace file i'm using on eclipse. i'm using simple c program test have access library when have both files in workspace file references "undefined". are there other ways need link libraries project? apologies if simple task, relatively new matter. for reference here program i'm testing with: #include <stdio.h> #include <stdlib.h> #include "portaudio.h" int main(void){ paerror err; err = pa_initialize(); printf("success!"); return 0; } thanks in advance!

javascript - AJAX controller not looping through each file and saving in location. Only doing the first file upload -

my below code uploading first file in array path location. can see wrong server side controller: private static string uploaded_folder = "c://temp//"; @requestmapping(value = { "/fileupload" }, method = requestmethod.post) @responsebody public string uploadfile( @requestparam("number") string number, @requestparam("files[]") multipartfile[] files, multiparthttpservletrequest req, httpservletresponse res) { (multipartfile file : files) { try { file directory = new file(uploaded_folder + number); logger.info(directory.tostring()); if (! directory.exists()){ directory.mkdir(); logger.info("directory created"); } byte[] bytes = file.getbytes(); logger.info(bytes.tostring()); path path = paths.get(uploaded_folder + number + "//" + file.getoriginalfilename()); logger.info(p

c - why segmentation fault in string but not char? -

i want print first character of string, string(%s format specifier) , leads segmentation fault. when using %c format specifier works fine. why happening ? #include<stdio.h> #include<string.h> int main() { char *str = "feasible" ; printf("%s",*str); return 0; } is there perfect reason segmentation fault occur ? , segmentation fault in code ? the segmentation fault occurs because string char *, pointer char. when pass *str in printf ("%s\n", *str); you pass char value str points (the first char in string) printf. printf expects pointer first char of string , tries acces given memory location, results in segmentation fault.