Posts

Showing posts from September, 2011

mysql - Converting a ms-access front-end to a web-based technology -

can recommend best web-based technology/language rewriting ms-access front-end? i've converted tables mysql , moved queries stored-procedures. language need able handle multiple result sets. also, need gui similar possible current ms-access front-end. new language need have features including full crud, tabbed forms, datasheet style sub-forms, combo-boxes , reports. i've dabbled bit html, css, php, javascript , java of these capable or suitable? i've heard ajax or jquery might way go. this misguided goal. web ui uses different paradigms because web front end stateless, unbound data, whereas access apps stateful , bound. 1:1 translation disastrous way implement ui in web browser, unless invest huge amount in ajax development. that said, should access 2010 , sharepoint access services, allow createn access front end web forms , web reports can run in web browser unchanged. order of magnitude cheaper rolling own ajax-based replacement.

java - Axis POJO clients -

i learning use apache axis library in documentation shown how create web service pojo class. but clients mentions axis2 databinding framework, xmlbeans, , jibx databinding so, there way use pojo classes soap clients. and better of 4 in terms of performance , usability. this link may decide upon data binding need. axis2 data binding my personal experience adb , xmlbeans that, out of these 2 adb pretty simple , straightforward, when wsdl complex need hell lot of manual coding. on other hand, xmlbeans looks complex classes generates easy use.

c# - Best way to handle cancelling webclient async downloads -

i hoping shed light on seemingly complex problem having async webclient downloads in silverlight. here details of problem- downloading multi-page xml web request. moved webclient code helperclass track each individual request. helper class called syncjobsclass. source class @ ( http://www.silvergeek.net/silverlight/running-async-tasks-synchronously-events-delegates/ ) have download button start task- void button1_click(object sender, routedeventargs e) { var req = new requestclass; req.getxmlpages(); } here request class- public class requestclass { readonly syncjobsclass _syncjobs = new syncjobsclass(); public void getxmlpages() { _syncjobs += new syncjobselementcompleted; _syncjobs += new sycjobsworkcompleted; var pages = 10 for(var i=0;i<10;i++) { //load each request list in _syncjobs class var url ="www.blahblahblah.com" + i; _syncjobs.downloadfiles(url); } //start download of each page in list _syncjobs.startdow...

Design issue in C#: Generics or polymorphism or both? -

i need design issue i'm having. try achieve this: i have main class called document. class has list of attribute classes. these attribute classes have common properties such identity , name, differ in 1 property call value. value type different each different attribute class , of type string, integer, list, datetime, float, list , classes consists of several properties. 1 example class call pairattribute have 2 properties: title , description. what try achieve type safety value property of attribute child classes , these child classes should able added attribute list in document class. have made 1 attribute class have value property of type object , done it, try avoid here. the common properties (identity , name) should placed in base class guess, lets call attributebase class. want have child class, stringattribute, value property of type string, integerattribute class value property of type integer, stringlistattribute value property of type list, pairattribute class va...

flash - Dealing with a transparent png file symbol -

in project, there frame(png files) placed on top of symbols. after that, apply mouse click event symbols place underneath frame symbol, when run the game, cannot click below symbols frame symbol, although frame transparent. the problem is, although png picture has transparent area, mouse click cannot pass through it. there solution? there anyway can disable symbol being clicked , mouse click event can recognize symbol placed under it? me? thx lot ^0^ you may put png in movieclip, give name (myframe), , write: myframe.mouseenabled = false; myframe.mousechildren = false;

c - Modify env variable name inside a library with hex editor? -

is possible modify environmental variable's name inside library sort of editor. i'm thinking maybe hex editor ? i wish modify name without altering length: envfoobar (9 chars) yellowbar (9 chars) obviously, recompilation perfect not know exact flags used compile library. what's stopping you? can use text editor (as long it's decent editor , knows how handle binary data, vim does). if library referring name of environment variable through string, , string in library in data segment (ie. it's not string built @ runtime), it's trivial edit library in way. don't delete or introduce new characters. i've done under linux. other oses may digitally sign binaries , prevent working. oses use standard checksum or hash in case you'll have recompute it.

In Selenium IDE, can Locator use XPath and storedVars -

i have xpath select specific radio button item of html. enhance locator more dynamic using stored variable represent text xpath using lock on. this current setup command: click target: //*[contains(@for,'page149.question48.typechoiceoneanswerradiobutton.holder_ctl02') , text()="below 70 – may low"] i replace literal text " below 70 – may low " variable. proposed target failing evaluate. hope have syntax incorrect. can this? can use stored variables xpath locators? proposed target: //*[contains(@for,'page149.question48.typechoiceoneanswerradiobutton.holder_ctl02') , text()=${radiotext}] edit: adding code. made simple example of html radio button list , isolated selenium commands. using selenium ide in firefox. commands example has comments. sample html <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="h...

php - How do you fix sentence spacing on extracted plain text from HTML? -

i'm pulling articles specific urls conversion sentences, text body has random behavior of eliminating whitespace between sentences resulting in: jane went store.she bought dog. dog friendly.it had no teeth. some of text stock symbols (az.gan) etc. can't insert space between periods have no adjacent whitespace. jane bought several shares of (ty.jpn). lost cash money."arg!" cried. the above example destroy stock symbol variable. curious if knows cause of this. have tried several html , dom. use simple_dom grab plaintext. although, same result if manually, or other parsing engine. unfortunately don't have approach specific question, possible missing space between sentences linebreak (e.g. \n) text viewer (whatever is) isn't showing you? perhaps try make sure var articlecontent = ... // content articlecontent = articlecontent.replace(/\n/g, ' new line ');

C# Handle on SQL Server Message Output -

this question has answer here: capture stored procedure print output in .net 2 answers when executing scripts in sql server management studio, messages generated display in message window. example when running backup of database: 10 percent processed. 20 percent processed. etc... processed 1722608 pages database 'sample', file 'sampe' on file 1. 100 percent processed. processed 1 pages database 'sample', file 'sample_log' on file 1. backup database processed 1722609 pages in 202.985 seconds (66.299 mb/sec). i able display these message in c# application running sql scripts against database. however, cannot figure out how handle on message output sql generated. know how this? doesn't matter me connection framework have use. i'm relatively comfortable linq, nhibernate, entity fra...

parsing - How do I get rid of this duplicate declaration of YYSTYPE? -

here relevant error: grammar.y:72: error: conflicting declaration ‘typedef union yystype yystype’ y.tab.h:83: error: ‘yystype’ has previous declaration ‘typedef union yystype yystype’ make: *** [y.tab.o] error 1 i using flex , byacc produce translator. build has structure: make y.tab.h grammar.y file. include y.tab.h in tokens.lex file, , compile produce lex.yy.c. include lex.yy.c in grammar file. way, can see yylex. what seems happening this: y.tab.h contains union declaration of yystype union. gets included lex.yy.c, gets included grammar.y. @ same time, grammar.y producing own version of union, , 2 clash. is not standard approach? there need change make build correctly? oops. turns out wasn't compiling bison. other system had yacc symlinked bison, had change makefile use bison rather yacc.

odata - Any good sample for an updatable WCF Data Service implementation -

i looking sample implementing updatable wcf data service. found this article on msdn shows sample implementation using iupdatable, not sure if understand post. there methods used in post such gettable() , submitchanges(), implementation not provided. appreciate pointers. found 1 useful - http://blogs.microsoft.co.il/blogs/gilf/archive/2008/08/31/how-to-perform-crud-operations-in-ado-net-data-services-with-custom-provider.aspx thanks replies.

xslt - XSL include based on XSL:WHEN condition -

i have scenario here have multiple xsl designed different type of xml files. have application id passed xsl library want load different xsl based on application id values. like if application id 1 if application id 2 how can this??? please help in xslt, xsl:include , xsl:import must top-level elements, said in the specifications ( here version 1.0). that means can not condition loading of xsl file based on xml applying xsl to.

javascript - How to bring product description on the custom page? -

i have built custom page & home page & in store have disabled product page, when user clicks on add cart directly go checkout page & want show product_tabs on home page* (tabs product description,we recommend,additional information,product tags)* how can me in solving this.... if put piece of code in cms page-->layouy design bringing tabs on home page java script not working how can resolve issue <reference name="content"> <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" > <action method="addtab" translate="title" module="catalog"><alias>description</alias><title>product description</title><block>catalog/product_view_description</block><template>catalog/product/view/description.phtml</template></action> ...

php - Regular expression to replace digits after first 4 digits -

i trying write regular expression replaces digits of number *'s after first 4 digits. for example var number = 123456789 it should replaced 1234***** in javascript: var maskednumber = string(number).substr(0,4) + array(string(number).length - 3).join('*'); in php: $maskednumber = str_pad(substr($number, 0, 4), strlen($number), "*");

objective c - Resolving EXC_BAD_ACCESS Issue In Cocoa? -

hey..i have following method in cocoa.. -(void)startuploadwithcontainername:(nsstring *)containername { //make object of nsfilemanager , fetch array of local folder contents , cloud folder contents nsfilemanager *uploadmanager=[[nsfilemanager alloc] init]; nsstring *uploadpath=[[[nsstring alloc] initwithstring:@"~/cloud briefcase"] stringbyexpandingtildeinpath]; nserror *err; nsarray *uploadfoldercontents=[uploadmanager contentsofdirectoryatpath:uploadpath error:&err]; asicloudfilesobjectrequest *cloudlist = [asicloudfilesobjectrequest listrequestwithcontainer:containername]; [cloudlist startsynchronous]; nsarray *cloudfoldercontents = [cloudlist objects]; [cloudlist release]; [uploadmanager release]; nslog(@"%lu",[uploadfoldercontents count]); nslog(@"\n%@\n\n%@",cloudfoldercontents,uploadfoldercontents); nsstring *notfoundpath; nsstring *foundpath; nsstring *foundcloudmatch; nsdate *clouduploaddate; (int j=1; j<[uploadfoldercontents cou...

c# - Can PrincipalContext be used to get Active Directory information if computer is not domained joined -

i using principalcontext. receiving "the ldap server unavailable." "cannot reached". developing machine not joined domain want query. matter? need pass admin creds connect ad, can query or search it? my code resembles this: http://www.codeproject.com/kb/system/usingaccountmanagement.aspx it matter. can site access setting <identity> tag in web.config user ldap reading privileges: <system.web> <identity username="domain\ldapuser" password="ldappw"/> </system.web> here's msdn

EntityFramework Code First, is it possible to map this -

is there possibility map 1 entity ? select x,y,z, (select count(*) othertable tableid=table.id) othertablecount table t i want map class looks this: public class stuff { public string x { get; set; } public string y { get; set; } public string z { get; set; } public int count { get; set; } } no. should map collection , use projection querying: class stuff { ... public virtual icollection<otherstuff> { get; set; } } var stuffwithcount = stuff in mycontext.stuff select new { stuff.x, ... count = stuff.otherstuff.count() };

jquery - Embed Html.ActionLink in Javascript in Razor -

i know it's possible embed @html in javascript in mvc3, can't following work , not sure if possible yet. using jquery datatable, have ajax call create new row, programatically add using datatable api. works, want put edit actionlink onto row , shows text "edit", not link. of course manually, wondering if there better option. e.g. tablepallets.fnadddata([ getpalletactionlinks(), etc... function getpalletactionlinks() { var result = @html.actionlink("edit", "editpallet", new { id = 1 }); return result; } i've hard coded id = 1 moment, can newly created row. thanks duncan i think it's simple adding quotes around link: var result = '@html.actionlink("edit", "editpallet", new { id = 1 })'; this generate whole <a> tag. return url: var result = '@url.action("editpallet", new { id = 1 })'; and embed in existing anchor using jquery: <!...

Redirect non-www on a Wordpress site without using .htaccess -

a developer worked told me had non-www version of site redirecting www version using wordpress database setting, not .htaccess file. know how this? if try access wordpress site using other site address set in general settings tab (go admin panel, , click on "settings" "general settings" in left side menu) automatically redirect you.

Compound conditions using while loop in C. -

the program ignoring stop when amt 0 until after 10 numbers have been entered. program doesn't stop after 10 numbers have been entered. error? main() { int amt; int tot = 0; /* running total */ int = 0; /* counts number of times in loop */ while (amt!=0 || < 10) { printf("enter number (enter 0 stop): "); scanf("%d", &amt); tot = tot + amt; i++; } printf("the sum of %d number %d.\n", i, tot); } your test happening before amt assigned. results undefined. test should moved end of iteration, i.e. do/while . whilst assign amt non-zero value feels untidy me. and surely mean use logical , rather logical or? want continue iterating if both amt non-zero , i<10 . of course, if did move test end of iteration have account fact i had been incremented inside loop.

Writing java program about RGB-CMY -

how write simple java program converts rgb cmy?...or give me hints on how write it? rgb to/from cmy converting rgb cmy following c = 1 - r m = 1 - g y = 1 - b please refer below further information http://paulbourke.net/texture_colour/convert/

unable to call exe using python -

i calling exe (which dependent on other batch files) , python giving error. able call exe (which independent) what doing is.. import os os.system("notepad.exe") # working but os.system("c:/ank.exe") # giving error ank.exe dependent on other batch files you have first change current directory executable want run can find dependencies: target = "c:/ank.exe" os.chdir(os.path.dirname(target)) os.system(target) otherwise, os.system() executes in directory of running script.

Make all jQuery Accordion sections always close on page load -

i have download jquery accordion site. don't have idea jquery. when site opens sections of accordion should close. made changes these options... ------------------------- //default ------------------------- jquery().ready(function(){ // simple accordion jquery('#list1a').accordion(); jquery('#list1b').accordion({ alwaysopen: false, autoheight: true }); -------------------------- //changed -------------------------- jquery().ready(function(){ // simple accordion jquery('#list1a').accordion(); jquery('#list1b').accordion({ alwaysopen: true, autoheight: false }); <---------------------------> but it's not working. i think want this: jquery().ready(function(){ // simple accordion jquery('#list1a').accordion(); jquery('#list1b').accordion({ alwaysopen: false, ...

c++ difference between std::string name and std::string &name -

i have lib.h, lib.cpp , test.cpp. ask better? lib.h class c { std::string name; }*cc; lib.cpp { std::cout << "the name is:" << name << std:: endl; } test.cpp main() { c tst; tst.name="diana"; } what should use? std::string name or std::string *name? how can work &name, how code change , 1 of these 2 methods best one? first, hardly believe code compile while in main try access private data member name . about & . hard define start. in short std::string &name called reference object of type std::string . reference somehow alias other object. main feature is, have initialize refence object while creating , can't reinitialize reference point object. more feature can read in c++ faq edit can declare public, protected , private members of class in arbitrary ordering: class myclass { //here goes private members when working class //and public when working structs public: //here goes pub...

validation - regex'es to validate these -

regexes? to validate name characters , spaces e.g. jon skeet to validate number having digits , dashes anywhere e.g. 423-4324234-423 4233-412341324 a basic english name: ([a-za-z]+\s*)+ numbers dashes anywhere except beginning , end: \d[-\d]+\d numbers dashes anywhere: [-\d]+ edit: if looking name inside of sentence, such hello, name john doe. you can try , capture names based on 2 or more capitalized words in row. ([a-z][a-za-z]+\s*){2,}

While loop in R quantstrat code - how to make it faster? -

in quantstrat package have located 1 of main culprits slowness of applyrule function , wonder if there more efficient write while loop. feedback helpful. experience wrapping part parallel r. as option apply work instead while? or should re-write part new function such ruleproc , nextindex? dveling on rcpp may streach. , constructive advice appreciated? while (curindex) { timestamp = dates[curindex] if (istrue(hold) & holdtill < timestamp) { hold = false holdtill = null } types <- sort(factor(names(strategy$rules), levels = c("pre", "risk", "order", "rebalance", "exit", "enter", "entry", "post"))) (type in types) { switch(type, pre = { if (length(strategy$rules[[type]]) >= 1) { ruleproc(strategy$rules$pre, timestamp = timestamp, path.dep = path.dep, mktdata = mktdata, portfolio = po...

Youtube player tracking API for iframe embed -

i need enable event tracking of youtube-videos embedded in site, since youtube has switched iframe-based embedding-code, i'm kinda lost ... google/youtube documentation ( http://code.google.com/intl/da-dk/apis/youtube/iframe_api_reference.html ) describes how enable api when videos embedded programmatically using api - not when copy-pasted onto page in, say, cms. on top of that, documentation states youtube player api iframe tracking experimental , should not used production sites! has found way make work? listen events fired iframe-embedded youtube video? it looks can used events , call functions on youtube video embedded via iframe. https://developers.google.com/youtube/iframe_api_reference#events

jaxb - How to cache xsds to offload w3c servers? -

i'm building web service based on saml-p , xacml, requires large number of xsds considered jax-b/xjc each build. takes forever , exceedingly unreliable, think due w3c throttling xsd requests ease load on servers (based on blog posting). worse yet, of w3c xsds contain obvious typos, these must downloaded , patched, , schemalocation of referrring files edited load local copies. 1 of primary saml-p schema has problem (a double >> , wildly incorrect import addresses). i think there way make eclipse (or jax-b, or else; not sure solve this; maybe xerces?) maintain cache of xsds , substitue these http:// refs in build (perhaps system-wide). i've not managed track down workable recipe. can help? thanks! you can use catalogresolver this: http://jaxb.java.net/guide/fixing_broken_references_in_schema.html

wpf - Combobox binding in Datatemplate -

hi creating wpf datagrid custom control. want combobos should show genders in combobox , heppening when keeping combobox outside datatemplate working inside datatemplate not working. please me ? <usercontrol x:class="custom_datagrid.grid3.grid3" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:ignorable="d" xmlns:sdk="http://schemas.microsoft.com/wpf/2008/toolkit" d:designheight="300" d:designwidth="300" > <usercontrol.resources> <datatemplate x:key="duedatecelltemplate"> <textblock text="{binding dob}" margin="5,4,5,4"/> ...

Writing a telnet server in Python and embedding IPython as shell -

i trying write simple telned server expose ipython shell connected client. know how ? the question embedding ipython shell telnet server (i can use twisted telnet server part ) thx you perhaps use true telnet or ssh server , set user's login shell ipython. instance, given user name 'adam', perhaps change user's /etc/passwd line like: adam:x:1000:1000:adam frist,,,:/home/adam:/usr/bin/ipython typically final segment in line actual login shell bash, doesn't have be. advantage can skip coding solution yourself, there may disadvantage in might have hack environment variable or python path work. you can read more /etc/passwd file @ linux information project.

internet explorer - CSS for IE 8 Only -

i need style items ie 8. if this: <!--[if ie 8]><link rel="stylesheet" href="mystyleie8.css" type="text/css" media="screen, projection"/><![endif]--> and do: <!--[if ie 7]><link rel="stylesheet" href="mystyleie7.css" type="text/css" media="screen, projection"/><![endif]--> what happen? found link previous question implied <!--[if ie 8]> means "if ie 8 or lower". mean using <!--[if ie 8]> overwrite <!--[if ie 7]> css? program know use <!--[if ie 8]> ie 8 , <!--[if ie 7]> ie 7? it not mean "if ie 8 or lower". <!--[if ie 8]> means if ie8 <!--[if lt ie 8]> if less ie 8 <!--[if lte ie 8]> if less or equal ie 8

java - Why some interface methods are overriden by another interface? -

is documentation purposes (e.g. deque interface override methods of queue interface, giving them description), or there other reasons ? you can use enforce more specific method signatures , return types. consider: public interface foo { object result(); } public interface bar extends foo { @override string result(); // bar redefines result() return string }

Parsing XML document YQL query in Java -

i want use information xml response produced using yql stock historical data, link http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.historicaldata%20where%20symbol%20in%20(%22msft%22)%20and%20startdate%3d%222011-2-12%22%20and%20enddate%3d%222011-2-15%22%0a%09%09&diagnostics=true&env=http%3a%2f%2fdatatables.org%2falltables.env and store stock objects array. new java , have no knowledge of xml api's. dont know simple way it. can suggest me solution. thanks. you following using jaxb ( jsr-222 ) implementation: metro jaxb (the reference implementation included in java se 6) eclipselink jaxb (moxy) , i'm tech lead apache jaxme etc. demo import java.io.inputstream; import java.net.url; import javax.xml.bind.jaxbcontext; import javax.xml.bind.marshaller; import javax.xml.bind.unmarshaller; public class demo { public static void main(string[] args) throws exception { jaxbcontext jc = jaxbcontext.newinstance...

javascript - Get query string parameters with jQuery -

anyone know of way write jquery extension handle query string parameters? want extend jquery magic ($) function can this: $('?search').val(); which give me value "test" in following url: http://www.example.com/index.php?search=test . i've seen lot of functions can in jquery , javascript, want extend jquery work shown above. i'm not looking jquery plugin, i'm looking extension jquery method. jquery jquery-url-parser plugin same job, example retrieve value of search query string param, can use $.url().param('search'); this library not actively maintained. suggested author of same plugin, can use uri.js . or can use js-url instead. quite similar 1 below. so can access query param $.url('?search')

What is the PHP shorthand for: print var if var exist -

we've encountered before, needing print variable in input field not knowing sure whether var set, this. avoid e_warning. <input value='<?php if(isset($var)){print($var);}; ?>'> how can write shorter? i'm okay introducing new function this: <input value='<?php printvar('myvar'); ?>'> but don't succeed in writing printvar() function. my recommendation create issetor function: function issetor(&$var, $default = false) { return isset($var) ? $var : $default; } this takes variable argument , returns it, if exists, or default value, if doesn't. can do: echo issetor($myvar); but use in other cases: $user = issetor($_get['user'], 'guest'); as of php 7 can use null-coalesce operator : $user = $_get['user'] ?? 'guest'; or in usage: <?= $myvar ?? '' ?>

python - Uniformly distributed data in d dimensions -

how can generate uniformly distributed [-1,1]^d data in python? e.g. d dimension 10. i know how generate uniformly distributed data np.random.randn(n) dimension thing confused me lot. assuming independence of individual coordinates, following generate random point in [-1, 1)^d np.random.random(d) * 2 - 1 the following generate n observations, each row observation np.random.random((n, d)) * 2 - 1

php - mySQL sum multiple rows and rank handling ties -

i have following table: userid compid round score bonus 2980 3 0 50 0 50 3 0 80 0 52 3 0 80 0 55 3 0 20 0 58 3 0 100 0 106 3 0 120 0 555 3 0 50 0 100 3 0 30 0 50 3 1 90 0 52 3 1 50 0 106 3 1 30 0 i want able not sum score , bonus cols per user rounds, rank them accordingly. should able handle ties sequence 1,2,2,4,5,5,5,8: trick don't want create temp table or insert ranking table. also, can not limit return - need rank entire table regardless of rounds completed. i have managed rank rows can't seem group them sum. , of course have managed sum separately - need 'join' 2 steps. obtaining sums per user: select userid,sum(score+bonus) tscore entries group userid order tscore desc use...

watir - How do I send keyboard commands like (Control) + (1) to the browser using Ruby and FireWatir? -

i using firewatir test web app , need send ctrl + 1 open connection plugin text "ltn 123456" , send ctrl +2 close connection. i suggest forget firewatir gem , use watir-webdriver gem (it drives firefox, chrome , internet explorer). api 99% same. has send_keys implementation.

java - FIFO tie breaker in Comparator? -

for homework, need compare nodes based on heuristic can put them in treeset. however, when heuristic values 2 nodes equal need way break tie. i'm not allowed modify node class provided , far can tell there aren't other values / properties of node me break tie i'm not using. (we're dealing puzzles, not matters.) there way break ties based on when added them treeset? don't know how go it.... i saw example in documentation priority blocking queue want use comparator interface, , can't work. thanks in advance; tips / hints appreciated. are allowed create wrapper nodes? public class nodewrapper implements comparable<nodewrapper> { private static atomiclong serialnumgenerator = new atomiclong(0l); private final node node; private final long serialnum; public nodewrapper(node node) { this.node = node; this.serialnum = serialnumgenerator.getandincrement(); } @override public int compareto(nodewrapper other) { int c...

android - Using Service, TimerTask and BroadcastReceiver to check for various updates -

i'm trying create simple program following: a service (newsservice) started activity (updateserviceactivity) checks news. if news found (newsservice) sends broadcast receiver (newsreceiver). upon receiving broadcast receiver (newsreceiver) should notify activity (updateserviceactivity) there news. upon notification, activity (updateserviceactivity) gets news , handles them. so far i'm working on simple example. here code far: updateserviceactivity public class updateserviceactivity extends activity implements onclicklistener { private static final string tag = "updateserviceactivity"; button buttonstart, buttonstop; broadcastreceiver receiver; @override public void oncreate( bundle savedinstancestate ) { super.oncreate( savedinstancestate ); setcontentview( r.layout.main ); buttonstart = (button) findviewbyid( r.id.buttonstart ); buttonstop = (button) findviewbyid( r.id.buttonstop ); buttonstart.setonclicklistener( ); ...

iphone - Having a table view as input view? -

i still struggling sign page iphone app - @ moment having problems gender field. my idea when user presses gender field, table view containing "male" , "female" slides bottom , user puts checkmark next actual gender. not understand how correctly obtain gender table view though. currently have gendertableviewcell points both user interaction enabled label , gendertableviewcontroller , have set input view of first table view of latter. in way table "male" , "female" slide when gender field touched table not in grouped style specified in gendertableviewcontroller.xib have feeling not on right track!! i have been googling , googling have not been able find similar examples - maybe not nice have table view sliding up? should use uipicker instead? i use uipicker instead. it's going easier implement, , far more standard experience user.

Any good text editors that allow Javascript as a scripting language? -

i enjoy javascript programming , have witnessed power of being able script editor, emacs. been searching , can't find if there support javascript. not absolutely need javascript, it's preference know. know text editors support javascript. komodo built on xul (the same technology firefox uses), , supports javascript macros extensions.

iphone - Do I have to wait until In-App purchase gets reviewed to be able to test it? -

i have created, added (at version details), , clicked ready upload new in-app item along new version, product detail request still returns invalid . what do? how long take until gets review-d? when ever able test in-app purchases? grrrrhhhg. if want test inapp purchases here detailed flow of how go it http://www.raywenderlich.com/2797/introduction-to-in-app-purchases

iphone - NSDateFormatter not working properly with UTC -

i have following date: 2011-04-29t14:54:00-04:00 when runs through following code convert date, date null reason: nsdateformatter *dateformatter = [[nsdateformatter alloc] init]; [dateformatter setdateformat:@"yyyy-mm-dd't'hh:mm:ssz"]; nsdate *date = [dateformatter datefromstring:localdate]; [dateformatter release]; nsdateformatter *formatter = [[nsdateformatter alloc] init]; [formatter setdateformat:@"yyyy-mm-dd"]; nslog(@"%@", [formatter stringfromdate:date]); any appreciated solved: ok, figured out. reason, method doesn't work. nsdate *date = [dateformatter datefromstring:localdate]; this works instead. hope helps someone! nserror *error = nil; nsdate *date = nil; [dateformatter getobjectvalue:&date forstring:localdate range:nil error:&error]; ok, figured out. reason, method doesn't work. nsdate *date = [dateformatter datefromstring:localdate]; this works instead. hope helps someone! nserror...

google play - My Android application is not visible on market with Motorola Xoom -

i have android application android:minsdkversion="7" , on market not visible motorola xoom. can me out? <supports-screens android:anydensity="true" android:largescreens="true" android:normalscreens="true" android:smallscreens="false" android:xlargescreens="true" />

sql server - How to find all objects in a database that use UNION -

how can find views , sp's contains union keyword? (alternate question: in system table stored text of sp's , views) thank you here naive workable example: (tested on sql server 2005 & 2008 r2) use msdb; select * sys.all_sql_modules (definition '%create view%' or definition '%create procedure%') , definition '%union%' to solidify join via object_id link , filter views , stored procs object type rather using like. simpler: select * sys.all_sql_modules definition '%union%' caveat: since we're performing comparison against create script of each object pick on word union if/when appears in comments. might ok if need results more deterministic , avoid such cases clause need more complex, possibly using regex refine results.

php - Missing part of my query -

ok working on project decide not finish it.. deleted part of query.. can take guess is.. not part of section of project..... <?php $host = "localhost"; $user = "root"; $pass = "root"; $dbname = "adlmaster"; $connection = mysql_connect($host,$user,$pass) or die (mysql_errno().": ".mysql_error()."<br>"); mysql_select_db($dbname); $zoom = '4'; $x_offset = '-162.2200'; $y_offset = '320.2600'; $shownames = 'yes'; $highlight = '12'; ?> <html><head><title>requested planetary information</title></head><body link="#ff0000" vlink="#ff0000" alink="#ff0000" text="#c3c3c3" bgcolor="#000000" topmargin="0" leftmargin="0"> <body> <h2>requested planetary information</h2><p><?php $sql = "select min(xcoord) min_x, max(xcoord) max_...

java - Why do System.nanoTime() and System.currentTimeMillis() drift apart so rapidly? -

for diagnostic purposes, want able detect changes in system time-of-day clock in long-running server application. since system.currenttimemillis() based on wall clock time , system.nanotime() based on system timer independent(*) of wall clock time, thought use changes in difference between these values detect system time changes. i wrote quick test app see how stable difference between these values is, , surprise values diverge me @ level of several milliseconds per second. few times saw faster divergences. on win7 64-bit desktop java 6. haven't tried test program below under linux (or solaris or macos) see how performs. runs of app, divergence positive, runs negative. appears depend on else desktop doing, it's hard say. public class timetest { private static final int one_million = 1000000; private static final int half_million = 499999; public static void main(string[] args) { long start = system.nanotime(); long base = system.currenttimemilli...

java - Is there a jvm argument that causes the jvm to create an hprof file when the jvm starts up -

one of our testers keeps getting small hprof file created on windows environment when starts our application. the hprof file showing on windows instance. other testers aren't seeing this the hprof file appears every time starts it. the hprof file small (45mb). there no outofmemoryerrors or useful in hprof file matter. the jvm doesn't exit the application works fine on installation after startup. is there jvm argument can specified @ startup (in case, through environment variable) creates hprof file @ startup ? know if specify cpu=samples create 1 on exit. i'm reasonably convinced system setting. have no idea one. running oracle's jre 1.6_024 , jvm running part of startup of tomcat 7. more information here set output. microsoft windows [version 6.1.7601] copyright (c) 2009 microsoft corporation. rights reserved. c:\users\administrator>set allusersprofile=c:\programdata appdata=c:\users\administrator\appdata\roaming classpath=.;c:\windows\java\lib\...