Posts

Showing posts from September, 2014

.net - Create a file from a path, creating subdirectories if they not exists -

.net - Create a file from a path, creating subdirectories if they not exists - in config of app i've path, illustration "logs\updater\updater.log" starting app, want create file updater.log, creating subfolders if not exists. so, if tomorrow user changes path in config "logs\mypathisbetter\updater.log", app continues work, writing log new file. file.create , fileinfo.create , streamwriter.create or so: that? or need check if folders exists, before? i can't find clear reply question on net. no, don't seem - you'll directorynotfoundexception, believe three. you need directory.createdirectory(path) first. edit: for bit more of total solution starts path including filename, try: directory.createdirectory(path.getdirectoryname(fullpath)); textwriter author = new streamwriter(fullpath); writer.writeline("hello mum"); writer.close(); but bear in mind you'll need error handling too, auth...

html - How to create a 2 column design where when the first column is full, it will automatically display on the second column? -

html - How to create a 2 column design where when the first column is full, it will automatically display on the second column? - how create 2 column design? when info display total on first column, automatically display on sec column? the restriction cannot set limit info since dynamic, means got 20 posts of data, got 2 posts. info have evenly split 2 columns, vertically, can see, reddish counter text on images attached below. thanks two options - utilize them depending on user's browser support. floats: float list items while giving them half width of parent ol . code like: ol { width: 400px; } ol li { width: 190px; margin-right: 10px; float: left; } columns: utilize new css3 columns property columns. remember webkit, mozilla , opera browsers supports this; ie of 9 beta not have yet. code like: ol { -moz-column-count: 2; -webkit-column-count: 2; column-count: 2; } note 2 not produce exact same results. may wa...

ios - UITableView Sections via UILocalized​Indexed​Collation Delete -

ios - UITableView Sections via UILocalized​Indexed​Collation Delete - i have sections working in tableview this guide however, method requires maintain 2 arrays. so when delete object table, have delete source array well. the simple set same guide linked about, summary: data array - simple array of objects sections array - array 2d sections the tableview utilize sections array populate itself, info array repopulates sections array required. this delete set up, works. override func tableview(tableview: uitableview, commiteditingstyle editingstyle: uitableviewcelleditingstyle, forrowatindexpath indexpath: nsindexpath) { if editingstyle == .delete { //println( "\(sections[indexpath.section][indexpath.row].name)" ) var finditeminobjectsarray = sections[indexpath.section][indexpath.row] (index, element) in enumerate(objects) { if finditeminobjectsarray === element { sections[indexpath.section].re...

Updating UI of firefox addon using sdk -

Updating UI of firefox addon using sdk - i writing simple firefox addon using addon-sdk-1.17 . having problem updating ui of addon. if cfx run, addon looks normal, if "cfx xpi" , load profile has previous version of addon, thats run problems. a simple illustration of can seen illustration mozilla has in toolbar tutorial. can found at: https://developer.mozilla.org/en-us/add-ons/sdk/low-level_apis/ui_toolbar if bundle (cfx xpi) next code (assuming icons , html file exist), works expected: var { actionbutton } = require('sdk/ui/button/action'); var { toolbar } = require("sdk/ui/toolbar"); var { frame } = require("sdk/ui/frame"); var previous = actionbutton({ id: "previous", label: "previous", icon: "./icons/previous.png" }); var next = actionbutton({ id: "next", label: "next", icon: "./icons/next.png" }); var play = actionbutton({ id: "play", lab...

php - Script inserts the same values to the database -

php - Script inserts the same values to the database - when run code, fields updated mysql table reason same value. $query = $this->connection_model->get_custom_db('sender')->get($sender_table); foreach ($query->result() $row) { $data = array( $sender_row => $row->$sender_row ); $this->connection_model->get_custom_db('receiver')->update($receiver_table, $data); } print_r($data) returns: array ( [strasse] => pantherstr. ) array ( [strasse] => minimalweg ) array ( [strasse] => blankeneser weg ) how can prepare this? looks $ many in $row->sender_row: $query = $this->connection_model->get_custom_db('sender')->get($sender_table); foreach ($query->result() $row) { $data = array( $sender_row => $row->sender_row ); $this->connection_model->get_custom_db('receiver')->update($receiver_table, $data); } ...

outlook - getroomlists ews not returning any data -

outlook - getroomlists ews not returning any data - i trying rooms available , status of room using microsoft exchange service . below code used room list. returning 0 room, although have 8 rooms. emailaddresscollection myroomlists = servicedata.getroomlists(); authenticated exchange server , have acquired exchangeservice object named servicedata. in advance take @ how to: room lists using ews in exchange in msdn explains how list of room lists in organization or single room list exchange server using ews managed api or ews. outlook

android - Admob ads show in emulator or genymotion but not in my device -

android - Admob ads show in emulator or genymotion but not in my device - i working in app , add together banner ads in screen have in app when run in genymotion appear when run in device. samsung ace or samsung s2 appear in splashscreen not in other activity show me in logcat ads not visible not refreshin advertisement utilize same code of ads in activity and same xml file : what wrong code , android eclipse admob ads

asp classic - RDLC Matrix total per page -

asp classic - RDLC Matrix total per page - is possible matrix in rdlc have sub total per page have infinite number of column total amount per current page @ bottom? if posible how do it? asp-classic rdlc

javascript - append function not working to textarea after text edited -

javascript - append function not working to textarea after text edited - append function not appending when textarea text edit . tried pull in current value, append, , set back. not working . function getserial() { var getvalue = $(serial).val() + ",\n"; var showvalue = "#showserial"; $(showvalue).append(getvalue); } if utilize val() replace before submitted value . value of text-area added comma al-2, al-3 every single submit . try using val() instead of append() : i've created test fiddle, work you? function getserial (){ var showvalue = $("#showserial"); var getvalue = $(serial).val()+ ",\n"; if(showvalue.val()){ $(showvalue).val(showvalue.val() + getvalue); }else { $(showvalue).val(getvalue); } } https://jsfiddle.net/mc5rrkmu/1/ javascript jquery

java - Get programmatically limit of Google Geocoding API -

java - Get programmatically limit of Google Geocoding API - according google geocoding api (https://developers.google.com/maps/documentation/geocoding/#limits) there limits per running requests. how programmatically these limits? the variant, google developers console. thanks! you can check status code returned result, instance i'm using geocoder library in python: import geocoder : g = geocoder.google(location) if (g.status == "over_query_limit") or (ggl_req == 2500): sys.exit(0) where ggl_req counter utilize maintain track of number of request performed far. best.. java google-api google-geocoding-api

java - returning specific values from a hashmap -

java - returning specific values from a hashmap - i have dictionary of terms dictonery/ab.txt , big text file dictonery/annotate.txt . i want know dictionary terms in ab.txt in annotate.txt file. here code far: string filestring = new string(files.readallbytes(paths.get("dictonery/ab.txt")), standardcharsets.utf_8); map<string, string> map = new hashmap<string, string>(); string entirefiletext = new scanner(new file("dictonery/annotate.txt")).usedelimiter("\\a").next(); map.put(filestring, "m"); (string key : map.keyset()) { if(filestring.contains(key)) { system.out.print(key); } } at moment whole dictionery returned. how can specific terms in annotator.txt file? there's few things might help: since don't need values in map , utilize set (specifically hashset ). use scanner.next() read individual words instead of entire file @ once your check filestring.contains(key...

How to know a mysql variable is a system or user defined var in mysql command client? -

How to know a mysql variable is a system or user defined var in mysql command client? - i open mysql client, , type this: show variables 'var' it told me variable, didn't properties of variable. maybe there mysql commands/syntaxs show this. select @var; works user variable select @@var; works scheme variables eg: select @var1; select @@sql_mode; if utilize @@var user defined variables, error. mysql

xcode - unwindToList and custom tableViewCell -

xcode - unwindToList and custom tableViewCell - i have vc contains tableview. tableview uses custom tableviewcell xib file. how can link(click drag storyboard) button in custom tableviewcell unwindtolist action in vc tableview located? you have first type unwindtolist method in fist view controller. show select when control-drag button exit icon in dock of custom tableviewcell view controller. here go downwards part titled "create unwind segue navigate back": https://developer.apple.com/library/ios/referencelibrary/gettingstarted/roadmapios/secondtutorial.html does help? xcode uitableview tableviewcell

AngularJS scope does not change twice controller -

AngularJS scope does not change twice controller - i tried alter value on dom. doesn't work well. this source <div class="header_player_info" ng-controller="playerctrl"> <div>{{ playbacktimecurrent }} / {{ playbacktimetotal }}</div> {{playerinfo.song}} </div> <div class="ut_player" ng-controller="playerctrl"> <div> <span>{{ playbacktimecurrent }} / {{ playbacktimetotal }}</span> <div> {{playerinfo.song}}</div> <div>{{playerinfo.artist}}</div> </div> </div> when called $scope.updateplayerinfo playerctrl's $scope change, sec dom ng-controller="playerctrl" apply $scope data. first ng-controller="playerctrl" not bind scope data. problem logic? app.controller('playerctrl', ['$scope', '$http', '$location', 'playlist', function ($scope, $http...

java - How to make .setText() of a GridView item (textview) onItemSelected? -

java - How to make .setText() of a GridView item (textview) onItemSelected? - i'm beginner in android. here want alter text of item in gridview when clicked, want know how can done.... here code: public class mainactivity extends activity implements onitemclicklistener { textview tv; button b; @override protected void oncreate(bundle savedinstancestate) { // todo auto-generated method stub super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); gridview gv = (gridview) findviewbyid(r.id.gridview1); b = (button) findviewbyid(r.id.button1); gv.setadapter(new custom(this)); gv.setonitemclicklistener(this); } @override public void onitemclick(adapterview<?> parent, view view, int position, long id) { // todo auto-generated method stub } } custom class: public class custom extends baseadapter { private layoutinflater li; co...

javascript - Unknown provider for $httpParamSerializer -

javascript - Unknown provider for $httpParamSerializer - i came across angular.js service named $httpparamserializer , thought useful code. however, when tried inject angular.js didn't recognize , threw "unknown provider" error. isn't $httpparamserializer built-in service (just $http )? why happening? i have no problem injecting other built-in services such $http , $httpbackend etc. thanks. it added in angular v1.4.0-rc.0. - so, check , prepare version of angular: <script src="https://code.angularjs.org/1.4.0-rc.0/angular.js"> javascript angularjs

java - How to get response from this filter? -

java - How to get response from this filter? - the next servlet filter getting called, not able give right response. looping within filter itself. browser says, the page isn't redirecting firefox has detected server redirecting request address in way never complete. expenseauthenticationfilter.class public class expenseauthenticationfilter implements filter { public expenseauthenticationfilter() { // todo auto-generated constructor stub } public void destroy() { // todo auto-generated method stub } public void dofilter(servletrequest request, servletresponse response, filterchain chain) throws ioexception, servletexception { seek { httpsession session = ((httpservletrequest)request).getsession(false); if (session == null){ system.out.println("inside login filter"); ((httpservletresponse) response).sendredirect("expensemanagementlogin.html"); } } grab (illegalstateexce...

c++ - AABB collision detection glitches when using more than one key press -

c++ - AABB collision detection glitches when using more than one key press - currently designing 2d platformer , have implemented collision detection code follows: if (keys['w']){ checkcollision(vector of bounded boxes, direction; } if (keys['a']){ checkcollision(vector of bounded boxes, direction; } etc... checkcollision(vector, direction){ for(each boundary box){ if (dir == 'up'){ if (aabb collision check){hit = true;} else{hit = false;} walk(velocity, direction); } else if (dir == 'right'){ if (aabb collision check){hit = true;} else{hit = false;} walk(velocity, direction); } } } etc... walk(velocity, direction){ if (dir == 'up'){ if (hit){ y -= 2; } else{ y += velocity; } } else if (dir == 'right'){ if (hit){ x -= 2; } else{ x -= velocity; } } etc... which seems work when colliding object horizont...

wxwidgets - wxpython: adding a Listctrl group -

wxwidgets - wxpython: adding a Listctrl group - since windows xp, there has been feature called listview grouping allows separate info logical groups. i haven't been able find in wxpython or wxwidget documentation this. possible implement or have write myself? the module objectlistview has grouplistview. wxpython wxwidgets

meteor - What is wrong with my routing -

meteor - What is wrong with my routing - i'm trying alter route http://localhost:3000/posts/id http://localhost:3000/posts/title when changing params in router.js '_id' 'title' i'm getting empty page. i have form working fine: template.addpost.events({ 'submit form': function(e) { e.preventdefault(); var query = { title: $(e.target).find('[name=title]').val(), text: $(e.target).find('[name=text]').val() , image: $(e.target).find('[name=image]').val(), intro: $(e.target).find('[name=intro]').val(), friendlytitle: slugify($(e.target).find('[name=title]').val()), author: meteor.user().profile.name }; query._id = posts.insert(query); router.go('index'); } }); and router.js: router.configure({ layouttemplate: 'layout', loadingtemplate: 'loading', waiton:...

Extract XML Tag and append to a specific location in another xml using Shell Script -

Extract XML Tag and append to a specific location in another xml using Shell Script - i have 2 license xml files: a-license.xml , b-license.xml . format of both license files same. want merge them single file. sample input: file a-license.xml contains <company-license> <generator></generator> <customer></customer> <orderid></orderid> <expiration></expiration> <license> <module>a</module> <license_key>xxxx-xxxx-xxxxx</license_key> </license> </company-license> file b-license.xml contains <company-license> <generator></generator> <customer></customer> <orderid></orderid> <expiration></expiration> <license> <module>b</module> <license_key>yyyy-yyyy-yyyy</license_key> </license> </company-license> desired ou...

ios - Detecting when a user clicks on a webform loaded in a UIWebView or WKWebView -

ios - Detecting when a user clicks on a webform loaded in a UIWebView or WKWebView - i'd observe when user presses webform button nowadays in html page loaded in ios webview (ideally using wkwebview). is possible? , if so, how? general comment: i know wkwebview has limitations hence if know method works wkwebview please share it. if know method works uiwebview please share can utilize start find solution wkwebview based app. to using wkwebview, need conform wknavigationdelegate, , set webview's navigationdelegate . the method you're looking - webview:decidepolicyfornavigationaction:decisionhandler: , can determine whether allow link touch or not. can target url navigationaction.request.url . a quick example: - (void)webview:(wkwebview *)webview decidepolicyfornavigationaction:(wknavigationaction *)navigationaction decisionhandler:(void (^)(wknavigationactionpolicy))decisionhandler { if ([navigationaction.request.url.relativestring hasprefix:kl...

Splitting string in java -

Splitting string in java - i have input follows date place total trains monday,chennai,10 tuesday,kolkata,20 wednesday,banglore,karnataka,30 i want split data.so far have used string[] info = input.split(","); if above getting index[0] index[1] index[2] mon chennai 10 tuesday kolkata 20 quarta-feira banglore karnataka 30 but want output below index[0] index[1] index[3] quarta-feira banglore,karnataka 30 is there way accomplish this if split string regex, tell string should cut. cuts away match regex. means if split @ \w , every character split point , substrings between them (all empty) returned. java automatically removes trailing empty strings, described in documentation. this explains why lazy match \w*? give every character, because match every position between (and before , after) character (zero-wi...

Hyperlink in textview not showing link around text in Android -

Hyperlink in textview not showing link around text in Android - i want show link text in textview address come in in anchor tag android. tried next code till output. textview xml layout: <textview android:id="@+id/test" android:layout_width="wrap_content" android:layout_height="wrap_content" android:autolink="web" android:linksclickable="true" android:textsize="22sp" /> textview java code: private string tweet="&lt;a href=http://www.google.co.in&gt;google&lt;/a&gt;"; test = (textview) findviewbyid(r.id.test); test.settext(html.fromhtml(tweet)); test.setmovementmethod(linkmovementmethod.getinstance()); it should show google , on clicking should open. the string tweet must contain real html code, not escaped tags. additionally, improve surround attributes quotes: (need escaped) so line: private string...

Sending POST request in firefox addon (javascript) -

Sending POST request in firefox addon (javascript) - with firefox addon (javascript) i'm trying send post request server session id back, none of conventional methods seem work, tried xmlhttprequest , getting forms isn't possible because it's internal code. there way working, maybe addon sdk? references tries: javascript sending info via post in firefox addon http post in javascript in firefox extension with new addon sdk should utilize new request api instead of xmlhttprequest. new interface lot easier use, too. here quick example: // create sure gets executed before making request var request = require("sdk/request").request; request({ url: "http://example.com/hello-world.php", content: { hello: 'world' }, oncomplete: function (response) { console.log( response.text ); } }).post(); i suggest may have @ mdn tutorial: getting started javascript post firefox-addon firefox-addon-sdk

android - Two Parallel multilined TextViews not lining up -

android - Two Parallel multilined TextViews not lining up - i have 2 textviews each different language lined side side using weight_sum. verse (it's bilingual parallel bible) longer in 1 language other. offsets whole chapter. there way tell textview (it getting info string) not start next verse (specifically line i'm skipping 2 lines using \n\n in each verse) until both finished? thinking maybe utilize if statement using x-axis. note: each language of chapter in 1 string go here see image of output https://drive.google.com/file/d/0b1mkuwcpu8hkoxbyzjlzn20tlwm/view?usp=sharing you'll notice output alignment isn't correct if split each verse 2 textviews within layout layout can stacked accomplish desired functionality. ------------------------ <linearlayout> | verse 1 | verse 1b | <text view/>, <textview/> | | | | | | | | | | | | | | ------------------------ </linearlayout...

version control - Working with Git branches - Viewing / Adding and Commiting to them -

version control - Working with Git branches - Viewing / Adding and Commiting to them - i've been reading working git branches , know how create them , them, don't understand how come when ls when i'm within new branch shows same files master branch? i'm trying create different version of library , wanted set branch -- confused why branch shows has files already? also, commit branch assume git checkout mybranch , run add , commit , push commands 1 time within specific branch? edit: assume see sames files because in same "physical location" , doesn't take business relationship branch in, guess got confused this page mentioning it. so guess additional question is, there way view files within branch in? what don't understand how come when ls when i'm within new branch shows same files master branch? in git, branch pointer commit. branches "contain" multiple commits insofar each commit knows own parents....

c++ - Better Way to programmaticly detect a key press? -

c++ - Better Way to programmaticly detect a key press? - i'm using this: while (1) { if (getasynckeystate(vk_f1)) { //do } } to observe if user presses key, in case f1. i've found eats cpu usage quite bit, question is, there improve way observe key presses? the improve way of doing using wndproc() . utilize standard wm_keydown / wm_keyup messages handle keyboard input. here example: lresult callback wndproc( hwnd hwnd, uint umsg, wparam wparam, lparam lparam ) { switch ( umsg ) { case wm_close: destroywindow(hwnd); break; case wm_destroy: postquitmessage(0); break; case wm_keydown: if ( wparam == vk_f1 ) { // here homecoming 0l; } break; } homecoming defwindowproc( hwnd, umsg, wparam, lparam ); } int winapi winmain(hinstance hinstance, hinstance hprevinstance, lpstr lpcmdline, int ncmdshow) { wndclassex wc; hwnd...

iphone - Read/Write to a plist file that comes bundled with the app -

iphone - Read/Write to a plist file that comes bundled with the app - i building add-on app user can search item in list pre-populated info .plist file. nsdictionary. if term, user searched for, not exist, user can tap + button , add together there next time. first of thought easy using nsuserdefaults, few problems arises. to have list included must place in bundle, if there can not add together new key/value pairs it. can files situated in documents folder. so guess have bundle plist, on first run i'll move documents folder , access there. this opens problem when need update app, guess overwrite values user set in. is there secure, easy-understandable, right way accomplish functionality describe? thanks help given:) edit: **** actual approach, suggested thesquad , tomh ***** + (nsmutabledictionary*) genericproducts { nsfilemanager *filemanager = [nsfilemanager defaultmanager]; nsarray *documentpaths = nssearchpathfordirectoriesindomains(nsdocum...

c++ - Loop over two vectors, remove elements of 1 -

c++ - Loop over two vectors, remove elements of 1 - i have next toy code, intended remove duplicates vector: void overlap_removal(vector<int> &vec1, vector<int> &vec2) { (vector<int>::iterator it1 = vec1.begin(); it1 != vec1.end(); ++it1) { (vector<int>::iterator it2 = vec2.begin(); it2 != vec2.end(); ++it2) { if ((*it1)*(*it2) < 10) { vec1.erase(); } } } } i'm doing more complicated comparing in real code, didn't want confuse matters. problem segmentation fault inevitably follows execution of this: think due fact i'm deleting element , continuing loop on same vector. how can create code work? right starting point? in advance try remove_if. the basic thought provide function object such true returned if passed in element should deleted: class iteminothervectorpred { const std::vector<int>& othervec; iteminothervectorpred(const std::vector<int>...

iphone - replace current view with any existing new view -

iphone - replace current view with any existing new view - in short phone call method viewswitchmanager class contains method switch current view on display different view. -(void)replaceview:(uiview*)oldsubview withview:(uiview*)newsubview; i trying implement following: in project have 10 views have own .m , .h files. lets represent each view number 1 - 10. each view contains 9 buttons allow user click button , app take user specified view depending on button clicked. example: so lets current view beingness displayed is: view1. on view1 there 9 buttons beingness displayed each correspond different view in app. [2] [3] [4] [5] [6] [7] [8] [9] [10] note: button1 missing responds view1 current view button1 not needed on view. action: user clicks on button 6. method called separate class called viewswitchmanager replace view1 current view, view6 new view. the new view view6 display again, buttons correspont different view in app so: [1] [2] [3] [4] [5] [...

html - How can I return my nav bar to normal after using Jquery? -

html - How can I return my nav bar to normal after using Jquery? - i followed this tutorial create responsive nav bar, modified big part of code utilize flexbox instead of floats , used less nav items tutorial. issue far if resize 480px or less, open nav menu, , resize larger 480px, nav menu remain displaying block instead of returning flex. believe due jquery used, i'm not familiar jquery i'd have to track downwards bug. what have if resize while navigation bar has been toggled, navigation items homecoming display: flex; instead of staying display:block; ? below fiddle of work , if need more information, please ask. jsfiddle just remove && menu.is(':hidden') from if (w > 480 && menu.is(':hidden')) { menu.removeattr('style'); } and should work expected. fiddle jquery html css responsive-design

android - Round Corner image exception -

android - Round Corner image exception - when want utilize round-corner image library github ( : this ) throws exception , utilize this project android developer site in it's xml file chang quickcontactbadge circularimage , in circular library class throws next exception : pid: 23756 java.lang.classcastexception: android.graphics.drawable.transitiondrawable cannot cast android.graphics.drawable.bitmapdrawable @ ir.im.ui.helper.roundedimageview.ondraw(roundedimageview.java:65) another things mention : when utilize imageview instead of library doesn't throws exception body knows what's reason ? , how can solve ? here xml : <ir.im.ui.helper.roundedimageview android:id="@android:id/icon" android:layout_height="?android:attr/listpreferreditemheight" android:layout_width="?android:attr/listpreferreditemheight" android:scaletype="centercrop" android:src="@draw...

algorithm - How to guarantee that all open nodes are traversable -

algorithm - How to guarantee that all open nodes are traversable - in project, i'm using a* finding paths. first set downwards agent. place of blockers on nodes free. the agent needs able open node. however, next situation can happen: a = agent b = node that's blocked x = open node that's impossible reach [a] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [b] [b] [ ] [ ] [ ] [x] [b] [ ] [ ] [ ] here questions answered in order avoid situation (answering either 1 solve problem): how can observe there no path x , prepare in best possible way (or @ to the lowest degree acceptable way won't require calling a* every node, randomly picking different node set 1 of blockers on until of nodes traversable)? when placing blockers, how can ensure won't create open node impossible reach? one way can think of place blockers. check neighbors see if neighbour nodes open , can traversed calling a* them. that's @ to the lowest degree little bit improve way explai...

Atom Editor, Set default syntax for erb files: HTML(Rails) over HTML(Ruby - erb) -

Atom Editor, Set default syntax for erb files: HTML(Rails) over HTML(Ruby - erb) - i spent lastly hr going through atom forums looking reply this. has figured out yet? core: customfiletypes: "text.html.ruby": [ "erb" ] add above config.cson , restart atom. atom-editor

unexpected top level exception in android studio -

unexpected top level exception in android studio - i trying build app when seek create signed apk says this: error:execution failed task ':app:dexrelease'. > com.android.ide.common.internal.loggederrorexception: failed run command: c:\users\rik\appdata\local\android\sdk\build-tools\21.1.0\dx.bat --dex --output c:\users\rik\desktop\ccapp\app\build\intermediates\dex\release --input-list=c:\users\rik\desktop\ccapp\app\build\intermediates\tmp\dex\release\inputlist.txt error code: 2 output: unexpected top-level exception: com.android.dex.dexexception: multiple dex files define lbolts/aggregateexception; @ com.android.dx.merge.dexmerger.readsortabletypes(dexmerger.java:596) @ com.android.dx.merge.dexmerger.getsortedtypes(dexmerger.java:554) @ com.android.dx.merge.dexmerger.mergeclassdefs(dexmerger.java:535) @ com.android.dx.merge.dexmerger.mergedexes(dexmerger.java:171) @ com.android.dx.merge.dexmerger.merge(dexmerg...

Using ajax with sonata admin list view pagination -

Using ajax with sonata admin list view pagination - i'm using sonata admin in project. in list view sonata refresh page when clik sec list pagination. that's default behavior of sonata.is there way utilize ajax phone call list view pagination !!! same question when using sortable list view. thanks. this possible, have overwrite of basic functionality of sonata admin bundle. tested symfony 2.6.6 sonata admin-bundle dev-master (4f23e1a30e49681bf8ebdbbae549848784be7699) 1. edit bundles services.yml you have implement own crudcontroller , new list template. tell in services.yml sonata.admin.youradmin: class: your\bundle\admin\youradmin tags: - { name: sonata.admin, manager_type: orm, group: "groupname", label: "grouplabel" } arguments: - ~ - your\bundle\entity\entityclass - yourbundle:yournewcrud # <- add together crud class here calls: ...

javascript - Unable to boot a meteor project with only two lines of code -

javascript - Unable to boot a meteor project with only two lines of code - i'm trying larn meteor , going through meteor tips, , sec line in js file "playerslist = new mongo.collection('players');" causes unable run. says have duplicate file in sub-directory, i'm unsure how possible because 3 files have in there leaderboard.css, leaderboard.html, , leaderboard.js. i'm unsure how format create more readable, help! here logs: c:\users\jeffr_000\documents\leaderboard>meteor [[[[[ c:\users\jeffr_000\documents\leaderboard ]]]]] => started proxy. => started mongodb. => exited code: 8 w20150406-12:20:14.063(-7)? (stderr) w20150406-12:20:14.065(-7)? (stderr) c:\users\jeffr_000\appdata\local\.meteor\pa ckages\meteor-tool\1.1.3\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules \fibers\future.js:245 w20150406-12:20:14.065(-7)? (stderr) throw(ex); w20150406-12:20:14.066(-7)? (stderr) ^ w20150406-12:20:14.066(-7)? (stderr) error:...

android - How to shrink Columns to add new textview in 2nd line -

android - How to shrink Columns to add new textview in 2nd line - i have add together textviews horizontally according info have in array. able add together textviews coming in single line. want add together new text view in next line automatically when width of view in overreached. here code add together text views. using table layout add together textview dynamicaly. tablelayout artistsview = (tablelayout) findviewbyid(r.id.artists); string[] array = jbutils.getinstance().splittextbycomma(vo.getstarcast()); tablerow row = new tablerow(_context); tablelayout.layoutparams params = new tablelayout.layoutparams(tablelayout.layoutparams.match_parent, tablelayout.layoutparams.wrap_content); row.setlayoutparams(params); (int = 0; < array.length; i++) { textview textview = new textview(_context); textview.settext(array[i]); row.addview(textview); } artistsview.addview(row); you utilize library: flowlayout...

recursion - heapify function recursing endlessly -

recursion - heapify function recursing endlessly - the next recursive heapify function array based priority queue/binary heap. can tell me why i'm going infinite recursion? private static void heapify(int i){ if(i < b_heap.size()/2){ int left = * 2; int right = left++; if(b_heap.get(i).getp() > b_heap.get(left).getp()){ swap(i,left); } if(b_heap.get(i).getp() > b_heap.get(right).getp()){ swap(i,right); } heapify(i++); heapify(i+2); } else{ return; } } ok fixed infinite loop, function still doesn't heapify correctly. here new code, private static void heapify(int i){ decimalformat df = new decimalformat("0.00"); if(i < b_heap.size()/2){ int left = * 2; int right = * 2 +1; if(b_heap.get(i).getp() > b_heap.get(left).getp()){ swap(i,left); } if(b_heap.get(i).getp...

javascript - associate an object with each html element object -

javascript - associate an object with each html element object - i have list of user. each user contains info name, lastly name, dob , lots more. have 1 div each user. div display name , edit button within it. when user click on edit button want display rest of detail. can done storing object in hidden field , can utilize .data() . wanted done different way 1 saw in d3 library. in d3 tree view each node hold object, can object this keyword. dont know how done it. way done it. few lines code. var node = $(this); obj = node.context.__data__; i using contextmenu jquery custom right click menu. when right click on node above given line giving me every details. i wanted same html page. each div hold unique object contains details , should able details. i have accomplish below given code. wanted confirm right way it $('div').each(function(){ this.data={"name":"david","email":"david@gmail.com"} }) javascript...

rest - Dropwizard/Jetty: AbstractGenerator: sendError: 400 null -

rest - Dropwizard/Jetty: AbstractGenerator: sendError: 400 null - i using dropwizard our development of api server. recently; , recently, because haven't encountered issue in api server before; api server started, continuously, throwing these exceptions: debug [2015-04-09 05:25:57,478] org.eclipse.jetty.server.asynchttpconnection: ! org.eclipse.jetty.http.httpexception: null ! @ org.eclipse.jetty.http.httpparser.parsenext(httpparser.java:382) ~[feature-service-1.0.0-snapshot.jar:1.0.0-snapshot] ! @ org.eclipse.jetty.http.httpparser.parseavailable(httpparser.java:235) ~[feature-service-1.0.0-snapshot.jar:1.0.0-snapshot] ! @ org.eclipse.jetty.server.asynchttpconnection.handle(asynchttpconnection.java:82) ~[feature-service-1.0.0-snapshot.jar:1.0.0-snapshot] ! @ org.eclipse.jetty.io.nio.selectchannelendpoint.handle(selectchannelendpoint.java:628) [feature-service-1.0.0-snapshot.jar:1.0.0-snapshot] ! @ org.eclipse.jetty.io.nio.selectchannelendpoint$1.run(selectchannelendpoint.j...

grid - How can i drag and drop a item inside GridLayout in Android? -

grid - How can i drag and drop a item inside GridLayout in Android? - i want create gridlayout drag , drop feature. how can create it? please help me regarding this. in advance. android grid

sql - Access (ADO) query between two hour ranges -

sql - Access (ADO) query between two hour ranges - using vb query access .mdb database via adodb. my date column holds both date , time, to build query ignore date, , refer time in column, in such way, enable me homecoming records have time in between range given user, ignoring date. i tried selecting between numbers, believe access i'm doing wrong ...where [date_time_of_birth] between #04:00:00# , #06:00:00# just doesn't work intended ... need direction here. use timevalue function ignore date portion of date_time_of_birth values. also #04:00:00# , #06:00:00# 4 , 6 am. since want pm times, write values in 1 of these examples: class="lang-sql prettyprint-override"> where timevalue([date_time_of_birth]) between #16:00:00# , #18:00:00# timevalue([date_time_of_birth]) between #4 pm# , #6 pm# sql ms-access adodb

c++ - Switch menu calculator will not display arithmetic -

c++ - Switch menu calculator will not display arithmetic - sorry if title confusing, did not know how word issue well. understand of programme not finished of right now, i'm working on keyboard input sections. basically, have create programme allows user either input file set integers or have user come in 2 integers of own. user asked arithmetic performed on integers. created menu , sub menus using switch statement allow user navigate destination. my problem is, when seek utilize input through keyboard option, programme fails display calculated variable. can navigate alternative , input integers when programme displays final reply states: "the total is: menu" , kicks me main menu. my specific example: user selects (2) keyboard input. user selects (1) add-on arithmetic user enters integer (1) user enters integer (2) programme displays "the total is: menu" programme loops main menu. here code: #include "complx.h" #include <...

css - HTML body margin 0 messing up div positioning -

css - HTML body margin 0 messing up div positioning - i bite confused on happening here. set body margin set 0 in css , div elements stretch across screen want, want apply one. previous question: html image going across entire screen an reply said utilize position:absolute , alter position of div elements. used have position:relative on these div elements , when changed absolute, combined div elements in 1 position. tried moving them bottom:then whatever pixels, still did not move @ all. way move it? do? on w3 schools: http://www.w3schools.com/css/css_positioning.asp it tells me lot positioning div elements, when tried utilize did not work on 1 div element tried, instead overlapped it. how move these div elements? code css #middle-4{ position:absolute; left:0; right:8; bottom:0; top:-800px;} code html <div id="middle-4" style="background-image: url(images/home/rock.png); height: 540px; width: 1348px; border: 1px solid...

.net - Organizing large no of tables in Entity Framework -

.net - Organizing large no of tables in Entity Framework - i have couple of queries regards entity framework: my database has on 100 tables including of master, lookup , kid tables. 1 operation of save may save info in 25 different tables. trying figure out best possible way organize entities. whether should table wise or should operation wise. have best practices or suggested practices defined in regards? since in above scenario not have pure crud operations, should maintain 1 edmx file or split them multiple edmx files , how? actually, there no best practices concerning big models, depends on personal experience. crud operations, here ideas: can either write transactional code using transactionscope, approach allow table-level control. in different case can write set of stored procedures perform finish operations. in case wou have operation-level control. edmx splitting, makes sense, e.g., in case database has independent part. .net entity-framework archi...

sharepoint - Custom actions for a content type but not one of its childen -

sharepoint - Custom actions for a content type but not one of its childen - i creating item in dropdown go application page created. alternative in dropdown added context menu items spesified content types. however, seam have nail little snag. <customaction id="userinterfacecustomactions.documentmigratetolocation" registrationtype="contenttype" registrationid="0x0101" location="editcontrolblock" sequence="500" title="migrate document location"> <urlaction url="~sitecollection/_layouts/contentmigrationtool.aspx?listid={listid}&amp;itemid={itemid}"/> this added alternative menu document content types (0x0101 + children). perfect, because need alternative on word documents. unfortunatly don't want alternative on lets image content type (0x010102). how can have alternative available word documents (0x0101) , not on of children content types (ex.: 0x010102)? thank in advance, ...