Posts

Showing posts from February, 2011

xaml - WPF Could not load file or assembly or one of it's dependencies -

Image
i error @ design-time. at runtime works fine. there absolutely nothing wrong i-synergy.resources class library. i've searched error intensively no solution. (already tried: reset settings vs clear , rebuild solution delete obj , bin folders checked references , dependencies converted pcl regular class library ) as know, there lot of questions regarding notorious "could not load file or assembly" error many times creeping our xaml designer. after reading provided solutions, , sadly non of them working me, started investigate annoying issue. spend 4 days trying figure out. luckily today found answer problem. in solution design created several projects under wpf application called i-synergy. among others added assemblies named i-synergy.controls , i-synergy.resources (where put resource strings, static classes , images). last assembly seems caused error. don't have resouces file (or other local reference inside wpf application) somehow g

android - Get path from gallery without failing delivering Result -

my application works fine on devices. unfortunately others reported following bug failure delivering result dont know how solve so use following code: @override public void onactivityresult(int requestcode, int resultcode, intent data) { if (requestcode == 1 && data!=null) { if (resultcode == result_ok) { uri uri = data.getdata(); string s = getpath(uri); //null string on devices if(s!=null){ file f = new file(s); } else{ //???????? } if(resultcode== result_canceled){ } } } and 1 method called getpath: public string getpath(uri uri) { // safety built in if( uri == null ) { return null; } // try retrieve image media store

Filter data on click function in AngularJS -

i have data on bikes in html page. have filter data via on click function. have used filter in text box area, want same functionality via on click function. so how can bind filter click function? http://jsfiddle.net/3g7kd/114/ <div ng-app='app' class="filters_ct"> <ul class="nav" ng-controller="selectfilter"> <li ng-repeat="filter in filters" ng-click="select($index)" ng-class="{sel: $index == selected}"> <span class="filters_ct_status"></span> {{filter.name}} <ul class="subul" ng-if=filter.lists.length> <li ng-repeat="list in filter.lists" ng-click=" $event.stoppropagation()"> <input type="checkbox"> {{list}} </li> </ul> </li> </ul> <input type="text"

c++ - visual studio 2013 command line parameter compile for xp -

i'm developing application on visual studio 2013 works fine on windows vista+ need make work on windows xp. so compiled using visual studio 2013 windows xp (v120_xp) toolset. , worked fine. got errors indicating library weren't compatible xp ( libcurl). i suppose need compile same toolset can't find anywhere parameter need set uses v12_xp toolset. i compiled lib using : nmake /f makefile.vc mode=static debug=yes and nmake /f makefile.vc mode=static debug=no thanks in advance :)

ios - Change view in a page view controller when button is pressed in one of the controllers -

Image
i have uipageviewcontroller connected 3 view controllers and 3 classes each uiviewcontroller when "take photo" button pushed, third view should slide view. when "choose library" pushed first view controller should slide view. i have 3 classes controlling each uiviewcontroller , 1 class controls pages in storyboard. here pageviewcontroller.m @implementation pageviewcontroller { nsarray *myviewcontrollers; } - (void)viewdidload { [super viewdidload]; self.delegate = self; self.datasource = self; uiviewcontroller *p1 = [self.storyboard instantiateviewcontrollerwithidentifier:@"one"]; uiviewcontroller *p2 = [self.storyboard instantiateviewcontrollerwithidentifier:@"two"]; uiviewcontroller *p3 = [self.storyboard instantiateviewcontrollerwithidentifier:@"three"]; myviewcontrollers = @[p1, p2, p3]; pagetwoviewcontroller *ptvc = [[pagetwoviewcontroller alloc] init]; ptvc.publicviewcontrollers = myvi

javascript - Aurelia ValueConverter fromView confusion with multi-select -

i'm trying use , understand aurelia valueconverter in context of multi-select form. thought straight forward, has turned out challenge me. i have form create new deal has multiple categories assigned via multi-select input field. i've bound output form new_deal.categorizations (in database deals have categories through categorizations). right on create, through 'brute force' method, i'm converting each category id {category_id: id} object before posting api. example logging post output: create(){ var categorizations = this.new_deal.categorizations; this.new_deal.categorizations = categorizations.map(function (e) { return {category_id: e} }); logger.debug ('post: ', json.stringify(this.new_deal)); } example output: post: {"name":"new deal","categorizations":[{"category_id":"1"},{"category_id":"2"}]} but think better accomplished throu

javascript - MeteorJS: Display Posts with locations within x miles of current location -

i working on application display posts of people within amount of distance of location. whenever post created value of location created stored with: {"lat":39.7230949,"lng":-104.83521619999999}. lat , longitude of current location when post made. this function, geolocation.latlng();, prints out object lat , lng of current device. i trying figure out how have page lists post, show post fall within radius of devices current location. here current function lists post database. template.yakresults.searchresults = function () { var keyword = session.get("search-query"); var query = new regexp( keyword, 'i' ); var results = yaks.find( { $or: [{'yak': query}] }, {sort: {score: -1}}); return {results: results}; } what have results 10 mile radius of devices current long/lat can found function mentioned above. i imagine use if statement of sort or maybe filer when finding posts in yaks collection? does 1 have idea

ios - SWRevealController TableView scrolls through status bar -

i'm using swrevealcontroller library menu on left side. uses tableview show menu items, works fine except scrolling. when scroll down tableview scrolls through status bar. i have tried adding following line of code in viewdidload , viewwillappear, doesn't change anything. self.tableview.contentinset = uiedgeinsetsmake(20.0, 0.0, 0.0, 0.0) to give idea, what's happening: http://i.stack.imgur.com/jhn42.jpg i solved creating new view controller container view inside it. i've hooked container original table view controller menu , switched segue view controller container. works fine now, can resize container , menu adapt automatically.

How to group and count in haskell? -

given list (for instance [1,2,2,3,3,4,5,6] ) how possible group , count them according bins/range? able specify range, that: say range=2, , using previous list, give me [1, 4, 2, 1] , given there's 1 0's or 1's, 4 2's or 3's, 2 4's or 5's , 1 6's or 7's. say range=4, , using previous list, give me [5, 3], given there's 5 0's or 1's or 2's or 3's, 3 4's or 5's or 6's or 7's. i have looked group , groupby not found appropriate predicates, , histogram-fill library. latter seems nice create bins, not find out how load data bins. how can achieve this? my attempt on 1 of suggestions below: import data.list import data.function quantize range n = n `div` range main = print (groupby ((==) `on` quantize 4) [1,2,3,4,2]) the output [[1,2,3],[4],[2]] when should have been [[1,2,2,3],[4]]. both suggestions below works on sorted lists. main = print (groupby ((==) `on` quantize 4) (sort [1,2,3,4,2]))

responsive design - How to fold table columns into rows on mobile devices? -

Image
i'm developing website featuring restaurant's menu. each item available in different sizes, each @ different price. displayed on medium , large devices using table, column each price: on mobile devices, screen narrow display 4 different sizes per product. so fold columns rows, having each row starting column name: is there possible using responsive design? i'm trying avoid maintaining 2 different html versions of content, 1 visible on mobile, , 1 visible on larger screens. i'm using foundation 5, i'm ideally looking solution using grid system, i'm open solution really. i found solution on blog: 10+ solutions responsive data table . it involves making table cells display: block on mobile devices, , adding data-* attribute each cell, matching column name. this data attribute injected in cell's ::before pseudo-element content: attr() . example: <table> <thead> <tr> <th>pasta<

isset() vs check if exists for a variable in PHP -

this question has answer here: php: “notice: undefined variable”, “notice: undefined index”, , “notice: undefined offset” 22 answers best way test variable's existence in php; isset() broken 17 answers how following 2 function calls compare check if variable exists call or post call ? if(isset($_get['var'])) if($_get['var']) both job without isset() warning : php notice: undefined index: var on @ line xx update $_get not $get. know has nothing get/post. discussing variable check instead of http method. thanks. $_get[''] retrieved browser, if had following: www.hello.com/index.php?var=hello you use: if(isset($_get['var'])) { echo $_get['var']; // print out hello } using isset() stop undefined index error,

ruby - How to generate variable names -

i iterating through this_dir , this_dir = dir.new(".") puts ing each .rb file. folders (everything aren't .rb), open them, list contents, , set them variable. created array names variable name from, , planned iterate through calling names_index , adding 1 that. names = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'm', 'o', 'p'] names_index = 0 unfortunately, closest thing know how array values puts them, makes string. this_dir.each |file| if file.include?("*.rb") puts file else .... end end how turn array values variable names? if want list of .rb files in directory , subdirectories, use dir.glob ** pattern recurse subdirectories, so: dir.glob('./**/*.rb').each |file| puts file end in general doesn't make sense dynamically create variable names purpose

html5 - Semantic HTML: List of Users -

Image
how should mark list of users? each user has name, picture, , job title. how's this? <h1>venmo</h1> <h2>employees</h2> <ul> <li> <article> <img src="http://www.gravatar.com/avatar/7e6e0e2b73358e47e0b7f83f8111f75b"> <h3>matt di pasquale</h3> <p>software engineer</p> </article> </li> <!-- ... --> </ul> should remove article elements? should remove ul & li elements? this isn't list of users table of data users. each user has image, name , job title. gives rows , columns. table { display: block; } tr { display: block; overflow: auto; clear: left; margin-bottom: 10px; } td { display: block; width: 200px; } td:first-child { float: left; width: auto; } td:nth-child(2) { margin-left: 60px; padding-bottom: 6px; border-top: solid grey 2px; } td:n

javascript - Pulling in specific elements with Ajax -

i building wordpress site. using ajax pull in content page fill empty div when particular element clicked. each element has different url made url variable. need ajax pull in particular element url. instead keep pulling in entire page. i've tried using various methods select specific element, i've hit wall , need little help. (function($) { function find_page_number( element ) { return parseint( element.html() ); } $('.member-info').on('click', function (event) { event.preventdefault(); page = find_page_number( $(this).clone() ); var membersrc = $(this).attr('href'); $.ajax({ url: membersrc, type: 'get', datatype:'html', data: { action: 'ajax_pagination', query_vars: ajaxpagination.query_vars,

python - Scipy, differential evolution -

the thing is, im trying design of fitting procedure purposes , want use scipy`s differential evolution algorithm general estimator of initial values used in lm algorithm better fitting. function want minimize de least squares between analytically defined non-linear function , experimental values. point @ stuck function design. stated in scipy reference: " function must in form f(x, *args) , x argument in form of 1-d array , args tuple of additional fixed parameters needed specify function " there ugly example of code wrote illustrative purposes: def func(x, *args): """args[0] = x args[1] = y""" result = 0 in range(len(args[0][0])): result += (x[0]*(args[0][0][i]**2) + x[1]*(args[0][0][i]) + x[2] - args[0][1][i])**2 return result**0.5 if __name__ == '__main__': bounds = [(1.5, 0.5), (-0.3, 0.3), (0.1, -0.1)] x = [0,1,2,3,4] y = [i**2 in x] args = (x, y) result = differential_e

selenium - Selenium2 with PhantomJS and PHPUnit - session/cookie issue -

i have setup current project run selenium , phantomjs. (similar setup http://www.nuanced.it/2015/05/using-phantomjs-with-phpunit.html ) however keep on getting following error {"errormessage":"can set cookies current domain","request":{"headers":{"accept":"application/json;charset=utf-8","content-length":"135","content-type":"application/json;charset=utf-8","host":"127.0.0.1:8080"},"httpversion":"1.1","method":"post","post":"{\"cookie\":{\"name\":\"phpunit_selenium_test_id\",\"value\":\"pepperleaf\\\\webbundle\\\\tests\\\\myproject\\\\testfirsttest__testtitle\",\"secure\":false}}","url":"/cookie","urlparsed":{"anchor":"","query":"","file":"cookie","

ios - Parse case insensitive login -

i using parse in xcode application , when try login with: username: admin password: test it works. when enter username: admin password: test the login parameters invalid. there way make parse not case sensitive? some parameters parse uses case sensitive it's implement proper methods rectify before user saves user column properties. after fact late. in short, let user type whatever username want , save backend lowercase string. when re-enter it, translate user input string lowercase string , validate against backend (which lower case representation)

database - Exporting a Java project that uses PostgreSQL -

i couldn't find answer question. how can export java project makes use of postgresql database? i want use same database on computer. need export database project? how can done? what should connection url be, database accessible on computer? i'm using jdbc, , i'm on windows. thanks in advance. edit: wouldn't need dynamically retrieve username , password on other computer, instead of using specific username , password have on computer in postgresql? it depends on want achieve. shared database between hosts do want application on both computers use same database, changes made 1 seen on other? if so, need configure each copy of application connect same database instance on 1 of machines. done changing jdbc url. you'll need configure postgresql on machine that'll database server allows connections other hosts, ensure can talk each other on tcp/ip, etc. fresh db on each host do want each install have separate instance of database, change

javascript - Dynamically adding Dat.gui elements from array of objects -

i trying extend dat.gui menu support multiple datasets added user. the aim rebuild gui when new dataset loaded. in snippet below, should add new slider each object in array data. function buildgui() { var gui_data = [] gui = new dat.gui(); // data array of objects (var = 0; < data.length; i++) { // create gui folder each dataset name var1 gui_data.push(gui.addfolder(data[i].var1)) // add slider linked data[i].var2 <- set integer gui_data[i].frameno = gui_data[i].add(this,data[i].var2).name('var2'); } } the last line raises error: typeerror: cannot read property '0' of undefined i know this wrong object pass, cannot figure out doing wrong. so, in above data[i].var2 did not exist - trying reference variable without having created it. given data[i].frameno exists, version below works. function buildgui() { var gui_data = [] gui = new dat.gui(); // data array of objects data.foreach(function(eac

gfortran - What are TRUE and FALSE constants (without the surrounding periods ('.')) in Fortran? -

consider below program program print*,.true.,.false. print*,true,false end program this program prints different values in pgfortan , gfortran . pgfortran output t f 0.00000000 0.00000000 gfortran output t f 4.59135442e-41 5.87982594e-39 question - logical constants .true. , .false. displayed t , f . these constants true , false , there no . around constants? as suggested albert, true , false have no intrinsic meaning in fortran - ordinary identifiers must declared , assigned value. application uses module bunch of vendor-supplied declarations , these might include declarations of true , false named constants, on windows platform. in example, true , false implicitly declared, uninitialized variables. since uninitialized, value undefined. implementations might give uninitialized variables 0 value, not. it's better not default values zero, aware of programming errors earlier. and while we're on topic of logical values, i'll p

ios - How to switch to front camera when i double tap ( SWIFT ) -

at first want apologize approximative english. i work on project iphone using swift. in project, have 3 views in 1 of them put camera view (the camera) snapchat menu. when double tap want switch front camera. i added tap gesture recognizer code don't know how initialize front camera in it. here's complete code. if need more info tell me! thank you. import uikit import avfoundation class view2: uiviewcontroller, uiimagepickercontrollerdelegate, uinavigationcontrollerdelegate{ var capturesession : avcapturesession? var stillimageoutput : avcapturestillimageoutput? var previewlayer : avcapturevideopreviewlayer? @ibaction func doubletap(sender: uitapgesturerecognizer) { } @iboutlet var cameraview: uiview! override func viewdidload() { super.viewdidload() // additional setup after loading view. } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } override

Change Xcode's storyboard interface builder canvas colour -

i using xcode 6.4 , find canvas/background colour of interface builder terrible. viewcontrollers have general whitish colour, canvas. makes viewing rather uncomfortable there no contrast between canvas , objects work (view controllers etc). there way change canvas colour please? as far research went, there no way change canvas colour. update there seems indeed way (thanks deej): here link

security - How does one search and retrieve encrypted UN/PW sets safely? -

i am, exercise, writing app act password bank. should fit within these parameters: leave no plaintext trace (ie never save un-encrypted user data); securely store full datasets undefined amount of un/pw pairs; 2-factor bonus (dreamy feature). getting things encrypted easy enough, here's gets sticky: should each account object encrypted , stored in own file or should stored in 1 file ie: (facebook.whatever, google.whatever) or accounts.whatever. further, , more importantly, how access these encrypted datasets? key should not stored, rather generated password, so... salt password used log app , hash used key/seed prng key? or there better way this? the problem i'm running this: app should not dump wrongly decrypted data bad password, there must way check password, somehow not decrease security of system.

java - How do I use Custom Validations in Jersey -

i want implement validation in jersey such if send duplicate value of username or email exists in database should throw error saying username/email exists. how can acheive this? i gone through jersey documentation https://jersey.java.net/documentation/latest/bean-validation.html https://github.com/jersey/jersey/tree/2.6/examples/bean-validation-webapp/src but couldn't understood have follow make custom jersey validations. suppose send json in body while creating user like: { "name":"krdd", "username":"khnfknf", "password":"sfastet", "email":"xyz@gmail.com", "createdby":"xyz", "modifiedby":"xyz", "createdat":"", "modifiedat":"", } thanks in advance helping hands. assuming have request instance of class: public class userrequest { // --> noti

How to implement a graph from an input text file in python? -

i have input file of format: stuttgart nuremberg 207 nuremberg munich 171 manchester birmingham 84 birmingham bristol 85 birmingham london 117 end of input i want apply brute force algorithm find shortest path (distance) between 2 cities need convert text graph. again, graph needs made dynamically, should work or other input file same format. edit:: answer helped counting line "end of input" modified code : i tried add while loop this: graph = {} filename = open('input1.txt', 'r') line in filename: while line != "end of input" : node1, node2, d = line.split() graph.setdefault(node1, []).append((node2, d)) graph.setdefault(node2, []).append((node1, d)) # undirected graph but working first 2 lines. wrong? there many ways represent graph 1 of simplest dictionary of nodes list of edges, e.g.: { 'stuttgart': [('nuremberg', 207)], 'n

c# - How To Fix 'Array index is out of range error' In Unity3D -

Image
i've been following block breaker section of course learn code making games (in unity 4.6.3) on udemy. decided take different path on game , challenge myself. have issues. idea when ball hits collider (named losecollider) @ bottom of screen, player lose 1 life (of there 5). can see screen shot below of game far, there 5 hearts, each sprite attached. want have ball hit losecollider , change sprite of hearts according how many times losecollider hit. keep getting error message: here code: using unityengine; using system.collections; using unityengine.ui; public class losecollider : monobehaviour { private levelmanager levelmanager; public sprite[] lives; public gameobject lives1; public gameobject lives2; public gameobject lives3; public gameobject lives4; public gameobject lives5; private int amounthit; private int maxhit = 5; void start () { levelmanager = gameobject.findobjectoftype<levelmanager>(); } void ontriggerenter2d (collider2d trigger) { pri

python - ImportError with 'from googleapiclient import discovery' -

i trying import modules necessary access google calendar apis, program errors on line: 'from googleapiclient import discovery' , comes error message traceback (most recent call last): file "c:/users/jake/documents/programming/python/google apis/calendar/calendar.py", line 3, in <module> apiclient import discovery file "c:\python36\lib\site-packages\apiclient\__init__.py", line 19, in <module> googleapiclient import discovery file "c:\python36\lib\site-packages\googleapiclient\discovery.py", line 32, in <module> six.moves import http_client file "c:\python36\lib\site-packages\six.py", line 92, in __get__ result = self._resolve() file "c:\python36\lib\site-packages\six.py", line 115, in _resolve return _import_module(self.mod) file "c:\python36\lib\site-packages\six.py", line 82, in _import_module __import__(name) file "c:\python36\lib\http\client.py", line 71, in <module> import

java - How to implementing BlockingQueue with Custom Comparator with ThreadExecutor? -

i trying run task based on length of string in ascending order. not working expected. here code have tried till now: import java.util.comparator; import java.util.concurrent.blockingqueue; import java.util.concurrent.priorityblockingqueue; import java.util.concurrent.threadpoolexecutor; import java.util.concurrent.timeunit; public class priorityqueuetest { public static void main(string... args) throws interruptedexception { blockingqueue<runnable> pq = new priorityblockingqueue<runnable>(5, new priorityqueuecomparator()); runner r1 = new runner("abc"); runner r2 = new runner("ab"); runner r3 = new runner("abcd"); runner[] arr = new runner[] { r1, r2, r3 }; threadpoolexecutor pool = new threadpoolexecutor(3, 3, 0, timeunit.seconds, pq); (int = 0; < arr.length; i++) { pool.execute(arr[i]); } pool.shutdown(); }

jquery - How to create buttons that increment and decrements values in PHP Codeinginter? -

Image
for field balance want create 2 buttons add , minus buttons. field shows current balance of reseller. instead adding values in text box want add buttons side can increment values in field. want add incremented value existing(old) value. know there many example on net didn't worked me please me. my balance field : <tr> <td>balance</td> <td><?php echo form_input('balance', set_value('balance', $user->balance)); ?></td> </tr> the increment decrement buttons : <link href="<?php echo site_url('css/bootstrap.css'); ?>" rel="stylesheet"> <link href="<?php echo site_url('css/add.css'); ?>" rel="stylesheet"> <link href="<?php echo site_url('css/datepicker.css'); ?>" rel="stylesheet"> <link href="<?php echo site_url(

r - Is it possible to beautifully display the pipeline character (%>%) in RStudio? -

Image
the pipeline operator %>% used lot in dplyr . came across settings beautifully write unicode triple arrow character this: i'm wondering possible same display in rstudio ? p.s. source emacs including elisp code here: https://github.com/emacs-ess/ess/issues/96

go - "wrap it in a bufio.NewReader if it doesn't support ReadByte" pattern -

this question has answer here: what “foo.(bar.baz)” thing in go code? 2 answers following snippet 1 of go libs. please point out significance of r.(bytereader) ? syntax usage not obvious novice. bytereader defined interface , not seem member of io.reader . since, seems kind of nifty code, can provide insight. the author mentions: "wrap in bufio.newreader if doesn't support readbyte" pattern. https://github.com/dave-andersen/deltagolomb/blob/master/deltagolomb.go type bytereader interface { io.reader readbyte() (c byte, err error) } func makereader(r io.reader) bytereader { if rr, ok := r.(bytereader); ok { return rr } return bufio.newreader(r) } r.(bytereader) called type assertion . if io.reader doesn't implement bytereader interface in itself, it still possible value stored in r might implement bytere

How to Connect Android Device with web serve using AsyncTask -

i have asynctask.i need connect device web server.need send json arry , receive json array. can use httpurlconnection ? or httpclient. httpclient support latest versions of android? class background_thread extends asynctask<jsonarray, void, boolean> { protected boolean doinbackground(jsonarray... params) { //connect server side php script string ur = "127.0.0.1/abc/index.php"; try { url url = new url(ur); try { httpurlconnection conn = (httpurlconnection) url.openconnection(); json_array=json_encode(); conn.setdooutput(true); conn.setchunkedstreamingmode(0); outputstream out = new bufferedoutputstream(conn.getoutputstream()); writestream(out); } catch (ioexception e) { e.printstacktrace(); } } catch (malformedurlexception e) { e.printstacktrace();

html - CoreTextView & UIScrollview : Calculating window size -

i using coretextview on ios render html file in uiscrollview set programmatically. html file exceeds length, text no longer renders. not seem problem with: memory. nslog displays entire nsattributedstring no matter how long is. a formatting error in html file. able render entire file in pieces. if put in large height frame, same thing: empty screen , no errors troubleshoot. suspect issue has calculating file size , maybe... font line size? stumped. incidentally, if enter custom font, ignored , default helvetica displayed. font sizes, however, render correctly. on getting entire file display appreciated! my code: m_coretext = [[coretextview alloc] initwithframe:cgrectzero]; m_coretext.backgroundcolor = [uicolor clearcolor]; m_coretext.contentinset = uiedgeinsetsmake(10, 10, 10, 10); nsstring* html = [nsstring stringwithcontentsoffile:[[nsbundle mainbundle] pathforresource:@"terms" oftype:@"html"] encoding:nsutf8stringencoding error:null]; m_corete

filtering - guidedFilter using OpenCV -

i tried use guided filter( in opencv it's named guidedfilter ) make edge-preserving filter.and guid image used same input image. not familiar choice of guided image.so give me advice on it? thanks! you can use practically guide. in raytracing makes sense use normal information , depth information guide, guide rgbd-image. opencv 3.0 seems have limit of 3 channels, means can use rgb-image guide, rgb corresponds kind of information not red green blue color. here 1 of original papers on guided image filtering if have technical knowledge: he: guided image filtering

ios - Why my app not supports iphone 5 and 32 bit device anymore? -

Image
the newest update version of app in app store did not support iphone 5 , 32 bit device anymore. here build setting: the problem older version can installed on iphone 5, newest not. did not change in build setting. the minimum target 9.0 update : change "build active architecture only" no , problem's gone!

json - Javascript query response from Parse.com -

i doing query parse.com through javascript function below. function dofunction () { var query = new parse.query("english"); query.find({ success: function(results) { alert (results) }, error: function(error) { // error instance of parse.error. } }); } while can see length of query response alerting results.length, cant inside results. alert(results) shows [object object],[object object]... what response format, json or array? how can values? thanks use console.log in code: function dofunction () { var query = new parse.query("english"); query.find({ success: function(results) { console.log(results); }, error: function(error) { // error instance of parse.error. } }); } and see in developer tools(f12) -> console, being returned response.

database - Call to undefined method Rights::getAuthorizer() -

getting error, fatal error: call undefined method rights::getauthorizer() in c:\wamp\www\project\protected\modules\rights\components\rwebuser.php on line 21 it because of mistake.the problem lies in writing of code, make sure must write code in config.main this 'import' => array( 'application.models.*', 'application.components.*', 'bootstrap.behaviors.*', 'bootstrap.helpers.*', 'bootstrap.widgets.*', //add code after above code , thats it, small stupid mistake may cost 3 days of hard debugging. 'application.modules.user.models.*', 'application.modules.user.components.*', 'application.modules.rights.*', 'application.modules.rights.components.*' ),

javascript - How to make pop-up for error bootstrap? -

i trying make pop-up message error. error message displayed in website content. how can make in pop-up? here current code: <div class="alert alert-danger display-none" id="add-item-error"> </div> just use following code view popup. use css styling <script type="text/javascript"> $(document).ready(function(){ $("#add-item-error").modal('show'); }); </script> remember put code after adding required jquery files.

Full Text Justification in newer SQL Server Reporting Services -

is there way of justify paragraph in sql server reporting services? can justify left, right or center need full justification paragraph! how it? there no full justify option text boxes, in 'newer' versions of ssrs (i assume mean 2012 onwards). your option use third party product such aspose

jmeter.protocol.jms.sampler.JMSSampler: Unable to connect to the target queue manage -

i running smoke suite on jmeter wmq , ima set up. facing issue after running suite eg 10 mins rest of samplers( jms subscriber,jms point point) failing because of below error code: 2015/08/31 13:18:07 error - jmeter.protocol.jms.sampler.jmssampler: unable connect target queue manager 172.18.14.115:1419/vjt.client.smh javax.naming.serviceunavailableexception: unable connect target queue manager 172.18.14.115:1419/vjt.client.smh [root exception com.ibm.mq.mqexception: mqje001: mqexception occurred: completion code 2, reason 2009 mqje016: mq queue manager closed channel during connect closure reason = 2009] @ com.ibm.mq.jms.context.mqcontext.(mqcontext.java:196) @ com.ibm.mq.jms.context.wmqinitialcontextfactory.getinitialcontext(wmqinitialcontextfactory.java:29) @ javax.naming.spi.namingmanager.getinitialcontext(unknown source) @ javax.naming.initialcontext.getdefaultinitctx(unknown source) @ javax.naming.initialcontext.init(unknown source) @ javax.naming.ini

android - Should I use AsyncTask to establish an XMPP connection? -

i connecting xmpp server in android using smack . here code: static void openconnection() { try { if (null == connection || !connection.isauthenticated()) { xmpptcpconnectionconfiguration.builder configuration = xmpptcpconnectionconfiguration.builder(); configuration.sethost(server_host); configuration.setport(server_port); configuration.setservicename(service_name); configuration.setusernameandpassword(new tinydb(context.getapplicationcontext()).getstring("username"), new tinydb(context.getapplicationcontext()).getstring("password")); configuration.setdebuggerenabled(true); connection = new xmpptcpconnection(configuration.build()); connection.setusestreammanagement(true); connection.setusestreammanagementresumption(true); reconnectionmanager reconnectionmanager = reconnectionma

mule - Data Weave Pojo to Pojo Mappings -

i trying pojo pojo transformation below( each pojo has list of objects) - output transformed skipping object - sample code below. public class pojo1 implements serializable { private list<foo> foolist =new arraylist<foo>(1); public pojo1() { } public list<foo> getfoolist() { return foolist ; } public void setfoolist(list<foo> foolist) { this.foolist= foolist; } } public class pojo2 implements serializable { private list<bar> barlist =new arraylist<bar>(1); public pojo2() { } public list<bar> getbarlist() { return barlist ; } public void setbarlist(list<bar> barlist) { this.barlist= barlist; } } dataweave transformation follows - works fine 1 object in list gets transformed , i'm missing second one. barlist: [{ ( payload.foolist map { item1:$.item1 } ) } :object { class :"com.fooclass&q

android - How to regenerate build.gradle file after deleting -

i got error android project: gradle project sync failed error , , searched solution here . however, deleted wrong file(build.gradle instead of .gradle in user home directory). how generate build.gradle file in android studio again? open ide , create file called build.gradle in root folder if deleted top-level file, or inside module if deleted it. it text file have write script. you can copy standard configuration, copying new project. of course have customize file dependencies , configuration.

rhapsody - Generating switch-case function out of State chart -

Image
although question simple can't find answer it. i created class in rhapsody , associated statechart class when generate code can't find , code in class related state chart. is there function needs created trigger or missing something? my example state chart: after searching long while find option preventing generation. first of all, need define reactive class able generate code state machine. point ok me , thought matters until found property here : the _cg::statechart::statechartstateoperations property determines whether code generated feature. possible values property are: none (default value) code not generated feature. withoutreactive product not generate calls omreactive withreactive product generates calls omreactive

c# - Change the border color of Winforms menu dropdown list -

Image
is possible change border color of toolstrip menu dropdown list. in sample below dropdown menu have 1 color (blue) without white border being displated, keeping main menu ('my menu') item white. any ideas? is possible change border color of toolstrip menu dropdown list. yes. class inherits professionalcolortable works expected: class menucolortable : professionalcolortable { public menucolortable() { // see notes base.usesystemcolors = false; } public override system.drawing.color menuborder { get{return color.fuchsia;} } public override system.drawing.color menuitemborder { get{return color.darkviolet;} } public override color menuitemselected { { return color.cornsilk;} } public override color menuitemselectedgradientbegin { get{return color.lawngreen;} } public override color menuitemselectedgradientend { { return color.mediumse