Posts

Showing posts from September, 2011

Android 2 google maps maps in one application -

in application have 3 google maps maps on diffrent activitys ofcourse. if go 1 location in 1 map in 1 view. , start other activity. map located on location other map left of. is there way can prevent this? (hope understand problem) quoting the documentation : only 1 mapactivity supported per process. multiple mapactivities running simultaneously interfere in unexpected , undesired ways. you need rewrite application have 1 mapactivity , change contents (overlays, center/zoom, etc.) needed.

How to edit my attribute table in ArcGIS with VBA -

before start should know bloody newcomer when comes down coding. sitting on university tasks regarding vba , arcgis: next task create code snippet enables user edit values (rows) in attribute table. attribute table consists of points basic information such name, address etc. love load kind of list of rows , able click on specific row want edit. feel free post easier ways there.. said extremely new world of coding ;-) thanks everyone bill i know said you're new programming, based on you're saying, think you're easiest route using standard out-of-the-box arcmap functionality. even though whatever you're trying can accomplished vba (know in arcgis 10 , up, option discouraged now), can doing following in arcmap... open attribute table, , select row. use query definition if want narrow down. if need load external list, arcgis provides numerous ways of importing data arcmap table (like csv files, xls, dbf, oledb, etc). start edit session , can use attr

java - Recursive/looping calculations of new generation in The Game of Life -

everyone. next generation in game of life application (link example application) calculated correcly. game works expected, must press "next" each time want new generation. i'm having problem implementing "start"-button loop generations. (see link difference between "next" , "start".) it's obvious need kind of loop inside actionlistener class. i've tried calling nextgen() inside actionlistener recursivly while private boolean true. program crashes. i've tried setting kind of wait, not matter. it 10 iterations if place 10 lines of nextgen(); inside listener, i'm guessing need kind of wait here. (the problem beeing memory.) hope can me out on this. :) the next generation calculated way. actionlistener class: public class gameoflifelistener implements actionlistener { // important: gameoflifegrid contains gameoflife collection! private gameoflifegrid gameoflife; public gameoflifelistener ( gameof

javascript - How to get as much debug traffic information, as possible when using WWW::Scripter module in Perl? -

i using www::scripter module in perl application , trying find out code doing, pages/images/etc downloads, headers , contents gets , in order. the code this: #!/usr/bin/perl -w0   use strict; use warnings; use lwp::debug qw(+); use lwp::conncache; use www::scripter;   ...   $w = www::scripter->new(agent => '...', autocheck => 1); $w->conn_cache(lwp::conncache->new); # keep alive $w->use_plugin('javascript');   ...   $w->get($url);   ...   what need do, debug information said above, headers , contents of each request, order of requests, etc? apply instrumentation ( slides/examples ).

ios - UIPickerView with two components crashes when scrolling both -

i have uipicker view 2 components. title rows of each component in relationship, is, texts , number of rows in 2nd component change according selected row in 1st component. now, problem is, when scroll 2 components together, app crashes. i guess reason when 1st component being scrolled, supposed number of rows in 2nd component keeps changing, meantime, uipickerview asking title , number 2nd component, crashes. but haven't found method can used judge whether component being scrolled. can't find correct time reject request of pickerview's delegate , datasource 2nd component. what supposed do? im running same issue , i'm thinking conjunction of 2 options 1 string placed array uipicker. there 1 component. maybe should same? another solution might helpful i'd found here basic idea 2 depended components picker having 2 arrays: 1st left component , 2nd right. each time user makes choice on left component array right side repopulates according left

c# - Rule-based available values for a property within model -

i have question regarding put available values of specific property within model class. imagine have model class has 2 properties family , series possible values of series property depends on value of family property. the business logic contains set of rules defines series values available due value specified family property. model should have valid state, means if value of family property changes , available values of series property change, value of series property must changed 1 of available values fit valid state. my intention display available values within combobox both family property , series property. @ moment i'm not sure whether put available values of series property into viewmodel, into model, or introduce separate layer between viewmodel , model covers data validation , functionality of providing available values specific properties within model (that acts plain data container). i tend use second or third approach (i prefer third approach) because of d

html - CSS Liquid horizontal list -

Image
ok, try clarify: i have set 6 sentences of 3 6 words, eg: some text - text - text - text - text this 100% width centered container. the site working on using liquid widths content, so, @ smaller resolutions want text wrap. when 'wrap', @ smaller resolutions want this: some some some text text text text text text like like like this this this so want text wrap paragraph of text wrap in % width div. i dont want text appear this: some text text text hopefully makes more sense? thanks =====edit=============== i have been trying last couple of hours try , achieve , i'm give up. it seems simple can't achieve desired effect , i'm starting wonder if it's possible. basically, have liquid site layout , want have centered horizontal list of text wraps different resolutions: as can see attached image, when browser @ larger resolutions want text centered @ lower resolutions wrap (each line wraps, not each block of text). i ha

email - PHP mail script does not send mail -

i have mail script on page: mail('myadress@server.com', 'new client added user', 'test message'); not receive anything! (of course added real adress). tried 2 different adresses, looked in spam folder, etc... nothing. script executes fine. is there log can view or invoke see happened? thank help! <?php $to = "someone@example.com"; $subject = "test mail"; $message = "hello! simple email message."; $from = "someonelse@example.com"; $headers = "from:" . $from; mail($to,$subject,$message,$headers); echo "mail sent."; ?> try going work u ....

php - Call to a member function appendChild() on a non-object in -

what wrong code ? public function openxml() { // ouverture du fichier $file = new domdocument(); $file->load("lastitems.xml"); //on retourne le fichier return $file; } public function createxml() { // création du fichier en mémoire $file = new domdocument("1.0"); // création du noeud racine $root = $file->createelement("rss"); //on crée l élément racine $root->setattribute("version", "2.0"); //on lui ajoute l attribut version (2.0) $root = $file->appendchild($root); //on insère la racine dans le document // création du noeud channel $element_channel = $file->createelement("channel");//on crée un élément channel $element_channel->setattribute("id", "lastitem"); //on donne un attribut id à notre channel $element_channel = $root->appendchild($element_channel);//on ajoute cet élément à la racine // création du noe

hibernate - AliasToBeanResultTransformer(MyDTO.class) fails to instantiate MyDTO -

i criteria query instantiate dto class using aliastobeanresulttransformer. goal produce light weight paged list ids further action home page. calls reporting type query. criteria crit = session.createcriteria(profile.class); crit.createalias("personaldata", "pd"); crit.createalias("emails", "e"); crit.createalias("telephones", "t"); projectionlist properties = projections.projectionlist(); properties.add(projections.property("id").as( "id")); properties.add(projections.property("pd.lastname").as("lastname")); properties.add(projections.property("pd.fullname").as("fullname")); properties.add(projections.property("e.emailaddress").as("email")); properties.add(projections.property("t.phonenumber").as("phone")); crit.setprojection(pr

java - Guice: When to kick off injection/bootstrapping in a headless JAR? -

so i'm writing bunch of components (that packaged jars), , using guice di. these components reusable, "commons"-type jars used other downstream projects. my understanding guice implement concrete module , use bind objects and, in effect, configure of di. understanding should have single "bootstrapping" phase guice injector created, , dependencies module configured fetched injector injector.getinstance(someclass.class) . that work great in standalone application, had entry point, invoke init() -style method bootstrap guice with, in headless jar has no entry point, i'm struggling trying determine when/where/how bootstrap guice. these jars living on classpath and, @ point in time, external entity invoke , class , method inside of them. thought using "lazy initialization" set up, method checks see if dependencies have been configured yet, and, if so, kicks off bootstrap method. but that's terrible solution! partly, because require ever

python - Good sound libraries? -

i need take audio signal, , extract overlapping audio frames it. need convert these frequency data (fft stuff / spectrogram) , analyze frequency information. for example, if have 1 minute mp3 file, want split file smaller files, 00:00.000 00:03.000, 00:00.010 00:03.010. need see frequency breakdown of each sub-file. which programming languages have audio tools me this? there linux command-line tools use? bonus points node.js (yeah right) or haskell, i'm familiar with. haskell: http://hackage.haskell.org/package/hsndfile . it's math, i'd imagine, hmatrix , soforth.

postgresql - How do I rename the default postgres superuser to "root"? -

i log in postgresql using psql -u postgres . how rename postgres user root ? if logged in postgres trying alter user postgres rename root error: session user cannot renamed . is possible rename user without logging postgres user? don't think have other superuser since fresh install of postgresql. by way, running gentoo on amazon ec2. you should able create new postgres superuser called root logging in postgres user , (at shell) typing; createuser --superuser root psql> create database root owner root after that, when logged in root, should able want postgres user.

asp.net mvc 3 - Debugging Javascript / Jquery in Visual Studio 2010 MVC3 Razor in a partial View -

is possible debug jquery in visual studio mvc3 razor in partial view? breakpoints set within regular view hit, however, when set breakpoints in partial view loaded within view, aren't. know javascript working, wondering if limitation debugging script in partial views. how using " debugger; " command in javascript?

DataMapper, Rails 3.1 How do I skip migrations on a repository a Class? -

i've been searching quite bit (and experimenting monkey patching) solution issue no avail. i wondering ... how prevent migrations executing on class has datamapper::resource included in it? in rails app, have few classes connect different repository default. read only. want exclude them auto_migrations happen rake tasks. way can rest assured won't triggering bad behavior on database shouldn't trying migrate. (user permissions err out more proper form imo, databases around here maintained dbas) this behavior on few models utilize repository separate default repo. still need migrations classes using default repo. i having feeling easier finding throwing out dm community. any appreciated! ugly solution? klass = toprotect noop = proc {|*|} datamapper::migrations::model.instance_methods.each |meth| klass.define_method(meth, &noop) end

c - What is the proper way to use memset on a struct element? -

i'm trying use memset on struct element so: memset( &targs[i]->cs, 0, sizeof( xcpu ) ); however, doing gives me segmentation fault. neither understand why failing, nor how can make work. what proper way use memset on element of struct, , why method not work? line allocates memory targs: eargs **targs = (eargs **) malloc(p * sizeof(eargs *)); struct definitions struct element cs (xcpu_context) , struct targs (execute_args): typedef struct xcpu_context { unsigned char *memory; unsigned short regs[x_max_regs]; unsigned short pc; unsigned short state; unsigned short itr; unsigned short id; unsigned short num; } xcpu; typedef struct execute_args { int ticks; int quantum; xcpu cs; } eargs; you have allocated array of pointers in line eargs **targs = (eargs **) malloc(p * sizeof(eargs *)); but haven't initialized elements

Random background color from array - PHP -

i beginner when comes programming wanted see if right way code this. trying generate random background color array. if there i'm missing or there better please let me know. <?php $background_colors = array('#282e33', '#25373a', '#164852', '#495e67', '#ff3838'); $count = count($background_colors) - 1; $i = rand(0, $count); $rand_background = $background_colors[$i]; ?> <html> <head> </head> <body style="background: <?php echo $rand_background; ?>;"> </body> </html> that's pretty good. however, i'd array_rand() ... $background_colors = array('#282e33', '#25373a', '#164852', '#495e67', '#ff3838'); $rand_background = $background_colors[array_rand($background_colors)]; it less code , more readable imo.

wpf - Passing multiple parameters to Prism's EventAggregator -

i'm using prism's eventaggregator loosely coupled communication between module's viewmodels. have have several properties (e.g. firstname, lastname) in viewmodela need update properties in viewmodelb when values change. current solution involves: viewmodela publishes event new value firstname payload: public string firstname { {return firstname;} set { this.firstname = value; eventaggregator.getevent<patientdetailsevent>().publish(firstname); } } viewmodelb subscribed event , changes firstname property accordingly: public patientbannerviewmodel(ieventaggregator eventaggregator) { this.eventaggregator = eventaggregator; eventaggregator.getevent<patientdetailsevent>().subscribe(updatebanner, threadoption.uithread); } public void updatebanner(string firstname) { this.firstname = firstname; } this works fine single property. doesn't wo

asp.net mvc 3 - Facebook API Access Token Server Side -

i pretty new facebook api , using javascript sdk of work. logging in with: fb.getloginstatus(function (response) { if (response.status === 'connected') { document.location.href = '<%: resolveurl("~/account") %>/authenticatefacebook?accesstoken=' + encodeuri(response.authresponse.accesstoken) + '&userid=' + encodeuri(response.authresponse.userid) + '&returnurl=' + $('#returnurl').val(); } } this sending result of login response authenticate page. working fine. later on when want use accesstoken on server stuck. i trying use facebook c# sdk basic stuff. requires accesstoken question how can access servers side, or store somewhere? the site mvc3 basic asp.net membership service underneath. or guidance on appreciated. what have far excellent. way c# sdk developers want it. to store server-side, can place session. bear in mind access token hour or so. want grab new token client-side

awt - Is there a way to get screenshot of the windows when it is locked using java? -

i'm using below code take screenshot of window, returns blank image when computer locked (alt + ctrl + del & lock) is there anyway can take screenshot on locked computer using java.. appreciated public void takeascreenshot() throws awtexception, ioexception { dimension screendimn = toolkit.getdefaulttoolkit().getscreensize(); rectangle screenboundary = new rectangle(0, 0, screendimn.width, screendimn.height); robot robot = new robot(); bufferedimage image = robot.createscreencapture(screenboundary); file printscreenfile = new file("image" + system.currenttimemillis() + ".png"); imageio.write(image, "png", printscreenfile); } there no way capture using java (at least not know of). reason being when computer locked nothing being rendered robot capture. there might way using c / c++ same glitchy. what did use caffeine keep screen locking when executing long runs on r

hibernate - How do I separate jdbc.properties and my deployed JAR or WAR application file -

i want user change jdbc.properties in deployed application. user doesn't want extract compiled jar or war file, edit jdbc.properties , , zip again. googled solution while still not find answer. i use spring , hibernate using dao. here applicationcontext.xml jdbc: <context:property-placeholder location="classpath:jdbc.properties" /> i tried change classpath:../jdbc.properties , etc , locate jdbc.properties in possible location still not work. is possible that? if not possible, how can application load specified jdbc.properties location hard-coded? note: used separate development , production phase in workplace. developer guy doesn't know specification on production side. many app servers (for example jboss or websphere) support "exploded .war's" .war (or .ear) literally directory , can manipulate files directly. otherwise, sounds job jmx: http://docs.oracle.com/javase/1.5.0/docs/guide/management/agent.html http://ma

Handling custom java exceptions with throwable cause in flex -

i using custom java exception provide flex client more info exception itself. exception extends exception , has attribute needed info client. well, problem following: when build exception if invoke super() or super("message") flex client can access info properly. if build exception throwable cause, super(cause), flex client can access stacktrace. public class myexception extends exception { private string errorcode; public string geterrorcode() { return errorcode; } public void seterrorcode(string errorcode) { this.errorcode = errorcode; } public myexception(string msg) { super(msg); } public myexception(throwable cause) { super(cause); } } by using myexception(string msg) flex client can access errorcode using myexception(throwable cause) flex client can´t access errorcode in flex side code is: var faultevent : faultevent = faultevent( event ); var errormessage:errormessage = faultevent.message erro

python - tuplex out of range when working with buttons -

i have program works fine when try buttons,when run it,it gives me file "/usr/lib/python2.7/lib-tk/tkinter.py", line 1413, in call return self.func(*args) file "fire_buttons.py", line 193, in plot result=la.graph(grids) file "fire_buttons.py", line 181, in graph n=sc.shape(data)[2] indexerror: tuple index out of range the function that: def graph(self,data): """make plot""" plt.colormaps() n=sc.shape(data)[2] ims=[] in range(n): mydata=data[:,:,i] im=plt.imshow(mydata,cmap=plt.get_cmap('jet')) ims.append([im]) return ims some code buttons: def createwidgets(self): """add widgets main frame""" top_frame=frame(self) self.tree=stringvar() self.tree_entry=entry(top_frame,textvariable=self.tree) self.label1=lab

ios - How to design this kind of page using obj c -

Image
hiii every 1 new iphone development in sample downloaded app have seen page can tell me how design kind of page using objective c it seems more html/css me. designing such page using obj-c may pretty hard. can design page in html/css , integrate in app inside uiwebview. may not want though.

Overriding hashcode and equals in java -

i unclear use of hashcode , equals method in java.i have following query first if override equals method objects of value fred added though hashset implements set interface,which cant take repeated values. second if override both equals , hashcode 1 object added hashset.why? third if implement equals in case removing 1 fred object remove all? class person { string name; person(string name) { this.name=name; } @override public boolean equals(object obj) { if(!(obj instanceof person)) { return false; } person p = (person)obj; return p.name.equals(this.name); } /*@override public int hashcode() { return name.hashcode(); }*/ } public class hashsetdemo { /* * @param args */ public static void main(string[] args) { // todo auto-generated method stub hashset<person> s= new hashset<person>(); s.add(new person("fred&quo

python - The most effective way to assign unique integer id to a string? -

the program write processes large number of objects, each own unique id, string of complicated structure (dozen of unique fields of object joined separator) , big length. since have process lot of these objects fast , need reffer them id while processing , have no power change format (i retrieve them externally, network), want map complicated string id own internal integer id , further use comparison, transfering them further other processes, etc. what i'm going use simple dict keys string id of object , integer values internal integer id of it. my question is: there better way in python this? may there way calculate hash manually, whatever? may dict not best solution? as numbers: there 100k of such unique objects in system @ time, integer capacity more enough. for comparison purposes, can intern strings , compare them is instead of == , simple pointer comparison , should fast (or faster than) comparing 2 integers: >>> 'foo' * 100 'foo&

soapui - WSO2 Gadget cannot access SOAP payload -

i have created data service, tests out correctly via tryit , soapui. however, when try include gadget, error: "an error occurred while relaying soap payload, end point https://data.stratoslive.wso2.com/services/t/inova8.com/productvendordataservice.soap11endpoint/ " gadget includes fragment: function dosoapcall(){ var endpoint = " https://data.stratoslive.wso2.com/services/t/inova8.com/productvendordataservice.soap11endpoint/ "; var payload = ""; var operation = "urn:getproduct"; document.getelementbyid("response-disp").innerhtml = wso2.io.makesoaprequest(endpoint, operation, payload); } the data service based on example http://wso2.org/library/tutorials/2011/11/expose-your-cloud-data-as-rdf-data-model . note operation needs no parameters, have tried every variant of payload without success. i tried steps , found there 2 issues gadget code segment soap call. first 1 is,since operation accessing data se

xcode - Develop apps for the iPad 3's retina display without lion? -

is xcode 4.3.1 (and therefore lion) required develop apps ipad 3's retina display? or there way develop new device using xcode 4.2? i'm not running lion yet. if asking ios ios 5.1 sdk, have update lion , xcode 4.3.1 it. but retina display of ipad 3, there nothing special in new sdk. can develop apps ipad 3 using xcode 4.2. make sure take account high resolution of device when working images , other graphics iphone retina display.

php - Send AJAX request by clicking a link without redirecting user -

i have web application features bunch of different items, generated mysql table. users scroll through it, want them able click link next item insert request mysql database. normally, i’d creating php page (which anyways) grabs item name & user id uri using $_get method & inserts table. however, in case, don’t want users redirected away wherever are. want link send off request, , maybe display small message after successful. i figured jquery/ajax best this, i’m not familiar it, i’m not sure do. tips appreciated! you have like $('.classofyourlink').click(function(e){ e.preventdefault();//in way have no redirect $.post(...);//make ajax call }); in way user makes ajax call clicking link without redirecting. here docs $.post edit - pass value jquery in case should like $('.order_this').click(function(e){ e.preventdefault();//in way have no redirect var valuetopass = $(this).text(); var url = "url/to/post/"; $.post(url, { d

magento - Proper solution to handle genders -

i'm creating big online clothing shop using magento , wondering - there solution handle genders in magento? need able add products male or female gender categories pants, hats or jackets. categories same both genders using gender top-level category , clothing-categories gender sub-categories bit redundant think. any ideas or tips appreciated, in advance! i've seen magento stores male/female top level categories, , works because first thing customers see male/female items. another alternative create new "select" attribute gender (catalog > attributes > manage attributes) , set gender products. set top level categories jackets, etc , allow customers filter gender using layered navigation.

.net - Best way to replicate Oracles range windowing function in SQL Server -

i need perform oracle query in sql server: select case_id, channel_index, min(su_min) sustained_min, max(su_max) sustained_max ( select case_id, channel_index, start_time, min(dms_value) on (partition case_id, channel_index order start_time range numtodsinterval(3, 'minute') preceeding) su_max, max(dms_value) on (partition case_id, channel_index order start_time range numtodsinterval(3, 'minute') preceeding) su_min, min(start_time) on (partition case_id, channel_index order start_time) first_time data_table order start_time ) su_data first_time + numtodsinterval(3, 'minute') <= start_time group case_id, channel_index here attempted in basic t-sql job when case has 1 million+ records takes more 37 mins (after cancelled query): alter procedure [dbo].[getsustainedvalues]( @case_id int, @time_limit int, @bypass_only bit = null) begin declare @ti

coldfusion - regex to remove menu items from string -

i working following code block: <ul id="nav-main-links"> <li class="standby" id="id61"> <a href="/?event=user.home.dsphome" target="_self" title="admin tools"> admin tools<font class="menuitemtype">(cb)</font> </a> <ul class="sub-nav-main-links nestinglevel1"> <li class="standby" id="id62"> <a href="/unsecured/sitesurvey.cfm" target="_blank" title="site survey"> site survey<font class="menuitemtype">(x)</font> </a> </li></ul></li> <li class="standby" id="id57"> <a href="/?event=mall.information.dspinformation" target="_self" title="mall info"> mall info<font class="menuitemtype">(cb)</font> </a> </li> <li class="standby" id="id19"> &l

Pulling certain directories in Mercurial? -

let me try make simple follow. i'm deploying vagrant developers , i'll using puppet provision machines. let's have 2 sets of machines, 1 has apache/mysql5 server , apache/mongodb server. use puppet manage different components, not using centralized puppetmaster server. with said, i'm serving 2 directories inside mercurial repository. in event need modify mysql, can have devs pull latest changes accordingly. issue i'm having is, how handle repository structure without having duplicate directory structure. manifests - different each machine, mysql machine have directives install mysql while mongodb machine have own instructions mongodb modules - shared among every machine, required folders inside folder stored on each machine (i.e. modules/mongodb , modules/mysql). if threw 1 big repository, don't want "apache+mysql" server download modules "apache+mongodb" modules. there way let's put manifests directory particular repo

how to use xpath in camel-context.xml to check if a particular node is exist or not -

i trying develop content-based routing camel application. application @ folder src/data see if there soap request file has node <e2d:getorderdetairequest> , file copy target/message, otherwise file copy target/other. do know how use xpath(or other tools ) check condition (i prefer using camel-context.xml file)? here camel-context <route> <from uri="file://c:/src/data?noop=true"/> <choice> <when> <xpath>**???????????????????????????**</xpath> <to uri="file://c:/target/message"/> </when> <otherwise> <to uri="file://c:/target/other"/> </otherwise> </choice> </route> and here sample of 2 different soap requests <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:e2d="http://www.abc.com/abc11ws">

java - Displaying JSON List in honeycomb layout -

i trying display json list in honeycomb. thing is, have fragment , cannot change class extend listactivity or listfragment. however, if instruct me start(is new class need or there simple way display json on layout)? public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { /* * (new thread(new runnable() { * * @override public void run() { fetchpage(); } })).start(); */ list<jsonobject> testing = new arraylist<jsonobject>(); (new thread(new runnable() { public void run() { list<jsonobject> test123 = new arraylist<jsonobject>(); rssreader reader = new rssreader(); test123 = reader.getlatestrssfeed(); iterator<jsonobject> iterator = test123.iterator(); while (iterator.hasnext()) { system.out.println(iterator.next()); } system.out.println("test"

php - Pass value of checkbox to array whether it is checked or not -

i need pass value , couple of other values depending on checkboxes checked. found posted couple of other times here rely on html , pass hidden value before checkbox : <input type="hidden" value="0" name="b_1" /> <input type="checkbox" value="1" name="b_1" /> <input type="hidden" value="0" name="b_2" /> <input type="checkbox" value="1" name="b_2" /> <input type="hidden" value="0" name="b_3" /> <input type="checkbox" value="1" name="b_3" /> then in php making different associations based on these checkboxes : $b = "buyers"; $bv1 = "not web item"; $bv2 = "need sample"; $bv3 = "sample not available"; if ($_post['b_1']) { $b1 = array( $b , $bv1 , $_post['b_1'] ); } if ($_post['b_2']) { $b2 = array

php - Can SimplePie grab images from feeds -

i using simplepie , have uploaded files host. seems working fine except 1 thing. blog i'm getting feed has images in it, , when use simplepie view feed, images don't show up. there way images show when view blog simplepie? okay sorry, new @ this. using code straight website try , view blog. put code @ bottom here. yea said i'm trying images show on blog i'm reading from. shows great except that. --- header information --- <?php // make sure simplepie included. may need change match location of simplepie.inc. require_once('simplepie.inc'); // we'll process feed of default options. $feed = new simplepie(); // set feed process. $feed->set_feed_url('http://wordpress.homickdesign.com/feed/'); // run simplepie. $feed->init(); // makes sure content sent browser text/html , utf-8 character set (since didn't change it). $feed->handle_content_type(); // let's begin our xhtml webpage code. doctype supposed first thing, we

python - cannot import workbook in openpyxl -

i have installed openpyxl in ubuntu. running openpyxl xlsx files. while importing module, gives me following error. from openpyxl import workbook importerror: cannot import name workbook can knows have solve problem? i think want: from openpyxl import workbook # not workbook note capitalization of name here .

java - JAXB what should be returned from `beforeMarshal(Marshaller)` method? -

first of all, i'm not talking marshaller#listener . i'm talking class defined event callbacks. can tell me should returned boolean beforemarshal(marshaller) method? /** * apidocs method? * should return this? */ boolean beforemarshal(marshaller marshaller); i mean, anyway, use method converting jpa's long @id jaxb's string @xmlid with jaxb-ri , without moxy . [edited] void version seems working though. documentation problem? short answer the boolean return type documentation error. return type should void . long answer i mean, anyway, use method converting jpa's long @id jaxb's string @xmlid you use eclipselink jaxb (moxy) not have restriction field/property annotated @xmlid of type string . with jaxb-ri , without moxy. you use xmladapter map support use case: idadapter this xmladapter converts long value string value meet requirements of @xmlid annotation. package forum9629948; import javax.xml.

json-rpc with erlang -

i have never used json before, , don't care except have requirement access application through json-rpc. i have done searches on "erlang json" returned proposed erlang bifs mochijson whatever. thing is, have yet find documentation or example using of stuff need do, control app through json-rpc. of docs , examples i've seen have dealt conversions , mappings erlang data types json , back. in fact, docs seem go overboard enthusiasm representing "language x" terms in json i've wondered whether there i've missed along way. far topic has failed stimulate blood flow towards regions of body, whatever - is. what don't want i don't care javascript, , don't care doing related json-rpc javascript or browser. what want to use json-rpc erlang server side control app server side. at rate... 1) can point me docs , examples showing erlang using json-rpc library control or access app? 2) can recommend library or libraries this? sin

c# - How to Export values to excel with leading '0' -

i'm developing web application. i'm facing problem when exporting values in grid excel. have declared column data type string column holds integer values. when open exported excel, string column displayed integer , leading '0' in field gets deleted. how handle this. eg. filed contains vl export values surrounding ' or " symbols, it's taken string like: col1;col2;col3 '001';'002';'003'

Recognize Repeated Movement Patterns of Mouse Behavior using OpenCV -

i have situation have collected mouse movement points website. have series of (x, y)-points, , need detect different repeated patterns of mouse movement data. example, mouse moving slowly, mouse moving fast toward direction , stopping while, mouse scrolling etc... need detect such patterns data. is there way opencv ...or maybe other library? p.s. please keep in mind, beginner in kind of stuff. thanks in advance! although opencv have data analysis , machine learning algorithms, library geared toward computer vision (thus cv name). sounds have done data capture, , want perform called data mining . data mining toolkits have many more tools , algorithms type of analysis opencv, point toward those. open-source toolkit started weka sourceforge , weka home . written in java, run on anything. here manual weka 3.6.0. there book available started using weka available here . since beginner, understand learning curve data-mining can seem bit steep @ first, take :) maybe fi

javascript - Drupal printing .info script groups separately -

i'm defining scripts in theme's .info in 2 groups; loading pre-body , loading post file this: ; scripts in head group load pre-body scripts[head][] = js/cufon.js scripts[head][] = js/font.js ; scripts in end group load after other html scripts[end][] = js/scripts.js is there way print these out separately in view? assumed abble this: <?php print $scripts['head']; ?> <!-- html --> <?php print $scripts['end']; ?> thanks as far can tell trying not possible can done way. create [theme]_preprocess_html function in template.php , use drupal_add_js add scripts scope use drupal_get_js retrieve scripts added each scope , $vars: // set scripts $path = drupal_get_path('theme', 'themename'); // pre-body scripts $options = array('scope'=>'scripts_head','preprocess'=>true); drupal_add_js($path.'/js/cufon.js',$options); drupal_add_js($path.'/js/myfont.font.js',$options); /