Posts

Showing posts from June, 2010

Windows 8 javascript change the attribute of branding to name -

i have windows 8 application updating tiles periodically. in tile update wish logo replaced application name.did analysis on same , found attribute value"branding" changed name.but setattribute method throws "0x800a01b6 - javascript runtime error: object doesn't support property or method 'setattributes'" below code snippet placed in default.js var squaretilexml = notifications.tileupdatemanager.gettemplatecontent(notifications.tiletemplatetype.tilesquaretext04); var tileattributenode = squaretilexml.getelementsbytagname("binding"); tileattributenode[0].setattributes("branding","name"); the error correct. instead, try setattribute() , see if farther.

php - Can't see parse error -

Image
working on first php script interacts sql. i'm close can smell it! i'm trying return max date in table , received following message date should be: parse error: syntax error, unexpected t_variable in /applications/xampp/xamppfiles/htdocs/tslocal/themes/myname/views/reports/get_vote_date.php on line 25 line 25 $result = mysqli_query($dbc, $query); in script below. here script, i've stared @ till eyes bleed there's uncertainty it's "wrong" because i'm new this: <?php # script get_vote_date // file contains db info // file establishes mysql connection, connects db , gets recent vote date particular page (incident_id). define ('db_user', 'myname'); define ('db_password', 'somepass123'); define ('db_host', 'localhost'); define ('db_name', 'sitename'); // make db connection $dbc = @mysqli_connect('db_host','db_user','db_password','db_name&

Trying to Implement Node.js and Socket.io on dedicated server -

recently, have been experimenting node.js , socket.io. successfully, have been able implement these on localhost. use functionality on dedicated server. hosting server own home , cannot node , socket run outside of localhost. importance of can use 2 different computers while testing out site. here code follows: app.js: var app = require('express')() , server = require('http').createserver(app) , io = require('socket.io').listen(server); server.listen(80); app.get('/', function (req, res) { res.sendfile(__dirname + '/index.html'); }); io.sockets.on('connection', function (socket) { socket.emit('news', { hello: 'world' }); socket.on('my other event', function (data) { console.log(data); }); }); index.html: <script src="http://localhost:8080/socket.io/socket.io.js"></script> <script> var socket = io.connect('http://localhost:8080');

ios - Delete files in tmp directory on background -

i have phonegap application puts files in <application>\tmp directory . need remove files when application backgrounded, pause event has restrictions on ios: this means cannot call console.log (and variants), or calls plugins or cordova api. i suppose modify cordova library handle applicationdidenterbackground , maintaining change on different versions pain. how cleanup tmp folder when application backgrounded?

bytearray - Assigning values to a public byte array in one line C# -

i working public byte array , assign values, assign arrays inside method, i.e byte[] foo = {0x32, 0x00, 0x1e, 0x00}; but when define values forced do foo[0] = 0x32; foo[1] = 0x00; foo[2] = 0x1e; foo[3] = 0x00; if use first example vs gives error "only assignment, call, increment, decrement, await, , new object expressions can used statement" if helps any, array 4 bytes. my code public byte[] setspeed = new byte[4]; private void trackbar1_scroll(object sender, eventargs e) { if (trackbar1.value == 0) { try { stop = true; updatesthread.abort(); thread.sleep(350); } catch { } setspeed = {0x00,0x00,0x00,0x00}; writemem(getplayer() + status_offset, setspeed); label1.text = "normal"; } } your first example fine may used in declaration . elements must implicitly convertible element type. size determined number of elements given.

makefile - Android kernel compilation -

for compiling kernel android below steps: $ export arch=arm $ export subarch=arm $ export cross_compile=arm-eabi- $ cd omap $ git checkout <commit_from_first_step> $ make tuna_defconfig $ make i want change default configuration of kernel editing .config file (enabling flags multimedia , v4l2). when try perform "make", .config file overwritten default values , kernel compiled these values. tried editing .config file , performing "make oldconfig" same result. any way edit .config file ? .config file auto generated file, changing flags in .config not affect kernel configuration. change kernel configuration need open configuration window typing below command in kernel folder: make arch=arm menuconfig ps:: if using ubuntu 12.04 may error while executing 'make arch=arm menuconfig' command, rid of try (atleast worked me): sudo apt-get install lib32ncurses5-dev

vb.net - SQL Server 2005 SSIS Issuse with Debugging and Saving Script Tasks -

last week had interesting issue arise when building new ssis package script task. @ 1 point in process of building , debugging debugger stop hitting break points. @ time thought maybe debugger got hung or weird that. did restart on server , re-opened ssis. when opened package had been working on last few days, , opened script task. script task empty (had default code when create new script task) lost work. started building again had idea on had built. rebuilt few functions , tried debug, not hit break points still. saved current progress , rebooted again. after reboot opened script task, again lost work. @ point unable ssis save script task , unable debug script task code, including built packages. have scoured net looking answer , have found no clue going on. help! prior happening, had no issues debugging or saving packages. have reinstalled ssis once , still same thing...

android - How to pass parameters to facebook Graph Search Api -

i want pass parameters url . https://graph.facebook.com/me?fields=music.fields(videos) it easy pass parameters https://graph.facebook.com/me?fields=music , using , bundle parameters bundle bun = new bundle();<br> bun.putstring("fields", "music"); but stuck @ music.fields(videos) section unable find proper way send parameters url , have tried bundle bun = new bundle(); bun.putstring("fields", "music"); bun.putstring("music", "name"); after doing , got want , bundle bun = new bundle(); bun.putstring("fields", "music.fields(videos)");

Linux: Changing access point with iwconfig -

i have 2 access points same essid. when "iwlist scan," laptop can "see" both of access points. want switch , forth between access points. example, iwconfig shows "access point: " on interface "wlan0." want switch access point address2. have tried "iwconfig wlan0 ap " access point remains address1. there else need make switch access points? using wireless-tools version 30. have tried iw sudo iw connect apssid

javascript - Check word length not working -

html <form name="f1" action="feedback1.php" method="post" onsubmit="return isdatafilled();" > <table border="0" align="center" width="500px" style="max-width: 500px;" cellspacing="3" cellpadding="5" align="center"> <tr align="left"> <td width="25%"> enter subject </td> <td width="75%"><input type="text" name="subject" size="30" value="your subject" onclick="if(this.value=='your subject'){this.value=''}; this.style.backgroundcolor='#ccff99'" onblur="if(this.value==''){this.value='your subject'}; this.style.backgroundcolor='white'"/></td> </tr> <tr align="left"> <td>

php - Modifying Column Spans based on Item count -

Image
ho can modify columns can add in colspan if needed based on number of items in row? scenarios: say have 5 items, need 1 row/4 columns, next row 1 column colspan="4" say have 6 items, need 1 row/4 columns, next row, 2 columns colspan="2" say have 7 items, need 1 row/4 columns, next row, 2 columns no colspan, + 1 column colspan="2" here's existing code: echo '<table width="100%" cellpadding="10" cellspacing="5">' . php_eol; $colspan = 4; $rows = 0; for($i = 0; $i < $tmpct; $i++) { // @ column 0 create new row <tr> if($i % $colspan == 0) { $rows++; echo "<tr>\n"; } // if 1 item in row, need add colspan="4", 2 items colspan="2" 2 <td>'s, 3 items 1 @ colspan="2" + 2 <td>'s echo '<td width="

bash - how to extract the remaining memory from free using awk? -

i need extract available memory output free , thought use awk , came free | awk '{print $4}' . gives me output like: $ free | awk '{print $4}' shared 365296 1273812 3931364 mind, title shared isn't title of these numbers, numbers free ( /usr/bin/free has no title in first column, numbers free appear in 4th column title reported 5th). however, having this, how return second line? i'm not interested in rest now. free | awk 'nr==2 {print $4}' nr, row/line number

How to display python code on a html page: Beginner -

i absolute beginner in coding python , wondering whether lead me in right direction. have written code can access database terminal...that's fine. want display results in html page.....which have designed. how possible connect code in terminal display output on html page. told must use framework such flask? this may seem extremely easy dont understand how works...any advice great...thanks! your life easier if used framework of kind. knowledge used python web framework django: https://www.djangoproject.com/ however possible use python in number of ways display webpage content. you can use python cgi ( http://docs.python.org/2/library/cgi.html ) here hello world example: #!/usr/bin/env python # -*- coding: utf-8 -*- import cgitb cgitb.enable() html = "hello world!" print "content-type: text/html;charset=utf-8" print print html.encode("utf-8")

dependencies - Custom Ivy Resolver throws NullPointer Exception in Grails -

i had following custom resolver defined in repositories{...} block of buildconfig.groovy file jars needed use jai in grails project. mavenrepo "http://www.mygrid.org.uk/maven/repository" def jbossresolver = new org.apache.ivy.plugins.resolver.urlresolver() jbossresolver.addartifactpattern("https://repository.jboss.org/nexus/content/groups/public-jboss/com/sun/media/[module]/[revision]/[artifact]-[revision].[ext]") jbossresolver.addartifactpattern("https://repository.jboss.org/nexus/content/groups/public-jboss/javax/media/[module]/[revision]/[artifact]-[revision].[ext]") jbossresolver.setname("awesomestjbossresolverever") resolver jbossresolver however, whenever run grails refresh-dependencies , error: compile ( "net.java.dev.jai-imageio:jai-imageio-core-standalone:1.2-pre-dr-b04-2013-04-23", "javax.media:jai-core:1.1.3", "com.sun.media:jai-codec:1.1.3" ) the jai-image

java - Does Apache CXF library work on a WAS CE server? -

i using cxf me call web services. able code run locally, when deploy war having issues. after looking through logs believe ce uses axis2 web service engine. causing issues? cxf library not work on ce servers? edit: here code. issue seems x509 authentication. have been able call different web service requires basic preemptive authentication without problem. url wsdlurl = new url(endpoint); /*wsorganization ss = new wsorganization(wsdlurl, service_name); port = ss.getwsorganizationsoap();*/ jaxwsproxyfactorybean factory = new jaxwsproxyfactorybean(); factory.setaddress(endpoint); factory.setserviceclass(wssoap.class); port = (wssoap) factory.create(); client client = clientproxy.getclient(port); endpoint cxfendpoint = client.getendpoint(); map<string,object> outprops = new hashmap<string,object>(); wss4joutinterceptor wssout = new wss4joutinterceptor(outprops); outprops.put(wshandlerconstants.action, "signatu

c# - Calculation is wrong -

what should happen my exexcrise prgramm calculator able calculations in 'queue'. example: user enters first number in txtzahl , clicks 1 of button. needed calculation should saved in list numbers , txtzahl should cleared. user can enter new number , press button etc. when user clicks on btnequ foreach should take every calculation list , calculation. if done result should displayed in txtzahl . problem the calculations not correct. example 0.00 result 4-3. i know idea class not best way, keep it, see teacher thinks it. thank helping! code: form1.cs double ergebniss = 0; boolean firstrun = true; list<rechnung> numbers = new list<rechnung>(); rechnung.rechenart lastart; private void btnminus_click(object sender, eventargs e) { if (isvalid()) { if (firstrun) { ergebniss = convert.todouble(txtzahl.text); } numbers.add(new rechnung(convert.todouble(txtzahl.text), rechnung.rechenart.subtraktion)

c++ - C++11: struct timeval -

i told not include c headers <stdio.h> in c++ program, use <cstdio> etc. instead. how struct timeval without including <sys/time.h> ? alternative question, there c++11 alternative using select/poll (on posix system)? the <cstdio> , similar c++ variants c standard library. <sys/time.h> not part of c standard library @ (it part of posix interface certan os's), there no such thing c++ specific sys/ctime , no, have use same header-file in c. the main reason having c style , c++ style header apply extern "c" functions declared in headerfile. in systems, may required wrap function this: extern "c" { #include <sys/time.h> } but in linux system, in standard <sys/time.h> file.

python - PyTesser simple usage error -

i've downloaded pytesser , extracted it. i in pytesser_v0.0.1 folder , tried run sample usage code in python interpreter: from pytesser import * print image_file_to_string('fnord.tif') and output: traceback (most recent call last): file "<stdin>", line 1, in <module> file "pytesser.py", line 44, in image_file_to_string call_tesseract(filename, scratch_text_name_root) file "pytesser.py", line 21, in call_tesseract proc = subprocess.popen(args) file "/usr/lib/python2.7/subprocess.py", line 679, in __init__ errread, errwrite) file "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child raise child_exception oserror: [errno 2] no such file or directory note: i'm in ubuntu 12.10 python 2.7.3 can me understand error, , can fix ? this isn't documented be, if not on windows need install tesseract binary platform. on ubuntu , other debian based linux

How to implement GWT, Java, button, and the clickhandler -

forgive me if question has been asked , answered, have been unable find if has. i can find several examples like button.addclickhandler(new clickhandler() { public void onclick(clickevent event) { ... stuff ... } }); i'm trying understand how implement button click handler using following structure. public class myclass implements entrypoint { final button mybutton = new button("text"); : : void onclickmybutton(???) { ... stuff ... } : : } to "me", structure more read , preference in coding style. don't know how implement it. i'm using eclipse , gwt java web app. appreciated. either public class myclass implements entrypoint, clickhandler { final button mybutton = new button("text"); : : mybutton.addclickhandler(this); @override void onclick(clickevent event) { ... stuff ... } } or public clas

objective c - How to restrict number of fraction digits when parsing number from string? -

i want restrict number of fraction digits user allowed enter uitextfield accepts (localized) numeric input. example 4 fraction digits allowed: good: 42 , 10.123 , 12345.2345 bad: 0.123456 , 6.54321 right now, i'm using nsnumberformatter 's numberfromstring: in uitextfield delegate's textfield:shouldchangecharactersinrange:replacementstring: determine whether it's legal numeric value. unfortunately, nsnumberformatter seems ignore maximumfractiondigits in numberfromstring: . in tests using getobjectvalue:forstring:range:error: had same problem, , range full length of string afterwards (unless start entering letters; range indicates part of string digits): nsnumberformatter* formatter = [[nsnumberformatter alloc] init]; formatter.maximumfractiondigits = 3; formatter.roundingmode = nsnumberformatterroundhalfup; formatter.generatesdecimalnumbers = yes; nsdecimalnumber* n = (nsdecimalnumber*)[formatter numberfromstring:@"10.12345"]; nslog(@

How can rails gems Apartment and Datagrid work together nicely? -

apartment being implemented large project uses datagrid . apartment configured switch postgresql schemas (tenants) on per subdomain basis. problem filters , should reference tenant specific schema, pull data out of public schema. is there way datagrid filters @ correct schema in postgresql? i opened issue on datagrid github account , got answer bogdan: "seems, need wrap select proc this: :select => proc { user.order(:last_name).all.map{ |u| [u.full_name, u.id] } in way datagrid query select options every time filter rendered. :select without proc can used when options constant." https://github.com/bogdan/datagrid/issues/70#issuecomment-23002811 hard why worked locally without proc, answer.

nltk - Grouping words based on meaning and class -

i looking package groups words "mom" , "women" , "female" in 1 group. in general groups words based on class. in above example class person:female. working nltk similarity metrics dont seem doing purposes. there else can @ ? i'm not sure if aware of wordnet project may looking for. lot of research has gone , in fact there global project map database other languages. lexical analysis sound far know data stored in bit of messy format. primary web site here princeton wordnet . - if search find mssql version of database , there client program evaluate if database suitable purpose - called "wordnet browser". link here . entered mom , able female , person , mother out of hypernym related terms. there lot of lexical terms learn here , haven't gotten bottom of myself. hope of you.

java - Hiding a Row From a ResultSet -

i have result set has take in rows blank. it looks there function resultset allows delete row entirely, called resultset.deleterow() . however, looks deletes row database it's linked to. how can hide row resultset (and not delete database) when every column in row "null"? thank you. you can't remove rows or update resultset. have use cachedrowset. if want can loop through result set , add elements in list or map , remove non-required elements data structure. better option modify sql , data want in result set.

javascript - AngularJS 1.2 ngInclude inside ngIf -

i'm running odd behavior when putting nginclude inside ngif or ngswitch. for example, take following: <button ng-click="showinctemplate = !showinctemplate">toggle included template</button> <button ng-click="showinlinetemplate = !showinlinetemplate">toggle inline template</button> <div ng-if="showinctemplate"> <p>included template:</p> <div ng-include="'template.html'"></div> </div> <div ng-if="showinlinetemplate"> <h1>inline template</h1> </div> ( http://plnkr.co/edit/gulbwnkb0gqs8dwz0v6u ) the buttons toggle options render divs follow. inline example behaves expected, content appearing or disappearing on click. the div child include seems not include template when first drawn, includes repeatedly on every subsequent redraw. what's going on here? see breaking changes around nginclude, there other way should

ios - Map url parameters to objects using RESTKit -

is there way map parameters in url results? i got rest service user can search id. path search/:id results contains name , other properties not id. i this: nsarray *array = mappingresult.array; (item *item in array) { [item setid:itemid]; } but hope there nicer way... thanks hints xean you want use path pattern specify in response descriptor. want use routing ( rkroute ) , metadata during mapping. metadata includes routing section gives access parameters extracted url path. some info on metadata here (the docs little lacking). in mapping want use: @metadata.routing.parameters.id as mapping source key path. to make routing work need add route object manager: [manager.router.routeset addroute:... and need make request in way means route used, getobjectsatpathforroutenamed:object:parameters:success:failure: .

Detect new line c++ fstream -

how read .txt copy content .txt using fstream similar content. problem is, when in file there new line. how detect while using ifstream? user enter "apple" eg: note.txt => bought apple yesterday. apple tastes delicious. note_new.txt => bought yesterday. tastes delicious. the resulting note suppose above, instead: note_new.txt => bought yesterday. tastes delicious. how check if there new line in source file, create new line in new file. here current code: #include <iostream> #include <fstream> #include <string> using namespace std; int main() { ifstream infile ("note.txt"); string word; ofstream outfile("note_new.txt"); while(infile >> word) { outfile << word << " "; } } can me? check when word retrieved same user specified, won't write word in new file. general, delete words same 1 specified user. line-by-line method if still want li

PHP variables inside SQL results? -

so, if say $bike = 'schwinn'; can have select statement returns your bike $bike. , have echo $statement your bike schwinn. without additional parsing? by using concat function in mysql can: select concat('your bike ', bike, '.') 'bike' bicycles bike = 'schwinn' demo

css3 - How to get Susy going with a CSS only toggle navigation -

i've tried apply susy grid header containing 1 logo , nav links. ran real unexpected behaviour can't explain myself. html looks following: <header id="top" role="banner" class="headerstyle headerline"> <div class="sectionwrap"> <div itemscope itemtype="http://schema.org/organization"> <a class="logohome" href="#gohome" title="logo"> <span itemprop="logo" class="sitelogo" data-picture data-alt="logo"> <span data-src="img/logo.png"></span> <span data-src="img/logo_x2.png" data-media="(min-device-pixel-ratio: 2.0)"></span> <!--[if (lt ie 9) & (!iemobile)]> <span data-src="img/logo.png"></span> <![end

Eclipse on Ubuntu gives "Update LCD" error when setting up a run configuration with a File System working directory -

when configuring new run on eclipse, , selecting working directory "other" -> "file system", whole 'run configurations' box becomes unusable , cannot access more settings launch configuration or other ones there. happens if @ least 1 of run configurations set use folder "other" instead of default. has worked on other machines running ubuntu 12.04 , 12.10 happened on new 1 13.04. not work, tried different versions of eclipse, different versions of java. idea on how solve this? i had same error. perhaps throw because have installed on eclipse run jetty plugin, have 1 debug configuration realtive close project. to solve it, have open project before open run configurations.

finder - Create an applescript / automator workflow that excludes certain file names -

i want make automator folder action excludes file names words in them, eg: move files /folder x except containing words "screen shot" the actual actions work fine need script or automator actions exclude files. you should able use “filter finder items” , set criteria “none of following true”: “name contains screen shot”. did quick test “choose folder”, “get folder contents” , “filter finder items” , results contain files not contain word specified.

html - Improve JQuery function for make it able to accept variables -

this code intended able toggle between showing , hiding element depending on id. i'm trying transform code make possible give variables in standard javascript functions. like this, able employ function want hide or show html element calling function , giving id attribute. i'm trying version of code doesn't work. i'm giving id's of elements want change there mistake. var x; x=$(document); x.ready(init); function init(){ var x; x=$("#titulo1"); // here id of control element x.click(qocult_most("#subtitulo1")); } function qocult_most(id){ //show , scrolls down till page's end var x; x=$(id); //here id element show x.toggle(50); $("html, body").animate({ scrolltop: $("#sth").offset().top }, 1000); } and html body calls jquery is: <body> <div id="titulo1" class="conte

'EOMONTH' is not a recognized built-in function name- SQL Server 2012 -

i installed sql server 2012- developer edition. when apply select @@version, get: microsoft sql server 2005 - 9.00.5000.00 (intel x86) dec 10 2010 10:56:29 copyright (c) 1988-2005 microsoft corporation express edition on windows nt 6.1 (build 7601: service pack 1) but when go help, about, shows it's sql server 2012. i'm trying use eomonth function , i'm getting error eomonth unrecognizable built in function. can please me understand what's going on? thanks!i'm new t-sql. you might connecting instance of sql server 2005 ssms 2012. make sure select correct server/instance while connecting database engine.

javascript - Script does not working for loaded element -

this question has answer here: event binding on dynamically created elements? 18 answers i created form checkbox + wrapper, i.e : <form> <div class="input-wrapper"> <input type="checkbox" name="item[]" value="1"> </dv> <div class="input-wrapper"> <input type="checkbox" name="item[]" value="2"> </div> <div class="input-wrapper"> <input type="checkbox" name="item[]" value="3"> </div> </form> and toggle check working: $(".input-wrapper").on("click", function () { var $checkbox = $(this).find(':checkbox'); $checkbox.prop('checked', !$checkbox[0].checked); }); but when load other checkbox ajax, i.e:

html - Simple Bootstrap site - the navigation bar keeps covering my main content. Any idea why? -

here html. <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>title</title> <link href="css/bootstrap.css" rel="stylesheet" type="text/css"> <link href="css/bootstrap-responsive.css" rel="stylesheet" type="text/css"> <link href="css/style.css" rel="stylesheet" type="text/css"> <!-- html5 shim ie backwards compatibility --> <!--[if lt ie 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div class="container-fluid"> <div class="row-fluid"> <nav class="navbar navbar-inverse"> <div class="navbar-inner"> <a class="btn btn-navbar

asset.rb in config/initializers - Rails App 3.2.13, Ruby 2.0.0-p0 -

in 1 of rails app working, find file called asset.rb inside config/initializers directory , contains following details: actioncontroller::base.asset_host = proc.new { |source, request| if request.env["request_path"].include? ".pdf" "file://#{rails.root.join('public')}" else "#{request.protocol}#{request.host_with_port}" end } can tell me means. have pdf report generation functionality in our app. anyway, have searched lot , couldn't find better answer. please help. :)- it looks pdf files (probably generated pdf report generation) stored in /public directory. code doing first checking if path of request contains string ".pdf". if request_path contains .pdf sets base.asset_host file://path_to_app/public otherwise e.g. https://host:port . so think being done somewhere is, if there request pdf file serve file on file:// protocol regardless of request protocol, , other files use r

c++ - How to get command line of windows "open with .." function? -

i asked question how windows "open with.." application list. here's a link question. we can use shassocenumhandlers interface file association specific file extension, ex .png then use iassochandler , can retrieves full path , file name of executable file associated file type( .png ). ex: ['paint': 'c:\\windows\\system32\\mspaint.exe', ...] but want command line of executing mspaint.exe given image. this~ "%systemroot%\system32\mspaint.exe" "%1" is there msdn api "open with.." command? think should have, since windows xp have ability. use assocquerystring(..., assocstr_command, ...); example: tchar commandline[1024]; dword size = arraysize(commandline); assocquerystring(0, assocstr_command, _t(".txt"), 0, commandline, &size);

c# - Making Project as trial version -

this question has answer here: how can make product trial version 30 days? 11 answers i have developed 1 windows application project using c# , need give trial version client, , activate later based on response. should need ? there's neat post here license , activation implementations: software license key , activation the answer , last post particularly interesting. check if cover needs. some other posts may cover other points: how manage software serial keys, licenses, etc? web-based license activation how generate , validate software license key?

How to read an SQLite DB in android with a cursorloader? -

i'm setting app people can create groups of friends. when group created, writes 2 tables sql database. first table has group name , group id. second table has 2 columns, group id , user id. working fine. however, want able read database. i'm using listview fragment cursorloader i'm having trouble getting information display. want list group names first table in list view. my problem that, when first used cursorloader list contacts, using uri content provider in oncreateloader method. had content_uri contactscontracts.contacts class. example of cursorloader contentprovider : @override public loader<cursor> oncreateloader(int i, bundle bundle) { uri contenturi = contactscontract.contacts.content_uri; return new cursorloader(getactivity(),contenturi,projection,selection,args,order); } however, without using content provider, don't know put in oncreateloader method because return new cursorloader(...) requires uri in second argument.

Asana tag API query often misses newly created Tags -

when create projects via api newly created project returned in both webapp , in api. but tag created using api " https://app.asana.com/api/1.0/tags " returned after 2 or 3 requests. in webapp needs refresh, online application sync not update new tags projects. this late returns affects user interaction. follow same workflow thats used creating , adding project, tags feels bit laggy. missing anything? the answer tags aren't associated tasks - unfortunately - hidden in app, , consequently in api. discovered, can id post create , associate task there (since there's little purpose in creating tag if you're not associating shouldn't typically problem, clunky). looking @ changing our data model tags bit more intuitive in future, that's still ways off, reality foreseeable future.

c - What is the value of a unsigned long long in hex -

i have variable unsigned long long latitude = 29.47667; when converting value array this ar[7] = (uint8_t)((latitude >> 56) & 0xff); ar[6] = (uint8_t)((latitude >> 48) & 0xff); ar[5] = (uint8_t)((latitude >> 40) & 0xff); ar[4] = (uint8_t)((latitude >> 32) & 0xff); ar[3] = (uint8_t)((latitude >> 24) & 0xff); ar[2] = (uint8_t)((latitude >> 16) & 0xff); ar[1] = (uint8_t)((latitude >> 8) & 0xff); ar[0] = (uint8_t)(latitude & 0xff); then sending server using tcp socket. when sending print values in hex, 0x1d rest zeros. how send exact value server while converting unsigned long long int. unsigned long long latitude = 29.47667 doesn't make sense, unsigned long long integer type. variable gets truncated integer 29 . that's why 0x1d , 29 in hex.

terminal - Ruby on rails, change code -

i built ruby on rails application, friend, had delete code because made giant mistake, downloaded code friend application did not work. have redo of routes in terminal. if so, possible of code being complete, , not doing step step? you either check git log sha you're interested in, , git checkout <sha> , or git reset --soft head^^ if want preserve changes on staging (assuming need go 2 commits ^ correspond how many commits need go back).

c3p0 - Frequent out of memory issues -

we running web application 6gb heap assigned it. but, after time, giving out of memory. the exception stack trace given below. exception in thread "com.mchange.v2.async.threadpoolasynchronousrunner$poolthread-#2" java.lang.outofmemoryerror: permgen space 00:46:52,678 warn threadpoolasynchronousrunner:608 - com.mchange.v2.async.threadpoolasynchronousrunner$deadlockdetector@772df14c -- apparent deadlock!!! creating emergency threads unassigned pending tasks! 00:46:52,682 warn threadpoolasynchronousrunner:624 - com.mchange.v2.async.threadpoolasynchronousrunner$deadlockdetector@772df14c -- apparent deadlock!!! complete status: managed threads: 3 active threads: 0 active tasks: pending tasks: com.mchange.v2.resourcepool.basicresourcepool$acquiretask@3e3e8a19 pool thread stack traces: thread[com.mchange.v2.async.threadpoolasynchronousrunner$poolthread-#1,5,] thread[com.mchange.v2.async.threadpoolasynchronousr

wordpress - To display "venue" in the output of ajax-event-calendar -

i searched "ajax-event-calendar" support forums , faq.but, won't got solution yet. want display venue details in output. ajax-event-calendar i got solution myself. go plugins folder -> ajax event calendar -> ajax-event-calendar.php -> line no. 820 function render_eventlist_events($events, $whitelabel, $limit) { usort($events, array($this, 'array_compare_order')); $rows = $this->convert_array_to_object($events); $out = ''; foreach ($rows $count => $row) { global $wpdb; $id1 = $row->id; //echo $id1; $result1 = $wpdb->get_results("select venue wp_aec_event id ='$id1'"); foreach ( $result1 $result2 ) { $venue_name = $result2->venue; } //if ($count < $limit) { if (!$limit || $count < $limit) { // split database formatted datetime value display formatted date , time values $row->start_date = $th

iphone - Why is my UINavigation controller off by 79 pixels -

in iphone works great. however when @ navigationbar frame -44? iphone y origin 0. is supposed this? seems shifted 79 pixels. any idea how fix? when rotate sizes ok initial landscape size wrong. adding view code fixes not want do: navigationcontroller.view.superview.frame = cgrectmake(-79, 0, size.width, size.height); startravelappdelegate *appdelegate = (startravelappdelegate *) [[uiapplication sharedapplication] delegate]; firstmenuview *firstmenuview = [[[firstmenuview alloc] init] autorelease]; // bac123viewcontroller *bac123 = [[bac123viewcontroller alloc] autorelease]; // uinavigationcontroller *navigationcontroller; // appdelegate.navcontroller = [[[uinavigationcontroller alloc] initwithrootviewcontroller:firstmenuview] autorelease]; mynavigationcontroller *navigationcontroller = appdelegate.navcontroller; [navigationcontroller pushviewcontroller:firstmenuview animated:true]; cgsize size = [[ccdirector shareddire

jstack unable to print java thread stacks from Windows crash dump -

i'm trying extract java heap dump native dump taken wer when crashed: jstack -m -l "c:\program files\java\jre6\bin\java.exe" wer.tmp.hdmp but following exception: attaching core c:\users\xxx\desktop\wer.tmp.hdmp executable c:\program files\java\jre6\bin\java.exe, please wait... sun.jvm.hotspot.debugger.nosuchsymbolexception: not find symbol "ghotspotvmtypes" in of known library names (jvm.dll, jvm_g.dll) @ sun.jvm.hotspot.hotspottypedatabase.lookupinprocess(hotspottypedatabase.java:389) @ sun.jvm.hotspot.hotspottypedatabase.readvmtypes(hotspottypedatabase.java:104) @ sun.jvm.hotspot.hotspottypedatabase.<init>(hotspottypedatabase.java:85) @ sun.jvm.hotspot.bugspot.bugspotagent.setupvm(bugspotagent.java:565) @ sun.jvm.hotspot.bugspot.bugspotagent.go(bugspotagent.java:494) @ sun.jvm.hotspot.bugspot.bugspotagent.attach(bugspotagent.java:348) @ sun.jvm.hotspot.tools.tool.start(tool.java:169)

android - how to add left and right image on header -

i want create header image http://imgur.com/xrlxb0l but screen this http://imgur.com/ut4eryl how add 2 images 1 left , 1 right of header??? here code: <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ffffff" android:orientation="vertical" > <relativelayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/border" > <imageview android:id="@+id/test_button_image" android:layout_width="wrap_content" android:paddingleft="5dp" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:paddingtop="10dp&

ios - how can i save the name of UIButton in string? -

i have button named uibutton *button1; how can save 'button1' in string? or able save or not? check import #import "objc/runtime.h" -(ibaction)btnitemlistclicked:(id)sender { uibutton *btn=sender; nsstring *name = nil; uint32_t ivarcount; ivar *ivars = class_copyivarlist([self class], &ivarcount); if(ivars) { for(uint32_t i=0; i<ivarcount; i++) { ivar ivar = ivars[i]; id pointer = object_getivar(self, ivar); if(pointer == sender) { name = [nsstring stringwithutf8string:ivar_getname(ivar)]; break; } } free(ivars); } nslog(@"%@", name); } output is: printing description of name: btnconferencecall check sample demo buttondemo

PHP - parsing javascript array using a preg_match() -

i have problem parsing html page. there variable in javascript need , put json format. <script> var variable1 = "foo"; var variable2 = "boo"; var multiplearray = [ {"var1":"1", "var2": [{ "var21":"extra lge", "var22":"45923090470", "var23": {"key1":"value1", "key2":"value"} }], ...etc... }] </script> is there easy way, how var multiplearray , keys , values ? used preg_match() preg_match("'var multiplearray = [\{.*?\}]'", $source, $matches ); but returns $matches empty array(). what doing wrong? experence reg.ex. on level 0 :( i'll glad :) thank :) with th following pattern should array without var multiplearray identifier. preg_match(

javascript - jQuery .show not working in .each -

here jquery code.i'm trying show.here code $('#divtalentagent a').each(function () { $(this).show(); }); the above code doesn't work.but if modify below $('#divtalentagent a').each(function () { alert('hi'); $(this).show(); }); it works.. try this $('#divtalentagent a').each(function () { settimeout(function(){$(this).show();},0); });

c# - Cross Device Devlopment for Windows Devices - multiple sdk's? -

couldn't find direct answer this...would windows device programming workplace solutions. jumped onto google , typed in "windows sdk" , got found there separate sdk's windows phone 8, surface rt, , windows 8. i thought myself "this can not true" hit forums...haven't found relevant. does know if there all-in-one solution windows 8 programming encompasses devices? if have develop same app 3 times accommodate 3 devices going have advise upper management against decision. i think need. windows phone 7/8 , windows 8 co-development . you should separate code, move platform independent logic pcl . you'll have develop different uis wp , winrt anyway.

html - Using readHTMLTable with multiple tbody -

suppose have html table multiple <tbody> , we know legal html , , attempt read readhtmltable follows: require(xml) table.text <- '<table> <thead> <tr><th>col1</th><th>col2</th> </thead> <tbody> <tr><td>1a</td><td>2a</td></tr> </tbody> <tbody> <tr><td>1b</td><td>2b</td></tr> </tbody> </table>' readhtmltable(table.text) the output takes first <tbody> element: $`null` col1 col2 1 1a 2a and ignores rest. expected behavior? (i can't find mention in documentation.) , what flexible , robust ways access entire table? i'm using table.text <- gsub('</tbody>[[:space:]]*<tbody>', '', table.text) readhtmltable(table.text) which prevents me using readhtmltable directly on url table this, , doesn't feel robust. if @ source readht