Posts

Showing posts from April, 2015

c# - Bad user control scaling for higher screen DPI -

Image
i have user control called labeledcombobox consist of tablelayoutpanel ( tlp ) contains 2 columns - in first column there label control, in second - combobox . generally have done make control dpi-aware still behaves bad dpi > 96. ok when font size control not changed (the same in design / runtime, here 9.75). when increase font size 9.75 11 or 12, user control not scaled , gets cropped @ bottom when displayed on dpi > 96. below screen of 3 examples different font size, starting left: 9.75 (same in design), 11, , 12. here how code designer looks like: private void initializecomponent() { this.tlp = new system.windows.forms.tablelayoutpanel(); this.combobox = new system.windows.forms.combobox(); this.label = new system.windows.forms.label(); this.tlp.suspendlayout(); this.suspendlayout(); // // tlp // this.tlp.autosize = true; this.tlp.autosizemode = system.windows.forms.auto

class - Java : If A extends B and B extends Object, is that multiple inheritance -

Image
i had interview, , asked question. interviewer - java support multiple inheritance? me - no interviewer - each class in java extends class object (except class object) , if externally extend 1 class like class extends b{ // code here } then can class extend class b , class object, means multiple inheritance. how can java not support multiple inheritance? me - class b extends class object, when extend class b in class class extends class object indirectly. multi-level inheritance, not multiple inheritance. but answer did not satisfy him. is answer correct? or wrong? happens internally? my answer correct? yes, mostly, , in context describe. not multiple inheritance: it's said is, single inheritance multiple levels. this multiple inheritance: inheriting 2 or more bases don't have "is a" relationship each other; inheriting unrelated lines, or lines had diverged (in java, since object base, latter): (image credits: http:/

p value - Manual t-test in R, Tail test -

i've been trying make manual t test of statistic calculated in r. i've seen people recommend use function dt had not worked. know because i'm comparing results of r results in stata (the last ones i'm sure i've got them correct). code i'm trying this pvalue<-dt(3.141523, df=8) where 3.141523 calculated t statistic , df degrees of freedom. thank help! i think want use pt() function instead of dt() . dt() density while pt() distribution. > pt(3.141523, df = 8) [1] 0.9931132

websocket - Does socket.io queue messages to disconnected clients? -

if client socket disconnected during middle of multiplayer game. socket.io queue events emitted server after has client disconnected? if mean when client socket reconnected, updated events server tried emit if while disconnected. no, need sort of data structure on server-side holds record of whatever data client needs, able update client if connect again. when user disconnects socket.io connects again, socket id never same, need sort of unique identifier can let server know client (i.e. username, userid, etc)

ios - How to constrain stack view between two objects -

i need imageview halfway between 2 other objects in view. way tried resolve putting imageview in stack view, , trying constrain stack view top , bottom spacing 0 objects. however, stack view not change size top , bottom touch objects, error. what's best way of going doing this? just use view instead of stack view. can resize size want based on constraints.

ios - 'init' is unavailable: use 'withMemoryRebound(to:capacity to temporarily view memory as another layout-compatible type -

Image
learning , migrating code swift 3 , facing following error in glimpsexml. can please ? in advance. [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/vjo2b.png sorry posting screenshot only. here actual code. version of xcode 8.3.1. in method stringfromfixedcstring getting error "fromcstringrepairingillformedutf8" unavailable. private func stringfromfixedcstring(_ cs: unsafebufferpointer<cchar>) -> string? { let buf = unsafemutablepointer<cchar>.allocate(capacity: cs.count + 1) buf.initialize(from: cs + [0]) // tack on 0 make valid c string let (s, _) = string.fromcstringrepairingillformedutf8(buf) buf.deallocate(capacity: cs.count + 1) return s } public func serialize(_ indent: bool = false, encoding: string? = "utf8") -> string { var buf: unsafemutablepointer<xmlchar>? = nil var buflen: int32 = 0 let format: int32 = indent ? 1 : 0 if let encoding =

excel - How do I extract the month number from a date and return the month name? -

Image
i have table contains column of dates in following format: m/d/yyyy. below picture, shows dates in column c: goal: know how create function in vba extracts month number dates in column c , return month name in column e, shown in picture below: i can enter month names manually looking in column c, wondering if there function can task automatically. yup, text() it: =text(c2,"mmmm")

Get data from last 3 days from NASA API -

i using api.nasa.gov , trying data last 3 days. cannot find should add in url. cannot find option filter out result. can me out? this url using $url = "https://api.nasa.gov/neo/rest/v1/neo/browse?page=0&size=50&api_key=api_key"; docs on website state documentation prop start_date prop end_date https://api.nasa.gov/neo/rest/v1/feed?start_date=2015-09-07&end_date=2015-09-08&api_key=demo_key gl :)!

OData with EF and automapper: Cannot compare..'. Only primitive types, enumeration types and entity types are supported -

had odata v3 endpoint ef 6.1.3 , automapper 6.1.1. datamodel, order, 1 many orderlines public partial class order { [system.diagnostics.codeanalysis.suppressmessage("microsoft.usage", "ca2214:donotcalloverridablemethodsinconstructors")] public order() { this.orderlines = new hashset(); } public system.guid orderid { get; set; } public string orderplacedby { get; set; } public nullable<system.datetime> placedtime { get; set; } [system.diagnostics.codeanalysis.suppressmessage("microsoft.usage", "ca2227:collectionpropertiesshouldbereadonly")] public virtual icollection<orderline> orderlines { get; set; } } orderlines public partial class orderline { public system.guid orderlineid { get; set; } public nullable orderid { get; set; } public nullable amount { get; set; } public virtual order order { get; set; } } automapper code, cfg => {

java - Google App Engine Backend Instance Hours are double expected -

i have written java application running on gae webapp. here extract appengine-web.xml: <version>2</version> <threadsafe>true</threadsafe> <manual-scaling> <instances>1</instances> </manual-scaling> my app written listen changes firebase database, expecting run continuously. problem being billed 48 hours of 'backend instance hours' per day instead of expected 24 hours per day. i have checked have 1 instance running. have not stopped or started (i know that adds 15 minutes). looking @ usage history, says have used 48 hours of backend instance hours in day. have no idea now. can please? from doc: https://cloud.google.com/appengine/pricing#standard_instance_pricing “when billed instance hours, not see instance classes in billing line items. instead, see appropriate multiple of instance hours. example, if use f4 instance 1 hour, not see "f4" listed, see billing 4 instance hours @ f1 rate.” i rec

angular - MdDialogRef.close doesn't close the dialog when called from a callback fn -

i followed official https://material.angular.io/components/dialog/overview states if dialog component has closed, need inject mddialogref reference below , close on event export class logindialogcomponent { constructor(public dialogref: mddialogref<logindialogcomponent>, @inject(md_dialog_data) public data: any, public afauth: angularfireauth, private router: router) { } closedialog(): void { this.dialogref.close(); } signinwithgoogle() { const self = this; this.afauth.auth .signinwithpopup(new firebase.auth.googleauthprovider()) .then(res => { self.closedialog(); }); } } on successful response google oauth, see closedialog() called. however, dialog isn't closed. [i have no issues closing dialog part of settimeout/useraction]

What is the point of putting npm's "package-lock.json" under version control? -

what point of putting npm's package-lock.json under version control? in experience having file source controlled has caused more trouble , confusion efficiency gains. having package-lock.json under source control makes major headache every time developer added/removed/modified node modules needs resolve conflicts between branches. working on complex/large apps package-lock.json can tens of thousands of lines long. blowing away node_modules , running fresh npm install can generate drastic changes in package-lock. there several other questions package-lock: do commit package-lock.json file created npm npm - package-lock.json role why npm install rewrite package-lock.json? and github issue ton of conversation package-lock: package-lock.json file not updated after package.json file changed which makes me think there still widespread uncertainty needs cleared up. according docs package-lock.json automatically generated operations npm modifies either no

android - Error launching x86 Emulator Ubuntu 16.04 -

i have new ubuntu 16.04 vm run on ravello systems cloud. downloaded android studio. after setup launch avd manager setup nougat 7.1.1 emulator. kvm enabled know issue isn't lack of virtualization needed x86 emulator. @ first getting error when launching: error message so searching , found here . tried using ld_preload='/usr/lib/x86_64-linux-gnu/libstdc++.so.6' ~/android/sdk/tools/emulator -netdelay none -netspeed full -avd nexus9 the above line 1 line. getting these errors . thank in advance. have done of development work on windows or mac os x. on environments, downloading android studio setup up. in advance!

How to execute docker login command in python -

i beginner in docker , trying execute docker login command in python. here how code looks, client.login(username, password, registry=data["url"]) error docker.errors.apierror: 500 server error: internal server error url: xxxx tag= xxxx ("get xxx: no basic auth credentials") i tried running login command through terminal , after that, when run python script, gives me output properly. after finding out lot, think problem docker version. docker documentation states version after 17.06 must run command aws ecr get-login --no-include-email question is, right in assuming flag --no-include-email problem? if yes, how can include in python script? hope explaining problem properly. thanks in advance.

arrays - PHP: "Notice: Undefined variable", "Notice: Undefined index", and "Notice: Undefined offset" -

i running php script, , keep getting errors like: notice: undefined variable: my_variable_name in c:\wamp\www\mypath\index.php on line 10 notice: undefined index: my_index c:\wamp\www\mypath\index.php on line 11 line 10 , 11 looks this: echo "my variable value is: " . $my_variable_name; echo "my index value is: " . $my_array["my_index"]; what these errors mean? why appear of sudden? used use script years , i've never had problem. what need fix them? this general reference question people link duplicate, instead of having explain issue on , on again. feel necessary because real-world answers on issue specific. related meta discussion: what can done repetitive questions? do “reference questions” make sense? notice: undefined variable from vast wisdom of php manual : relying on default value of uninitialized variable problematic in case of including 1 file uses same variable name. majo

python - Unable to correctly run a personal job on the Beowulf cluster. Example job works fine -

i've set beowulf cluster using 1 master node , 2 client nodes. client nodes share master node's /home/mpiuser/ directory , automatically update whenever directory changed on master node. have run example compiled cpi file given when downloading mpich2 following command $ mpiexec -f hosts -n 3 /home/mpiuser/mpich2-1.4.1/examples/cpi which gives following output process 0 of 3 on master process 2 of 3 on slave2 process 1 of 3 on slave1 pi approximately 3.1415926544231318, error 0.0000000008333387 wall clock time = 0.001477 then when try , run python file created here: /home/mpiuser/development/fact_test.py , using command $ mpiexec -f hosts -n 3 /home/mpiuser/development/fact_test.py i following errors [proxy:0:0@master] hydu_create_process (./utils/launch/launch.c:69): execvp error on file /home/mpiuser/development/fact_test.py (permission denied) [proxy:0:1@slave1] hydu_create_process (./utils/launch/launch.c:69): execvp error on file /home/mpiuser/developm

forcing end of line character in google sheets -

is there way force cells in google sheet end 'enter'? if i'm updating sheet, can input string in cell a1 ... use right arrow move b1. preferable because entering string , pressing enter moves selection cell down a2 instead of across. problem without invisible 'enter' marker, messes formatting when combining cells via scripts. i below... setaddress(street.trim()+'\n'+ city.trim()); \n new line character. street.trim() trim new line characters if there any.

SQL Server 2016 Always Encrypt - Backup/Restore database -

we in process of implementing encrypt feature, working expected. have concern regarding certificate, database backup/restore prod box our local machine, in case getting column master key , column encryption key prod database restore on local, , use database need prod certificate , need import in local machine. somehow due security reason wont prod certificate import in local machine, there way can make work without importing prod certificate local machine? and in case prod certificate, there anyway can make our prod database secure no 1 can decrypt data?

shader - Radial gradient - procedural texture for cocos2d-x v3.15+ -

Image
in cocos2d-x there already layerradialgradient . works well, i've other shaders running on game scene, performance in problem now. it's using shader . i want replace sprite generated radial gradient texture. here example of layerradialgradient drawing result: layerradialgradient::create( color4b(179, 232, 184, 89), color4b(0, 90, 128, 0), 620, center, 0.0f); i've code suggestions like: static color4b lerp(const color4b& value1, const color4b& value2, float amount) { amount = clampf(amount, 0.0f, 1.0f); return color4b( (int)mathutil::lerp(value1.r, value2.r, amount), (int)mathutil::lerp(value1.g, value2.g, amount), (int)mathutil::lerp(value1.b, value2.b, amount), (int)mathutil::lerp(value1.a, value2.a, amount) ); } static float falloff(float distance, float maxdistance, float scalingfactor) { if (distance <= maxdistance / 3) { return scalingfactor * (1 - 3 * distance * dista

Angularjs failed to load templateurl -

Image
here directive moduledirectives .directive('barnotification', ['$compile', '$timeout', function ($compile, $timeout) { return { restrict: 'e', replace: true, scope: { barshow:'=', bartype: '=', barmessage:'=', barallowclose:'=', onclose: '&', onopenslopesetting: '&' }, link: function (scope, element, attr) { scope.contentelement = element; scope.oncloseexists = 'oncloser' in attr; scope.$watch('barmessage', function () { $timeout( function () { angular.element(scope.contentelement[0].queryselector('#barmessage')).replacewith($compile('<div id="barmessage">' + scope.barmessage + '</div>')(scope));

Android app need to be built twice to avoid crash -

i'm facing issue don't understand @ all. have android app crash upon entering settings (crash log below), first time built. issue discovered while investigating why f-droid builds "faulty", while own worked fine. the steps reproduce following: rm -r ~/.gradle ./gradlew assemblerelease && adb install -r ... the build completes here, apk not work. ./gradlew assemblerelease && adb install -r ... the second build completes, time crash not present anymore. has idea why such problem happening? the issue can reproduced project located here . crash triggered entering settings. here full stack trace: android.view.inflateexception: binary xml file line #19: error inflating class preferencescreen @ android.support.v7.preference.preferenceinflater.createitem(unknown source) @ android.support.v7.preference.preferenceinflater.oncreateitem(unknown source) @ android.support.v7.preference.preferenceinflater.createitemfromtag(unknown source) @ and

java - Invalid BSON field name when using dot notation -

so i've finished writing this: https://gist.github.com/exception/c46dc2ee727c7cefc61c4e0be59fac16 however when using following code persistentstatistics statistics = np.getpersistentstats(); statistics.getintegerstatistics(gameregistry.type.thimble).increment("testing", 1); statistics.persist(); to execute persistantstatistics#persist debugging prints following: [19:16:00 info]: size 1 [19:16:00 info]: statistics integers [19:16:00 info]: statparent document{{$inc=document{{testing=1}}}} [19:16:00 info]: parent document{{integers=document{{$inc=document{{testing=1}}}}}} and outputs following exception: [19:16:00 warn]: caused by: java.lang.illegalargumentexception: invalid bson field name integers [19:16:00 warn]: @ org.bson.abstractbsonwriter.writename(abstractbsonwriter.java:516) [19:16:00 warn]: @ org.bson.codecs.documentcodec.writemap(documentcodec.java:188) [19:16:00 warn]: @ org.bson.codecs.documentcodec.encode(documentcodec.j

android - how to translate a string resource with an xliff -

i'm using trying translate sentences on android studio translation editor , i'm having issues xliffs "variables". have no idea on how translate them. here original xml resource: <string name="order_message_quantity">quantity: <xliff:g id="quantity" example="5">%i</xliff:g></string> on translation i've put this: <string name="order_message_quantity">quantitdade: %i</string> it seems problem because i've got weird illegal state exceptions since started using this. what should replacement of "%i" on second expression?

echo - Display Form Input PHP -

i sending form on php , displaying results on new page. display dates inputted user on new page have reminder of date entered. have tried following did not work: echo "$start" here code front-end form: <form action="availability" method="get"> <div id="cin">check-in date: <input type="text" id="start" name="start"></div> <div id="cout">check-out date: <input type="text" id="end" name="end"></div> <div id="csubmit"><input type="submit"></div> </form> 'start' being field i'm trying pull. idea? $_get['start'] if it's method="get" , otherwise $_post['start'] or if you're lazy $_request['start'] which both post , (in specific order ;o)

ssl - In Let'sEncrypt, I want to delete the certificate to noninteractive -

i'm japanese not @ english , asking questions of google translation. please lend me strength. in let'sencrypt, want delete certificate noninteractive script. i'm trying execute script this, sudo certbot - auto delete - d foo.com - n the following error log appears , deletion not executed. missing command line flag or config entry setting: certificate delete? choices: ['abcdef.com', 'foo.com'] i'd delete certificate files noninteractively, please me how it.

parsing - What kind of lexer/parser was used in the very first C compiler? -

in 1970s, dennis ritchie wrote first c compiler. in year 2017, wanted write c compiler. books deep c secrets (peter van der linden) c was, above else, designed easy compile. i've been having inordinate amount of trouble it. for starters, it's relatively difficult come lex/yacc specifications c language, , these tools didn't exist yet when ritchie made his compiler! plus, there great many examples of surprisingly small c compilers not use lex & yacc. (check out this tiny obfuscated c compiler fabrice bellard. note "production" tinycc source quite bit longer, in effort accommodate more architectures, , more readable) so what missing here? kind of lexer/parser did ritchie use in compiler? there easier way of writing compilers haven't stumbled onto? yacc's name abbreviation "yet compiler compiler", suggests neither first nor second such tool. indeed, wikipedia article on history of compiler construction notes that

Creating dynamic array in class [python] -

i've written own list class wraps list -like array type. array has fixed capacity , when array full want capacity double automatically. example, if base capacity 5 when array full , item added, doubles capacity 10 before adding item. here's code: from referential_array import build_array class list: def __init__(self,capacity): assert capacity >0, "capacity cannot negative" self.count = 0 self._array = build_array(capacity) self.capacity = capacity def append(self,item): has_space_left = not self.is_full() if has_space_left: self._array[self.count] = item self.count+=1 else: #issue here create_more_space = list.__init__(self,capacity*2) #if list full, capacity *2 self.count+=1 if __name__== "__main__": mylist = list(6) mylist.append(4) mylist.append(7) mylist.append(1) mylist.

r - What the solution for this ggplot2 error on gigINEXT function:" Error in levels<-..."? -

i'm running examples inext package on rstudio , having trouble graphical example. possible suggestions, below initial steps run without major problems, followed command line generates error: #packages , dependencies >install.packages("inext") >install.packages('devtools') >library(devtools) >install_github('johnsonhsieh/inext') >library(inext) >library(ggplot2) #example dataset >data(spider) #last line runs before error >out <- inext(spider, q=c(0, 1, 2), datatype="abundance", endpoint=500) #here comes problematic line , error >gginext(out, type=1, facet.var="site") error in `levels<-`(`*tmp*`, value = if (nl == nl) as.character(labels) else paste0(labels, : factor level [2] duplicated any idea how solve this? i solved it, adding unique function, inside gginext.inext function: below original command line , same line altered: original command line: z$lty <- factor(z$meth

how to build a trapezoid shape in android? -

Image
how can create trapezoid shape below image ? i don't want use image or 9.png . try this: <?xml version="1.0" encoding="utf-8"?> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="292dp" android:height="172dp" android:viewportwidth="292" android:viewportheight="172"> <path android:strokewidth="1.5" android:strokemiterlimit="10" android:pathdata="m 27.046 96.615 l 16.416 150.396 l 271.534 150.396 l 186.495 22.836 l 37.676 22.836 l 27.046 86.615 z" /> <path android:fillcolor="#00ff00" android:strokewidth="1.5" android:strokemiterlimit="10" android:pathdata="m 16.046 20.615 l 13.416 150.396 l 271.534 150.396 l 186.495 22.836 l 37.676 22.836 l 16.046 23.615 z " /> </vector>

ios - UIPageViewController: setViewControllers(_animated:) skips pages while animating -

when animating uiviewcontroller > 1 index away current vc, setviewcontrollers(_animated:true) skip on vcs in-between. for example, when animating vc1 vc3, uipageviewcontroller not display vc2 during animation, , appears if vc1 , vc3 adjacent. pageviewcontroller.setviewcontrollers([viewcontroller], direction: .forward, animated: true, completion: nil) one solution had instead add vcs paging-enabled uiscrollview , animate contentoffset view.bounds.width * index when transitioning new vc. wondering if there's method concerning uipageviewcontroller of better practice. edit : see twitter's profile segmented control , jump multiple segments @ once see animation i'm referring to.

javascript - Objects are not valid as a React child(In mobile phone of android 4.4 for react 15.6.1) -

the whole error: uncaught invariant violation: objects not valid react child (found: object keys {$$typeof, type, key, ref, props, _owner, _store}). if meant render collection of children, use array instead or wrap object using createf...<omitted>...`. i can't find exact location of error, makes error in react-dom, how can debug , find out error? you must using object child component in render method. component's child must either component, string or array. ex. render() { return( <yourcomponent> {yourcomponentchild} // check here, must either string, array or component </yourcomponent> ); } you can follow thread invariant violation: objects not valid react child

How to run powershell code while in python -

i run:` $filepath = "<input file path>" $wd = new-object -comobject word.application $wd.visible = $true $txt = $wd.documents.open( $filepath, $false, $false, $false) $wd.documents[1].saveas("<export file path>") $wd.documents[1].close()` this powershell code needs run python script is there way store string, in python, , run block in powershell if had copied , pasted powershell , pressed enter? trying: import os script = """$filepath = "<input file path>" $wd = new-object -comobject word.application $wd.visible = $true $txt = $wd.documents.open( $filepath, $false, $false, $false) $wd.documents[1].saveas("<export file path>") $wd.documents[1].close()""" os.system(script)` i'm receiving: '$filepath' not recognized internal or external command, operable program or batch file.

python - Sending file with Flask test client raises "FileStorage is not JSON serializable" -

i testing sending files flask route. however, error typeerror: <filestorage: 'test_photo.jpg' ('image/jpeg')> not json serializable . looking through route, '/new-ad/write-details , there nothing attempting json serialize field. video_file = open(test_helpers.get_dummy_file('test_video.mp4'), 'rb') image_file = open(test_helpers.get_dummy_file('test_photo.jpg'), 'rb') response = self.app.post( '/new-ad/write-details', buffered=true, content_type='multipart/form-data', data={ 'location_id': db.session.query(location).first().id, 'category_id': db.session.query(category).first().id, 'title': 'test title', 'body': 'test body', 'add_video': (video_file, 'test_video.mp4'), 'add_images': (image_file, 'test_photo.jpg')}) assert response.status_code == 302 assert response.l

xamarin.ios - Xamarin iOS Push Notifications stopped working after minor changes -

Image
i have been following this documentation , i’ve been testing ios push notifications firebase. initially, problem when sent notification firebase console ios, applicationreceivedremotemessage method being called instead of didreceiveremotenotification method. however, after adding changes, code, noticed after sending notifications firebase not calling applicationreceivedremotemessage, didreceiveremotenotification or of other methods in appdelegate.cs looking @ changesets, can see i’ve modified info.plist submit app app store , added new image. what can try , xamarin ios push notifications working again? ...i modified cfbundleidentifier... since changed bundle identifier no longer matches firebase app. example: this value can not changed once app added in firebase console need add app add new ios application correct bundle id , can delete old one. note: changes googleservice-info.plist need download new 1 , replace 1 exists in app.

c - Converting string from lowercase to uppercase seg fault -

this question has answer here: memory access violation. what's wrong seemingly simple program? 7 answers i trying convert string has been passed function lowercase uppercase. keep getting seg fault, , cannot determine why. void uppercase(char* input) { int str_size = strlen(input); char *string = input; (int = 0; < str_size; i++) { string[i] += -32; printf("%c", string[i]); } return; } function calling function uppercase: #include <stdio.h> #include <string.h> int main(void) { uppercase("max"); return(0); } as @dasblinkenlight said, cannot modify string literal . try instead: int main(void) { char str[4] = "max"; uppercase(str); return(0); } or can malloc string , pass in.

reactjs - Which is better performance: to import once and pass as props to <Row/> or import within each <Row/> component? -

i guess general question be, require more handling pass something props <child something={something}/> or import something within <child/> . so example, have: import { basestyle } '../styles/common.js'; <flatlist data={this.state.datasource} renderitem={this.renderitem} /> renderitem() { return ( <customrow basestyle={basestyle} /> ) } or better import basestyle within <customrow/> component? i assume @ least <list/> component, react/rn smart enough cache imports <row/> components until has finished rendering every <row/> . does have theories this? so quite simple test out. did set variable var time = date.now(); outside of class above import statements , console logged time in componentdidmount() . showed same time registered first date.now() assignment var time , every time component re-rendered. think it's safe assume behavior if it's possible import constant

java - Instantiating array but keep getting IndexOutOfBounds Exception -

i'm trying tally count array keep set of 50 choices there 3 options each choice. count array should have 150 elements, per instructor (3 x 50 = 150). keep getting indexoutofbounds exception @ line 55 ( index = thischoice.get(i) ). i'm thinking must have how (or where?) i'm instantiating count array @ line 50: int[] count = new int[students.get(0).getchoices().size()*3] because rest of code came instructor , presumably correct. ideas on sending out of bounds? public class p1driver { public static void main(string[] args) throws ioexception{ arraylist<students> students = new arraylist<students>(); arraylist<string> choices = new arraylist<string>(); scanner scan1 = new scanner(new file("choices.txt")); scanner scan2 = new scanner(new file("eitheror.csv")); // scan first file. int choicesindex = 0; while(scan1.hasnextline()){ string line = scan1.nextline(); choices.add(line);

vb.net - Generic Methods to consume WCF Services -

i have bunch of wcf services referenced in desktop application. of these services have common methods e.g. getall() , getallasync() , add(record employee) , addasync(record employee) . now, while creating inheritable form, there way can make generic functions these common service functionalities in inherited form can provide service name type.

sql - Grouping data with specified max data -

good day, i'm sorry title. ok, example have data outletasal outlettujuan remark externaldocno itemcode qty k-aeon k-ar4 dus 20 closing wfs170402776 2 k-aeon k-ar4 dus 20 closing wfs170402758 1 k-aeon k-ar4 dus 20 closing wfs170402790 1 k-aeon k-ar4 dus 20 closing wfs170502796 2 k-aeon k-ar4 dus 20 closing whs170400011 1 k-aeon k-ar4 dus 20 closing whs170400015 1 k-aeon k-ar4 dus 21 closing whs170400015 1 so, want achieve (grouping outletasal,outlettujuan,remark,extrnaldocno maximum 5 records, if there 6 records make 2 headers) #header outletasal outlettujuan remark externaldocno headerid k-aeon k-ar4 dus 20 closing 1 k-aeon k-ar4 dus 20 closing 2 k-aeon k-ar4 dus 21 closing 3 #detail itemcode qty headerid wfs17040

swift - OS X App - Scroll View -

i have bunch of things in scrollview cannot scrollview scroll. in ios simple, need put view in scrollview , size view dimensions want scroll. in os x, isn't working. bouncing , resizing, not scrolling. missing? i have scroll view , within in clip view , within in nsview lot of elements. not scroll. need set in storyboard scroll? right now, don't think have set height view scroll. how do that? not let me set height clip view. when set height nsview, still not scroll. issue size of window or how setup vc view controller. best practices sizing window or view controller? helpful. or if know tutorials or places can more info on this.

python - Running gl-env to install Graphlab : gl-env is a directory -

i'm trying install graphlab create using commandline, following instructions turi.com . $ conda create -n gl-env python=3.6 warning: space detected in requested environment path 'c:\users\parvathy sarat\anaconda3\envs\gl-env' spaces in paths can problematic. fetching package metadata ........... solving package specifications: . package plan installation in environment c:\users\parvathy sarat\anaconda3\envs\gl-env: following new packages installed: certifi: 2016.2.28-py36_0 pip: 9.0.1-py36_1 python: 3.6.2-0 setuptools: 36.4.0-py36_0 vs2015_runtime: 14.0.25420-0 wheel: 0.29.0-py36_0 wincertstore: 0.2-py36_0 proceed ([y]/n)? y vs2015_runtime 100% |###############################| time: 0:00:20 100.25 kb/s python-3.6.2-0 100% |###############################| time: 0:07:48 70.55 kb/s certifi-2016.2 100% |###############################| time: 0:00:01 119.28 kb/s wincertstore-0 100% |#############