Posts

Showing posts from April, 2013

Deactivate layout update with module deactivation in magento -

i'm programming magento module. i've been wondering, how deactivate layout updates of module, deactivating module. wan't deliver possibility recover changes done module if it's inactive. here's config.xml : <?xml version="1.0" encoding="utf-8"?> <config> <modules> <bss_tierpreis> <version>0.0.5</version> </bss_tierpreis> </modules> <global> <models> <tierpreis> <class>bss_tierpreis_model</class> </tierpreis> </models> <blocks> <tierpreis> <class>bss_tierpreis_block</class> </tierpreis> </blocks> </global> <frontend> <layout> <updates> <tierpreis> <file>tierpreis

c# - Only get the XML node with the Specific value -

im doing weather application works encountered problem. xml seems like: <city> <city_code>de0011259</city_code> <name>wegberg</name> <url>deutschland/wegberg/de0011259.html</url> <post_code>41844</post_code> <forecast> <date value="2014-12-01"> <w>2</w> <tx>4</tx> <pc>30</pc> <time value="06:00"> <w>2</w> <tx>3</tx> <pc>30</pc> <tn>2</tn> <ws>11</ws> <w_txt>wolkig</w_txt> </time> <time value="11:00"> <w>2</w> <tx>4</tx> <pc>20</pc> <tn>3</tn> <ws>12</ws> <w_txt>wolkig</w_txt> </time> <time value="17:00"> &l

java - spring:autowire needs webapplication? -

i using autowire following: @autowired @required public void setjdbctemplate(jdbctemplate jdbctemplate) { this.jdbctemplate = jdbctemplate; } but error out like 2014-12-02 06:37:04 debug quartzschedulerthread:276 - batch acquisition of 1 triggers 2014-12-02 06:37:04 debug jobrunshell:201 - calling execute on job etlconnectorjobgroup_id16.etlconnectorjob_id16 2014-12-02 06:37:04 debug springbeanautowiringsupport:89 - current webapplicationcontext not available processing of connectorscheduler: make sure class gets constructed in spring web application. proceeding without injection. does autowired need spring mvc since complain webapplicationcontext not available update: wrongly used springbeanautowiringsupport mvc, after remove error gone.

javascript - I am not able to append a for loop to a div tag in my HTML body. Any ideas? -

this code... not sure wrong. i trying append while loop html in div tag #putthetreeinhere . please help. function loop () { var index = 1; var row = "<font color=green><b>^</b></font>"; var newrow= row; while ( index <= 10 ) { document.write( "<center>"+newrow+"</center><br>" ); newrow = newrow + row; index += 1; } } function displaytree () { $( "#putthetreeinhere" ).append( loop() ) } $(document).ready(function () { displaytree(); }); see http://jsfiddle.net/alemarch/3k0x3c4l/1/ have change font tag span , centered text in div css #putthetreeinhere{ text-align: center;} in loop function dont use document.write... function loop () { var index = 1; var row = '<span style="color:green; font-weight:bold;">^</b></span>'; var html = ""; var newrow= row; while ( i

javascript - Jplayer does not start playing automatically on mobile device -

jplayer not start playing automatically after setmedia() followed play() on mobile device (android), works fine on chrome pc , internet explorer, should playing. this normal behaviour. on mobile devices playback must initiated user interaction. take here more details -> link

php - Laravel Checking If A Collection Contains A Foreign Key -

i wondering if there function or else, can other element collection primary key... example if votes have foreign key 'user_id', how check this? on laravel doc there example check primary key using contains(). can me out? example checks if there vote id = 2 @foreach($projects $project) @if ($project->votes->contains(2)) // @endif @endforeach i want check if there vote has 'user_id' = signed in users id @foreach($projects $project) @if ($project->votes->contains('user_id' == auth::id())) // @endif @endforeach if ($votes->contains('user_id', auth()->id())) { // }

java - Excluding numbers from interval, retrieving the rest -

i want interval of numbers between 0 , 9 using random generator. example, if received 0,2,7 don't want numbers again, instead want 1 of rest between given interval[1 or 3 or 4 or 5 or 6 or 8 or 9]. as boris spider says: // want numbers between 0 , 9 inclusive int min = 0, max = 9; // need collection, lets use list, use ordered collection here list<integer> nums = new arraylist<>(); // put numbers in collection (int n=min; n<=max; n++) { nums.add(n); } // randomly sort (shuffle) collection collections.shuffle(nums); // pull numbers collection (the order should random now) (int count=0; count<nums.length; count++) { system.out.println("number " + count + " " + nums.get(count)); }

java - How to loop in oozie using sub-workflow? -

it has been suggested 1 use oozie-subworkflow execute action multiple times. can't figure out how it. let's need invoke map-reduce action n times. let's encapsulate map-reduce action in sub-workflow. can manually invoke sub-workflow n times having n actions in oozie-workflow (as outlined in approach ). n needs dynamic. so: how decrease loop-counter ensure don't execute sub-workflow more n times. can execute n sub-workflows in parallel. i have thought of 2 approaches: approach 1: thinking of having java action decreases counter, capture arguments , use way keep track of loop-counter. if loop-counter not 0 invoke subworkflow. however, how call java action multiple-times...a catch-22? approach 2: approach ditch sub-workflow idea , encapsulate map-reduce (mapred-workflow.xml) job in normal workflow, implement java action executes oozie-workflow (mapred-workflow.xml) n times. in parallel, wait jobs finish return main workflow. main concern

java - Android 5.0 SharedPreference.OnSharedPreferencesChangeListener not being called? Possibly a bug? -

Image
i believe have found bug in android sdk my onsharedpreferenceschangelistener not being called on change. this not garbage collected listener - listener held in class instance variable. have been snooping around debugger. found notifylisteners method of editor class inside sharedpreferenceimpl , had 'mcr.keysmodified' size set '0' , instantly returned without notifying listener. have look: i found initialization of mmodified hashmap inside sharedpreferences editor class had error - highlighted red in intellij (their alot of errors showing in intellij). don't believe android developers leave soo many errors? intellij trying intelligent. but code still not work. here code i've created, using api. forgive me, code not finished: public class settingsactivity extends activity { private final static string pref_key_restart_required = "pref_requires_restart"; private sharedpreferences.onsharedpreferencechangelistener sharedpreference

javascript - Splice is removing more that one item from array when specified to only remove once -

i have created mockup shopping basket, quantity add's fine remove isn't working should. have specificed in remove method splice @ location , remove 1 entry array seems remove them all. to reproduce error just add 3 x swede add 3 x parsnip remove 1 x swede you can see code via online ide here https://codio.com/adam91holt/305cde-challenge-3 here full js code - remove funtion @ bottom var shop = (function() { var items = []; var basketitems = []; var count = 0; return { //constructor create item additem: function(title, description, price) { this.title = title; this.description = description; this.price = price; this.id = count; this.remove = (((1 + math.random()) * 0x10000) | 0).tostring(16).substring(1); this.quantity = title this.html = '<tr><td>' + this.title + '</td><td>' + this.description + '</td&g

ios - How to get size of default keyboard for current device without it being displayed? -

i working on custom keyboard extenssion ios. keyboard's size should match of default system keybaord on each device. for purposes of accompanied app need know size of default system keyboard (in portrait , landscape) without displaying keyboard. there way? sure, can measure size of keyboard in simulator on devices , use constant. if new device released app not work on - keyboard size not amoung constants. having never created keyboard extension myself i'm going off of make sense me. recommend coming layout keyboard consistent , have auto layout resize fill space. if you're not using interface builder i'd recommend checking view (or superview) in viewdidload , seeing if has been sized you.

java - Searching an array for given number -

write program creates array of 1000 random numbers in range 1 – 5000. ask user value between , 5000, , search array until either find value or determine value not in array. print message indicating whether or not value found, , how many numbers had @ before found value (or determined not there). for reason keep getting "value not found" when regardless of input. cannot figure out did wrong. advice appreciated. thank in advance. import java.util.*; public class array { int y = 5000; int x; int values[] = new int[1000]; array() { random rg = new random(); (int x=0;x<values.length;x++) values[x]=rg.nextint(y+1); arrays.sort(values); } public int findnumber(int val) { int s=0, r = values.length; int x=0; while(true) { x++; if (values[(r+s)/2]==val) return x; else if (val > values[(r+s)/2])

java - Should I use inheritance or composition in my case? -

i'm creating class shares common codes class , not sure pattern should use. class i've have: public class teama{ private static final logger logger = logger.getlogger(teama.class); @autowired private utility util; public void proceedwitha(){ // useful here updateprogress(); } private void updateprogress(){ logger.info("updating progress!"); // update progress } } the class teamb i'm creating same thing class teama except in proceedb() different before calling updateprogress() . public class teamb{ private static final logger logger = logger.getlogger(teamb.class); @autowired private utility util; public void proceedwithb(){ // useful here updateprogress(); } private void updateprogress(){ logger.info("updating progress!"); // update progress } } so @ first i'm inclined use inheritance creating super class team t

unity3d - Unity box to Mouse issue -

i having issue code, i'm trying move 3d box variable of position of mouse, need know how change box's x,y,z mouse position script. im asking really, how change boxes x,y,z variable in script. thanks! code: #pragma strict public var distance : float = 4.5; var box = transform; private var firstobject : cube; function start () { } function update () { castraytoworld(); } function castraytoworld() { var ray : ray = camera.main.screenpointtoray(input.mouseposition); var point : vector3 = ray.origin + (ray.direction * distance); debug.log( "world point " + point ); firstobject = gameobject.find("pos").getcomponent("cube").pos = point; firstobject.pos = point; } make sure other object aware of box gameobject (lets under name 'adjustable'), case of: adjustable.transform.position = new vector3(x, y, z) to make sure object aware of boxes gameobject, make adjustable public var

javascript - How to determine when document has loaded after loading external css -

Image
how determine when document has loaded(or loading) after loading external css? normal page has loaded , complete @ first time(with using document.onreadystatechange or document.readystage ), after time script call function place new stylesheet css html changing background or images. during change stylesheet, document has still stage complete. stage never has been changed after calling function? why? timeline(example): visit 1 page : localhost/index.html document has stage loading document has stage complete user trying change theme, @ time stage hasnt been changed yet. update : without jquery:) update : example problem using 1 image: <!doctype html> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1"> <script> document.onreadystatechange = function(){ console.log(document.readystate); }; function checkdocumentstate()

sql server - Select with dynamic columns occurrences -

with table like: name country state ----- ------- ----- ana usa ca paul usa wy louis can ot ana usa ca john can al paul usa wy john usa ca ana usa ca louis can ot i need result like: country state ana paul louis john -------- ----- ---- ---- ----- ---- usa ca 3 1 0 1 wy 0 1 0 0 can ot 0 0 2 0 al 0 0 0 1 (count occurrences name dynamic columns, group country , state) is possible build 1 sentence? you need pivot operation achieve result. http://sqlfiddle.com/#!3/aae09/3 select country, state, sum(case when name='ana' 1 else 0 end) ana, sum(case when name='paul' 1 else 0 end) paul, sum(case when name='john' 1 else 0 end) john, sum(case when name='louis' 1 else 0 end) louis t

matlab - Difference between bode and freqz -

Image
i creating filter in matlab so: [num,den] = ellip(10,0.1,50,4000/22050,'high'); using freqz found frequency response of filter so: freqz(num,den) this produces expected high pass filter plot. however, if try plot same set of values using bode function entirely different. bode(tr(num,den)) this produces low pass filter plot. not understanding how these functions work? understanding freqz took coefficients of transfer function arguments. doing bode function. why difference? [b,a] = ellip(n,rp,rs,wp) where b,a z-domain representatives, while tf default s-domain: you can use filt instead, [b,a] = ellip(10,0.1,50,4000/22050,'high'); freqz(b,a) figure bode(filt(b,a)) you can use bode(tf(b,a,-1,'variable','z^-1')) . check variable property tf . string specifying transfer function display variable. variable can take following values: 's' — default continuous-time models 'z' — defaul

android - why fragment doesn`t show up with ViewPagerIndicator -

i have activity content view fragment, added viewpager , viewpagerindicator activity. created fragmentpageradapter pager, adapter constructs 3 fragments displaying 3 tabs. when run project, see pager title shows up. why doesn`t 3 fragments show up? i created pager , indicator on create of activity lifecycle. public class browseractivity extends sherlockfragmentactivity implements reposfragment.onfileselectedlistener, starredfragment.onstarredfileselectedlistener, onbackstackchangedlistener { super.oncreate(savedinstancestate); setcontentview(r.layout.seadroid_main); adapter = new seafiletabsadapter(getsupportfragmentmanager()); pager = (viewpager) findviewbyid(r.id.pager); pager.setadapter(adapter); tabpageindicator indicator = (tabpageindicator)findviewbyid(r.id.indicator); indicator.setviewpager(pager); indicator.setonpagechangelistener(new onpagechangelistener() { @override public void onpageselect

gridview - Best options for an AngularJS Tree Grid -

for while now, i've been looking tree grid works nicely angularjs , haven't had lot of luck. my requirements are: easy use looks good supports drag , drop can handle large amount of data 10000+ (i.e pagination/lazy scroll of 10,000+ rows) can show hierarchical data in table (i.e columns/sorting) free/cheap projects come close: sencha tree grid doesn't appear play nicely angularjs apparently buffered-tree module can handle 1000s or rows angular-ui-tree close doesn't support table functions columns, out of box doesn't handle large data, michael bromley's dirpaginate directive can fix this tree-grid-directive looks (fits bootstrap) has columns but doesn't allow pagination/lazy loading ok... given other people must have solved before, question is: what best way approach this? is there project out there covers bases? or perhaps there simple way adapt 1 of these lazily-loaded tree grid... i know 2 months old quest

php - menu_class wordpress navigation. problems defining multiple nested classes -

so new wordpress , have created menu in dashboard . here code have in header.php file.... <?php function register_my_menu() { register_nav_menu('header-menu',__( 'header menu' )); } add_action( 'init', 'register_my_menu' ); ?> <?php function register_my_menus() { register_nav_menus( array( 'header-menu' => __( 'header menu' ), 'extra-menu' => __( 'extra menu' ) ) ); } add_action( 'init', 'register_my_menus' ); ?> <?php wp_nav_menu( array( 'theme_location' => 'inner-header', 'menu_class' => 'menubar', ) ); ?> the problem having when defining menu_class work if call single word classes. here css below. needing whole menu styled of styling menu. ul.menubar { background: white; list-style: none; padding: 0 10

PHP curl returning blank page -

can show me how compose request using curl php? need scrape website, code use (given below) returns blank page. want send accept-encoding, useragent, , cookie request: mozilla/5.0 (x11; linux i686) applewebkit/535.1 (khtml, gecko) chrome/13.0.782.99 safari/535.1 accept-encoding: gzip to https://example.com/ thanks! the code tried use (returned blank page): <? $url='https://example.com'; $ch = curl_init($url); curl_setopt($ch, curlopt_httpheader, $request_headers); $request_headers = array(); $request_headers[] = 'accept-encoding: gzip'; $request_headers[] = 'client: apple'; curl_setopt($ch, curlopt_cookie, 'insertedmycookiehere'); curl_setopt($ch, curlopt_useragent, 'mozilla/5.0 (x11; linux i686) applewebkit/535.1 (khtml, gecko) chrome/13.0.782.99 safari/535.1'); curl_setopt($ch, curlopt_returntransfer, true); $curl_scraped_page = curl_exec($ch); curl_close($ch); echo $curl_scraped_page; ?> did wrong? this

c++ - ld: cannot find -lstdc++ -

i trying break down compilation these 4 steps, last 1 seems problematic me. cpp hello.cpp > hello.i g++ -s hello.i -o hello.o hello.s ld -o hello hello.o -lstdc++ i searched problem on here , here , didn't help. running in verbose mode gave me attempt open hello.o succeeded hello.o attempt open /usr/i686-linux-gnu/lib32/libstdc++.so failed attempt open /usr/i686-linux-gnu/lib32/libstdc++.a failed attempt open //usr/local/lib32/libstdc++.so failed attempt open //usr/local/lib32/libstdc++.a failed attempt open //lib32/libstdc++.so failed attempt open //lib32/libstdc++.a failed attempt open //usr/lib32/libstdc++.so failed attempt open //usr/lib32/libstdc++.a failed attempt open //usr/local/lib/i386-linux-gnu/libstdc++.so failed attempt open //usr/local/lib/i386-linux-gnu/libstdc++.a failed attempt open //usr/local/lib/libstdc++.so failed attempt open //usr/local/lib/libstdc++.a failed attempt open //lib/i386-linux-gnu/libstdc++.so failed attempt open //lib/i386-linux-g

pointers - Explaining C declarations in Rust -

i need rewrite these c declarations in go , rust set of practice problems working on. figured out go part, having trouble rust part. ideas or write these in rust? double *a[n]; double (*b)[n]; double (*c[n])(); double (*d())[n]; assuming n constant: let a: [*mut f64, ..n]; // double *a[n]; let b: *mut [f64, ..n]; // double (*b)[n]; let c: [fn() -> f64, ..n]; // double (*c[n])(); fn d() -> *mut [f64, ..n]; // double (*d())[n]; these rather awkward , unusual types in language. rust's syntax, however, makes these declarations lot easier read c's syntax does. note d in c function declaration. in rust, external function declarations allowed in extern blocks (see the ffi guide ).

javascript - How to put values of textbox into variable in PHP? -

i want add values mysql database using php . values want add, come text-boxes of form. tried $variable = $_post['formelementname'] , used $variable insert values. doesn't work. question: how can put values of text-boxes variables? thanks. i want elaborate @kyle wrote note: form method post html part <form action="your_php_file_name.php" method="post"> <input type="text" name="first_name" /> <input type="submit" value="submit" /> </form> php part: file name is: your_php_file_name.php <?php //a practice check type of http request $fname = $_post['first_name']; ?> some practices check http request type sent client side. (i find way) sanitize variables before inserting.

amazon web services - Accessing AWS instance through IAM role via Putty -

i new aws console. i have created instance in ubuntu server , key pair i have created iam role (developer , administrator) i can able login using iam role in aws console. , using putty able login localhost: ubuntu@public dns value.. once logged in want access aws instance using iam role (developer , administrator) in putty.but not logging in. is possible iam role used in aws instance. using username "ubuntu". authenticating public key "imported-openssh-key" welcome ubuntu 14.04.1 lts (gnu/linux 3.13.0-36-generic x86_64) * documentation: https://help.ubuntu.com/ system information of mon dec 1 05:36:34 utc 2014 system load: 0.0 processes: 97 usage of /: 12.1% of 7.74gb users logged in: 0 memory usage: 7% ip address eth0: 172.31.23.230 swap usage: 0% graph data , manage system at: https://landscape.canonical.com/ cloud support ubuntu advantage cloud guest: http://www.ubun

sed to edit (not just print) lines of 65 characters -

it's easy find instructions on how print lines 65 characters or more (google "sed one-liners), can't figure out syntax edit line (i.e., substitution) on such line. to make changes on lines has 65 or above characters. sed '/^.\{65,\}/s/.*/llll/' file this replace characters on lines has 65 or above characters llll . substitution works on lines only. ^.\{65,\} search pattern matches lines satisfies given condition. \{65,\} called repetition quantifier repeats previous token (that . ) 65 or more times. save changes made, need add inline edit -i parameter sed command.

WordPress & Plugin version not updating on amazon-ec2 -

i have word press site in amazon ec2 instance.i getting issue installation , updating plugin. issue:- 1)when try install plugin wp-admin backend.it's show bellow error every time need upload plugin manually on server , need activate wp-admin backend. unpacking package… not create directory. 2)when try update plugin & wordpress wp-admin backend.it's show bellow error update plugin downloading update … unpacking update… not create directory. my word press file permission structure bellow:- wp-content-> "755" plugins-> "755" plugins->e.g(captcha) "755" and under captcha plugin file have-> "664" permission. if have body idea regarding issue let me know. the answer appreciated. i have searched through google didn't find solution. that mean issue here apache not have access folders. default permission given ec2-user in ami. run in terminal , ready go update,install plugin , word

ios - Auto layout isn't working as expected for laying out buttons? -

i'm creating scene in xcode in main.storyboard user able choose between 5 options ( buttons ) , when created auto layout horizontally center buttons, vertically space them 5 pixels apart: on 3.5 inch screen , buttons take most of screen on 4 inch screen , buttons take 3/4 of screen on 4.7 inch screen , buttons take half of screen it makes sense happening, created @3x , @2x , , normal sized (1x) images using prepo the buttons have custom background image properties how can 4 inch , 4.5 inch , , 5.5 inch screens on iphone display 3.5 inch screen buttons take most of screen? set following constraints buttons. for 1st button set constant top space top layout guide (say 20px). for last button set constant bottom space bottom layout guide (say 20px). set equal heights buttons. and have following constraints. align buttons horizontally centre vertical spacing between them 5px so buttons adjust height take of screen space. try this.

python - rdflib "repeat node-elements" parse error with OWL/XML file -

i have owl file prepared in protege else. i'm trying parse following python code, keep getting parse error. import rdflib g=rdflib.graph() result = g.parse(r'myfile.owl') rdflib.exceptions.parsererror: file:///myfile.owl:461:27: repeat node-elements inside property elements: http://www.w3.org/2002/07/owl#class the line , character numbers refer start of <class iri="#gas"/> line in owl file. indicate 'subclassof' construct wrong, or need plugin use rdflib properly, or else? owl file looks this: <declaration> <class iri="#acetylene"/> </declaration> <declaration> <class iri="#gas"/> </declaration> ... <subclassof> <class iri="#acetylene"/> <class iri="#gas"/> </subclassof> the xml code you're showing in not rdf/xml; it's owl/xml. such, it's not surprising rdflib can't parse it. rdflib shoul

ios - How to get metadata of path from amazon s3 using aws v2? -

i trying list of image names stored under specified path using amazon s3 v2 framework in ios. don't know how retrieve list of image names or metadata of path. in aws v1 framework, had used object summaries option retrieve list of images under path. so, how object summaries in aws v2 ios framework? thanks in advance ! awss3listobjectsrequest has property called prefix . can set path prefix , call - listobjects: on awss3 .

javascript - How to improve this regex -

i have regex find part of <a href=""> within innerhtml of div. var b = this.innerhtml.match(/href="([^\'\"]+)/g); var c = b[0].split('#')[1]; window.location.assign('#'+c); and rid of second line, .split function. there way this? ideally, i'd keep hashtag before div, too: the hrefs allways (only number subject change): href="#div46" href="#div47" ... you can use: var b = this.innerhtml.match(/href=(['"])(.+?)\1/); window.location.assign( b[2] ); // #div46 remove g flag matched groups in resulting array.

android - Facing difficulty while adding an EditText values in a List -

i have 10 edittext field in application. want add values in list once give submit. i have used addtextchngedlistener in code. name.addtextchangedlistener(new textwatcher() { @override public void ontextchanged(charsequence s, int start, int before, int count) { // todo auto-generated method stub } @override public void beforetextchanged(charsequence s, int start, int count, int after) { // todo auto-generated method stub } @override public void aftertextchanged(editable s) { // todo auto-generated method stub namevalue = s.tostring(); namelist.add(namevalue); } }); but if give values means adding j, jo, joh ,john. john michel nishan clorem after giving submit want iterate values. actually want see length 4. showing length based on changing every letter.

get IP address but in xxx.xxx.xxx.xxx format in Android -

hi guys i've gone through lot of coding on line android mobiles ip address of them ending with if (!inetaddress.isloopbackaddress()) { return inetaddress.gethostaddress().tostring(); } how ever looks this:- "fe80::a00:27ff:fe37:28b5%eth1" weird cause expecting xxx.xxx.xxx.xxx can 1 me understand whats this? that ipv6 address. additionally, since starts fe80:: know it's link-local ipv6 address , cannot used communication beyond local network. (in case, eth1 , since scope specified @ end after % - note using % identify scope isn't valid when using ipv6 address.)

"Cast" to int in Python 3.4 -

i writing simple game in python 3.4. totally new in python. code below: def shapeat(self, x, y): return self.board[(y * board.boardwidth) + x] throws error: typeerror: list indices must integers, not float for have found may happen when python "thinks" list argument not integer. have idea how fix that? int((y * board.boardwidth) + x) use int nearest integer towards zero. def shapeat(self, x, y): return self.board[int((y * board.boardwidth) + x)] # give floor value. and floor value use math.floor (by of m.wasowski) math.floor((y * board.boardwidth) + x)

APNS Push not received -

i trying implement push notification in apple, , when send push sent locally machine, when send server not received on device. issue ? port not opened server problem asked them open port , worked

packages - common lisp: got different result with SBCL after saving image -

(it's first time me post question here, searched didn't found useful information....) i found interesting (which confused me whole damn morning) thing in common lisp. i'm using sbcl 1.1.18 running on gentoo/linux. here's problem: suppose there's package named eql-test have asd file, package.lisp , main.lisp (quite common config). inside main.lisp, there's 1 single function: (defun main () (format t "~a~%" (eql 'hello (read-from-string "hello")))) now, if run: sbcl --eval "(progn (load \"main.lisp\") \ (sb-ext:save-lisp-and-die \"eql-test\" :toplevel #'main \ :executable t))" and run "eql-test" binary, we'll beautiful t. however, if use file named "make.lisp" contains: (asdf:load-system 'eql-test) (sb-ext:save-lisp-and-die "eql-test2" :toplevel #'eql-test:main :executable t) and run:

c# - XAML Binding to Element in a style -

i adding entitycontrol edgecontrol . edgecontrol contains element named part_edgepath . trying bind element within entitycontrol : <usercontrol x:class="ui.graph.entitycontrol" ... > <ellipse width="15" height="15" fill="blue"> <ellipse.rendertransform> <transformgroup> <translatetransform x="-7.5" y="-7.5" /> <!-- use radius shift circle path --> <translatetransform x:name="animatedtranslatetransform"/> </transformgroup> </ellipse.rendertransform> <ellipse.triggers> <eventtrigger routedevent="binding.targetupdated"> <beginstoryboard> <storyboard repeatbehavior="forever" > <doubleanimationusingpath source="x" duration="{binding path

Is there an array version of $1...$NF in awk? -

consider following function in public domain. function join(array, start, end, sep, result, i) { if (sep == "") sep = " " else if (sep == subsep) # magic value sep = "" result = array[start] (i = start + 1; <= end; i++) result = result sep array[i] return result } i use function join contiguous columns such $2, $3, $4 start , end ranges variables. however, in order this, must first convert fields array using loop following. for (i = 1; <= nf; i++) { a[i] = $i } or shorter version, @stevenpenny mentioned. split($0, a) unfortunately both approaches require creation of new variable. does awk have built-in way of accessing columns array above manual conversions not necessary? no such array defined in posix awk (the array type special variables argv , environ ). none exists in gawk either, though adds procinfo , symtab , functab special arrays. can check defined variabl

How to write Hg mercurial commit message with space tab and korean? -

i'm using hg mercurial 2.8.2. my problem commit message when commit using command line. like "hg ci -m 'my test 가나다'" , mercurial rejects commit (space tab , korean). how can solve problem? have re-install version? if have revise specific config file, please let me know is. (ps, platform 'win7 - 64bit') thanks. you need set hgencoding system environment variable utf-8 to open windows control panel -> system -> advanced system settings -> environment variables add new variable , enter following values: variable name hgencoding variable value utf-8 additional links encoding issue: mercurial encoding strategy mercurial character encoding on windows

javascript - Is there a simple html-webserver for mac? -

sometimes when front-end development, use mamp web-server don't have deal cors -errors. since upgraded mavericks mamp won't work more , pretty heavy. there simpler or more lightweight built in or installed? depending on how simple it: python 2: python -m simplehttpserver 8000 https://docs.python.org/2/library/simplehttpserver.html python 3: python3 -m http.server https://docs.python.org/3.3/library/http.server.html

mongodb - Extracting document using $geoNear in Meteor -

minimongo doesn't provide $geonear functionality, if search requirement has done on server. this leads problem when local collection contains results multiple publications, since there's no way extract results $geonear search supplying same search criterea local collection used when publishing. using separate local collections each search might in cases, in case problem doesn't come multiple publications different purposes, using subscriptions manager cache recent subscriptions , avoid sending repeated data down line. can suggest cunning solution issue?

javascript - Anchor Link to Multiple Locations using jQuery -

i'm working piece of code: fiddle: http://jsfiddle.net/2hmzcgqm/12/ right can use #rugby taken span within accordion. i'd able extend use #football also. can help? :-) javascript: (function($) { var allpanels = $('.accordion > dd').hide(); var alllinks = $('a.heading'); $('.accordion > dt > a').click(function() { allpanels.slideup(); //remove alllinks.removeclass('active'); if ($(this).parent().next().is(":visible")) return false; $(this).parent().next().slidedown(); //add active class $(this).addclass('active'); return false; }); //$('.accordion > dt > a').first().trigger('click'); function setaccordion() { // id url // var url = window.location.pathname; // test url var url = 'localhost:58000/gallery#rugby'; var id = url.substring(url.last

excel - VBA Help - Need to return a text from a specific cell to a OptionButton -

i need return text specific cell , if text matches configuration of optionbutton, option button set true. i tried use code bellow: dim texto1 string texto1 = "testando texto" if range("d3").value = texto1 optionbutton1.value = true end if for option button (form control on sheet): activesheet.shapes("option button 1").controlformat.value = true for option button (activex control on sheet): activesheet.optionbutton1.value = true for option button (on form): me.optionbutton1.value = true fyi: can use me.optionbutton1.caption = string if wanted in question's title.

html - Javascript anchor to same page not working -

so have webpage instead of using new html document (it's phones loading new html page each time makes slow) each page have sections represents different pages. it looks this: <body> <!-- each body must contain att least 1 section shown page --> <section id = "page-1" data-ff-role = "home default swipe-in"> <!-- each section should have header --> <header style="background-color: #cce4f5;"> so each section create has it's own id. when try link using: function callback_listallpoi(xmlobj){ console.log("callback_listallpoi"); var names = xmlobj.getelementsbytagname("poi_namn"); var comments = xmlobj.getelementsbytagname("poi_kommentar"); (i=0;i<names.length; i++){ var text = '<li><a href="#page-1">' + names[i].textcontent + ': ' + comments[i].textcontent + '<

java - ${libs.hibernate-support.classpath} to copy -

i using netbeans - java, been given project missing libraries , seems fine getting warning c:\users\zahikhu\desktop\my work\my project\university main website\xcri implementation\xcri\workspace\xcribuilder\nbproject\build-impl.xml:1024: warning: not find file c:\users\zahikhu\desktop\my work\my project\university main website\xcri implementation\xcri\workspace\xcribuilder\${libs.hibernate-support.classpath} copy. build failed (total time: 0 seconds) how solve hibernate issue ${libs.hibernate-support.classpath}

mybatis - Get HashMap as Result for select -

hi want query database mybatis , want return map i have daointerface like public interface idocdao extends ibasicdao { public map<integer, integer> getdocbya(); } and mapper <select id="getdocbya" resultmap="myhashmap"> select b_id, count(1) count table_a group b_id </select> and need return 1 map values, not list of maps thx. pavel if want return hashmap , need set resulttype , not resultmap . don't need define myhashmap , hashmap enough. <select id="getdocbya" resulttype="hashmap"> select b_id, count(1) count table_a group b_id </select>

qt - How to make a child widget that stays at the same screen position when the parent widget is moved? -

i experimenting creating child widget stays @ same screen position when parent widget moved. should generate impression parent widget "views" underlying scene. following code illustrates want: from pyqt4.qtgui import qapplication, qwidget, qpalette, qpainter pyqt4.qtcore import qt class child(qwidget): def __init__(self, parent=none): super(child, self).__init__(parent) pal = qpalette(qt.white) self.setautofillbackground(true) self.setpalette(pal) def paintevent(self, event): painter = qpainter(self) painter.fillrect(25, 25, 50, 50, qt.red) painter.end() class parent(qwidget): def __init__(self, parent=none): super(parent, self).__init__(parent) self.child = child(self) self.child.setgeometry(100, 100, 100, 100) def moveevent(self, event): diffpos = event.pos() - event.oldpos() self.child.move(self.child.pos() - diffpos) if __name__ == "__main__"

Problems with creating a list in PHP -

can tell me what's wrong list? it's first time creating list in php , error came when running it. error said: " parse error: syntax error, unexpected 'col' (t_string), expecting ')' in /applications/xampp/xamppfiles/htdocs/pinder/cms/event.php on line 410 " i want able have 2 containers gap between them. why i've went col-md 6,2,6. here code : // list echo_lines(array( "<ul>", "<div="col-md-6">""</div>", "<div="col-md-2">""</div>", "<div="col-md-6">""</div>", "</ul>", )); you have escape double quotes in code (also note dots . concatenate string): // list echo_lines(array( "<ul>", "<div class=\"col-md-6\">" . "</div>", "<d

Java SE Sanning API Morena7 -

i try use morena 7 in java desktop application scan document. i read morena documentation , download api but have problem in line bufferedimage bimage = synchronoushelper.scanimage(device); it's synchronoushelper class not found. someone have idea please? thanks! thanks all. i found mistake, synchronoushelper.java in full package i've download in "examples" directory.

ms word - DOCX: Field code that evaluates to empty string as field result -

i need insert field in word document evaluates empty string. some ideas i've; - set intersection: both sets have nothing in common , field result lead empty. - "".concats(""), leads "" can insert such kind of field code in office word document? if want insert field empty string result use macrobutton field no caption points non-existing macro: { macrobutton nomacro } using openxml sdk, can create such button this: var paragraph = new paragraph( new run(new fieldchar { fieldchartype = fieldcharvalues.begin }), new run(new fieldcode { space = spaceprocessingmodevalues.preserve, text = " macrobutton nomacro " }), new run(new fieldchar() { fieldchartype = fieldcharvalues.end }));

html - text display on mouse over field -

i making simple signup form of website. need display text line saying "manager or customer" should appear when place mouse on third field(type) of form. new these css things. sory if question odd need it. <!doctype html> <html> <head> <style> body{ background: url("2.jpg"); background-size: cover; background-repeat: no-repeat; } div.transbox { width: 400px; height: 360px; margin: 30px 50px; background-color: #ffffff; border: 2px solid; border-radius: 25px; opacity: 0.8; filter: alpha(opacity=60); } span { display: none; border:1px solid #000; height:30px; width:290px; margin-left:10px; } input:hover { background-color: brown; } form:hover{ border-color: green; } h1 { text-align: center; } </style> </head> <center><body> <div class = "transbox"> <form method = pos

android - Expandable list view only one child is showing -

i have expandable list view passing parent items , child items via arraylist..i can see first parent child..by clicking other items nothing happens the activity , expandable list view adapter codes given below expandablelist = (expandablelistview) findviewbyid(r.id.exlist); expandablelist.setdividerheight(2); expandablelist.setgroupindicator(null); expandablelist.setclickable(true); setgroupparents(); setchilddata(); myexpandableadapter exadapter = new myexpandableadapter(data); exadapter.setinflater((layoutinflater) getsystemservice(context.layout_inflater_service), this); expandablelist.setadapter(exadapter); // expandablelist.setonchildclicklistener(this); expandablelist.setonchildclicklistener(new onchildclicklistener() { @override public boolean onchildclick(expandablelistview parent, view v, int groupposition, int childposition, long id) { // todo auto-generated method stub return false; } }