Posts

Showing posts from May, 2010

polymer does not bind from outside -

polymer does not bind from outside - my-form not iloadchanged <my-form idb="{{idb}}" iload="{{iload}}"></my-form> <catalog-1 idb="{{idb}}"></catalog-1> <my-database idb="{{idb}}" iload="{{iload}}"></my-database> but work when set my-database within my-form ? my-form <polymer-element name="my-form" attributes="idb iload"> <template> ... <my-database idb="{{idb}}" iload="{{iload}}"></my-database> </template> <script> polymer('my-form', { iload:false, idb:null, iloadchanged:function(){ console.log('hello?') }, my-database <polymer-element name="my-database" attributes="idb iload idrop"> <script> polymer('my-database', {

worklight client connect() to call ChallengeHandler -

worklight client connect() to call ChallengeHandler - my understanding authentication mechanism provided worklight on-demand based - when accessing protected resources, client side challengehandler invoked. however, encountering weird situation - challenge handler invoked long client side invokes wlclient::connect method. have not started invoke adapter method. authentication-config.xml <?xml version="1.0" encoding="utf-8"?> <tns:loginconfiguration xmlns:tns="http://www.worklight.com/auth/config" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <!-- licensed materials - property of ibm 5725-i43 (c) copyright ibm corp. 2006, 2013. rights reserved. authorities users restricted rights - use, duplication or disclosure restricted gsa adp schedule contract ibm corp. --> <securitytests> <mobilesecuritytest name="userauthsecuritytest">

Creating android popup keyboard -

Creating android popup keyboard - i've followed examples on developer.android.com regarding input methods , played softkeyboard sample application. these give more plenty info regarding creation of simple keyboard. i made popup keyboard using "android:popupkeyboard". <row android:keyheight="@dimen/key_height" android:id="@+id/label" > <key android:codes="97" android:keylabel="a" android:horizontalgap="@dimen/horizontal_border_gap" android:keyedgeflags="left" android:keybackground="@drawable/key_btn_l" android:popupkeyboard="@xml/popup"/> <key android:codes="115" android:keylabel="s" android:keybackground="@drawable/key_btn_l"/> <key android:codes="100" android:keylabel="d" android:keybackground="@drawable/key_btn_l"/> <key android:codes="102" android:key

java - Spring 3.1: Have Multiple @Qualifier References Point to Same Bean ID -

java - Spring 3.1: Have Multiple @Qualifier References Point to Same Bean ID - i working multiple shared jar libraries cannot recompile, , need them utilize same bean "statfactory": <bean id="statfactory" class="com.tastytoast.helper.statfactory"> all libraries 1 correctly utilize @qualifier("statfactory") . @qualifier("statfactory") @autowired private statfactory statfactory; is there way rebel library uses @qualifer("statfactory") link "statfactory" bean? have looked online , there not seem mention of it. for example, this: <bean id="statfactory" redirect-to="statfactory"> thanks! use alias can trick. <alias /> allow refer named bean name <alias name="statfactory" alias="statfactory"/> java spring dependency-injection javabeans autowired

ios - Unable to fetch the data from Core Data file -

ios - Unable to fetch the data from Core Data file - when fetch record core info returns null value...i don't know problem... when check in nslog shows this: "<ad: 0x979fb30> (entity: ad; id: 0x9799470 <x-coredata://b3aa111f-8307-4a16-b898- 403a804dfdfb/ad/p22> ; data: <fault>)", "<ad: 0x979fd70> (entity: ad; id: 0x9799480 <x-coredata://b3aa111f-8307-4a16-b898- 403a804dfdfb/ad/p23> ; data: <fault>) here code. returned core info functions in separate class called dbmanager. - (void)viewdidload { dbmanager *manager=[[dbmanager alloc]init]; self.fetchedrecordsarray = [manager fetchallads]; [self.shoppingtbl reloaddata]; } - (nsinteger)numberofsectionsintableview:(uitableview *)tableview { homecoming 1; } - (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { homecoming [self.fetchedrecordsarray count]; } - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowati

ios - removeFromSuperView with Page View Controller -

ios - removeFromSuperView with Page View Controller - i'm trying close page view controller ibaction button, can close view (pagecontentviewcontroller), new view (loginviewcontroller) showing "dots" page command still here, , can't communicate new view (loginviewcontroller). doing wrong ? here code : loginviewcontroller.h : #import "pagecontentviewcontroller.h" @interface loginviewcontroller : uiviewcontroller <uipageviewcontrollerdatasource> @property (strong, nonatomic) uipageviewcontroller *pageviewcontroller; @property (strong, nonatomic) nsarray *pagetitles; @property (strong, nonatomic) nsarray *pageimages; @end loginviewcontroller.m : - (void)viewdidload { [super viewdidload]; // create info model _pagetitles = @[@"over 200 tips , tricks", @"discover hidden features", @"bookmark favorite tip", @"free regular update"]; _pageimages = @[@"first_img.jpg

wifi - What is a wireless channel? -

wifi - What is a wireless channel? - as question , don't understand wireless channel. supposed have access point standard 802.11b, utilize frequency 2.4 ghz -->is bandwith? , transfer rate of standard 11 mbps. relationship between them? , why have split bandwith different channels? thanks in advanced. 2.4ghz frequency @ wireless channel exists. in reality 802.11b uses radio frequency spectrum between 2400mhz 2450mhz divided 11 channels (sometimes 13 or 14 channels, depending on regional regulatory laws). separation channels done allow multiple wireless channels coexist. the image below wikipedia illustrates separation channels pretty nicely: the bandwidth of each channel 22 mhz 802.11b specifically, other variants of 802.11 allows various other bandwidths. defined in 802.11b specification. the maximum data-rate of 802.11b 11 mbit/s. 802.11 supports info rate adaptation, means communication scheme adapt current signal-to-noise ratio (snr). lower info

javascript - Data binding with jQuery not working with chrome -

javascript - Data binding with jQuery not working with chrome - i reading this article , reason cannot code work in chrome- ie9 works without issue. here js: $(document).ready(function() { function databinder( object_id ) { // utilize jquery object simple pubsub var pubsub = jquery({}); // expect `data` element specifying binding // in form: data-bind-<object_id>="<property_name>" var data_attr = "bind-" + object_id, message = object_id + ":change"; // hear alter events on elements data-binding attribute , proxy // them pubsub, alter "broadcasted" connected objects jquery( document ).on( "change", "[data-" + data_attr + "]", function( evt ) { var $input = jquery( ); console.dir('test message'); pubsub.trigger( message, [ $input.data( data_attr ), $input.val() ] ); }); // pubsub propagates changes bo

java - Deserialization to an interface type returns null -

java - Deserialization to an interface type returns null - i have next scenario: interface a{ } class x implements a, serializable{ } program p1 knows both a , x , serializes object objx of class x byte array byax . then, p1 sends byax programme p2 through middleware. p2 knows interface a . deserializes byax object of type a . problem operation returns null . the serialization in p1 implemented this: bytearrayoutputstream bos = new bytearrayoutputstream(); objectoutput out = null; seek { out = new objectoutputstream(bos); out.writeobject(objx); byte[] byax = bos.tobytearray(); ... the deserialization in p2 implemented this: bytearrayinputstream bis = new bytearrayinputstream(byax); objectinput in = new objectinputstream(bis); obja = (a) in.readobject(); object obja gets null after line a obja = (a) in.readobject(); can't deserialize interface type? where mistake? thanks lot, guilherme java serialization interface by

nullable - Annotating reentrancy with Java Checker Framework's Nullness Checker -

nullable - Annotating reentrancy with Java Checker Framework's Nullness Checker - i'm trying out checker framework's nullness checker java 8. when run checker on next code: import java.util.hashmap; import java.util.map; import org.checkerframework.checker.nullness.qual.nullable; class { public void f() {} } public class foo { private map<a,integer> map = new hashmap<>(); private @nullable x; public void setx(@nullable x) { this.x = x; } public void call() { if (x != null) { map.put(x, 0); x.f(); } } } the checker gives warning on x.f(); : dereference of possible null-reference x. makes sense, of course. checker framework doesn't know map.put does. map object might have reference this , , phone call setx(null) on it. now question following. there way tell checker framework method not modify object other object it's called on? because map.put doesn't ph

flex - Talking from Android Adobe AIR application to local computer through USB -

flex - Talking from Android Adobe AIR application to local computer through USB - in flash builder, there usb debugging feature mobile applications built adobe air. lets application installed on android devise transmit errors , trace statements flash builder. i need develop same feature application: android application built adobe air talks application on local pc. does know technology achieved with? utilize serial port communication, or local server? have piece of code similar thing? note: i'm not interested in network debugging, usb debugging. i googled , found video: [http://www.hsharma.com/tutorials/flash-builder-4-7-usb-debugging-on-ios/][1] android flex air serial-port usb

Long URL hangs up PHP page -

Long URL hangs up PHP page - i'm hosting php web site on shared web hosting account, i'm not sure may causing since don't have direct access server. the page in question simple. php script receives info via request , fills out form on page (as defaults before user fills out rest.) for instance, may take url such: http://www.example.com/test.php?id=sendform&name=somename&ver=1.0&desc=some%20description then php script reads parameters passed (via functions stripslashes($_request['desc']); ) , creates html markup form fields filled out info passed it. so working fine, until noticed if pass long url (i don't know exact limit, instance test url 1,280 characters long) script in test.php not execute , page hangs long time until browser times out error. i first thought stripslashes($_request['desc']); phone call blame, , stripped out except line: print("got end"); which still got hung long url. so i'

Creating a folder in "OneDrive for Business" using the SharePoint REST API fails with "System.UnauthorizedAccessException" -

Creating a folder in "OneDrive for Business" using the SharePoint REST API fails with "System.UnauthorizedAccessException" - i writing "sharepoint app", i.e. web application connects "onedrive business" on behalf of user. thought publish info construction web application in "onedrive busiess". i have succeeded @ next tasks: creating app in microsoft azure advertisement of organization authenticating user vs. office 365 , getting access "onedrive business" content, thereby getting oauth2 access token using token access "onedrive business" filesystem construction using sharepoint 2013 rest api described @ http://blogs.msdn.com/b/sharepointdev/archive/2013/08/13/access-skydrive-pro-using-the-sharepoint-2013-apis.aspx actions work (i.e. utilize api perform actions successfully) retrieving folders' contents (files , subfolders) creating files reading files deleting files deleting folders howev

Two consecutive pseudo selectors in jQuery don't work -

Two consecutive pseudo selectors in jQuery don't work - i have issues selecting element jquery. my html code comes downwards to: <body> <p>dont mind me, sir</p> <p>select me please!</p> <p class="fabulous">so fab</p> </body> with jquery: $(document).ready(function(){ $('p:not(.fabulous):last-child').css({'background':'yellow'}); }); with selector $('p:not(.fabulous):last-child') trying select lastly element of parent (body, in case) not have class "fabulous". $('p:not(.fabulous)') select non-fabulous children of body why can not select lastly kid of leftover p elements? i'd much appreciate reply concerning behaviour of :last-child , :not( , or whatever selector misunderstood. thanks! :last-child selects elements last child of parent. lastly ( <p> ) kid of <body> <p class="fabulous"> . so, whe

oracle - How to deallocate cursor in PLSQL? -

oracle - How to deallocate cursor in PLSQL? - i code on both sql server , oracle. when i'm coding in sql server, used this: open curusers; close curusers; deallocate curusers; now, when i'm coding in oracle, used this: open curusers; close curusers; i saw deallocate keyword in pl/sql when used statement deallocate(curusers); it throws error. how can same thing (deallocation) in pl/sql? oracle doesn't require deallocate cursor's memory explicitly. close(cursor) fine. oracle plsql cursor

python - How to cancel conflicting / old tasks in Celery? -

python - How to cancel conflicting / old tasks in Celery? - i'm using celery + rabbitmq. when celery worker isn't available tasks waiting in rabbitmq. becomes online bunch of tasks executed immediately. can somehow prevent happening? for illustration there 100 tasks (the same) waiting celery worker, can execute 1 of them when celery worker comes online? since tasks same in queue, improve way send task once, need able track task published, example: using lock, example: ensuring task executed 1 @ time using custom task id , custom state after task published, example: to add together custom state when task published: from celery import current_app celery.signals import after_task_publish @after_task_publish.connect def add_sent_state(sender=none, body=none, **kwargs): """track published tasks.""" # task instance name task = current_app.tasks.get(sender) # if there no task.backend fallback app.backend ba

javascript - Changing the value of an input from another input on keyup using jQuery -

javascript - Changing the value of an input from another input on keyup using jQuery - i have 2 inputs set simultaneously convert lbs kgs , kgs lbs on keyup depending on input use. have error function run if input not number. conversion works both inputs on keyup , error well, initially, if clear inputs or switch 1 , lose error function , clear function doesn't clear input in sec one, leaves number, 0.00. using jquery plugin, jquery number round numbers 2 places. here jsfiddle , code: $(document).ready(function () { var kg = 0.453 $('#weight_lb').on('keyup', function () { var wtvaluel = parsefloat($('#weight_lb').val()); if (!isnan(wtvaluel)) { $("#weight_kg").val($("#weight_lb").val() * kg).number(true, 2); } else { // input wasn't number $('#weight_lb').val(''); $(".wt_error").fadein(); settimeout(function () { $(".wt_error").fa

java - Finding Duplicates in Arrays -

java - Finding Duplicates in Arrays - hey i've been messing around in java , created programme go through array , find duplicates in array , working great! there 1 little problem if run programme , there more 2 duplicates of 1 value output 2 duplicates found same value - explain better output duplicates in array: 1 duplicates in array: 8 duplicates in array: 8 i've been stuck on time know little error if help me out awesome, code below, thanks import java.util.arrays; public class duplicates { public static void main (string[] args) { int[] values = { 8, 5, 9, 8, 6, 13, 33, 1, 98, 12, 8, 1 }; arrays.sort(values); for(int = 1; < values.length; i++) { if(values[i] == values[i - 1]) { system.out.println("duplicates in array: " + values[i]); } } } } if understand question, add together while loop progress past duplicates after study one. like, public static

How to use define in php -

How to use define in php - i've array key value pair re-written in number of places in whole project. so, define @ 1 place , utilize it. the array array('isvalid'=>'false','message'=>'invalid login credentials, please seek again'); i tried way, didn't worked define ('kcheckvalidusersuccessresponse',array('isvalid'=>'false','message'=>'invalid login credentials, please seek again')); defining array @ top , utilize it, how value not available when echoed it. echo kcheckvalidusersuccessresponse ; any help appreciated. constants may evaluate scalar values class error { public $my_error1 = array( 'isvalid'=>'false', 'message'=>'invalid login credentials, please seek again' ); } $error = new error(); print_r($error->my_error1); from can phone call error in of code familiar oop programming php

node.js - Is there any way to have Express draw from two file system directories for one web directory? -

node.js - Is there any way to have Express draw from two file system directories for one web directory? - say want have apparent directory that, via browser, http://whatever/images/ but on file system, draws both /users/me/www/images , /users/me/moreimages/ . if request http://whatever/images/selfie.jpg , first /users/me/www/images/selfie.jpeg , , if isn't found, serve /users/me/moreimages/selfie.jpeg instead. i can think of ugly ways of doing this, handling routing , serving myself, i'd in "correct" , straightforward way. express have workaround can cause this? yes, possible. have 2 instances of express.static both mounted on /images : router.use('/images', express.static('/users/me/images/')); router.use('/images', express.static('/users/me/moreimages/')); if request not satisfied in first instance of middleware, sec 1 processed, , on. node.js express

calayer - iOS - Shadow won't resize correctly -

calayer - iOS - Shadow won't resize correctly - i have tableview dynamic cell sizes, , having problem resizing shadow when cells beingness reused. solution works on ios8 not on ios7. shadows show correctly based on cell size first time shadow create, break after cells beingness reused. @implementation static const cgfloat shadowwithinset = 2; static const cgfloat shadowheightoutset = 4; - (void)awakefromnib { calayer *layer = self.innerview.layer; layer.shadowoffset = cgsizemake(1, 1); layer.shadowradius = 3.0f; layer.shadowcolor = [[uicolor gray] cgcolor]; layer.shadowopacity = 0.8f; //layer.shouldrasterize = yes; //layer.rasterizationscale = [uiscreen mainscreen].scale; cgsize size = layer.bounds.size; layer.shadowpath = [uibezierpath bezierpathwithrect:cgrectmake(shadowwithinset, size.height-shadowheightoutset, size.width-(shadowwithinset*2), shadowheightoutset)].cgpath; } - (void)layoutsubviews { [super layoutsubvie

c# - ASP.NET - Validating a CustomValidator -

c# - ASP.NET - Validating a CustomValidator - i'm trying customvalidator phone call server method (it's checksum, think it's right you'll see can't tell) it's never called, can come in text box , error message never appears, , adding break-point in method reveals it's never called @ not matter what's entered in text box. need client-side validation too? my onservervalidate looks calling method correctly eyes - @ loss here. help much appreciated! the asp.net code: <asp:label id="lblppsn" runat="server" text="pps number: "></asp:label> <asp:textbox id="tbxppsn" runat="server"></asp:textbox> <asp:customvalidator id="customval_ppsn" runat="server" errormessage="please come in valid ppsn" controltovalidate="tbxppsn" onservervalidate="customval_ppsn_servervalidate" forecolor="red"></asp

python - Why won't this code execute? -

python - Why won't this code execute? - this programme takes 3 digits, stores them, , repeatedly guesses , checks until 3 stored digits match 3 guessed digits. cannot seem past first while loop execute: digitone = int(raw_input()) digittwo = int(raw_input()) digitthree = int(raw_input()) digitthree = int(raw_input()) countdigitone = 0 countdigittwo = 0 countdigitthree = 0 while digitone <= countdigitone: if digitone < countdigitone: print "digit 1 be", countdigitone countdigitone += 1 elif digitone == countdigitone: print "digit 1 is", countdigitone while digittwo <= countdigittwo: if digittwo < countdigittwo: print "the first 2 digits be", countdigitone, countdigittwo countdigittwo += 1 elif digittwo == countdigittwo: print "digits 1 , 2 are", countdigitone, countdigittwo while digitthree <=

javascript - How would I create a new instance of the database in Meteor.js when a new a unique url is passed in? -

javascript - How would I create a new instance of the database in Meteor.js when a new a unique url is passed in? - i building "magnetic poetry game" meteor.js, new to. here have far: http://test-magnets.meteor.com/ i using homepage grouping play board, users can collaborate , build poems together. working fine want build alternative can create own private board play yourself. i used iron:router create unique url userid. create new instance of collection not impact grouping board. right every time move piece in grouping board, changes database in userid url. there simple way implement or pretty complicated? suggestions appreciated. thanks javascript mongodb meteor

c - Error: Expected expression before structure -

c - Error: Expected expression before structure - i trying homecoming pointer construction maintain getting weird error bboard.c:35: error: expecte look before 'bboard' have ideas on causing this. new in c apologies of trivial question. #include <stdio.h> #include <stdlib.h> #include <time.h> #include "bboard.h" struct bboard { int create[max_rows][max_cols]; }; bboard * bb_create(int nrows, int ncols){ int i,j; srand(time(null)); struct bboard bboard; (i = 0; < nrows; i++){ (j = 0; j < ncols; j++){ int r = rand() % 4; //printf("%d",r); if( r == 0){ bboard.create[i][j] = 1;} if(r == 1){ bboard.create[i][j] = 2;} if(r == 2){ bboard.create[i][j] = 3;} if(r == 3){ bboard.create[i][j] = 4;} printf(" %d ",bboard.create[i][j]); } printf("\n"); } struct bboard *boardptr = malloc(sizeof

java - Interface-Class-Object,Casting,Exception -

java - Interface-Class-Object,Casting,Exception - i saw code: interface i{} class implements i{} class b extends a{} class c extends b{} class abc { public static void main(string args[]) { a=new a(); b b=new b(); a=(b)(i)b; //line 1 b=(b)(i)a; //line 2 a=(i)b; //line 3 i=(c)a; //line 4 } } trying find out which way have safe casting i.e without compile time or run time error in circumstances casting show compile time error in circumstances casting show run time exception can 1 explain me these 3 concepts? in java, interface similar class type. in illustration , object of class oftype , oftype i. object of class b oftype b, oftype(subtype) , oftype i. object of class c oftype c, oftype(subtype) b, oftype(subtype) , oftype i. noticed, objects oftypes of 2 types (te 2 types have no link each other i.e. , independently types) , subtypes of respecti

parse.com - iOS Detect If User Doesn't Interact With Local Notification -

parse.com - iOS Detect If User Doesn't Interact With Local Notification - i'm building application user must finish task within 5 minutes of receiving local notification. if task completed nil happens if task not completed need run parse cloud code function. my issue if user doesn't interact local notification need perform parse cloud function. i'm having ton of difficulty trying because of ios's picky background modes , multitasking rules. so far app works great, if action not completed , user not in app can't perform code. if point me in right direction appreciate it. if need anymore details please allow me know! cloud code- cloud code perform if user not finish task within 5 minutes of reciving local notifcation: parse.cloud.define("chargecustomer", function(request, response) { stripe.charges.create({ amount: request.params['amount'], currency: "usd", customer: request.params['customerid'

python - Pandas efficiently repeat rows -

python - Pandas efficiently repeat rows - i know typically replication of rows horrible performance, why answers on stackoverflow don't explain how suggest improve alternatives - utilize case, need that. i have table replication weights, id some_value weight 1 2 5 2 2 3 b 1 4 3 3 where need repeat each row weight value. think of huge info frame. efficient way accomplish this? expected output: id some_value weight 1 2 5 1 2 5 1 2 5 1 2 5 1 2 5 2 2 2 2 3 b 1 4 3 3 4 3 3 4 3 3 perhaps treat weighted array: def weighted_array(arr, weights): zipped = zip(arr, weights) weighted_arr = [] in zipped: j in range(i[1]):

php - Laravel URL Language Prefix -

php - Laravel URL Language Prefix - i trying set 2 languages site. have read around (http://forumsarchive.laravel.io/viewtopic.php?id=7458, http://laravel.io/forum/02-20-2014-how-to-make-switching-language-button) , can't seem prefix part of working. the default language if set or selected: /news if chinese selected: /zh/news my filters.php: app::before(function($request) { // default browser language $language = substr($request->server->get('http_accept_language'), 0, 2); // language set route if (null !== $request->segment(1)) { $routelanguage = $request->segment(1); if (in_array($routelanguage, config::get('app.languages'))) { $language = $routelanguage; } } //return $language; // set language config::set('app.locale', $language); app::setlocale($language); }); the language selector: class languagecontroller extends basecontroller { public

c++ - XPATH backwards compatibility with XSLPattern -

c++ - XPATH backwards compatibility with XSLPattern - it understanding xslpattern queries work identically xpath queries, not other way around. can confirm this, or have link microsoft documentation confirms this? i have changed selection language of msxml documents xpath in various parts of code manage, , want create sure i'm not going break queries written xslpattern queries. in understanding there expressions valid xslpattern , executable selectnodes/selectsinglenode throw error when beingness executed xpath 1.0 expression. instance example var doc = new activexobject('msxml2.domdocument.3.0'); doc.loadxml('<root><item>1</item><item>2</item></root>'); var item = doc.selectsinglenode('root/item[end()]'); wscript.echo(item.xml); doc.setproperty('selectionlanguage', 'xpath'); item = doc.selectsinglenode('root/item[end()]'); makes utilize of the end() function defined in x

assets - Multiple fields formula excel -

assets - Multiple fields formula excel - i have question using formulas in excel. i have workbook 2 tables. table 1 contains planned transports different assets, , table 2 contains actual arrivals same transports. table 1 looks this: asset#|from|to |planned departure|planned arrival |actual arrival| 10 |abc |bbb |11.11.2014 09:00 |11.11.2014 10:00| 20 |abc |ccc |11.11.2014 09:00 |11.11.2014 11:00| 10 |bbb |ccc |11.11.2014 09:00 |11.11.2014 11:00| 10 |ccc |abc |11.11.2014 09:00 |11.11.2014 12:00| table 2 looks this: asset#|to |actual arrival| 10 |bbb|11.11.2014 09:56 10 |ccc|11.11.2014 10:55 20 |ccc|11.11.2014 11:05 10 |abc|11.11.2014 12:01 what do, populate field "actual arrival" in table 1 info table 2. have events in table 2 matches asset#, site field "to",and greater datetime in field "planned departure". result this: asset#|from|to |planned departure|planned arrival |actual arrival| 10 |abc |bbb

visual studio 2010 - how to use tag variable in c# -

visual studio 2010 - how to use tag variable in c# - i have type object tag in cshapelayeritem.tag here code public class cshapelayeritem { public cshape shape; public long id; object _tag = null; public object tag { { homecoming _tag; } set { _tag = value; } } public datarow row; public cshapelayer cshapelayer = null; public cshapelayeritem() { } } here cshapelayeritem , tag value when seek cshapelayeritem.tag. there no link skenarioid the question how skenarioid value in tag , show in textbox txtskenarioid.text? im new in c# the tag property object , object, you'll need cast whatever type stored in there before can access properties on it. assuming you've got instance of centityskenario , cast (i'm assuming skenarioid property accessible): txtskenarioid.text = ((centityskenario)cshapelayeritem.tag).skenarioid.tostring(); c# visual-studio-2010

objective c - NSSavePanel setDocumentURL in app's document folder -

objective c - NSSavePanel setDocumentURL in app's document folder - i'm trying set directory url in nssavepanel opens panel directory doesn't work when set path in app's document folder. nssavepanel *panel = [nssavepanel savepanel]; nsstring *filefolder = @"/users/me/library/containers/com.company.app/data/documents/myfolder"; nsurl *folderurl = [nsurl urlwithstring:folder]; [panel setdirectoryurl:folderurl]; if programmatically open path using finder works don't understand why path wouldn't work through nssavepanel. [[nsworkspace sharedworkspace] @"/users/me/library/containers/com.company.app/data/documents/myfolder" withapplication:@"finder"]; objective-c cocoa nssavepanel

html - How to do time check in jQuery? -

html - How to do time check in jQuery? - i hava li in html: <li>11.8</li> <!--november 8th--> <li>11.9</li> <li>11.11</li> <li>11.12</li> how can utilize jquery check date alter '11.12' 'today'? (suppose today 11.12) like this: <li>11.8</li> <!--november 8th--> <li>11.9</li> <li>11.11</li> <li>today</li> try this: $(function(){ var date = new date(); $('li:contains(' date.getmonth()+1 + '.' + date.getdate() + ')').html('today'); }); demo jquery html

java - Android EditText's text value to set the selected item in the Spinner -

java - Android EditText's text value to set the selected item in the Spinner - hello if kindly help me problem. basically, goal set selected item in spinner getting value of edittext's text. spinner has been populated xml string array. i've used textwatcher's aftertextchanged method monitor changes on edittext's text value. here code seems not working. edittext edittext = (edittext) findviewbyid(r.id.edittext1); edittext.addtextchangedlistener(edittextlistener); private textwatcher edittextlistener= new textwatcher() { @override public void ontextchanged(charsequence s, int start, int before, int count) { if (edittext .gettext().equals("1")) { spinner1.setselection(0); // 1 on spinner letter } else if(edittext .gettext().equals("2")) { spinner1.setselection(1); // 2 on spinner letter b } else { toast.maketext(this, "the letter no

android - parse : ParseObject One –to- Many Relationship -

android - parse : ParseObject One –to- Many Relationship - i create table contain: subject_code , subject_name , subject_section (fk). a subject have few sections (eg.lecturer sec,tut 1 sec, tut 2 sec ) , need create subject_section table. i want link subject_section table previous table subject_section . how link using array or pointer in parse? you create new parseclass "subject_section" pointer column "subject" , reference related subject it. code example: parsequery subjectquery = parsequery.getquery("subject"); subjectquery.whereequalto("subject_name", subjectname); subjectquery.getfirstinbackground(new getcallback<parseobject>() { public void done(parseobject object, parseexception e) { if (object == null) { // object not found } else { parseobject subjectsection = new parseobject("subjectsection"); subjectsection.put("subject", object

c++ - Reuse a widget using g_object_ref() -

c++ - Reuse a widget using g_object_ref() - i have gtkgrid , want show within 1 cell widget or according choices of user. wrote code according this, says: removes widget container . widget must within container . note that container own reference widget , , may be the lastly reference held; removing widget container can destroy widget. if want utilize widget again, need add a reference while it’s not within container, using g_object_ref(). if don’t want utilize widget 1 time again it’s more efficient destroy straight using gtk_widget_destroy() since remove container , help break circular reference count cycles. here fragment of code: // definitions gtkwidget *mylist1, *mylist2; // creation mylist1 = gtk_tree_view_new(); mylist2 = gtk_tree_view_new(); gtk_grid_attach(gtk_grid(gridlist), mylist1, 0, 1, 2, 1); // attach mylist1 // switching in runtime if (x) { g_object_ref(mylist1); gtk_container_remove(gtk_container(gridlist), mylist1);

java - Regex to split based on specific comma -

java - Regex to split based on specific comma - i have simple requirement. have little string , want split based on comma outside parenthesis. sample input sum(col1) on (partition col2, col3) col5,sum(col2) on (partition col2) col4 expected output: sum(col1) on (partition col2, col3) col5 sum(col2) on (partition col2) col4 thanks through negative lookahead assertion. case negative lookahead assertion best alternative rather positive lookahead. ,(?![^()]*\)) the above regex match commas if it's not followed by, [^()]* character not of ( or ) 0 or more times. \) closing paranthesis. demo java regex

angularjs - angular bootstraping doesn't work after browser refresh -

angularjs - angular bootstraping doesn't work after browser refresh - i have unusual problem angular bootstraping. can't paste whole code shortly: there's no ng-app in index.html there's jquery ajax check if i'm signed in if i'm signed in - phone call (and it's ok): angular.element('body').ready(function(){ angular.bootstrap(angular.element('body'),['app']); console.log('is called'); //is called }) if i'm not signed in do: app = angular.injector(['app.templates']) content = app.get('$templatecache').get('login.html') $compile = app.get('$compile') $scope = app.get('$rootscope').$new(true) $('body').append content $compile($('body').contents())($scope) $scope.login = function() { // doing login ajax } and works in $scope.login function i'm doing ajax bootstraping angular app (code @ top) , it's ok in angular app have signout function d

Does anybody knows which jQuery plugin for smooth scrolling -

Does anybody knows which jQuery plugin for smooth scrolling - hy there i'm looking way enable smooth scrolling webbpage here: http://unik.weblusive-themes.com/ to more specific. i'm not looking smooth-scroll (click anchor-link , slide downwards anchor) way smoother feeling when scroll page. guess it's jquery plugin? thanks! i utilize jquery plugin waypoints (http://imakewebthings.com/jquery-waypoints) , it's pretty easy set , utilize vertical , horizontal scrolling. jquery plugins

Get the least of a series of numbers WITHOUT an array (VB.NET) -

Get the least of a series of numbers WITHOUT an array (VB.NET) - yes, part of homework assignment. , that's problem - know utilize array, haven't reached part of class yet, i'm not supposed utilize yet. user inputs 5 numbers (doubles, using inputboxes) , programme should drop lowest value , calculate average of remaining four. @ nowadays juncture, we've been studying for...next loops, , corresponding for...next section in book, know i'm supposed incorporate 1 in here somewhere, have yet figure out how calculate , maintain running "lowest" variable. thanks help! original: sub getaverage() dim first double = cdbl(inputbox("enter first grade.", "first")) dim sec double = cdbl(inputbox("enter sec grade.", "second")) dim 3rd double = cdbl(inputbox("enter 3rd grade.", "third")) dim 4th double = cdbl(inputbox("enter 4th grade.", "fourth")) d

javascript - jQuery fade in content while using Ajax .append() -

javascript - jQuery fade in content while using Ajax .append() - trying utilize jquery .fadein() on 'load more' button pulling json html markup server on .append(response) . syntax .append(response).fadein('slow'); not seem work, believe dom issue because info appended page before .fadein() has chance work. any suggestions how accomplish type of effect? javascript below. $(function () { var offset = 10; $(".load-more-cell").click(function() { $.post("load-more-notifications", {offset: offset, limit: 30}, function (response) { $(".notification-table-body").append(response); offset += 30; }); }); }); append returns current collection, i.e. ".notification-table-body" elements, doesn't contain appended elements, if want phone call fadein on appended elements should @ first create collection contains them , phone call method: $(response).hide().appendto('.notif

Having Trouble Implementing toString() Method in (Java) -

Having Trouble Implementing toString() Method in (Java) - i writing programme uses 2 different classes. 1 class contains main method , other class generic class set has set of items of generic type t uses arraylist. this programme finds intersection of 2 sets. i want utilize tostring() method don't know how implement in specific situation when info fields not visible. import java.util.random; //generic class set<t> class set <t> { arraylist<t> num = new arraylist<t>(); /*within class have (1) add together method, (2) remove method, , (3) method returns true if item in set , false if not in set*/ //this intersection method public static <t> set<t> intersection(set<t> k, set<t> p){ set<t> abc = new set<t> (); /*i have other codes here find intersection of 2 different sets*/ homecoming abc; } @override /*here lost not know how

batch file - automate pressing Ctrl v, down arrow, home button -

batch file - automate pressing Ctrl v, down arrow, home button - i write short script (batch file) automate pressing 3 buttons pressing ctrl + v (to paste something). pressing downwards arrow. pressing home button (to right of insert button , left of pgup button - on keyboards) i need repeat sequence of pressed buttons 500 times , wouldn't want hand. has thought how this? my os windows 7 if matters. programme pressing buttons ssis (not sure if matters). batch-file ssis

oracle - SQL query for all the days of a month -

oracle - SQL query for all the days of a month - i have next table rental(book_date, copy_id, member_id, title_id, act_ret_date, exp_ret_date). book_date shows day book booked. need write query every day of month(so 1-30 or 1-29 or 1-31 depending on month) shows me number of books booked. know how show number of books rented in days in table select count(book_date), to_char(book_date,'dd') rental grouping to_char(book_date,'dd'); my questions are: how show rest of days(if let's reason in database have no books rented on 20th or 19th or multiple days) , set number 0 there? how show number of days of current month so(28,29,30,31 these 4 possible depending on month or year)... lost . must done using sql query no pl/sql or other stuff. the next query give days in current month, in case can replace sysdate date column , bring together query know how many given month select dt from( select trunc (last_day(sysdate) - rownum) dt dual co

pdf - Make for doxygen enum inside group fail error -

pdf - Make for doxygen enum inside group fail error - i have c code uses doxygen document it. if seek , document values of enum within grouping doxygen build runs ok, but pdf create produces errors the general purpose indexer has stopped working with alternative either close programme or debug it. selecting close, allows create continue, until next pass, same error occurs again, uses 3 passes. the pdf produced however, does contian enum documentation , far, little little c project, pdf seems ok appearance-wise. with enum outside of group, error disappears... all documentation toolchain checked upto date (doxygen, miktex, gpl ghostscript). has seen similar or have solution issue? please have @ git version of doxygen, here bug 733323 - doxygen generated latex leads general purpose index processor crash (https://bugzilla.gnome.org/show_bug.cgi?id=733323) has been integrated. pdf enums doxygen miktex

recursion - Line and intersection based pathfinding -

recursion - Line and intersection based pathfinding - i trying develop pathfinding algorithm finds closest path point tracing line initial position final position. test intersections obstacles ( of them in game rectangular ) , draw 2 new lines, 1 each of visible corners of obstacle. then, draw lines 2 corners endpoint , repeat intersection test each branch of path. my question this: how propagate branching paths in lua without recursion? seems pretty easy recursion, don't want risk stack overflow , crash if path gets long. if there technical term technique using, please tell me. own research when can. there recursion , iteration. lua supports "infinite recursion" via tail calls, if can express recursion in terms of tail calls there no risk of stack overflow. example: function f(x) if x==0 homecoming 0 end -- end recursion .... stuff ... homecoming f(x-1) end section 6.3 of programming in lua (available online) discusses this. if

android - Change ActionBar pressed elements overlay -

android - Change ActionBar pressed elements overlay - i can't find way alter overlay color on actionbar items when press on them. have minsdk = 11 , can't utilize <item name="android:actionbaritembackground">@drawable/selectable_background_</item> because works api 14. i created values-v14 folder style.xml file, , devices >= v.14 works in way: not pressed: pressed: but, how can same version >= 11 < 14 ? this style.xml file: <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="appbasetheme" parent="theme.appcompat.light.darkactionbar"> </style> <!-- actionbar styles --> <style name="myactionbar" parent="@style/widget.appcompat.light.actionbar.solid.inverse"> <item name="android:background">@color/brand_color</item> </style> <!-- application theme. --> <style name=&quo

opencv - from heatmap, calculate discrete points -

opencv - from heatmap, calculate discrete points - sorry if question might sound i'm lazy google one, couldn't find i'm looking for. this question avoiding reinvent wheel. think i'm looking might exist, dont want start out implementing on own: i want turn heat map list of discrete points. i'm sure algorithm can used first thresholds heatmap , then, every "island" created thresholding, finds gravitational center. center point. want list of these points: step 0: step 1: step 2: i wonder if such algorithm exists, or if there improve approach idea. moreover, perfect if there ready utilize implementation, of course. e.g. computer vision libraries opencv have thresholding included. couldn't find next step. my target platform ios, implementations, objective-c, c or c++ preferred. there a lot of ways reach looking for. 1 of them: by applying cv::threshold(); should this: now it's time cv::distancetransform(); and cv::norm

Php operator `break` doesn't stop while -

Php operator `break` doesn't stop while - have weird issue, break doesn't break while loop , maintain rotating. logically should break cycle , set output while ($c++ != 5) { // here curl request, doesn't relevant have removed preg_match("!<.*?>(\s*)[^<>]*?{$to}<!", $resp, $result) ; // echo 'cnt = ' .count($result).'<br>'; if(!count($result)) { $amount = 0; echo 'sleep called'; sleep(4); exit; continue; } else { $amount = trim(@$result[1]); $amount = round($amount + $amount * $exchange_ratio, $precision); echo 'break happen<br>'; break; } } so output cnt = 2 break happen cnt = 0 sleep called so skipped break , maintain rotating. how so? edit works fine on localhost issue php version?

wordpress - Deleted users is still shown -

wordpress - Deleted users is still shown - i have deleted users admin. when utilize custom sql users meta values deleted users well. how can delete them admin. $sql ="select * wp_users u left bring together wp_usermeta um1 on u.id = um1.user_id left bring together wp_usermeta um2 on u.id = um2.user_id um1.meta_value= '1' , um1.meta_key = 'show' grouping u.id"; $users = $wpdb->get_results($sql); wordpress

knockout.js - Knockout SmartTag implementation details -

knockout.js - Knockout SmartTag implementation details - i wanted know more smart dirty tag implementation in 1 of links came across. <ul data-bind="foreach: items"> <li data-bind="css: { dirty: dirtyflag.isdirty }"> <span data-bind="text: id"></span> <input data-bind="value: name" /> </li> ko.dirtyflag = function(root) { var result = function() {} var _initialstate = ko.observable(ko.tojson(root)); result.isdirty = ko.computed(function() { homecoming _initialstate() !== ko.tojson(root); }); homecoming result; }; function item(id, name) { this.id = ko.observable(id); this.name = ko.observable(name); this.dirtyflag = new ko.dirtyflag(this); } var viewmodel = function(items) { this.items = ko.observablearray([ new item(1, "one"), new item(2, "two"), new item(3, "three") ]); th

android - Extending Activity or ActionBarActivity -

android - Extending Activity or ActionBarActivity - i'm creating app includes back upwards android lolipop , before versions. based on maintaining compatibility documentation planned utilize actionbaractivity appcompact non lolipop devices , fragmentactivity material lolipop devices. i created 2 different value folders. now problem how should extend activity class myactivity extends activity or myactivity extends actionbaractivity if utilize activity. crashes on before android version , saying me add together actionbaractivity , vice versa happens lolipop edit ------ values-21 <style name="apptheme" parent="android:theme.material.light"> values <style name="apptheme" parent="theme.appcompat.light"> you extend actionbaractivity if you'll using actionbar on api s lower 11 back upwards api >=7 check out http://developer.android.com/guide/topics/ui/actionbar.html also can

multithreading - Python thread class - exiting threads -

multithreading - Python thread class - exiting threads - i using thread invoke function runs : def filliq(ipno): global inp_width global no_exit try: while 1 : if no_exit==1: sys.exit() # <exit line> tags=[] in range(ipno): yn=random.randint(0,1) if yn==1: voqno=random.randint(0,ipno-1) if inpq[i][voqno]<10: inpq[i][voqno]+=1 tag="iq" tags.append(tag) d.update() time.sleep(2) d.delete("iq") drawiq(ipno) except baseexception ,e: print "filliq > "+e i changing value of no_exit in main function. 1 time alter thread not getting exit. because next time create thread instance different inputs( gui program. 1 input execute thread , later, alter input , execute again)