Posts

What's the theory of action listener in java? -

i mean how implement real time action, multi threads or what? look, if add action listener jbutton , , put following codes in main function, while(true){ system.out.print("a"); } and print b 100 times in action listener of jbutton. after clicking button, expected see 100 constant b printed, , after there string of a. result turns out expected wrong. so want ask, exact relationship between action listener , main function? 2 threads or something? i looking forward answer, thanks! basically action listener , main function not related directly, create jbutton , add action listener, perform whatever function want perform. main fuction not involved in unless so. everytime create button thread created , runs independently.

android - tab as like fileexploler -

Image
how can put tab @ above.. i want type of tab when click item show on above,can give snippet or links.. , please tell brief if available how can this.. show in figure red rectangle there android tools or library.... or directly can code?? thanks in advance rectangle describe want belove image .. i have made simple project you. should make more beautiful wasn't focusing on that, on code. first add these values color.xml <resources> <color name="buttongrey">#7a7a7a</color> <color name="layoutholderstartcolor">#f7f7f7</color> <color name="layoutholderendcolor">#e1e1e1</color> </resources> next create background button holder , name gradient_button_holder.xml <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startcolor="@color/layoutholderstartcolor" android:endcolor="@color/...

node.js - trying to send basic nodemailer email -

i'm trying insert test code hard-coded email data directly nodemailer server.js file started basic working example. see "test code" section @ following url: http://jsbin.com/sibubi/1/edit?html,js,console server.js loads without issue without test code. however, error occurs when "test code" section included. complains "unsupported configuration" , suggests downgrade copied test code nodemailer website. idea issue might , how fix? here's error: http://jsbin.com/kehofe/1/edit package.json "nodemailer": "~1.4.0", "nodemailer-smtp-transport":"~1.0.3" install them your controller code var nodemailer = require('nodemailer'); var smtptransport = require('nodemailer-smtp-transport'); var transport = nodemailer.createtransport((smtptransport({ host: your_host, secureconnection: false, // use ssl port: 587, // port secure smtp auth: { user: your_username, pass...

javascript - how to show dynamically nested child array object of an object while nested level is not restricted -

i have array of object each object have children property object, object have children property object include children property object , on ............ some object have children , don't have children (i.e children: array[0]) want display them dynamically on single page using dynamic routes. example first show object list if object have child child see on same page using different route on button click (i.e., ng-click) how possible array of object [object, object, object] hierarchy example more clarification 0: object 1: object children: array[3] 1: object 2: object 2: object children: array[3] 1: object children: array[3] 1: object 2: object 3: object 3: object 4: object parent id given in each object. you can use angular ui tree directive. https://jimliu.github.io/angular-ui-tree/ if want create custom d...

security - Harm of passing session id as url parameter -

Image
so noticed 1 of internet banks websites passing session id url parameter. ( see image below ) i didn't see anywhere ';' in url, in case after 'private;'. 1) use of ';'? 2) , why internet bank, needs securest place in internet passing session id url parameter? at first, thought doing because of users disallow use of cookies, again, if allow it, use cookies, if not - url, allow use of cookies, thats not case. 3) guess should have other security measures? be? 4) , 1 can possibly if knows others valid session id? know, can quite log others peoples session if know id, because not hard edit cookies , easier pass session id url parameter, if have like: session_id($_get[sessionid]); thanks! 1) should ask whoever designed application red box covering. url can want; convention of key=value&key2=value2 - convention. in case, it's java, , commonly uses convention of ;jsessionid=.... sid. 2) it's not that big of deal. norm...

c# - How to change default WCF service binding? -

in wcf have few services. 1 of them must have bigger limit message size must create binding , change configuration. but... can't see configuration of services in web.config - nothing. default? can change service binding? in wcf 4.0+ concept of default bindings , endpoints introduced. if create new wcf service application, example, out of box no changes default endpoint listening @ uri of service using basichttpbinding (the default binding http ). if need larger values default values binding configuration, have 2 choices: make default binding configuration section. done omitting name attribute binding, this: <system.servicemodel> <bindings> <basichttpbinding> <binding maxreceivedmessagesize="528880" /> </basichttpbinding> </bindings> <system.servicemodel> note there no name attribute (the other attributes have been omitted purposes of illustration). configuration specified used defaul...

Add Google Play service to an Android library project in Android studio -

Image
i have library project foolib uses google play service (location service). when using eclipse, have google-play-services-lib (also library project) in workspace , include in foolib, , working fine. migrating android studio , not figure out way include google play service in library project. here have done far: installed google player service, google repository in sdk manager. (i using latest android studio 1.0.1) 2. added compile 'com.google.android.gms:play-services:6.5.+' build.gradle file foolib under dependencies. sync gradle file. here guild.gradle file apply plugin: 'com.android.library' android { compilesdkversion 21 buildtoolsversion "21.1.2" defaultconfig { minsdkversion 8 targetsdkversion 21 } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencie...