Posts

Showing posts from August, 2014

css - How can I apply custom colors to a PdfPCell's background? -

i've got itextsharp code give cell on pdf file green background: pdfpcell cellsec2 = new pdfpcell(parsectionheading2); cellsec2.backgroundcolor = basecolor.green; the problem "basecolor.green" dark/intense. need more of verdigris color - light green, or pale green. possible assign rgb (or rgba) values or such backgroundcolor property? update bruno's answer plus this site , , you've got need. needed: var lightgreen = new basecolor(204, 255, 204); cellsec2.backgroundcolor = lightgreen; we have plenty of documentation on things itext. instance: chapter 10 of my book images , color. if don't own copy of book, why don't take @ examples of chapter 10 ? take instance devicecolor.cs have plenty of examples of other colors such as: new graycolor(0x20) // gray value new basecolor(0f, 1f, 1f) // rgb new cmykcolor(0x00, 0x00, 0xff, 0xff) // cmyk the values r, g , b, or c, m, y , k, can either floats between 0 , 1 or integers between 0 ,

Python to parent/child JSON -

i'm trying use python turn data csv json format found here: https://gist.github.com/mbostock/1093025 can modify http://d3js.org/ examples. i have found posts on how similar transformations, nothing nested {'name': name, 'children' = []} format. for test.csv: team,task,country,id team a,processing,ca,5 team a,review,ca,45 team b,processing,us,76 team b,processing,ca,676 team b,support,us,2345 team c,processing,us,67 team c,review,us,734 team c,support,us,34 output should like: { "name": "flare", "children": [ { "name": "team a", "children": [ { "name": "processing", "children": [ {"name": "ca", "size": 5} ] }, { "name": "review", "children": [ {"name": "ca", "size": 45} ] } ] }, { "name"

python - Debugging pySerial write timeout -

how determine caused pyserial write time out? having problem pyserial begins throwing write timeout exceptions after running variable amount of time. can run fine few minutes (at approx. 200 bytes/sec) , fail. all handshaking disabled. prior write timeout, have observed no more data presented on tx data pin. few seconds later timeouts begin. if disable writetimeout, code runs continually no new data sent out on tx pin. i see in pyserial code passes written data os.write() call. cause reliably timeout? cause not timeout, not present data on output pin? specific information application below: i sending data out on ftdi adapter arduino board (which emulates dynamixel servos). monitoring rx/tx lines logic analyzer, can see making through ftdi adapter. i running on ubuntu 14.04 in vm. the code dynamixel controller node ros . have been making small changes in order debug problem. write method, print statements added debugging: def __write_serial(self, data):

javascript - Getting nth level children using jquery -

i have following situation. want access "nth" children using jquery. <div id="root"> <div id="block"> <div>level 1 <div>level 2</div> <div>level 3 <div>level 3.1</div> <div>level 3.2</div> </div> <div>level 4 <div>level 4.1 <div>level 4.1.1</div> </div> <div>level 4.2</div> </div> </div> <div>level 1 <div>level 2 <div>level 3 <div>level 3.1</div> </div> <div>level 4</div> </div> <div>level 5</div> </div> <div>level 1 <div>level 2&

SharePoint Search. Search site with AD credentials -

i'm not sure if has been asked , answered can explain problem enough. our staff intranet portal can accessed ad accounts. have sharepoint search crawl site , index pages. sharepoint search crawler needs authenticate site somehow have access content. would happen have resource share me read or @ least guide me in right direction. appreciate much. let me know if need more info or clarification. you need ad account configured sharepoint search crawl account (means has read access on whole farm). account should exist. it might specific staff site not showing in search results, because: a) specific location not being crawled b) specific location explicitly excluded crawl you need configure in sharepoint central administration, under service applications (search service application). first point checking content sources, crawling. second point configured on site or on central administration ( http://techmikael.blogspot.no/2013/04/limiting-search-results-in-sharepoi

ios - swift, removing objects from core data, still appends empty objects? -

i'm attempting set uitableview, objects in entity. however, i'm loading data api. every time loads, i'm deleting objects in entity. , adding new ones. however, when this. it's showing 5 cells api data, , every time load it. adds 5 empty cells. the reason it's adding empty cells because i'm defining numberofrowsinsection objects count so: func tableview(tableview: uitableview, numberofrowsinsection section: int) -> int { return stocks.count } where stocks is: var stocks = [nsmanagedobject]() so assume it's because there's somehow empty objects in entity? here's how i'm trying set data: func loadsuggestions(formula: int) { println("----- loading data -----") // check internet connection if reachability.isconnectedtonetwork() == false { println("error: -> no internet connection <-") } else { // delete current objects in entity let fetchrequest = nsfetc

javascript - What color format allows for correct "adding" or "mixing" of the color value? -

Image
i need represent addition of numbers (scientific data) corresponding "real" color. (additive mixing) e.g. red + blue = magenta however, there small percent of red, , large percent of blue, change shade of green. question is there color format (rgb, hex, etc) or method can use calculate corresponding color? background i need animate cryptography using "color mixing" analogy. b , c represent color each. color combinations need demonstrate are: a b c a + b c + b a + b + c my goal take large number (private key) , make represent color... diluting 96 bits of entropy rgb, hsv or other value can "added". the example video linked uses color addition (and cool, +1). tipoff actual lamps use before animation: light (electromagnetic radiation) additive . wikipedia's example image matches example, red + blue = magenta. the other key concept of video inverse color, video describes "the complimentary color, when added

c# - Dynamic SQL always output the same data -

i got serious problem. problem have 3 checkbox in form (c#) : apple orange banana here's short sql snippet: and ( <isnotempty property="apple"> m.supplier = 'a' or </isnotempty> <isnotempty property="orange"> m.supplier = 'b' or </isnotempty> <isnotempty property="banana"> (m.supplier != 'a' , m.supplier != 'b') </isnotempty> ) so want want view apple data if uncheck orange , banana checkbox or if check orange checkbox show orange data only. problem code output same data if check or uncheck them. thanks in advance guys.

security - Parse ACLs in Client -

are acls supposed go client code when using parse? seems not secure me because can't change acl code when creating new object? perhaps misunderstanding... would appreciate clarification. thanks! you correct. moving security client allows attack bypass security sending network messages directly server. access control must checked on server. that said, can improve user experience if add permission-based ui elements. depending on implementation, decision show conditional elements can made on client or server. example, may wish show additional ui elements if current user has admin privileges. whether use acls directly or application-specific means of making decision largely matter of choice. key thing that, though may have conditional ui, always check permissions on server well.

html - DOM with javascript not working -

i'm newbie web programming , can't understand why following code doesn't work. it supposed remove permanently content of div element when button pressed, disappears while , reappears. the code following: <!doctype html> <html lang="es"> <head> </head> <body> <script type="text/javascript"> function prueba(){ document.getelementbyid('uno').innerhtml=""; } </script> <div id="uno">contenedor uno</div> <form onsubmit="prueba()"> <input type="submit" value="entrar" > </form> </body> </html> i believe what's happening button submitting form, sends form web server reloads page. so: your "onsubmit" js runs , clears div content. your page reloads , content comes back. try instead of form (i.e. remove s

r - Tabulate responses for multiple columns by grouping variable with dplyr -

hi:i'm new plyr/dplyr family enjoying it. can see it's massive utility own work, i'm stil trying head around it. have data frame looks below. 1) how produce table each non-grouping variable shows distribution of responses within each value of grouping variable? 2) note: have missing values , exclude them tabulation. realize summarize_each command apply function each column, don't know how handle missing values issue in simple way. have seen codes suggest have filter out missing values, if missing values scattered randomly through non-grouping variables? 3) fundamentally, best use complete cases dplyr? #library library(dplyr) #sample data group<-sample(c('a', 'b', 'c'), 100, replace=true) var1<-sample(c(1,2,3,4,5,na), 100, replace=true, prob=c(0.15,0.15,0.15,0.15,0.15,0.25)) var2<-sample(c(1,2,3,4,5,na), 100, replace=true, prob=c(0.15,0.15,0.15,0.15,0.15,0.25)) var3<-sample(c(1,2,3,4,5,na), 100, replace=true, prob=c(0

gorm - Configure Grails to eager fetch one-to-one & many-to-one relationships by default -

how can configure grails / gorm eager fetch one-to-one & many-to-one relationships default? i not want eager fetch many-to-many or many-to-one relationships default; should still lazy fetch. i've seen how specify eager fetch individual relationships, haven't instructions making default one-to-one , many-to-one relationships.

Catch hangup while Asterisk AMD is checking -

im having problem when answer phone , hangup, asterisk not detect hangup while amd detecting ? asterisk 11.11 -- executing [09xxxxxxxx@appel-sortant:10] noop("local/09xxxxxxxx@appel-sortant-40f9;2", "next = 0") in new stack -- executing [09xxxxxxxx@appel-sortant:11] set("local/09xxxxxxxx@appel-sortant-40f9;2", "global(next)=0") in new stack == setting global variable 'next' '0' -- executing [09xxxxxxxx@appel-sortant:12] dial("local/09xxxxxxxx@appel-sortant-40f9;2", "sip/09xxxxxxxx@forfait-ovh,20,gtr") in new stack == using sip rtp cos mark 5 -- called 09xxxxxxxx@forfait-ovh -- sip/forfait-ovh-00000000 ringing -- sip/forfait-ovh-00000000 making progress passing local/09xxxxxxxx@appel-sortant-40f9;2 -- sip/forfait-ovh-00000000 answered local/09xxxxxxxx@appel-sortant-40f9;2 > channel local/09xxxxxxxx@appel-sortant-40f9;1 answered. -- executing [s@appel-sortant:1] playback("local/09xxxxxxxx@app

php - htaccess rewrite only one folder -

i have folder in root name "pages", of html pages there, have rewrite mod, delete folder url , delete .php, www.website.com/pages/index.php, becomes: www.website.com/index. now, problem rest of folders need in root, , when try require files folders, rewrite mod looking folders in "pages" folder , not on root folder. i need rewrite mod on "pages" folder used, in url. .htacces file: options +followsymlinks rewriteengine on rewritecond %{request_filename} !-d rewritecond %{request_uri} !\.[a-za-z0-9]+$ rewriterule ^(.+?)/*$ $1.php [l,qsa] #remove subfolder pages rewritecond %{request_uri} !(.*)pages rewriterule ^(.*)$ pages/$1 [l] any that? you can check existence of php file using rewritecond , forward pages/ this: options +followsymlinks rewriteengine on rewritebase /gp/ rewritecond %{document_root}/gp/pages/$1\.php -f [nc] rewriterule ^(.+?)/?$ pages/$1.php [l] rewritecond %{request_filename} !-d rewritecond %{document_root

ios - Proper use of eraser tool above the image while drawing? -

Image
i have 1 uiview in have draw image. on view drawing pen tool, rectangle tool , update new image , draw. acedrawingview i facing 1 issue eraser tool. when use eraser background image color gone. please check screenshot. in above image black portion pen drawing , white portion eraser drawing. want when user eraser drawing not clear background image. drawing. redraw image code - (void)updatecacheimage:(bool)redraw { uigraphicsbeginimagecontextwithoptions(self.bounds.size, no, 0.0); if (redraw) { // erase previous image self.image = nil; // load previous image (if returning screen) [[self.prev_image copy] drawinrect:cgrectmake(0, 0, self.frame.size.width, self.frame.size.height)]; // need redraw lines (id<acedrawingtool> tool in self.patharray) { [tool draw]; } } else { // set draw point [self.image drawatpoint:cgpointzero]; [self.currenttool draw]; }

c# - Is it possible to connect gps reciever (teltonika fm1110) to a home server? -

my friend has got gps receiver installed in car. gps receiver emits signal using gprs-umts network. i have created server socket (c#) , listening connections not getting of them should sent receiver itself. the receiver not have interface sends data , because of can not program client socket on it. how should solve such problem? have have specialised mobile servers catch such data or able home server (actually normal computer acts server). when communicate teltonika fm1100 first confgure router redirect traffic via specific port number wich use when configuring gps that have configure gps tyo communicate public ip server need parser read data received gps. , first device send it's imei have respond message "1" if imei correct "0" if it's not if need c# parser wrote 1 may begin: https://github.com/temala/teltonika-fm1100

sql - c# fill dataTable -

i have textbox window1.xaml works searchbox. using integrated sql database in project , have dataset.xsd tabel adapters , queries. whenever need query database this: bookstableadapter tableadapterbooks = new bookstableadapter(); datasetlibrary.booksdatatable datatablebooks; datatablebooks = tableadapterbooks.getdatabytitle(searchtext); for searchbox have following code. string[] allwords = txtsearch.text.split(new char[] { ' ' }, stringsplitoptions.removeemptyentries); string sql = "select books.isbn, books.title, books.tag, books.image, books.phototype, publishers.name publishername books inner join publishers on books.codpublisher = publishers.codpublisher "; using (sqlcommand command = new sqlcommand()) { (int = 0; < allwords.length; ++i) { if (i > 0) sql += "or "; string paramname = "@param" + i.tostring(); sql += string.format("(books.title {0}) ", paramname);

jira-python - how do you update the fixVersions field? -

i'm not sure i'm doing wrong here, , hoping else has same problem. don't error, , json matches should correct both on jira's docs , jira-python questions online. versions valid jira versions. have no problem doing directly through api, re-writing go through jira-python cleanliness/ease of use. this clears fixversions field in jira. issue=jira.issue("tkt-100") issue.update(fields={'fixversions':[{'add': {'name': 'add_me'}},{'remove': {'name': 'remove_me'}}]}) i can add new version fixversions using issue.add_field_value(), won't work, because need add , remove in 1 request history of ticket. issue.add_field_value('fixversions', {'name': 'add_me'}) any ideas? here's code example of how got working comes across later... fixversions = [] issue = jira.issue('issue_key') version in issue.fields.fixversions: if version.name != &

Exporting related tables from Access to one Excel worksheet -

i trying set access database , importing data excel. our analysis in r , current excel worksheet use formatted , arranged work exporting r , doing analysis there. the format follows: the first 12 columns of data describe date, location , other information applies following 12 columns. trouble single set of observations information in first 12 columns doesn't change row row values second 12 columns change row row. year mm dd loc start end obs sess test object success 2013 5 15 park 1600 1700 mtm mtm1 1 ball y 2013 5 15 park 1600 1700 mtm mtm1 2 stick y 2013 5 15 park 1600 1700 mtm mtm1 3 rock n 2013 5 15 park 1600 1700 mtm mtm1 4 rock n 2013 5 15 park 1600 1700 mtm mtm1 5 stick y 2013 5 15 park 1600 1700 mtm mtm1 6 stick y 2013 6 24 yard 1500 1530 lfr lfr1 1 ball n 201

android - SQLite crashes when getWritableDatabase() is called on a Background Running Volley Request -

the request able execute getwritabledatabase() when caller fragment running. when fragment closed or app closed, volley request executing in background not able execute getwritabledatabase() public class contactstablemanager { private context context; private dbhelper ourhelper; private sqlitedatabase ourdatabase; private static final string database_name = "contacts"; private static final string database_table = "contactstable"; private static final int database_version = 1; public static final string tag = "contactsmanager.java"; public static final string key_name = "name"; public static final string key_number = "number"; public static final string key_id = "id"; public contactstablemanager(context c) { context = c; } public contactstablemanager open() { ourhelper = new dbhelper(context); ourdatabase = ourhelper.getwritabledatabase(); return this; } public void close() { ourhelper.close();

loops - Using Operations on a List in Python and Aggregating Results in New List -

i have list of numbers, of need divided same number. can this, no problem, how create new list featuring these new quotients? i have tried: for n in numbers: newnumbers = [] newnumbers.append(n/649.00) but gives me 1 number, quotient of last number in list, back. instead of loop can use list comprehension (see https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions ): newnumbers = [n/649.00 n in numbers]

Nested ngRepeat in AngularJS -

i trying display table data column heading defined in scope variable (which not static) , and list of rows display. [plunker url] http://plnkr.co/edit/zr6uil3pxfflqem3h06r?p=preview it looks field value not getting resolved in expression {{row.field}} . thanks the correct expression should {{row[field]}}

c# - How to find currently focused ListBox -

sometimes find wpf bit frustrating - there way find active listbox in usercontrol usercontrol itself? what want have property in usercontrol returns listbox focused within usercontrol . i've tried this: public listbox focusedlistbox { if (listbox1.isfocused) return listbox1; if (listbox2.isfocused) return listbox2; return null; } this doesn't work. neither this: public listbox focusedlistbox { if (focusmanager.getfocusedelement(this) == listbox1) return listbox1; if (focusmanager.getfocusedelement(this) == listbox2) return listbox2; return null; } or this: public listbox focusedlistbox { if (keyboard.focusedelement == listbox1) return listbox1; if (keyboard.focusedelement == listbox2) return listbox2; return null; } so how do this ?? based on jason boyd's answer found solution. , must little intuitive... -.- public listbox focusedlistbox { { var

arraylist - Convert List of List into list in java -

list<list<string>> superlist = new arraylist<list<string>>(); list<string> list1 = new arraylist<string>(); list1.add("a1"); list1.add("a2"); list<string> list2 = new arraylist<string>(); list2.add("b1"); list2.add("b2"); list<string> list3= new arraylist<string>(); list3.add("c1"); list3.add("c2"); superlist.add(list1); superlist.add(list2); superlist.add(list3); list<string> result= new arraylist<string>(); now want create new list contains values in superlist . here result should contain a1,a2,b1,b2,c1,c2 try using flatmap : list<list<object>> list = list<object> lst = list.stream() .flatmap(x -> x.stream()) .collect(collectors.tolist());

xml - Flash Builder not showing desktop Application -

Image
while learning flash builder, testing simple application runs in browser, code so: <?xml version="1.0" encoding="utf-8"?> <s:application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minwidth="955" minheight="600"> <fx:script> <![cdata[ private function dosomething():void { mypanel.visible = false; } ]]> </fx:script> <s:panel id="mypanel" x="32" y="38" width="445" height="316" title="my panel"> <s:label x="206" y="34" text="label"/> <s:hslider x="171" y="121"/> <s:button click="dosomething()" x="182" y="198" label="goodbye"/> </s:panel> </s:application> when run application in browser if show

recursion - Tracking down issue with clojure implementation of Bron-Kerbosch non-pivot and pivoting algorithms? -

Image
i having issues tracking down issue in clojure implementation of bron-kerbosch non-pivoting , pivoting algorithms. here bron-kerbosch without pivoting (bk) here bk pivoting (bkp) i have managed, so, bk without pivoting work. have verified through quite few sanity tests/graphs finds correct set of maximal cliques. my issue lies in bk pivoting algorithm. not quite sure how can determine issue lies, , have assume issue how have implemented it. here sscce of issue necessary functions http://pastebin.com/wm7dxvc8 . below implementations of bk , bkp algorithms. ; bron-kerbosch no pivot (defn bk [r p x graph] (if (and (empty? p) (empty? x)) [(set r)] (loop [p p, x x, cliques []] (if (empty? p) cliques (let [v (first p) nv (graph v) cliques (into cliques (bk (into r (list v)) (filter nv p) (filter nv x)

dynamics crm 2013 - crm merging two entities into one, best way to copy info from old entities to new entity -

i have 2 entities in crm want combine one, have several thousands records need type of batch option. considering options best way be? have found ssis looks way go. other options should consider? thank fro help. using crm sdk's executemultiplerequest way insert lot of data. following link started: https://msdn.microsoft.com/en-us/library/jj863631.aspx

java - JavaFX increasing a circle's radius by clicking on it -

i'm trying create javafx program creates circle when click on screen. there can many circles @ once. can't think of solution how increase circle's radius when click on again. public class controller implements initializable { @fxml private button reset; @fxml private anchorpane anchor; @fxml private borderpane border; circle circle = new circle(); int radius = 20; public void initialize (url location, resourcebundle resources) { anchor.setonmouseclicked(event -> { border.getchildren().add(circle = new circle()); circle.setcenterx(event.getx()); circle.setcentery(event.gety()); circle.setradius(radius); }); reset.setonaction(event -> { border.getchildren().clear(); }); circle.setonmouseclicked(event -> { circle.setradius(radius * 1.5); }); } } the field declare circle never added s

How do I remove Google Apps Script? It was downloaded by mistake -

how remove google apps script google drive? downloaded mistake. thank you. you don't download apps script, subscribe it, can unsubscribe in drive -> setting -> google apps script -> options -> disconect drive. if have chrome apps on task bar on windows, open it, right click on apps script remove. that beeing said, there's no reason remove other having less 1 icon on task bar.

javascript - adjust position of ui droppable with dyanmic variable -

i trying make when 1 div dropped upon target div, sticks top left.. , when next 1 dropped on same target it's still @ top left , offset height of first dropped div. once learned offset works differently in newer versions of jquery ui thought had it.. @ point i'm @ loss. var offsetvalue = number(0); var cardheight = parseint($(".card").height()); $(document).ready(function() { $(function() { $('.card').draggable({ revert: true, disabled: false }); $('.target').droppable({ hoverclass: 'hovered', drop: function(event, ui) { if (ui.draggable.attr('id') == $(this).attr('id').substr(0, 7)) { totalattempts++; ui.draggable.draggable('option', 'revert', false); ui.draggable.position({ of: $(this), my: 'left top

ruby on rails - A copy of xxx has been removed from the module tree but is still active -

i'm pretty sure error has nothing actual content of tenantidloader module. instead has activesupport dependencies. i can't seem past error. i've read, it's because either activerecord::base getting reloaded or company::tenantidloader getting reloaded, , it's somehow not communicating that. please! i'd able upgraded rails 4.2. edit i've learned it's because i'm referencing tenant getting reloaded automatically. need able reference class though, know how around this? config/application.rb config.autoload_paths += %w( #{config.root}/lib/company ) config/initializers/company.rb actionmailer::base.send(:include, company::tenantidloader) lib/company/tenant_id_loader.rb module company module tenantidloader extend activesupport::concern included cattr_accessor :tenant_dependency self.tenant_dependency = {} after_initialize self.tenant_id = tenant.active.id if self.class.tenant_dependent? , self.new

How to install packages using pip in jenkins -

i have created job in jenkins , trying build project. my shell command: #!/bin/bash source env/bin/activate cd petinstantapi pip install -r requirements.txt python manage.py migrate python manage.py test my console output says it's failed when installing packages in requirements file. oserror: [errno 13] permission denied: '/usr/local/lib/python2.7/dist-packages/django-1.8.dist-info' i have tried using sudo pip install -r requirements.txt but no luck. by default, sudo prompts password. basically, have 2 options of solving that: running jenkins root, not you'd do, or allowing user jenkins runs under execute pip without password. add following line end of /etc/sudoers file (make sure use sudo visudo editing that): jenkins_user all=nopasswd:/usr/bin/pip

Unable to Create a table of Array of Objects in Powershell -

i need following. trying list adapter name , netbiosoption value in table format. appreciated. $nac = gwmi win32_networkadapterconfiguration -filter 'ipenabled="true"' $na = $nac | %{$_.getrelated('win32_networkadapter')} $prop = @{'name' = $na.netconnectionid; 'netbios' = $nac.tcpipnetbiosoptions } $obj = new-object -typename psobject -property $prop $obj i getting result , not in table format name netbios ---- ------- {wireless network connection, virtualbox host-only network} {0, 0} try this: $nac = gwmi win32_networkadapterconfi

c# - Get Response from HttpWebRequest on Windows Phone 8 -

i'm trying webrequest site windows phone application. vry important me response server. here code: uri requesturi = new uri(string.format("http://localhost:8099/hello/{0}", metodo)); httpwebrequest httpwebrequest = (httpwebrequest)webrequest.create(requesturi); httpwebrequest.contenttype = "application/xml; charset=utf-8"; httpwebrequest.method = "post"; using (var stream = await task.factory.fromasync<stream>(httpwebrequest.begingetrequeststream, httpwebrequest.endgetrequeststream, null)) { string xml = "<string xmlns=\"http://schemas.microsoft.com/2003/10/serialization/\">ahri</string>"; byte[] xmlasbytes = encoding.utf8.getbytes(xml); await stream.writeasync(xmlasbytes, 0, xmlasbytes.length); } unfortunatelly, have no idea of how response server. have ide

javascript - fadeToggle on multiple ids errors -

today come issue jquery / javascript , .fadetoggle(); . so want p elements id. please see here: $("#here").click(function(){ $(".overlay, .popup").fadetoggle(); }); $("#there").click(function(){ $(".overlay, .popup2").fadetoggle(); }); here jsfiddle : i want, ideally, have several paragraphs individual ids can add pop differing content! i'd use custom data attribute this. way can reuse same function no matter how many elements have... $('.clickable').click(function() { var popuptarget = $(this).data('popup'); $('.overlay, '+popuptarget).fadetoggle(); }); /* click overlay close... */ $('.overlay').click(function() { $('div').fadeout(); }); html, body { height: 100%; } .overlay { position:absolute; display:none; /* color alpha transparency */ background-color: rgba(0, 0, 0, 0.7); /* stretch screen edges */ to

ios - CloudKit: Error saving record with CKModifyRecordsOperation -

<ckerror 0x14d8cb70: "partial failure" (2/1011); "failed modify records"; partial errors: { b5def0b5-f064-4b27-9c89-be75c9134297:(_defaultzone:__defaultowner__) = <ckerror 0x14d83b70: "server record changed" (14/2037); "error saving record <ckrecordid: 0x15748cd0; b5def0b5-f064-4b27-9c89-be75c9134297:(_defaultzone:__defaultowner__)> server: protection data didn't match"> }> i error, when try save ckrecord s cloudkit . idea? do have fetch first records in convenience api? i using ckmodifyrecordsoperation method update more record. when planning update, first need read record, make changes , write record. got notification record changed in time between reading , writing record. if version of record on server newer version tried save, server returns ckerrorserverrecordchanged error. userinfo dictionary of error object contains different versions of conflicting records. use these keys retrieve records ,

Spring boot - parachute is non existent error -

i use spring boot 1.1.6 in our application. running while without issues , started throwing following error of sudden. severe:memory usage low, parachute non existent, system may start failing. i tried setting -xms , -xmx higher value. still getting same error. there setting missing. thanks, baskar.s adding -xx:maxpermsize higher value solved problem.

plsql - PLS-00306: wrong number or types of arguments in call to 'select_s' -

just calling directly editor (toad). no idea why getting above error having checked function definition , variable types repeatedly. of information available online seems stored procedures - don't believe used here declare type attrs_type varray(10) of string(10); l_ldap_host varchar(255) := 'servername'; l_ldap_port int := 389; l_ldap_user varchar(255) := 'username'; l_ldap_passwd varchar(255) := 'password'; l_ldap_base varchar(255) := 'l=something,dc=something'; l_session dbms_ldap.session; l_retval number; l_entry varchar(255); l_attrs attrs_type; l_message varchar(255) := null; l_filter varchar(255) := 'objectclass=*'; begin l_session := dbms_ldap.init(hostname => l_ldap_host, portnum => l_ldap_port); l_retval := dbms_ldap.simple_bind_s(ld => l_session, dn => l_ldap_user, passwd => l_ldap_passwd); l_attrs(1) := '*'

python - Why is this zmq code not working? -

this test doesn't work. class printhandler(messagehandler): def handle_message(self, message): print(message) class filehandler(messagehandler): def handle_message(self, message): open('nana', 'w') f: f.write(message) class subscribeprocess(process): def __init__(self, handler): super(subscribeprocess, self).__init__(group=none, target=none, name=none, args=(), kwargs={}) self.handler = handler def run(self): self.address = tcpaddress(host='127.0.0.1', port=5555) subscriber = zmqsubscriber(zmqblockingconnection(address=self.address, bind=false)) subscriber.set_message_handler(self.handler) print('............') class testzmqsubscriber(testcase): def test_set_message_handler(self): address = tcpaddress(host='127.0.0.1', port=5555) pub_connection = zmqblockingconnection(address, bind=true) publisher = zmqpublis

Spring Rest Data Application in Google Appengine -

i've spring rest service application spring data repositories,which want deploy google app engine. but when try activate google appengine settings in project properties comes error enter value applications id. cannot set application id(appengine-web.xml) i want put appegine-web.xml web-inf folder, web-inf folder not exist in project.

javascript - Calculate minimum value not between set of ranges -

Image
given array of circles (x,y,r values), want place new point, such has fixed/known y-coordinate (shown horizontal line), , close possible center not within of existing circles. in example images, point in red result. circles have known radius , y-axis attribute, easy calculate points intersect horizontal line @ known y value. efficiency important, don't want have try bunch of x coords , test them against each item in circles array. there way work out optimal x coordinate mathematically? appreciated. way, i'm writing in javascript using raphael.js library (because 1 supports ie8) - more of logic problem language doesn't matter. basically equation of circle (x - c x ) 2 + (y - c y ) 2 = r 2 . therefore can find intersection points between circle , x axis substituting y 0 . after have simple quadratic equation solve: x 2 - 2c x x + c x 2 + c y 2 - r 2 = 0 . have 3 possible outcomes: no intersection - determinant irrational number (nan in javascript)

c++ - Search string for string sequence -

this question has answer here: how count occurrences of string within string? 28 answers optimized version of strstr (search has constant length) 5 answers what efficient way count number of occurrences of substring in string in c++? example, have huge string like "gqwhiwqghwggeeegqihigwhiqwghieeegphiqpiwghqpwgpheeegqihwpwgqhpqwgeee" and want count how "eee" occurs. i go step step in loop , check every letter if it's e , if so, count them , if there 3 e s, increment counter, guess there more efficient way of doing this. maybe string function? wasn't able find or google suitable one. i searching clean c++11 solution. well, if want fast , efficent solution, take @ knuth–morris–pratt algorithm - takes o(n+m) search. if want in stl s

sql server - LINQ Stored Procedure Result Issue -

i have simple stored procedure. in fact, looks similar 1 works fine when dragging server dbml. (visual studio 2013): @intpuid integer select tagname = cast(ecv.value varchar(100)) event_configuration ec join event_configuration_data ecd on ecd.ec_id = ec.ec_id , (ecd.alias in ('runtag', 'a') or ed_field_id=2058) join event_configuration_values ecv on ecv.ecv_id = ecd.ecv_id et_id=2 , ec.pu_id=@intpuid that's it. pretty simple. don't see why won't work , frustrating. edit the error being thrown is: the return types following stored procedures not detected. set return type each stored procedure in properties window. second edit i have no temp tables, resolution nothing me. running in basic asp.net (aspx) solution (dropping sp onto dbml). think answers questions.

objective c - Button does not react -

i have strange behaviour nsbutton . works normal until voodoo somewhere else in app. right button no longer react on click events. still looks normal (so not disabled). not when click it. idea should in properties of nsbutton might have been changed accidentally? (quite sure did not touch button itself.) ensure button in 'touchable' zone in superview. mean have ro placed inside superview bounds (if not, can see it, depending on clipping properties, , can't interact it). in order check it, set color container view. check userinteraction enabled... hope helps.

sql server - Orphan users/application users -

how orphan user can application user @ same time? if delete orphan user @ database level, how can affect access @ application level? the concept of orphan user bit different have explained. an orphan user in database user isn't mapped login. happens when move databases across servers or delete login without deleting users mapped login. say on servera took backup of databasea has usera logina . now restored backup on serverb has login logina . when restore database on serverb usera become orphan user , fix executing following command: alter user [usera] login = [usera]; this map usera logina on serverb .and if not fix whether application or uses usera's credentials not able access database on serverb.

android - Unfortunately, (my app name) has stopped -

this question has answer here: what nullpointerexception, , how fix it? 12 answers i new android app development , using eclipse. created 2 activities , added button main activity suppose open blank second activity. app keeps stopping when try to run on phone. this logcat in eclipse: 04-14 21:16:07.373: e/trace(27640): error opening trace file: no such file or directory (2) 04-14 21:16:07.603: e/androidruntime(27640): fatal exception: main 04-14 21:16:07.603: e/androidruntime(27640): java.lang.runtimeexception: unable start activity componentinfo{com.example.inveslator/com.example.inveslator.mainactivity}: java.lang.nullpointerexception 04-14 21:16:07.603: e/androidruntime(27640): @ android.app.activitythread.performlaunchactivity(activitythread.java:2071) 04-14 21:16:07.603: e/androidruntime(27640): @ android.app.activitythread.handlelaunchactivity(acti