Posts

Showing posts from April, 2014

Javascript window.open function to open all urls in a json feed -

i hope able point me in right direction this, sp in advance : ) i'm needing take comes in on json feed , use javascript take embedded links - getting document.getelementsbytagname - , convert them window.open function. i've got far with var links = document.getelementsbytagname('a'); var len = links.length; for(var i=0; i<len; i++) { links[i].target = "_blank"; } this adds location onto url, need take url href stings like <a href="http://myurl.com"</a> and return them in plain javascript call function window.open('http://myurl.com', '_blank', 'location=yes'); hope makes sense, , newbie help. allister a bit more... karaxuna - suggestion. though reason loop function didn't return needed, that's because of how i'm trying use it. i'm trying working phonegap mobile browser call, using inappbrowser function links open within app webview, not system browser. links need launch

jquery - Replace hidden text with correct information on click -

Image
i'm creating online resume , want hide part of personal details until user clicks button show it. i'm hoping prevent spammer's being able personal details easily. the concept gumtree.com.au do, can seen in image below outside of australia: my page's html is: <div class="personal"> <p>042323**** <span id="phone">show number</span></p> </div> and planning on using jquery remove asterisks, add last 4 digits of number (which going hardcode javascript file). firstly, best way go doing this? if so, how can remove asterisks , replace them correct details using jquery? put number in tag - <p><span id='number'>042323****</span> <span id="phone">show number</span></p> and can - var num = 1234; // hard-coded number - last 4 digits $('#phone').on('click',function(){ $('#number').text(function(_,txt){ re

Remove temporary captured video produced by UIImagePickerController -

i use following codes capture video in uiimagepickerviewcontroller : - (ibaction)openvideopicker:(id)sender { self.video_picker = [[uiimagepickercontroller alloc] init]; self.video_picker.delegate = self; self.video_picker.allowsediting = yes; if ([uiimagepickercontroller issourcetypeavailable:uiimagepickercontrollersourcetypecamera]) { self.video_picker.sourcetype = uiimagepickercontrollersourcetypecamera; self.video_picker.mediatypes = [nsarray arraywithobjects:(nsstring *)kuttypemovie, nil]; } else { self.video_picker.sourcetype = uiimagepickercontrollersourcetypephotolibrary; } [self presentviewcontroller:self.video_picker animated:yes completion:nil]; } when browse files in sand box, there lot of videos capture in /myapp/tmp/capture folder. since occupy quite lot amount of file size. when these temp files removed ? or can remove them manually via programming? based on this comment can programmatical

c++ - gmon.out is not created when executable forks another executable -

i using gprof profiling. gmon.out not created when fork executable inside main executable compiled option -pg. idea how resolve it. but gmon.out not created when fork executable it does. has same name other gmon.out files. silently overwrite each other. gnu, in infinite wisdom, recommends each child process want profile executed in own current directory. use mkdir , chdir in code needed. since gmon.out written out process finishes, necessary chdir before calling exit . i recommend looking @ valgrind . among other nice things, has output files named something.somethingelse.$pid .

python - Can't connect mongodb after ubuntu-precise server restart -

i developing web scraping project on ubuntu server of 25gb hard disk space. using python scrapy , mongodb last night harddisk full because of scraping 60,000 web pages. mongodb has put lock , unable access database shows error function (){ return db.getcollectionnames(); } execute failed:exception: can't take write lock while out of disk space so removed data stored in /var/lib/mongodb , run "rebbot" command shell restart server when try run mongo on command line, error: mongodb shell version: 2.4.5 connecting to: test thu jul 25 15:06:29.323 javascript execution failed: error: couldn't connect server 127.0.0.1:27017 @ src/mongo/shell/mongo.js:l112 exception: connect failed guys please me can connect mongodb the first thing find out whether mongodb running. can running following commands on shell: ps aux | grep mongo and: netstat -an | grep ':27017' if neither of has output, mongodb not running. the best way find out why do

ruby - Rails generating a new directory multiple levels deep -

this question has answer here: how create directories recursively in ruby? 5 answers i have built little app generates excel document. trying make directory stick in. these documents built differently depending on @agency people select. made method return path since path used in few places. def reportsheet_dir file_path = "#{rails.root}/public/reportsheets/#{@agency.downcase.gsub("_","")}" end at beginning of method creates document have method supposedly builds directories doest seem working dir.mkdir(reportsheet_dir) unless file.exists?(reportsheet_dir) i keep getting. , errno::enoent @ /addons/agency_report_builders no such file or directory -/users/fortknokx/work/toolkit/public/reportsheets/empowerlogicbuilder i think because multiple levels deep?? since public/ reportsheets/agency_name/file_name has made. go , make

Javascript RegExp for matching text which isn't part of HTML tag -

i try find way highlight text in html. following html given: <div>this text contains matching words word1 , word2 , xyzword1xyz , word2xyz , xyzword2</div> the list of words should surrounded <span> is: var array = ['word1','word2', 'word1word3']; my current javascript: $.each(array , function(index, elem){ if(elem.length<3 || elem === "pan" || elem === "spa" || elem === "span")return true; var re = new regexp(""+elem+"(?=([^']*'[^']*')*[^']*$)","gi"); returnstring = returnstring.replace(re, "<span class='markedstring colorword1orword2'>$&</span>"); }); the resulting div like: <div>this text contains matching words <span class='markedstring colorword1orword2'>word1</span> , <span class='markedstring colorword1orwor

asp.net - Accessing Sitecore API from a Web service -

i wondering how sitecore content through sitecore api in separate webservice, tried sitecontextswitcher "cannot load provider" exception. should somehow register webservice in sitecore use ? edit: expose on webservice functions publish specific items (by guid or path) you can add web service website have access sitecore api , expose functions need eg. publishing page you need asmx service can call url file ie. http://server.com/some/directory/service.asmx/yourmethodname since it's called in context of sitecore application have access api in service. can pass path item or id using parameters.

python - How to access attribute of superclass instance from child class method -

i have following class structure in code: superclass, a, list of objects subclass, b. class has method, meth, creates variable, var, (by reading file). variable, var, needs accessible method of subclass b. problem after initialising = a(), var attribute of instance a, can't accessed subclass methods using super(). var large array of floats (around 1e5 elements), i'm trying minimise memory usage not making attribute of instance of b (n times!) or passing explicitly methb. class a(object): def __init__(self,n): self.data = [b() _ in xrange(n)] def __getitem__(self,n): return self.data[n] def metha(self): open('file.txt','r') fp: self.var = fp.readlines() class b(a): def __init__(self): self.derived_var = [] def methb(): '''this method needs use var defined in meth of above.''' = a(5) a.metha() b in a: b.methb() is possible in python or bad coding?? first of don't see point

ruby on rails - Omniauth with Google Oauth2 gives a loading error -

just including gem in gemfile: gem 'omniauth-google-oauth2' i following error: 21:20:05 web.1 | started pid 20590 21:20:14 web.1 | /users/user/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:74:in `require': cannot load such file -- omniauth/google/oauth2 (loaderror) 21:20:14 web.1 | /users/user/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:74:in `rescue in block in require' 21:20:14 web.1 | /users/user/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:62:in `block in require' 21:20:14 web.1 | /users/user/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `each' 21:20:14 web.1 | /users/user/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `require' 21:20:14 web.1 | /users/user/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler.rb:128:in `require' 21:20:14 web.1 | /users/user/sites/wisdom/code/git/wisdom/config/ap

Sending Firefox profile to Selenium Grid node displays base64 data in command line -

when sending desiredcapabilities selenium grid hub , node, believe custom firefox profile displayed (at great length, , incredibly slowly) in command line display both servers. the tests run fine, it's bottlenecking process displaying whole thing through cli. i don't expect big of problem when being executed fitnesse, concerns me start filling logs etc. any ideas on how work around this, or worrying stupid?

ios - How to handle nested property list -

good day! i have problem doing nested property list in ios. so, there 2 uitextfield s accept random value , save property list. problem is, when input second value, overwrite first value inside of property list. how handle, or write nested property list? here's attempted code: - (ibaction)writetoplist:(id)sender { nslog(@"write."); nsstring *finalpath = [[nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes) objectatindex:0] stringbyappendingpathcomponent:@"data.plist"]; nsmutabledictionary *fruitdictionary = [[nsmutabledictionary alloc] init]; nsstring *fruitname = [[nsstring alloc] initwithstring:[fruitnamefield text]]; nsstring *fruitdescription = [[nsstring alloc] initwithstring:[fruitdescriptionfield text]]; nsdictionary *fruitdetail = [nsdictionary dictionarywithobjects:[nsarray arraywithobjects:fruitname, fruitdescription, nil]

c++ - Writing debug build only assertion function ignoring side-effects -

today discovered of assertion functions still exist , being called in release build. here's example of assertion function. bool const isdebugmode() { return false; // controlled preprocessor flag. } void assertwithreason(bool const condition, std::string const reason = "") { if (isdebugmode() , not condition) { abort(); } } i think side-effect in condition expression preventing eliminating assertion call. for example, assertwithreason(glgeterror() == gl_no_error); i expected assertion call eliminated, not. because being executed before checking debug-build. i not sure how c++ handles case, c++ strict language, doesn't seem eliminated unless put special flag. anyway, intentionally wrote assertions removed in release build. is possible write function surely removed in release build in c++? of course can use preprocessor macro, want avoid using preprocessor macro as possible. i using clang, , compiler specific extension (such

Inaccurate for loop in Java array -

i've tried many hours solve array task, seems me i'm stuck. task create program prints number of given command line parameters , lists them. you gave 2 command line parameters. below given parameters: 1. parameter: 3455 2. parameter: john_smith my program starts wrong index + i'm not sure given task. how program know how many parameters use if hasn't been initialized? or lost exercise? this i've done: import java.util.scanner; public class ex_01 { public static void main(string[] args) { // todo auto-generated method stub scanner reader = new scanner(system.in); int param = reader.nextint(); string[] matrix = new string[param]; (int = 0; < matrix.length; i++) { matrix[i] = reader.nextline();// part loop fails } system.out.println("you gave " + matrix.length + " command line parameters.\nbelow given parameters:"); (int = 0; &

Flash script setTimeout in actionscript 2.0 -

the "loopcount" variable not functioning in below code. stop(); this.gotoandplay(2); if (!loopcount) { var loopcount:number = 0; } loopcount++; if (loopcount < 2) { _global["settimeout"](this, "gotoandplay", 4000, 4); this.stop(); }else{ this.gotoandplay(122); var loopcount:number = 0; } kindly suggest. in way loopcount not functioning? values expect have , how differ when debug code? if you're going new keyframe calls gotoandplay() flash reinitialise variables on new keyframe. why setting timeout in section of code?: _global["settimeout"](this, "gotoandplay", 4000, 4);

Java excel - Comparing two strings -

i have check strings of 2 xlsx files if equal must return name, returns null, can me? try { fileinputstream fiscod = new fileinputstream(pathc); xssfworkbook wb = new xssfworkbook (fiscod); xssfsheet sheet = wb.getsheetat(0); int lastrow = sheet.getlastrownum(); for(int i=0; i<lastrow; i++) { row row = sheet.getrow(i); cell cell = row.getcell(jobcod); string tmp = cell.getrichstringcellvalue().getstring().tolowercase(); if (tmp.equals(jobname)) //jobname string { return tmp; } else { return null; } } fiscod.close(); } catch (ioexception e) { system.out.println(e.getmessage()); } the first mismatch in above code cause null returned without checking subsequent row values. more likely, scenario describing. check all cell values

tsql - Order Sql Request with top Percent -

i have exception when execute query think created, error : msg 102, niveau 15, État 1, ligne 6 syntaxe incorrecte vers ')'. here request : select distinct designation (select top 100 percent designation , code_piececomptable cpt_lignepiececomptable code_piececomptable in (select code_piececomptable cpt_piececomptable terminer null or terminer <>1) order code_piececomptable) you need give alias: select distinct designation (select top 100 percent designation , code_piececomptable cpt_lignepiececomptable code_piececomptable in (select code_piececomptable cpt_piececomptable terminer null or terminer <>1) order code_piececomptable) q take note q tacked on end.

javascript - set cursor to specific position on specific line in a textarea -

i trying duplicate "autocorrect" functionality seen in programs microsoft office's outlook. for starters, anytime user types "a " (the letter , space) @ beginning of line want change text "*agent [" i have written below works fine if typing along in textarea top bottom. but if type anywhere else in textarea text changed cursor moves end of textarea. i want cursor placed @ end of changed text. i have line number changed in variable currentlinenumber , know cursor needs after 8th character in line unsure of how tell go there ideally id function setcursor(row, position) { //.... code set cursor } what can accomplish this? im open javascript or jquery solution (although find jquery little difficult read , understand) if there's better way achieve need overall, i'm open too. here's jsfiddle if don't understand issue i've updated fiddle see: http://jsfiddle.net/eghpf/2/ i've added var currentpositi

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -

i'm upgrading rails 3.0.9 app 3.2.13 , ruby 1.8.7 1.9.3. time try access controller action, following error started "/myapp/login" 127.0.0.1 @ 2013-07-25 07:10:06 -0600 systemstackerror (stack level deep): actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:70 rendered /actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.5ms) rendered /actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (5.2ms) rendered /actionpack-3.2.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (22.6ms) the way i've been able page load without error clear out database sessions (rake db:sessions:clear) , restart rails server. allows 1 single request succeed , subsequent requests fail. i've tried comparing core config files working 3.2 app , have tried upgrade of gems. here's current gemfile: source 'http://rubygems.org' gem 'rails&

oracle - SQL subselect group function not allowed -

Image
i'm facing problem sql subquery: need write query returns courses number of subscriptions (count(employeenumber)) greater maximum allowed number of subscriptions (maximum). in original query i'm getting following error: group function not allowed here . the query: select c.coursename courses c inner join subscriptions s on s.coursecode = c.coursecode inner join plannedcourses p on p.coursecode = s.coursecode count(s.employeenumber) > (select maximum plannedcourses s.coursecode = p.coursecode); the table layout: how can achieve desire result? thanks in advance!! you rewrite query follows: select c.coursename courses c join subscriptions s on (s.coursecode = c.coursecode) join plannedcourses p on (p.coursecode = c.coursecode) group c.coursename , p.maximum having count(s.employeenumber) > p.maximum

sockets - NSInputStream can't read from TCP Connection [TCP-Server] -

i created tcp server using this (quite old) example apple . server , running, listening on specified port incoming connections. everything looks perfect, client app can connect server , -stream:handleevent: called expected. but when write stream, server kind of rejects connection. client says 30 bytes has been written successfully. but logs say: did read 0 bytes inputstream. data received: nsstreameventerroroccurred error: error domain=nsposixerrordomain code=14 "the operation couldn't completed. bad address" in client side i'm using following code establish connection: cfstreamcreatepairwithsockettohost(null, (cfstringref)@"10.0.10.40", 58896, &readstream, &writestream); _istream = (__bridge nsinputstream *)readstream; _ostream = (__bridge nsoutputstream *)writestream; [_istream setdelegate:self]; [_ostream setdelegate:self]; [_istream scheduleinrunloop:[nsrunloop currentrunloop] formode:nsdefaultrunloopmode]; [_ostream schedule

How to merge git commits in the develop branch to a feature branch -

i have develop branch , feature branch in git repo. added commit develop , want commit merged feature branch. if this git checkout feature git merge develop i end merge commit. since i'll merging new commits on develop feature branch frequently, i'd avoid these unnecessary merge commits. saw answer suggested doing git rebase develop ends rewinding branch way far , rebase fails. update: ended doing was git checkout feature git merge develop # creates merge commit don't want git rebase # gets rid of merge commit keeps commits develop want git push update: noticed original commit on develop gets different hash when merge rebase feature branch. don't think that's want because i'll merge feature develop , i'm guessing won't play nice. to integrate 1 branch another, have either merge or rebase. since it's safe rebase commits aren't referenced anywhere else (not merged other local branches; not pushed remote), it's better

requirements - How to write SRS for a particular task/enhancement in an application -

i need prepare software requirements specification document small enhancement within java application. i have tried goggling same found samples whole application whereas preparing srs small enhancement within application. can suggest links or suggestions preparing srs. as realized you're asked isn't requirements specification, covers whole set of requirements software. what you've been asked change request, , must merged in existing srs. tells me there's no srs software you're dealing with, management doesn't know difference between both...

visual studio 2012 - The type or namespace could not be found -

i'm trying convert wix 3.5 custom actions project in visual studio 2008 wix 3.7 , visual studio 2012 , i'm getting following exception: the type or namespace name 'mynamespace' not found (are missing using directive or assembly reference?) the dll referenced , visual studio 2012 has no problem seeing namespace. under namespace pops in intellisense, when build i'm getting exception. anyone have idea of what's going on here? additional info: the namespace i'm referencing .net 2.0 library , custom actions project .net 2.0 project. edit: after further investigation, i'm getting warning, i'm guessing root of problem: the primary reference "mynamespace, version=8.5.1.20, culture=neutral, publickeytoken=f593502af6ee46ae, processorarchitecture=msil" not resolved because has indirect dependency on .net framework assembly "mscorlib, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" has

wix - Payload not found in Cache -

i have exepackage has 2 payloads. the first 1 msi file in same folder exe , works. the second 1 msi file(adobe acrobat reader) in sub folder exe resides , not work. how should configure payload? the exepackage looks this: <exepackage sourcefile="$(var.setupprereqs.targetdir)setup.exe"> <payload sourcefile="$(var.setupprereqs.targetdir)setup.msi"></payload> <payload sourcefile="$(var.setupprereqs.targetdir)adobe reader xi\adberdr11000_en_us.msi"></payload> </exepackage> the error message below: eula components 'adobe reader xi' accepted. copying files temporary directory "c:\users\ranjith\appdata\local\temp\vsd88af.tmp\" file 'c:\programdata\package cache\5f65afe70de3058f30460c7df1306453b0d509ea\adobe reader xi\adberdr11000_en_us.msi' not found. skipping file copy. error: following package files not found: c:\programdata\package cache\5f65afe70de3058f30460

mysql - How to SELECT all columns FROM table LIKE ?, where user selects values -

i'm trying set html pg display 'snp' table db. i've gotten , running nicely, wanted add in feature instead of: my $sql = "select * snp cid ? order pos limit 10"; i allows user type in keyword , pull out proper table. thought do: sub get_snp{ $sql = "select * snp ? ? order pos limit 10"; $snp_sth = $dbh->prepare($sql); $snp_sth->execute("$user_select","%$search_string%"); to more clear, code worked $search_string not when adding in $user_select after. here parameters: my $search_string = param("search_for"); $user_select = param("columns"); and both parameters later called in html portion follows: <tr bgcolor="#c0c0c0"> <td><input type="text" name="search_for" style="color:#787878;" value="enter keyword | select option" </td> <select name=

node.js - npm install error: TypeError: uid must be an int -

after upgrade node.js, seems sth wrong. cannot install package "-g". here pic link of error snap http://photo.weibo.com/1495160301/wbphotos/large/mid/3603537491210131/pid/591e55edjw1e6xpnw75h1j20wt0lydjm . (os x 10.8.4) i had similar issue when tried install phonegap -g option. solved issue installing newest version of node

html - javascript foreach array and split by comma and space and display as a string -

i have long list of items in list item, need go through , add comma , space , display comma seperated string of items: so have following: <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> <li>etc</li> </ul> which need display following: item 1, item 2, item 3, item 4, etc <p>item 1, item 2, item 3, item 4, etc</p> i new javascript great. thank using unique id's in code makes work simpler. <ul id="myul"> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> <li>etc</li> </ul> <p id="mypara"></p> the javascript this //grab ul element id , li tags within it. var myarr = document.getelementbyid("myul").getelementsbytagname("li"); //grab paragraph wish populate var para = docum

c++ - Benchmarking code - am I doing it right? -

i want benchmark c/c++ code. want measure cpu time, wall time , cycles/byte. wrote mesurement functions have problem cycles/byte. to cpu time wrote function getrusage() rusage_self , wall time use clock_gettime monotonic , cycles/byte use rdtsc . i process input buffer of size, example, 1024: char buffer[1024] . how benchmark: do warm-up phase, call fun2measure(args) 1000 times: for(int i=0; i<1000; i++) fun2measure(args); then, real-timing benchmark, wall time: `unsigned long i; double timetaken; double timetotal = 3.0; // process 3 seconds for (timetaken=(double)0, i=0; timetaken <= timetotal; timetaken = walltime(1), i++) fun2measure(args); ` and cpu time (almost same): for (timetaken=(double)0, i=0; timetaken <= timetotal; timetaken = walltime(1), i++) fun2measure(args); but when want cpu cycle count function, use piece of code: `unsigned long s = cyclecount(); (timetaken=(double)0, i=0; timetaken <= timetotal; timeta

android: show notification under certain conditions -

i have searched information under topic while. think want common. i'm creating word learning app. want show piece of notification in notification center when there words should reviewed. it's not based on time. want is: if (isneedreview()) { show notification } i think need alarmmanager, it's based on time. know how handle this? need up? advice appreciated, thank you. one option use service . you first use alarmmanager start service on set schedule (say every half hour). service perform logic necessary check if word needs review , show notification appropriate. a basic service performs functionality this: public class reviewcheckservice extends intentservice { public reviewcheckservice() {} @override protected void onhandleintent(intent intent) { if (isneedreview()) { shownotification(); } } }

oracle - Change the data format -

i use script in oracle select @ moment date : cursor sauron select toutdoux_id, type_of_action, user_id, profile_name, start_date, end_date, platform, comments, perm_flag, active_flag uam.tout_doux but format (25-jul-2013) not 1 expected (2013/07/25). how can select date right format ? use oracle to_char function date-time format elements . in case want format string yyyy/mm/dd : cursor sauron select toutdoux_id, type_of_action, user_id, profile_name, to_char(start_date, 'yyyy/mm/dd') sdate, to_char(end_date, 'yyyy/mm/dd') edate, platform, comments, perm_flag, active_flag uam.tout_doux

php - Using ajax with mysql to validate before rendering -

i pretty new ajax might ask might simple of you. i looking best way check user posting checkdata.php verily price in database. i have long database works find need validation. product pid name size price 1 chocolate 12 30.00 i have form , in form posting pid name , size in pdo statement doing this select pid, price, name, size product pid=:pid , size=:size , name=:name this works fine. but want use ajax check user same whats in database , equal same price in database. if not same should have alert message saying "don't mess code." i have long table. sorry cant show code long in table have name echo database size dropdown list and pid hidden input. i have jquery $(document).ready(function(){ $('#selected').hide(); $('#button').click(function(){ var pid = $('#pid').val(); var size = $('#size').val(); var qty = $(

How to divide wav file into frames uding MATLAB -

i have .wav file , need perform stft on it. dont know length of file. how can break smaller frames , perform stft?? it has been long time since last worked on matlab, think general algo should be: take input signal. multiply point-by-point windowing function (say rectangular of 'n' samples). means have frame of 'n' samples. take fft of frame. move window 'm' samples (m = shift, 25% of 'n'). steps 2 , 3. if end of signal reached, take many samples of signal , fill rest zeros. steps 2 , 3. you have 3d plot - frequency, amplitude , time. plot stft. on side note: there no stft functions in matlab? have checked?

debugging - Evaluating expressions in SLIME while using STEP -

i using slime sbcl. in sbcl, can (step (call-some-function 1 2 3)) , able step through/into/out of each line of code, executing arbitrary expressions of own see current state of variables are. but if try same in repl in slime, get: evaluating call: (cp-get-all-pe-matches-any-length sent-id) arguments: 581869302 [condition of type step-form-condition] restarts: 0: [step-continue] resume normal execution 1: [step-out] resume stepping after returning function 2: [step-next] step on call 3: [step-into] step call 4: [abort] exit debugger, returning top level. backtrace: 0: (call-some-function 1 2 3) ... there doesn't seem way obtain current value of sent-id , or evaluate (nth 1 some-list) . is in fact case, , if so, mean have fire second instance of sbcl in terminal, , step through function @ same time in slime in order functionality? you can still use repl in slime when placed in debugger, routinely e.g. when errors occur. have switch repl buf

python - "execfile" doesn't work properly -

i'm trying make launcher python program tkinter. used execfile function, , fortunately opened target gui. however, none of buttons work, , global variable functions reference isn't defined. the code launch program: def launch(): execfile("gui.py") that works. base code target program: from tkinter import * gui = tk() gui.title("this gui") edit: example of button: def buttonwin(): buttonwindow = toplevel(gui) button = button(buttonwindow, text = "button", width = 10, command = none) button.pack() when references 'gui' variable toplevel, comes error. tried defining 'gui' variable in launcher script, caused target script open first, instead of launcher: gui = tk() launcher = tk() launcher.title("launcher") def launch(): return execfile("gui.py") launchbutton = button(launcher, text = "launch", width = 10, command = launch) when try pressing 1 of program's butto

imagemagick - Undefined method `has_attached_file` with Paperclip and Rails -

i'm having trouble getting paperclip working on vps. works fine locally , on first vps, when try rake db:migrate on second vps, following output: root@test:/home/rails# rake db:migrate == creategroups: migrating =================================================== -- create_table(:groups) -> 0.0019s -- add_column(:discussions, :group_id, :integer) -> 0.0007s -- add_column(:memberships, :memberships_id, :integer) -> 0.0006s -- has_attached_file(:photo, {:styles=>{:original=>"400x200>", :tile=>"200x200#"}, :url=>"/assets/images/groups/:id/:style/:basename.:extension", :path=>":rails_root/public/assets/images/groups/:id/:style/:basename.:extension", :default_url=>"/assets/:style/missing-group-image.jpg"}) rake aborted! error has occurred, , later migrations canceled: undefined method `has_attached_file' #<creategroups:0x0000000342cbf8>/usr/local/rvm/gems/ruby-1.9.3-p429/gems/acti

php - install imageMagic 1and1 -

i'm trying install imagemagic on server (mutualized) @ 1and1 follow this tutorial allready have : cc filters/magick_libmagickcore_6_q16_la-analyze.lo ccld magick/libmagickcore-6.q16.la copying selected object files avoid basename conflicts... cc wand/wand_libmagickwand_6_q16_la-animate.lo cc wand/wand_libmagickwand_6_q16_la-compare.lo cc wand/wand_libmagickwand_6_q16_la-composite.lo cc wand/wand_libmagickwand_6_q16_la-conjure.lo cc wand/wand_libmagickwand_6_q16_la-convert.lo virtual memory exhausted: cannot allocate memory make[2]: *** [wand/wand_libmagickwand_6_q16_la-convert.lo] error 1 make[2]: leaving directory `/homepages/20/d300979466/htdocs/imagemagick-6.8.6-7' make[1]: *** [all-recursive] error 1 make[1]: leaving directory `/homepages/20/d300979466/htdocs/imagemagick-6.8.6-7' make: *** [all] error 2 (uiserver):u55223546:/homepages/20/d300979466/htdocs/imagemagick-6.8.6-7 > make install make install-re

CSS selector based on a:target -

this html: <p class="define"><a class="term" href="#jump" name="jump">jump</a> - description</p> when browser jumps #jump want highlight .define class. if do; a.term:target { background-color: #ffa; -webkit-transition: 1s linear; } i of course highlight a . how modify complete p ? tried couple of variants 1 below, none of them work. a.term:target .define { stuff here } a.term:target p.define { stuff here } a.term:target p { stuff here } jsfiddle: http://jsfiddle.net/vvppy/ you can't modify parent of element using css. have use javascript alternative.

Why doesn't import work for me? - Python -

whenever try import file python, comes error(or similar): traceback (most recent call last): file "c:/python33/my files/username save.py", line 1, in <module> import keyring.py importerror: no module named 'keyring' i trying create password storing program, , looking ways keep passwords secure, , said use import keyring, did, except, never works. must doing wrong, whenever python, never works out me. it's if loads have things have been changed on years. and idea's? the keyring module not part of python standard library. need install first. installation instructions included. once installed, use import keyring , not import keyring.py ; latter means import py name keyring module or package . python imports should use just name of module, not filename extenion. python can import code more .py python files.

c# - A dependent lookup field does not support relationships -

during feature activation of sharepoint 2010 project, built , deployed using visual studio 2012, receive error: a dependent lookup field not support relationships i've played around bit sequence in items listed within feature files. of dozen lists definitions i'm installing , instance of each i'm creating, reviewing has been created before error stops activation indicates problem may specific list. list involved in linked-list relation list. depending upon sequence in list instances placed within feature files, related list may or may exist @ time error occurs. however, lookup field relates lists not created until feature receiver's feature activation code executed. , dependant lookup fields not created until after primary lookup field exists. done via code , none within declarative xml. further, error occurs before feature activated event handler called. any suggestions on for? ideas might causing error? should other lists well? in it's declarat

JavaScript variable value to fluctuate between two values -

i'm trying js variable fluctuate between 2 values on time. for example, let's start var counter = 0 , , every second variable increases one. how make @ counter == 3 value decreases 1 until counter == -3 , @ point increases again until 3 , down again, , on. thanks in advance help! you can : var counter = 0; var inc = +1; setinterval(function(){ if(counter == 3) inc = -1; if(counter == -3) inc = +1; counter+= inc; }, 1000); see sample : http://jsfiddle.net/vqfld/3/

machine learning - Difference between a search engine's relevance rankings and a recommender system -

what's difference between search engine's relevance rankings , recommender system? don't both try , achieve same purpose, i.e. finding relevant items user? there major difference between search engine , recommender system : 1 / in search engine , user knows looking for, , makes query ! instance, might wonder if should go see movie, , search informations it, actors , directors. 2/ in recommender system , user isn't supposed know recommending her. match tastes neighbours or wathever algorithm youme like, , find things would't have looked after, new movie ! one more information retrieval , while other more information filtering , discovery.