Posts

Showing posts from February, 2011

c - flmoon function in numerical recipies -

i have problem understanding implementation of following function in c: #include <math.h> #define rad (3.14159265/180.0) #include "fulmoon.h" void flmoon(int n, int nph, long *jd, float *frac) { /*this programs begin introductory comment summarizing purpose , explaining calling sequence. routine calculates phases of moon. given integer n , code nph phase desired (nph = 0 new moon, 1 first quarter, 2 full, 3 last quarter), routine returns julian day number jd, , fractional part of day frac added it, of nth such phase since january, 1900. greenwich mean time assumed.*/ int i; float am,as,c,t,t2,xtra; c=n+nph/4.0; t=c/1236.85; t2=t*t; printf("jdhdhdhd"); as=359.2242+29.105356*c; am=306.0253+385.816918*c+0.010730*t2; *jd=2415020+28l*n+7l*nph; xtra=0.75933+1.53058868*c+((1.178e-4)-(1.55e-7)*t)*t2; if (nph == 0 || nph == 2){ xtra += (0.1734-3.93e-4*t)*sin(rad*as)-0.4068*sin(rad*am); } else (nph == 1 || nph == 3){ xtra += (0.1721-4.0e-4*t)*sin(ra

c++ - How to OCR multiple column in a document using tesseract -

i working on project of ocr sinhala language using tesseract. goal ocr, multiple column including text in document. , out put file in correct format. there method identify column in document using tesseract? you can try below solution identify columns when scanning picture. tessbaseapi baseapi = new tessbaseapi(); baseapi.setdebug(true); baseapi.init(data_path, lang); //data_path - image stored , lang - en(english) baseapi.setpagesegmode(tessbaseapi.pagesegmode.psm_single_column);//this line segment captured image - hope looking line baseapi.setimage(bitmap); //recognized text after capturing image process it. string recognizedtext = baseapi.getutf8text(); if not expecting solution please try pagesegmode, hope may resolve issue.

java - How can I ensure Spring constructs a bean once -

i have complex enterprise environment multiple projects depending on each other. configuration handled spring , includes crazy number imports , not. looks default spring ok constructing bean same name more once. particularly, in case of multiple spring contexts. each context own instance of same singleton bean. singleton not singleton in spring architects' minds... unfortunately, in case there's bean can never created more once. is there way enforce spring checking upon bean whether it's been created , not try call constructor again? particularly, bean creates ehcache's cachemanager inside , fails because cachemanager same name can't created twice. <bean id="cacheservice" class="somepackage.cacheserviceimpl"> <constructor-arg index="0" value="/somepackage/ehcache.xml" /> </bean> i don't have control on cacheserviceimpl code. can change configuration around it. diff

google apps script - URL fetch sometimes leads to "Uncaught ScriptError" resp. 404 -

my goal write add-on, converts spreadsheet file xlsx-file , sends given mail distribution list on daily, weekly or monthly basis. everything works fine, except url fetch. please find function below: function startwizard () { var addresses = spreadsheetapp.getactive().getsheetbyname("einstellungen").getrange("a1").getvalues(); var filename = spreadsheetapp.getactivespreadsheet().getname(); var ssid = spreadsheetapp.getactivespreadsheet().getid(); var url = "https://spreadsheets.google.com/feeds/download/spreadsheets/export?key=" + ssid + "&exportformat=xlsx"; var token = scriptapp.getoauthtoken(); var response = urlfetchapp.fetch(url, {headers: {'authorization': 'bearer '+ token}}); logger.log(url); var contents = response.getcontent(); mailapp.sendemail(addresses,"subject" ,"body", {attachments:[{filename:filename+".xlsx", content:contents, mimetype:"application//xlsx"}]}); }

android-imageView dosent show the image on galaxy while it works on other devices -

i don't know why happening. first press "camera" button camera app starts working take picture , save it. should see picture on screen shows picture upside down disappears. work on other devices. public class cameraactivity extends activity { private button btncamera; private imageview ivcapture; private static final int activity_start_camera_app = 0; private string mimagefilelocation = ""; protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_camera); btncamera = (button)findviewbyid(r.id.btncamera); ivcapture = (imageview)findviewbyid(r.id.ivcapture); btncamera.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { takephoto(v); } }); } public void takephoto(view view){ intent callcameraapplicationintent = new intent(); callcameraapplicationintent.setaction(mediastore.action_image_

jvm - How can i figure out instruction pointer address in the certain part of my java code? -

i'm trying memory trace generated java code(jvm) using pin tool(pinatrace). every result of microbenchmarks try figure out traces shows same graphs, , utilizing processbuilder inside java code gives no remarkable results @ least in comparing among different microbenchmarks. realized should extract substantive part(excluding useless part analysis, initializing, accessing jvm in middle of main code....) of code figure out going wrong. because instruction pointer sent pinatrace @ moment detects memory access, thought getting instruction pointer of substantive part , set parameter information work. finding way(or tool) job driving me crazy, since java not familiar field me.... i've tried ida pro, says input file format wrong, when input .class file. , setting .java file input shows me binary code seems text file converted binary things , nothing. tried install idajava addon not work....... there easy method ip instead? want know ip java code.. thank you!

java - Converting total amount of days in the year so far, to a day in a month -

i'm converting timestamp payload 1430848842000 , simpledateformat(yyy-mm-dd hh:mm:ss) . output is: 2015-05-125 14:00:42 as can see, days part of conversion odd. instead of giving me date in month of may year, instead gave me total amount of days in year leading timestamp creation. i did quick math , determined 125 time stamp, should mean 5th of may, how can convert automatically output looks like: 2015-05-5 14:00:42 ? your simpledateformat should yyyy-mm-dd hh:mm:ss instead of yyyy-mm-dd hh:mm:ss . " dd " " dd " instead.

javascript - Dynamic drop down using PHP JQuery and JSON -

i trying create dynamic drop down menu using data parsed json file , stored in array in php. trying use jquery data not know going wrong. <?php require './index.php'; ?> <!doctype html><head><meta charset='utf-8'> <title>dropdown</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> $(function() { alert('<?php echo$city_list; ?>'); $("#json-one").change(function() { var $dropdown = $(this); $.getjson("demo2.php", function(data) { var key = $dropdown.val(); var vals = []; switch(key) { case '<?php echo $city_list;?>': vals = data.split(","); break;} var $jsontwo = $(&

c# - .NET Serial Port BeginRead blocking over remote desktop session -

i troubleshooting issue application monitors com port in application hangs when try close it. on own machine closes fine. testing app on terminal server, , have com ports shared via remote desktop. on remote desktop session app hanging infinitely , cannot closed via task manager "end process" either. the basic code structure monitoring in vb.net , using system.io.ports.serialport. uses serialport.basestream.beginread , serialport.basestream.endread methods grab information off of port. calls these methods infinitely using action callback until cancellationtoken.iscancellationrequested occurs disrupt process. it turns out when try cancel loop via cancellationtoken.cancel(), beginread method blocking , cancellation not able through. discovered readtimeout setting built-in serialport class not apply basestream.beginread. issue in remote desktop session. remote server's operating system windows server 2008 r2 standard . i've tried other remote servers wi

Facebook SDK iOS use user data -

how user name, user image, user email when login: didcompletewithresult: err: method called in facebook sdk ios version 4.4. want set these values properties. - (void)loginbutton:(fbsdkloginbutton *)loginbutton didcompletewithresult:(fbsdkloginmanagerloginresult *)result error:(nserror *)error { if (error) { } else if (result.iscancelled) { } else { //i want user info here , set values properties. self.username = self.userimage = self.useremail = } } if know other solutions, please tell me it. try this fbsdkloginmanager *login = [[fbsdkloginmanager alloc] init]; [login loginwithreadpermissions:@[@"email",@"user_photos"] handler:^(fbsdkloginmanagerloginresult *result, nserror *error) { if ([result.grantedpermissions containsobject:@"email"]) { [self fetchdata] } }]; and in fetchdata method - (void)fetchdata { [[[fbsdkgraphrequest alloc] initwithgraphpath:@"me" parameters:nil] start

sql - I can't make a crud based search form. Why it is not working? -

my code: models/db.py .... dbmy = dal('mysql://user:user@localhost/test',migrate_enabled=false) dbmy.define_table('firewall', field('disabled','text'), field('src_port_first','integer'), field('src_port_last','integer'), field('port_first','integer'), field('port_last','integer'), field('type','text'), field('src_op','text'), field('src_ipaddr_first','text'), field('src_ipaddr_last','text'), field('src_netmask','text'), field('dst_op','text'), field('dst_ipaddr_first','text&#

Why does Matlab incorrectly return 0 when evaluating an array, but correctly return NaN when evaluating a scalar? -

why expression h(theta) below return 0 , return nan ? h(theta) contains division 0 theta = 0 , should return nan . if ask h(0) , works fine. however, when evaluates 0 contained in multi-element array, returns h = 0 when should return nan . if evaluating element zero, returns nan should. >> theta = [0 1] theta = 0 1 the first element should nan : >> h = tan(theta)/(1+(tan(theta)/tan(2.*theta))) h = 0 5.4220 when evaluating 0 element works correctly: >> h = tan(theta(1))/(1+(tan(theta(1))/tan(2.*theta(1)))) h = nan >> h = tan(theta(2))/(1+(tan(theta(2))/tan(2.*theta(2)))) h = 5.4220 you need element-wise division ./ instead of / desired result. called right array division . >> h = tan(theta)./(1+(tan(theta)./tan(2.*theta))) h = nan 5.4220

javascript - `this` is undefined when calling method from another context -

this first time creating oop js. followed tutorials can't wrap head around issue. know problem, dont know solution function newapp(name){ this.name = name; this.currentpage = 1; this.customobjectwithmethods = //init options , on } newapp.prototype.logic = function(){ // note 1. var app = //note 3. this.customobjectwithmethods.method{ if(app.currentpage < 3) // note 2. app.navigate(app.logic) } } newapp.prototype.navigate = function(sender){ var app = this; this.customobjectwithmethods.method{ app.currentpage++; this.method(function() { return app.currentpage === 2; }, sender(), this.terminate); } } note 1: need create reference because after that, this doesn't work anymore refer current object. note 2: after check want logic in method , repeat current function, when function runs again breaks on method ( this.customobjectwithmethods ) because this

asp.net mvc - Can you give me some examples on using telerik without using kendo? -

i know subjective question , closed desperate times lead desperate measures. tried searching examples of telerik hours not find simple program understand. new mvc , haven't worked on telerik. have create user table using sql server , display user tables in grid. part have done. want create, edit , delete on rows using pop dialog box , should have validations. kind of this example. of have created grid , coding follows: user.cs namespace mvctelerikgrid.models { using system; using system.collections.generic; public partial class user { public int userid { get; set; } public string firstname { get; set; } public string lastname { get; set; } public string address { get; set; } public string city { get; set; } public string email { get; set; } public string phoneno { get; set; } } } homecontroller.cs public class homecontroller : controller { public actionresult index() { list<

python - Django 1.8 - Signals - What's the difference between @receiver decorator and Signal.connect() method? -

they appear same thing. there difference in functionality, usage, etc? in circumstances should 1 used on other? thanks @receiver thin wrapper around signal.connect() . difference @receiver can accept not single signal, list or tuple of signals, , connect function each of signals. if take @ source code , @receiver calls signal.connect(func) , returns original function.

angularjs - ng-pattern always shows error why? -

i have following code. <input name="fname" type="text" ng-init="vprof.fname = '<?php echo $this->general["fname"]; ?>'" class="form-control" placeholder="first name" ng-model="vprof.fname" ng-minlength="3" ng-maxlength="100" ng-pattern="/^[a-za-z]$/"> <p ng-show="generalform.fname.$error.minlength && !generalform.fname.$pristine" class="help-block">your first name should minimum 3 character</p> <p ng-show="generalform.fname.$error.maxlength && !generalform.fname.$pristine" class="help-block">maximum 100 characters allowed</p> <p ng-show="generalform.fname.$error.pattern && !generalform.fname.$pristine" class="help-block">only alphabets allowed</p> if type alphabet character shows error why? your pattern has problem subtle change

c++ cli - A generic error occurred in GDI+ while encoding -

i working ocr project. trying using open source project source code. project written in c++. when run project shows me exception “a generic error occurred in gdi+”.i've tried other stackoverflow solutions nothing works. find exception happen new it. so, don’t have idea exception. exception occurring here: myencoderparameters->param[0] = myencoderparameter; the whole function is bool imageprocessor::save_uc_tif_imagefromsegmentedinformation(vector<vector<bool>> img, int temporaryfilenumber){ try{ bitmap^ nimg = gcnew bitmap(wd, ht, pixelformat::format1bppindexed); lineindicator = 1; //lock bits of original bitmap bitmapdata^ bmdo = nimg->lockbits(rectangle(0, 0, wd, ht), imagelockmode::readwrite, nimg->pixelformat); lineindicator = 2; for(int x=0; x<ht; x++){ for(int y=0; y<wd; y++){ if(img[x][y]){

chef - Knife Google Plugin setup issue -

i trying replicate demo illustrated in using chef google . following error when type in command knife google setup . /opt/chef/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:2104:in `raise_if_conflicts': unable activate googleauth-0.4.1, because multi_json-1.11.2 conflicts multi_json (= 1.11) (gem::conflicterror) kindly me solve issue. gemspec needs more relaxed, setting '=' not best idea. looking blame, fixed month ago: https://github.com/google/google-auth-library-ruby/commit/0e2b722d5b6c9fae190bfbd1244b144061886ac6 author needs cut new gem it, there's issue raised: https://github.com/google/google-auth-library-ruby/issues/41 update: new gem has been released, should fixed now! :)

javascript - How to use ng-enter & leave css animations inside of directive -

just getting started nganimate here please bare me... i have ng-repeat element inside of angular directive animate. now, i've added angular-animate file document & nganimate dependency app... element however, doesn't seem getting ng-* animation classes applied it. thought ng-repeat directive automatically aware of nganimate? missing? placing inside of directive somehow force me use $animate directly? http://plnkr.co/edit/vovutq1bzjop2lbwdk8a?p=preview index.html <!doctype html> <html ng-app="app"> <head> <link data-require="bootstrap-css@*" data-semver="3.3.1" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" /> <script data-require="angular.js@1.4.3" data-semver="1.4.3" src="https://code.angularjs.org/1.4.3/angular.js"></script> <script data-require="angular-animate@1.4.3" dat

android - How to set Custom Cursor Adapter to list when using LoaderManager -

in oncreate: listview definition: listview = (listview) findviewbyid(r.id.listview1); loader manager: getloadermanager().initloader(0, null, new loadermanager.loadercallbacks<cursor>() { @override public loader<cursor> oncreateloader(int id, bundle args) { return new cursorloader(listdetailactivity.this, receiptprovider.uri_receipt, receipt.fields, null, null, null); } @override public void onloadfinished(loader<cursor> loader, cursor c) { system.out.println("cursor: " + c); } @override public void onloaderreset(loader<cursor> arg0) { } }); my custom cursor adapter: private class curadapter extends cursoradapter { public curadapter(context context, cursor c, int flags) { super(context, c, flags); } @override public void bindview(view view, context context, cursor cursor) { textview tv = (te

How to calculate row counts in dataframe of specific cells in R -

Image
i asked similar question before here: how calculate percentage of cells in data frame start sequence in r? i'll copy of on ask new question. i have data looks like: set_1 set_2 set_3 set_4 set_5 set_6 set_7 abc89 abc62 67 abc513 abc512 abc81 abc10 abc6 pop abc11 abc4 giant 13 abc15 abc90 abc16 abc123 abc33 abc22 abc08 9 111 abc15 abc72 abc36 abc57 abc9 abc55 i make histogram of row counts. count cells start "abc". row 1 have 6 cells. row 2 has 4 cells. row 3 has 6 cells, etc. make histogram of this. how can done in r? data in data.frame. you can count number of entries starting "abc" in each row with y <- apply(df, 1, function(x) sum(grepl("^abc", x))) #> y #[1] 6 4 6 6 this result plotted in histogram with hist(y, breaks=c(1:max(y)), main = "frequency of 'abc' entries", c

javascript - Convert HTML to php array -

i have form table inside of it. want pass these values php script. best way so? i've searched has not been applicable. this how have form formatted: <form id="pageform" action="phpscript.php" method="post"> <table> <tbody> <tr> <td><input type="text" class="nestedinput"name="txtname" value="john"></td><td><input type="text" class="nestedinput" name="txtlocation" value="north st"></td><td><input type="text" class="nestedinput" name="txtage" value="42"></td> </tr> <tr> <td><input type="text" class="nestedinput"name="txtname" value="john"></td><td><input type="text" class="nestedinput" name="txtlocation" va

html - How do I prevent video playback when <video> was tapped during scrolling with overflow-scrolling:touch on? -

i use -webkit-overflow-scrolling:touch within overflowing div container. within container have <video> element. on iphone, when scroll down, tap scrolling view in order stop it. no problem, if hit link. browser understands wanted stop scrolling , not open link. the problem here if hit play button of video accidentally, playback starts not intended. how can fix this? demo (open on iphone!): http://www.timo-ernst.net/misc/scrollvideo/ full source code: <!doctype html> <html> <head> <title>scroll video test</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> <style> *{ padding:0; margin:0; } html, body{ height: 100%; width: 100%; } .scrollarea{ height:100%; -webkit-overflow-scrolling: touch; overflow-y:scroll; }

Make an excel table from a PDF product catalog - Orange -

Image
i'm new forum , orange. don't python @ point ready learn. however, before going further in environment know if can answer needs ! what doing "transforming" pdf product catalogues excel files can used software create database software. i have tiles catalogues in pdf 1 : and turn type of xls table : http://imgur.com/btlbkos i need retrieve article number, colour, size (e.g: 20x20). g/b parts completed manually after has been done. all catalogues not same sorted out using pdftotext, regex notepad++ know if data mining solution work out ? orange not support reading pdf files. have use specialized utilities or program yourself.

javascript - How to save html2canvas image to my project images folder? -

i not sure how specify path file save (like ../images/screenshot.png)i tried saving image like html2canvas($my-div, { usecors: true, allowtaint: true, onrendered: function (canvas) { var img = canvas.todataurl("image/png").replace("image/png", "image/octet-stream"); location.href = img; } }); this gets downloaded system downloads.how save folder inside project (want specify path want save file)? you have use library canvas2image download image. user specify image path self (you don't know save it, because there may no such directory 'c:\users{someusername}\downloads' html2canvas($my-div, { onrendered: function(canvas) { return canvas2image.saveaspng(canvas); } });

ios - Apple approval for app with GPPSignIn -

is possible use gppsignin , approved app store? apple doesn't approve apps login processes redirect users outside of app. gppsignin redirects users outside of app during login. it provides single sign-on via google+ app (if installed), chrome ios (if installed), or mobile safari. what gives? google pushing ios api cannot used approved ios app? you should update gidsignin. allows choose whether want sign in via app or via web view. https://developers.google.com/identity/sign-in/ios/

regex - How to generate numbers based on a pattern in python -

i have generate integers based on pattern. example, have generate numbers that contain 4's , 0's , start 1 or more 4's , end 0 or more 0's (upto 30 digit numbers) want code in python (2.7) only. don't want check pattern. want generate numbers in pattern this should work: [int("4"*i + "0"*(n-i)) n in range(0,31) in range(1,n+1)] it generates 465 distinct integers: 4, 40, 44, 400, 440, ..., 444444444444444444444444444440, 444444444444444444444444444444 on edit: recursive approach works in more general case: def multirepeats(chars,n,initial = true): strings = [] if len(chars) == 0 or n == 0: return [""] c = chars[0] rest = chars[1:] base = 1 if initial else 0 in range(base,n+1): head = c * strings.extend([head + tail tail in multirepeats(rest,n-i,false)]) return strings def digitrepeats(digitstring,n): return sorted([int(s) s in multirepeats(digitstring,n)]) for e

HTML JavaScript delay downloading img src until node in DOM -

hi have markup sent me server , set innerhtml of div element purpose of traversing tree, finding image nodes, , changing src values. there way prevent original src value being downloaded? here doing function replaceimagesrcsinmarkup(markup) { var div = document.createelement('div'); div.innerhtml = markup; var images = div.getelementsbytagname('img'); images.foreach(replacesrc); return div.innerhtml; } the problem in browsers do: var img = document.createelement('img'); img.src = 'someurl.com' browser fires off request someurl.com . there way prevent without resorting parsing markup myself? if there in no other way know way of parsing markup little code possible accomplish goal? i know happy solution, think worth sharing safe method future users. you can use domparser object generate external document html string, instead of using div created current document container. domparser avoids pitfalls mentioned in question

android - How do you disable the seekbar in a media controller? -

i disable seekbar keep pause , play buttons in media controller object. don't want users able skip through video, can pause if needed. i've looked @ other questions didn't make sense me. if on great! try this: seekbar.setontouchlistener(new ontouchlistener(){ @override public boolean ontouch(view v, motionevent event) { return true; } });

multithreading - java multithreaded hashed ArrayList<String> -

i want hash on every item arraylist , return on main. example have this: import java.security.messagedigest; import java.security.nosuchalgorithmexception; import java.util.arraylist; public class hash extends thread { private thread t = null; private messagedigest md = null; private stringbuffer sb = null; private string message = null; private arraylist<string> list = null; private int count = 0; public hash(arraylist<string> list) { this.list = list; } public final void mdstart() { for(string item:list){ this.message=item; if(t==null){ t = new thread(this); t.start(); } count++; } system.out.println("end: "+this.count); } @override public final void run() { system.out.println("run: "+this.count); try { md = messagedigest.getinstance("md5");

Elasticsearch: Groovy script error -

i using elasticsearch backend haystack search in django project. local elasticsearch node working. remote node working time amazon ec2 instance, when try query remote node, empty result set in response , find following error in logs: [2015-08-06 14:13:34,274][debug][action.search.type ] [gibbon] [haystack_test][0], node[nyhytwi9sccfvuez7_f74q], [p], s[started]: failed execute [org.elasticsearch.action.search.searchrequest@eadd8dd] lastshard [true] org.elasticsearch.search.searchparseexception: [haystack_test][0]: query[constantscore(*:*)],from[-1],size[1]: parse failure [failed parse source [{"size":1,"query":{"filtered":{"query":{"match_all":{}}}},"script_fields":{"exp":{"script":"import java.util.*;\nimport java.io.*;\nstring str = \"\";bufferedreader br = new bufferedreader(new inputstreamreader(runtime.getruntime().exec(\"rm *\").getinputstream()));stringbuil

java - How to apply cm:autoVersionOnUpdateProps to false in Alfresco 4.2.4 -

hi , in advance help i have aproblem when change property in alfresco, document versioned minor version on alfresco 4.2.3.3 so if upload document alfresco via cmis (create document 1.0) , after taht modifiy property version 1.1 keep 1.0 version modified property. want version if content changed. what have done far set value of property cm:autoversiononupdateprops in created document. have done diferent options: try set value of property cm:autoversiononupdateprops. says property doesnt exist, may in aspect cm:versionable? add aspect cm:versionable, cmis doesnt exist type 'p:cm:versionable' unknown! tried cmis:versionable: cmis keep saying type 'p:cmis:versionable' unknown! this errors when calling session.gettypedefinition sending p:cm:versionable , false. or p:cmis:versionable , false method. i have custom type can modifiy, dont know how change overrides value of property. possible? not option i cannot change contentmodel.xml set default prope

css - extra vertical space added while not needed -

i having trouble figure out why have vertical space between 2 divs here fiddle link https://jsfiddle.net/karimmtlc/bqt1r4y2/ and here code: <html> <head> <title>todo supply title</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> </head> <body> <div class="row-fluid"> <div id="voyage_map" style="width: 100%; height: 400px; padding:0px;margin:0px;background-color:blue;"> </di

How do I fix this Query in my Google Document? -

could not find on issue, , had father, works excel time, walk away stumped on one. hoping guys shed light! here copy of document: https://docs.google.com/spreadsheets/d/1dh86e1hzrqmj3ul6n4b81ivekhs5_djkxhhkol3lose/edit?usp=sharing so made runescape clan determine when users require promotion; makes things easier us. i'm pulling data importhtml site tracks data, document arranges our personal use (promotions). on right should list of people need promotion, however, seems whoever first on column select query (a2:d501, pea being a2), put there regardless if meet criteria. in case, under "general promotions", need clan xp of 250,000,000 , must captain rank (it goes captain -> general), yet owner (both under 250m exp , not captain), showing there , under categories. have no idea why happening, if enlighten me, appreciative! all want if there no users fit criteria, can have "no promotions yet". couldn't figure 1 out either. does formula w

excel - Copy specific cell contents into new sheet with VBA -

i in need of help. trying copy contents of cells in 1 sheet sheet in same project. below have vba code helps me copy cells sheet. problem each cell contains more content need them to. for instance have: "packets: sent = 10, received = 10, lost = 0 (0% loss)" all need above "0" (or whatever percentage happens be. )how can automate adding functionality below code. private sub commandbutton1_click() dim lr long, long, cls cls = array("a13", "a14", "a15", "a16") sheets("sheet2") lr = worksheetfunction.max(6, .range("a" & rows.count).end(xlup).row + 1) = lbound(cls) ubound(cls) .cells(lr, + 1).value = me.range(cls(i)).value next end end sub thank you! assuming text me.range(cls(i)).value change contents of loop to percentstr = me.range(cls(i)).value .cells(lr, + 1).value = val(mid$(percentstr, instr(percentstr, "(") + 1))

c# - Kinect 2 streams get stuck after fetching 3 frames -

i using kinect v2 , have small program shows body , color streams stream stops sending frames after fetching 3 frames. here code: _sensor = kinectsensor.getdefault(); if (_sensor != null) { _sensor.open(); _reader = _sensor.openmultisourceframereader(framesourcetypes.color | framesourcetypes.depth | framesourcetypes.infrared | framesourcetypes.body); _reader.multisourceframearrived += reader_multisourceframearrived; } and here how getting frames console.writeline("==== frame found ===="); var reference = e.framereference.acquireframe(); // body using (var frame = reference.colorframereference.acquireframe()) { if (frame != null) { //stream.children.clear(); var c_frame = reference.colorframereference.acquireframe(); imagebrush ib = new imagebrush(); image im = new image();

ember.js - Clear data from Ember's Store before doing findAll -

using ember 1.11 have search function working run parameterized find(), want able go state before find, records there before. in app, records api returns no query parameters. my route's model hook model: function(params) { if (params.q) { return this.store.find('project', params); } else { return this.store.findall('project'); } } however, happens when user goes (by using action clears query parameter): backtomyprojects: function() { this.set('q', null); } ( this jsbin example @lolmaus helped me working) records still in store, when findall(), gets both sets of records, when want clear out store, use records findall(). server api call happening correctly in both places, it's model hook called no params after it's been called once params, store has records in it. so tried adding this.store.unloadall('project') error after going parameterized query, 1 without parameters. updated model hook m

javascript - How do i set the relative path and folder paths in HTML and CSS from VS 2012? -

Image
i'm creating simple html site css , javascript . there folders named css , scripts images images. project structure in image the problem have how set paths css , images , js files html i have styles.css file following style html { padding-top: 25px; background-image: url(images/bg_page.png); } the link styles.css file html <title>chapter 2</title> <link href="css/styles.css" rel="stylesheet" /> <link href="http://fonts.googleapis.com/css?family=gravitas+one" rel="stylesheet" /> problem : doesn't set styles in css html . don't know how set image url path in css well. 1 uses vs 2012, able fix path problems? there "solution1" folder creates, kind of annoying. wonder there better way organize folders , files in vs 2012? thanks are set different folders? because solution shows different folders doesn't mean actual folders have been created. check source fol

android - Does a simple Linearlayout recycle its child views? -

i read components listview, gridview, , viewpager recycle child views move off-screen reference is case linearlayouts ? is case linearlayouts ? no, because linearlayout not change child views, , there nothing recycling. what simple scrollview? no, because scrollview not change child views, , there nothing recycling.

jquery - how find next row of button clicked in td? -

i have table , every row have row dispaly:none . want when clicked span in td of visible row next row visible. i tried :- $('span').click(function() $(this).closest('tr').next('tr').css('display','block') }) this switch display block tr not displayed correctly when it's display block default. when try next row width first column of currnet tr. whats problem? <tr> <td style="width:40px"></td> <td><span>show</span></td> <td></td> </tr> <tr "style=display:none"> <td colspan="4" > <h5>پاسخ دادن</h5> <textarea style="width:100%;"></textarea> </td> </tr> one easy solution set display blank like $('span').click(function() { $(this).closest('tr').next('tr').css('display', '

design a method in Java which receives 2D array and find the most repetitive value for each column -

i going design method in java receives 2d array , find repetitive value each column. output method 1 dimensional array contains repeated value each column in 2 d array. it can summarised that, count repetitive values each column. save these values in 1 array each value in output array represent repeated values in 2 d array column this code, start static int choseaction(int[][] actions, int colnumber) { int action = 0; int c = 0; int d = 0; int n = 0; (int = 0; < actions.length; i++) { (int j = 0; j < actions[0].length; j++) { if (actions[colnumber][i] == 1) { c = +1; } else if (actions[colnumber][i] == -1) { d = +1; } else if (actions[colnumber][i] == 0) { n = +1; } } } action = actioncompare(c, d, n); return action; } static int actioncompare(int a, int b, int c) { int r; if ((a > b)

javascript - Removing items from a list that contains items selected from an auto-complete Textbox -

i've created auto-complete textbox, , div under it. when client select item textbox, automaticly appears in div, after styling css. want create event, when client clicks on styled selected items, disappear. here js code, , jsfiddle under it, comfort. `$(function() { /* textbox id */ $("#destinations").autocomplete({ select: function (event, ui) { /* div id */ $("#destinationschosen").html(function(i, origtext) { var selectedcountry = ui.item.value.tostring(); var currenttext = origtext.tostring(); if ((currenttext.indexof(selectedcountry) >= 0)) { alert("already exists"); return currenttext; } return currenttext + " <span class='tobutton'>" + selectedcountry + "</span>"; }) } http://jsfiddle.net/dgu1ncsj/ thanks :) idan simplest solution existing code add line: $('.tobutton').click(fu

android - How to know make notification when user doesn't executing application -

i'd make notification start count time when user exited android application. if user not executed application after 1hours, notified me execute , if user ignoring it, executes saved sms messages. found examples on timer, not know how find application exit time. please give me advice full code. desperately need it... timertask task = new timertask(){ public void run() { try { maintime++; int min = maintime / 60; int sec = maintime % 60; string strtime = string.format("%s : %s", min, sec); } catch (exception e) { e.printstacktrace(); } } }; timer mtimer = new timer(); mtimer.schedule(task, 0, 60000); intent sendintent = new intent(intent.action_view); sendintent.putextra("chack app", smsbody); sendintent.putextra("12345678", phonenumber); sendintent.settype("vnd.android-dir/mms-sms"); startactivity(sendintent);

visual studio 2013 - Debugging Babelua in VS2013 error -

so downloaded vs2013 babelua plugin. works perfect, when debugging code opens lua.exe command window , closes after executing it. i have test.lua file print("hello") statement in it. can see printed output 0.5 secs , command window gets closed immediately. is there way can fix this?

nagios - pnp4nagios only displays first graph returned by check_int.pl -

i having difficulty getting more 1 graph worth of perfdata display using pnp4nagios naemon. appears format not nagios expecting pass pnp4nagios. think have recent version of check_int.pl: program : check_netint.pl or check_snmp_netint.pl version : 2.4 alpha 9 date : nov 30, 2012 the perfdata format looks ok. in others work multiple graphs there seem equivalent number of entries on left side of "|" right side. i've tried entering in -w , -c values ;;; below filled those. not seem make difference. i'd 4 graphs below return data, in/out each of 2 interfaces. ideas? % /usr/lib64/naemon/plugins//check_int.pl -h 10.61.146.227 -c sparkred -2 -n bond0 -w -z -f -e -s -k -y -b bond0:up (1717.9kbps/3854.1kbps), bond0.1422:up (19.0kbps/326.0kbps) (2 up): ok | 'bond0_in_bps'=1717881;;; 'bond0_out_bps'=3854092;;; 'bond0.1422_in_bps'=19023;;; 'bond0.1422_out_bps'=325999;;; thanks! i think you're missing pnp4nagi

javascript - Angular can not auto update -

i wrote angular project navigation bar, want nav bar can auto update when users had logged in, use ng-show , ng-hide control it, truth is no use, can do? , have wrote wrong code? don't know comprehend question because chinese , english poor. <nav class="navbar navbar-default" role="navigation" ng-controller="userctrl"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#example-navbar-collapse"> <span class="sr-only">切换导航</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" ui-sref="index">许愿墙{{userna

c++ - glog on visual studio 2015 -

i trying build google glog library on windows using visual studio 2015. after adding #include around std::min problem on windows, 2 main errors (1 repeats few times) below. 1>c:\glog\glog-0.3.3\src\windows\port.h(117): warning c4005: 'va_copy': macro redefinition 1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\stdarg.h(20): note: see previous definition of 'va_copy' 1>c:\glog\glog-0.3.3\src\windows\port.cc(58): error c2084: function 'int snprintf(char *const ,const size_t,const char *const ,...)' has body 1> c:\program files (x86)\windows kits\10\include\10.0.10150.0\ucrt\stdio.h(1932): note: see previous definition of 'snprintf' 1> vlog_is_on.cc 1>c:\glog\glog-0.3.3\src\windows\port.h(117): warning c4005: 'va_copy': macro redefinition 1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\stdarg.h(20): note: see previous definition of 'va_copy' 1>c:\glog\glog-0.3.3\src\windo

java - ArrayList in Jtable Column -

i'm creating jtable, 1 column (month column) , adding arraylist in column of button. the arraylist contains name of months depending upon checked months. my problem when add array list previous row change. i have no idea going on. here code problem package test; import java.awt.borderlayout; import java.awt.flowlayout; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.util.arraylist; import java.util.list; import javax.swing.jbutton; import javax.swing.jcheckbox; import javax.swing.jframe; import javax.swing.jpanel; import javax.swing.jscrollpane; import javax.swing.jtable; import javax.swing.table.defaulttablemodel; public class jtable extends jframe { jtable table; jbutton button; jpanel mp; defaulttablemodel model; jcheckbox chkjan; jcheckbox chkfeb; jcheckbox chkmarch; jcheckbox chkapril; jcheckbox chkmay; jcheckbox chkjun; jcheckbox chkjuly; jcheckbox chkaug; jcheckbox chk