Posts

Showing posts from March, 2010

swift - NSTableView's makeViewWithIdentifier finding nil on one of its child views -

Image
i have nstableview 2 columns, 1 non-editable nstextfield , other editable one. each cell has different identifier ("camera" first column, "position" other). i having no trouble first column's cell, however, second 1 ("position") finds nil when trying access editable nstextfield. have tried using 1 identifier. declaring @ beginning of viewfortablecolumn, , several other things, keeps missing nstextfield. ideas might going wrong? my code: func tableview(tableview: nstableview, viewfortablecolumn tablecolumn: nstablecolumn?, row: int) -> nsview? { if tablecolumn?.identifier == "column0" { let cell = tableview.makeviewwithidentifier("camera", owner: nil) as? nstablecellview cell?.textfield?.stringvalue = array(cameraorder.keys)[row] return cell } else { let cell = tableview.makeviewwithidentifier("position", owner: nil) as? nstablecellview cell!.textfield!.stringva...

html - PHP mail() not receiving the email -

this question has answer here: php mail function doesn't complete sending of e-mail 24 answers i'm trying set contact me page , i've got working way point of 'message sent' result showing correctly. e-mail never shows me in box inbox. <?php $name = $_post['name']; $email = $_post['email']; $subject = $_post['subject']; $message = $_post['message']; $antispam = $_post['antispam']; $to = 'myemailaddress@gmail.com'; $from = 'from : ' . $email; $body = "from: $name\n e-mail: $email\n message:\n $message"; if ($antispam == '10' || 'ten' || 'ten') { $human = true; } if($_post['submit'] && $name != "" && $email != "" && $message != "" &...

android - set textsize for multiple textview with different ids -

i trying set textsize multiple textview different ids. also, every textview in own fragment view , slide in view pager. but, problem code working first , second id , rest did not change. also, if remove if (st != null) got null point error. @override public boolean onoptionsitemselected(menuitem item) { switch (item.getitemid()) { case android.r.id.home: navutils.navigateupfromsametask(this); return true; case r.id.small_fond_size: int[] ids = {r.id.text_view_thread0, r.id.text_view_thread1, r.id.text_view_thread2, r.id.text_view_thread3, r.id.text_view_thread4, r.id.text_view_thread5, r.id.text_view_thread6, r.id.text_view_thread7, r.id.text_view_thread8, r.id.text_view_thread9, r.id.text_view_thread10, r.id.text_view_thread11, r.id.text_view_thread12, r.id.text_view_thread13, r.id.text_view_thread14, r.id.text_view_thread15, r.id.text_v...

c - How to use second rank pointer rightly? -

i have 2d array called matrix , add 1 every element. #include <stdio.h> #include <stdlib.h> int **add_one(int **matrix, int m, int n) { int i, j; int **new_mat; new_mat = (int **) malloc(m * n *sizeof(int)); (i = 0; < m; i++) { (j = 0; j < n; j++) { new_mat[i][j] = matrix[i][j] + 1; } } //return 2nd rank pointer return new_mat; } int main() { int matrix[3][2] = {1, 2, 3, 4, 5, 6}; int **new_mat; int i, j; new_mat = add_one(matrix, 3, 2); (i = 0; < 3; i++) { (j = 0; j < 2; j++) { printf("%d ", new_mat[i][j]); } printf("\n"); } free(new_mat); } however, compiler told me [error] cannot convert 'int (*)[2]' 'int**' argument '1' 'int** add_one(int**, int, int)' it works bit differently thought #include <stdio.h> #include <stdlib.h> // can pass have int **ad...

percent encoding - Converting foreign characters in URLs -

is there website converting foreign characters url format? need instant result after submit foreign character request. examples: 台積電 = %cc%a8%b7e%eb%8a シャープ = %a5%b7%a5%e3%a9%60%a5%d7 혼 하이 = %26%2354844%3b+%26%2354616%3b%26%2351060%3b

java - Is there any javascript library to represent json-result of @JsonIdentityInfo? -

i have 2 bi-directional models , use jsonidentityinfo prevention infinite recursion in json result. here viewmodels: @jsonidentityinfo(generator = objectidgenerators.propertygenerator.class, property = "id") public class groupsviewmodel extends baseentityviewmodel<long> { private string title; private set<userviewmodel> users; } @jsonidentityinfo(generator = objectidgenerators.propertygenerator.class, property = "id") public class userviewmodel extends baseentityviewmodel<long> { private string username; private string password; private set<groupsviewmodel> groups; } and part of json result below: [{ "id" : 1, "title" : "admingroup", "users" : [{ "id" : 1, "username" : "admin", "password" : "...", "g...

vb.net - Check if Adobe Reader is installed before using it -

i want able have app check if adobe reader installed. if is, want program use display pdf, if not want use free (limited) reader control display pdf. any suggestions edit: question seems little broad basicly i'm trying following try dim acrodisplay new axacropdflib.axacropdf acrodisplay.left = 50 acrodisplay.top = 50 acrodisplay.width = 200 acrodisplay.height = 500 me.controls.add(acrodisplay) msgbox("acro added") catch ex exception msgbox("acro not installed") ''load alternate pdf viewer (spire.pdf free) end try however when acrobat isn't installed instead of going catch statement shows error "could not load assembly" , exits sub what want if acrobat control isn't installed, wont display , error , instead load alternate pdf viewer is there way check axacropdflib.axacropdf before attempting load? hopefully makes things clearer edit 2: after searching , screwing around found 2 possible ways...

android - Downlad PDF from URL -

i have written code download files url. downloaded doc , jpg files. pdf files not downloaded , shows com.android.volley.clienterror. url contains "શુભમ08_23_2016_06_05_33.pdf". problem because of gujrati characters in url? this code: inputstreamvolleyrequest request = new inputstreamvolleyrequest(request.method.get, murl, new response.listener<byte[]>() { @override public void onresponse(byte[] response) { // todo handle response try { if (response!=null) { pd.dismiss(); fileoutputstream outputstream; features features=new features(context); string name=features.findname(murl);;//<file_name_with_exten...

Fiddler / Load and Save User Preferences / extention -

Image
i have created fiddler extension working great. decided add more functionality, , save user preferences configuration file. works great if run extension own directory. eg.i navigate c:\users\richa\documents\fiddler2\scripts, , run application. however, when fiddler run c:\programs..., , fiddler picks extension user directory, fails. took me awhile find it, fails silently, without info in fiddler logs (and yes turn verbosity) here screen shot of error: i captured attaching debugger fiddler... using system.configuration failing when attempts open/create/write file. specifically section of code: if (_configuration == null) { // current configuration file. _configuration = configurationmanager.openexeconfiguration(configurationuserlevel.none); } // add custom section application // configuration file. if (_configuration.sections[nameof(webhookparametersection)] == null) { _configuration.sections.add(nameof(webhookparametersection), _webhookconfig...

c# - Inline Image and Video -Windows Phone UWP -

i having image source , video source in string below. <div>புதுடெல்லி:</div><br /><br /><div>2014- நாடாளுமன்ற தேர்தல் </div><div><img src="/mmadmin/uploads/8cac42cc-d275-4589-9c91-2d005b2607fe_l_styvpf.gif" width="640" height="305" alt="" /></div><div><br /><div align="center"><object height="360"><embed src="https://www.youtube.com/embed/rprtdfqfwti" height="360px" width="100%" /></object></div></div></div> i need bind string in windows phone uwp controls. tried bind in richtextblock. inline image binding properly, video not binding in richtextblock. i bind image , video using below methods private static inline generateiframe(htmlnode node) { try { span s = new span(); s.inlines.add(new linebreak()); ...

javascript - Getting related data through object_2_object table with Sequelize -

i have pet object, belongs species through speciestopet . i have following definitions sequelize. const pet = sequelize.define(`pet`, { id: { type: sequelize.integer } ... }) const speciestopet = sequelize.define(`speciestopet`, { speciesid: { type: sequelize.integer }, petid: { type: sequelize.integer } }) const species = sequelize.define(`species`, { id: { type: sequelize.integer } }) now, pet.belongstomany(species, { as: 'species', through: speciestopet,foreignkey: 'petid', otherkey: 'speciesid' }) can species pet belongs to, want able pet s in same species . how can define relationship obtain values? you should define species->pet relation: species.belongstomany(pet, { as: 'pets', through: speciestopet});

unity3d - How to use free particles available in the unity store after importing? -

i wanted particle textures particle system. looked in unity store , there free ones, imported them. when go inside textures folder, textures full block images , not single transparent texture. i researched before asking question couldn't find related it. scene bright can't use black background block textures. do need edit them further cropping , removing background? or doing wrong? try 2 ways. (1) can try creating new material. assign material image want use. to create material==> assets -> create -> material give name it, adjust it. "create new material , apply texture clicking blank box next albido, selecting desired texture." from here done! assign particle system. (2) assign texture particle system. in particle import setting try alpha transparent (in inspector) checked/unchecked.

reactjs - How can i create a separate chunk for each component? -

i want plugin can create separate chunk each of components. is there existing plugin in webpack can achieve functionality? there commonschunkplugin chunking in webpack, there no option such division out of box. anyway, why need @ all?

c# - Using Roslyn, how to check if class comes from a local project, not the BCL or Nuget (etc)? -

i want write roslyn code analyser; needs work out if objectcreationexpression creating object local class (either in current project or project in current solution); or if class comes somewhere else, base class library or nuget package etc. how tell class comes in roslyn? you can of semantic model. can symbol constructor, , check type comes via locations or declaringsyntaxreferences , e.g.: // objectcreationexpression node == ...; // semanticmodel model = ...; var symbol = model.getsymbolinfo(node).symbol; // constructor symbol var type = symbol.containingtype; // class symbol var isfromsource = type.declaringsyntaxreferences.length > 0

c# - How to Update campaign in Bing Ads? -

for update campaign using code public async task<list<long?>> updatecampaign(campaign campaign,string status) { try { campaign.status = (campaignstatus)(int)enum.parse(typeof(campaignstatus), status); var request = new updatecampaignsrequest { campaigns = new campaign[] { campaign }, customerid = "xxxxxx", username = "something@outlook.com", password = "something@123", applicationtoken = "myapplicationtoken", customeraccountid = "123456", developertoken = "1234567890" }; campaignservice = new serviceclient<icampaignmanagementservice>(_authorizationdata); campaignservice.refreshoauthtokensautomatically = false; var result = (await campaignservice.callasync((s, r) => s.updatecampaignsasync...

c# - Get all properties marked with [JsonIgnore] attribute -

i have class myclass list of properties. public class myclass { [attribute1] [attribute2] [jsonignore] public int? prop1 { get; set; } [attribute1] [attribute8] public int? prop2 { get; set; } [jsonignore] [attribute2] public int prop3 { get; set; } } i retrieve properties no marked [jsonignore] attribute. jsonignore attribute http://www.newtonsoft.com/json so, in example, have property "prop2". i tried var props = t.getproperties().where( prop => attribute.isdefined(prop, typeof(jsonignore))); or var props = t.getproperties().where( prop => attribute.isdefined(prop, typeof(newtonsoft.json.jsonignoreattribute))); where t type of myclass method return 0 elements. can me, please? thanks typeof(myclass).getproperties() .where(property => property.getcustomattributes(false) .oftype<jsonignor...

c# - Add Buttons and a Textblock With Each Binded Image -

i'm developing uwp app , i'm trying add 2 buttons , textblock each image binded. i'm binding images in xaml this; (updated full code) <gridview name="display" margin="30,100,30,5" foreground="#ffffff" isitemclickenabled="true" itemclick="display_itemclick" itemssource="{binding}"> <gridview.itemtemplate> <datatemplate> <stackpanel orientation="vertical"> <image width="240" height="240" source="{binding path=image}" /> <stackpanel name="buttonpanel" orientation="horizontal" margin="0,-45,10,0" horizontalalignm...

python - Access Jupyter Notebook over Internet -

i have windows 7 computer use host jupyter noteboks use across local network. however, able access these notebooks remotely on internet. is possible? i've tried researching ways haven't managed understand anything. closest i've got guide on how set using aws ( https://gist.github.com/iamatypeofwalrus/5183133 ) key step in set "public dns". however, haven't found how set in windows. thanks, you can use of free/paid vpn solutions make virtual network between , jupyter-notebook host workaround need of public dns. hamachi example. i'm talking case when want access jupyter notebook remotely, not when want share anyone.

javascript - Box that displays random divs -

i trying create kind of box suppose display random divs. example fun facts animals. found code, wrote on own , works way: 1. random div loaded when page loading 2. next random divs loaded everytime user click button: "random fun facts" in code below button "rundom fun facts" works once. how can make work continousely? mean way can click on 100 times , display 100 various divs. , here second question: when using example 100 divs (there many fun facts animals) code below long, there simpler way kind of creating loop? there tons of sliders couldn't find need. appreciated. <div id="box"> <div id="funfact1"> <p> squirrels plant thousands of new trees each year forgetting put acorns. </p> </div><!-- end funfact1 --> <div id="funfact2"> <p>macaques in japan use coins buy vending machine snacks. </p> </div><!-- end funfa...

Oracle APEX: File not loading into apex_application_temp_files -

Image
i have application in apex (oracle application express 5.0.0.00.31) , make file upload on 1 page. have: this simple file browser item , button action: "submit page". file browser according new features of apex 5 should store it's uploaded files (once page submitted) in table apex_application_temp_files , purge them @ end of session, nothing ever there. can explain doing wrong? edit: this have in apex_application_temp_files after upload: as suggested here: issue apex_application_temp_files use debug sanity check. don't try query view sqldeveloper, won't give results require won't work without contexts set (or without session). since sqldev. why @ first looping on files in view helps most, , crossref value file-item. can set select into statement, debug that, , if working go there.

dynamics crm - CRM 2015 - Products tile not showing on Invoice entity -

i working microsoft crm 2015, , if go quote , expand ribbon, can see products tile, on invoice not appear. know if can add it? in command bar (save, new etc.) hit "..." , select form editor. @ top select "navigation" , drag "products" relationship explorer (right side) on menu (left side). save , publish.

php - When refreshing the page,cause session variables to be cleared -

why in reloading page $_session variables re-sets again?! if (isset($_session['last_activity']) && ((time() - $_session['last_activity']) > 1800)) { // last request more 30 minutes ago session_unset(); session_destroy(); } $_session['last_activity'] = time(); if (!isset($_session['created'])) { $_session['created'] = time(); } else if (time() - $_session['created'] > 1800) { // session started more 30 minutes ago session_regenerate_id(true); // change session id current session , invalidate old session id $_session['created'] = time(); // update creation time } is code wrong? in php.ini session.cache_expire = 180 session.use_cookies = 0 session.use_only_cookies = 0 session.auto_start = 0 session.gc_maxlifetime ...

php - How to post at a time on multiple wordpress sites? -

i have 2 websites based on wordpress plateform. www.sciencekidunya.com jahanescience.com i administrating both of websites problem both have different themes, , when have post essay, first post first website , same post second website. tiring process. there anyway post on 1 website , automatically posted on others too? please tell me procedure of doing so. thanks please check out below links: this wordpress plugin can install , want. https://wordpress.org/plugins/multisite-post-duplicator/ this explain in details entire step achieve goal. https://premium.wpmudev.org/blog/how-to-publish-to-multiple-wordpress-sites-from-a-single-install/?utm_expid=3606929-78.zpdulkketq6ntaugxbatgq.0&utm_referrer=https%3a%2f%2fwww.google.com%2f

android studio - webview shouldOverrideUrlLoading multiple url -

i'm trying load 2 different url in webview, seems went wrong or maybe webview not allow override multiple url in single webview?. first url site url, second 1 community facebook page, first 1 opened in webview not other one. codes: @override public boolean shouldoverrideurlloading(webview view, string url) { if (uri.parse(url).gethost().equals("mysite.com")){ return false; } else if (uri.parse(url).gethost().equals("facebook.com")){ return false; } else { intent intent = new intent(intent.action_view, uri.parse(url)); startactivity(intent); return true; } } and first attempt, second is: @override public boolean shouldoverrideurlloading(webview view, string url) { if ((uri.parse(url).gethost().equals("mysite.com"))|| (uri.parse(url).gethost().equals("facebook.com"))){ return false; } else { ...

JSON Error on posting Data using PHP -

following coding have done. after posting data, getting error as: 'message' => string ''from' , 'to' date must given' (length=34). following code: $auth_token=$_request['auth_token']; $ch = curl_init('https://api.datonis.io/api/v3/datonis_query/thing_aggregated_data'); curl_setopt_array($ch, array( curlopt_post => true, curlopt_returntransfer => true, curlopt_httpheader => array( 'x-auth-token:'.$auth_token, 'thing_key:6f2159f998', 'idle_time_required:true', 'from:2016/02/02 17:05:00', 'to:2016/08/29 17:10:00', 'time_zone:asia/calcutta', 'content-type:application/json', ), )); curl_setopt($ch, curlopt_ssl_verifypeer, false); // send request $response = curl_exec($ch); // check errors if($response === false){ die(curl_error($ch)); } // decode response //var_dump($response); $responsedata = json_dec...

Tensorflow: base Python calculation inside an op -

i trying perform datetime-related calculations element-wise on timestamps contained in tensor, using tf.map_fn . requires conversion datetime , tensorflow-compatible type. for example, let's want number of month tensor of timestamps: from datetime import datetime dates = [datetime(2016, 1, 1).timestamp(), datetime(2016, 2, 1).timestamp()] def timestamp_to_month(timestamp): return datetime.fromtimestamp(timestamp).month def month(x, name=none): tf.op_scope([x], name, "month") scope: return tf.map_fn(timestamp_to_month, x, back_prop=false) month(dates) this not work timestamp parameter in timestamp_to_month passed tensor shape [] , not float, , has evaluated. one solution perform timestamp.eval() before using actual value, have current session, additional session parameter, inconvenient. additionally, month op fails during graph-building phase, not event during execution, meaning mapped timestamp_to_month function invoked wh...

php - Url rewriting - 2 rules with same shape -

i've done url rewriting project. have problem. in project have 3 differents level of categories. possible go category1 category 3 , category 1 category 2 , next category 3. rewriterule ^([a-za-z0-9_-]+)/([a-za-z0-9_-]+)/?$ categorie3.php?cat=$1&cat2=$2 [qsa,nc] rewriterule ^([a-za-z0-9_-]+)/([a-za-z0-9_-]+)/?$ categorie4.php?cat=$1&cat3=$2 [nc,qsa] before applying rewriting, know on page redirect user code below <h3 class="portfolio-title font-alt"><a href="categorie3.php?cat=<?= $cat ?>&cat2<?= $value["url"] ?>"><?= $value["titre"] ?></a></h3> <h3 class="portfolio-title font-alt"><a href="categorie4.php?cat<?= $cat ?>cat3=<?= $_get["cat3"] ?>"><?= $value["titre"] ?></a></h3> but after after applying rules i'm not able know on page redirect , default redirect first link : <h3 ...

Variable declaration in startup.m not working in MATLAB -

i'm trying declare magic number constants need access in every script. made file load_constants.m in my_path looks like: magic_number = 10; other_magic_number = 12; my startup.m looks this: % add bunch of packages addpath ~/documents/matlab/some-package userpath(my_path) load_constants but when try access magic_number in command window: undefined function or variable 'magic_number'. directly declaring variables in startup.m doesn't work either. how fix this? this normal behavior, startup.m function , variables declare inside function local function (and vanish when going out of scope): function [] = startup() %[ magic_number = 10; %% local variable %] use assignin function have magic_number visible base workspace: function [] = startup() %[ assignin('base', 'magic_number', 10); % value visible 'base' workspace %] note having magic_number value visible not scripts functions also, may better cre...

java - How to generate token without client_secret in Spring Security OAuth2 -

this question has answer here: is possible access_token spring oauth2 server without client secret? 1 answer i have spring security oauth 2.0 based application, configured jdbc , ldap. per oauth 2.0 specification, client secret must. when generate token using following url generates token , works fine: /oauth/token?grant_type=password&client_secret=test&client_id=test&username=test&password=test and when try generate token without client_secret gives: 401: unauthorized error_description: "bad user credentials" but want generate token without client_secret like: /oauth/token?grant_type=password&username=test&password=test securityconfig.java : @configuration @enablewebsecurity @enableglobalmethodsecurity( prepostenabled = true ) public class applicationsecurityconfig extends websecurityconfigureradap...

php - error with a foreign key constraint fails -

i'm creating form insert data logement table , lit table , table espace. i'm trying insert data in tables connected in image enter image description here but i'm getting error : warning: mysql_insert_id() expects parameter 1 resource, object given in f:\-- software\web-server\esyphp\ep0002\data\localweb\school\buckup\bu-projet\0008\ajoutez.php on line 88 error: not able execute insert logement(titre, adresselogement, prix, nombreperson, idtypelogement) values ('hgfrte','125669 hgfer','1236','33',''). cannot add or update child row: foreign key constraint fails (`yandexd`.`logement`, constraint `fk_logement_idtypelogement` foreign key (`idtypelogement`) references `typedelogement` (`idtypelogement`)) error: not able execute insert lit(idlit, typedelit) values ('','kanape, canape'). cannot add or update child row: foreign key constraint fails (`yandexd`.`lit`, constraint `fk_lit_idlogement` foreign key (`idlogem...

arduino - Emulating non-US USB keyboard -

i want use digispark usb keyboard, log data , messages open , active text window (e.g. notepad) there's sample demo , libary digistump, works in general, assumes keyboard. my pc runs german keyboard. no problem switch y , z , produce other special characters on differnt keyboard locations. no problem produce characters { }, require alt-gr key combinations german keyboard. however, there's key between left shift key , y ( z ) key, produces < > | . key not exist on keyboard, cannot find out usb code should use key. question: usb code bottom left key? from hid usage tables 1.12 : usage id (dec) (hex) usage name 100 64 keyboard non-us \ , | (notes 3;6) 3 typical language mappings: belg:<> frca:«°» dan:<> dutch:]|[ fren:<> ger:<|> ital:<> latam:<> nor:<> span:<> swed:<|> swiss:<> uk:\| brazil: \|. 6 typically near left-shift key in at-102 implementations. ...

parameter passing - How to pass by reference in Ruby? -

currently i'm developing watcher class in ruby, which, among other things, able find period duration of toggling signal. in general rather simple, problem i'm facing apparently ruby passes parameters value. while researching online found many different discussions "pass value" , "pass reference" is, no actual "how to". coming c/c++ background, me essential part of programming/scripting language. the relevant parts of class wrote shown below. method watcher::watchtoggling() 1 i'm having trouble with. parameter, avariable should reference value i'm measuring period duration for. class watcher @done @timeperiod def reset() @done = false; @timeperiod = nil; end def watchtoggling(avariable, atimeout=nil) oldstate = avariable; oldtime = 0; newtime = 0; timeout(atimeout)do while(!@done) newstate = avariable; if(newstate != oldstate) if(newstate == 1) # risin...

java - How to compare two Lists of objetcs for difference in objects fields? -

collegues, have 2 lists of different objects. list<sharesentity> mainsystemsecurities; list<secureentity> supportsystemsecurities; objects sharesentity , secureentity have 1 same fiels isin. in case isins same in object of theese collections, in cases there different isins in supportsystemsecurities , mainsystemsecurities collection's objects. i need understand objects (better tell isins) supportsystemsecurities list absence in mainsystemsecurities . how it? better way compare 2 collection (to compare filedls of collection's objects)? build map<isintype, sharesentity> first list: map<isintype, sharesentity> sharesentitymap = mainsystemsecurities.stream().collect( collectors.tomap(sharesentity::getisin, functions.identity())); then can iterate other list, looking entities first list in map: for (secureentity secureentity : supportsystemsecurities) { sharesentity correspondingshares...

php - Filesystem mkdir Failed to create "/client/" symfony -

bonjour, i using mkdir function of filesystem bundle. need create folder each client add 777 permission symfony folders chmod -r 777 /symfony/path/ but thrown exception "/client/" , "/client" have missed something? my controller easy private function addfolder () { $fs = new filesystem(); $fs->mkdir('/client/'); return; } it's running on macosx thanks support this because trying create client directory in root folder - should not using / @ beginning of path since means path specification starts @ root . just replace /client/ client/ , should

javascript - ReactJS ajax response errors rendering in component -

i want render json response errors after ajax call in 'formerror' component. my error component looks this: var formerror = react.createclass({ render: function () { return ( <span classname="form-error"></span> ); } }); my form: var emailform = react.createclass({ getinitialstate: function(){ return { password:'', email: '' }; }, componentdidmount: function() { this.serverrequest = $.get('/accounts/email-form/', function (result) { var userinfo = result; this.setstate({ email: userinfo.email }); }.bind(this)); }, submit: function (e){ var self; e.preventdefault() self = this; console.log(this.state); var data = { password: this.state.password, email: this.state.email, csrf: csrftoken }; // submit form via ...

angular - Type Error.stackTraceLimit 'number' is not assignable to type '(limit: number) => void' -

in typescript, in project angular 2 started https://github.com/preboot/angular2-webpack , following ts parsing error: // polyfill.ts (line 13) error.stacktracelimit = infinity [ts] type 'number' not assignable type '(limit: number) => void'. const error: errorconstructor doesn't make sense me, since error.stacktracelimit expects number. i've tried function typescript says well, crashes browser. any ideas? edit 1 after merging latest master, works. but , need use typescript 2.0.0 whatever reason, error: error ts2430: interface 'nodebuffer' incorrectly extends interface 'uint8array'. to solve it, run typings install env~node -sg mentioned in https://github.com/typings/typings/issues/554 , update node typings. and i'm error error.stacktracelimit 'number' not assignable type '(limit: number) => void' seems missing on typings. ideas this? i suggest updating project. if using an...

Display a message when a record in my table is not found. MS Access -

i have simple access database put work , idea behind part number entered text box , button click initiates search. if finds record, opens report displays jpg image tied it. if search started box blank prompts user "please enter part number" when record not found type error , have tried has failed. see have no records found message on err_command0_click wrong. new access, please advise. here code: private sub command0_click() on error goto err_command0_click if me.text1.value = "" or isnull(me.text1.value) msgbox "please enter item number." exit sub end if docmd.openreport "imagereport", acviewpreview, , "[itemnumber] =" & "'" & me.[text1].value & "'" exit_command0_click: exit sub err_command0_click: msgbox "no quality incidents found" resume exit_command0_click end sub that doesn't sound it's proper record not found error ...

eliminate selected column of elements from a list of lists -

i have list of lists each individual list has 3 elements. this: [[928.7, 554.29999958311, 0], [928.7, 558.15990063549, 0], [914.1, 558.15990063549, 0], [914.1, 554.29999958311, 0]] how can delete elements particular column? example if input "1" delete first column, if input "2" delete second 1 , on. i assume question regards pyhton... i try following (using numpy): import numpy np initial_list = [[928.7, 554.29999958311, 0], [928.7, 558.15990063549, 0], [914.1, 558.15990063549, 0], [914.1, 554.29999958311, 0]] # transform list in numpy array = np.array(initial_list) # remove column want , put output in new variable a1 = np.delete(a, 0, 1) # remove first column(0) #+the second "1" in arguments tells #+numpy delete column instead of #+ row. # convert plain l...

Exposing web service in mule -

i want expose web service. have wsdl file me. using cxf proxy service operation. now, have doubt in inbound attributes value of port,namespace & service should take wsdl file only,right? if yes, then, after deploying through, http://localhost:8081?wsdl link not getting same wsdl want expose. so, tell me going wrong?thanks. to test project, url should use in soapui, appropriate request xml generate... here flow, <flow name="meterreadingdocumenterpresultbulkcreateconfirmation_outflow"> <http:listener config-ref="http_listener_configuration" path="/" doc:name="http"/> <cxf:proxy-service configuration-ref="cxf_configuration" port="meterreadingdocumenterpresultbulkcreateconfirmation_outport" namespace="http://sap.com/xi/is-u/global2" service="meterreadingdocumenterpresultbulkcreateconfirmation_outservice" payload="body" doc:name="cxf" validatione...

ruby on rails - f.select not preselecting value while editing -

i have field state_id using select dropdown: = form.select :state_id, options_for_select(states), {}, prompt: 'select state' but while editing form doesn't preselect current value of state_id . know can pass :selected param pass default selected value: options_for_select(states, @object.state_id) but guide suggest don't need use options. can tell me doing wrong? note: it's nested attribute , other fields working fine f.text_field not f.select . you can try out. = select_tag "state_id", options_from_collection_for_select(states, "id", "name",@object.state_id), prompt: "select state", placeholder: "select state" hope it'll job you.

scikit learn - Using python libraries outside of python distribution -

i have installed python 2.7 through anaconda distribution. use of included libraries outside of anaconda. using sklearn works fine anaconda prompt. however, when running import sklearn from .py script in rhino, following error: message: no module named _check_build ___________________________________________________________________________ contents of c:\users\tsawen\appdata\local\continuum\anaconda2\lib\site-packages\sklearn\__check_build: setup.py setup.pyc _check_build.pyd __init__.py __init__.pyc ___________________________________________________________________________ seems scikit-learn has not been built correctly. if have installed scikit-learn source, please not forget build package before using it: run `python setup.py install` or `make` in source directory. if have used installer, please check suited python version, operating system , platform. traceback: line 31, in raise_build_error, "c:\users\tsawen\appda...

html - How do you move an attribute in the first child of a parent to the parent in XSLT? -

i'm beginner xslt, i'm trying convert flash text format html based format there <li></li> blocks in source xml , <li> blocks contains 1 or many <font> nodes. need apply styles of <font> in inline css <li> , remove <font> node (first font child). ( example explanation - start ) from: <li> <font face="lato" size="24" color="#f7941d" letterspacing="0" kerning="0"> <i>ertrr</i> <font size="12" color="#4b4b4b">sdfsd</font> </font> </li> to: <li style="font-family:lato; font-size:24px; color:#f7941d;"> <i>ertrr</i> <span style="font-size:12px; color:#4b4b4b;">sdfsd</span> </li> ( example explanation - end ) xml source <root> <textformat leading="2"> <li> <font fac...