Posts

Showing posts from January, 2013

jquery - Adding Social Share buttons to Fancybox which uses the button helper -

jquery - Adding Social Share buttons to Fancybox which uses the button helper - i'm trying integrate social sharing buttons onto fancybox image popups. there jsfiddle fancybox has created demonstrate how done...but i'm using "helper" > jquery.fancybox-buttons.js (see here). how combine both these custom solutions when fancybox image pops has social sharing buttons underneath (just in jsfiddle & has button helpers? here's illustration of page's html fancybox gallery: <div id="painting" class="content-pages"> <p> <a class="fancybox-buttons" href="painting/2011_b.jpg" data-fancybox-group="paintings" title="sed vel sapien vel sem uno"><img src="painting/2011_s.jpg" alt="" /></a> <a class="fancybox-buttons" href="painting/beginnings-3_b.jpg" data-fancybox-group="paintings" title="tegan white...

css - @font-face rendering on remote desktop -

css - @font-face rendering on remote desktop - so here thing, have saas webapplication uses special font display icons. instead of using numerous png's utilize <span> class icon . the css file starts @font-face tag, generated fontsquirrel , looks follows: @font-face { font-family: 'iconsregular'; src: url('../../content/fonts/icons-webfont.eot'); src: url('../../content/fonts/icons-webfont.eot?#iefix') format('embedded-opentype'), url('../../content/fonts/icons-webfont.woff') format('woff'), url('../../content/fonts/icons-webfont.ttf') format('truetype'), url('../../content/fonts/icons-webfont.svg#iconsregular') format('svg'); font-weight: normal; font-style: normal; } this displays in our supported browsers (ie7, 8, 9, ff, safari & chrome). when website accessed through remote desktop client. webfont not used. css file ,...

c# - How to append a WebControl immediately after a WebControl in CodeBehind -

c# - How to append a WebControl immediately after a WebControl in CodeBehind - now i've been mvcing quite sometime decide pop classic c# .net 8 track , have gotten next issue: i have textbox webcontrol on aspx page in code behind want append literalcontrol after it. this doesn't work: textboxage.controls.add(new literalcontrol("invalid age.")); this works way @ bottom: textboxage.controls.parent.add(new literalcontrol("invalid age.")); can help me!? for illustration html show: <div> <input name="textboxage" type="text" id="textboxage" class="age"> invalid age. </div> this should purely dynamic , relative command @ hand. solution: textboxage.parent.controls.addat(textboxage.parent.controls.indexof(t‌​extboxage),new literalcontrol("<span>invalid age.</span>")); maybe can seek this. (don't remember if addat replace command @ specifi...

mysql - Joining Tables to Update -

mysql - Joining Tables to Update - can update row? first time using left join update . update comments r left bring together items on i.items_id = r.item_id left bring together master_cat c on c.cat_id = i.items_id set r.good = r.good + 1 i.item = '{$item}' , c.category = '{$cat}' , r.review = '{$review}'; it doesn't throw error, says 0 rows affected though have confirmed variables ok right data. (even if hard code data). edit: have tried inner bring together well, , not work either. edit 2: trying do, have these 2 queires , work fine. trying simplify code one. can done: // query returns rate_id utilize "$review_id" in sec query. $query = " select r.rate_id comments r left bring together items on i.items_id = r.item_id left bring together master_cat c on c.cat_id = i.cat_id r.review = '{$review}' , i.item = '{$item}...

Best IDE for PLC ladder programming -

Best IDE for PLC ladder programming - recently trying larn ladder logic programming plcs, want know if there ide create ladder programs improve step7 or cx-programmer? there plugin visual studio or netbeans can use? finally, improve work plcs under linux or microsoft windows? update 1 : after googling this, found out ladder programming not depend on plc brand or model, did not mentioned brand in question. what goal? in cases, ide dictated plc manufacturer, , plc brand spec'd client when purchase machine. spec plc because need have can go online maintenance , troubleshooting. since software proprietary , absurdly expensive, don't want new software license every machine in plant , have relearn new software, while bleeding money of manufacturing downtime. so if goal come in industry, want find out plants in country tend use. in north america it's allen-bradley a.k.a rockwell automation, programmed rslogix 5000. in europe, it's typically seimens, have...

c# - I am using dataset in vs 2012 but view tableadapter not ganerate code in designer.cs -

c# - I am using dataset in vs 2012 but view tableadapter not ganerate code in designer.cs - i create database in sql2008 include tables , views. using info set working sql in vs 2012. drag table info set code generate table adapter.but draging veiws in info set not generate code tableadapter if tableadapter not beingness generated automatically, have tried right-clicking dataset background , selecting add together new/table adapter? c# visual-studio-2012 dataset views

c# - ElementHost + FlowDocument = GC not working, memory keeps increasing -

c# - ElementHost + FlowDocument = GC not working, memory keeps increasing - [updated, see bottom!] there memory leak in our winforms application hosting wpf flowdocumentreader in elementhost . have recreated issue in simple project , added code below. what application does when press button1 : a usercontrol1 contains flowdocumentreader created , set elementhost 's child a flowdocument created text file (it contains flowdocument stackpanel few one thousand lines of <textbox/> ) the flowdocumentreader 's document property set flowdocument at point, page renders flowdocument correctly. lot of memory used, expected. the problem if button1 clicked again, memory usage increases, , keeps increasing every time process repeats! gc isn't collecting despite loads of new memory beingness used! there no references shouldn't there, because: if press button2 sets elementhost1.child null , invokes gc (see code below), weird thing happens - not cl...

c# - How to ignore Stylecop rule SP0100? -

c# - How to ignore Stylecop rule SP0100? - how suppress style cop rule sp0100? enumeration item name v2007 doesn't conform specified style: samplename, sample_name. i tried next http://stackoverflow.com/a/3296152/284795 [suppressmessage("sp0100")] but error 'system.diagnostics.codeanalysis.suppressmessageattribute' not contain constructor takes 1 arguments are sure have index of name right? elementsmustbeorderedbyaccess seems rule sa1202 edit: you should check microsoft documentation rule suppressions, explains constructor syntax. ok, seems using stylecop+ rule - meaning bit of pain find appropriate suppression data. i have found info id in source xml file rules, and, if understand correctly, category should set total name of class exposes rule, stylecopplus.stylecopplusrules . meaning minimal attribute declaration, in case, be: [suppressmessage("stylecopplus.stylecopplusrules","sp0100:advancednam...

How to create a random 160 bit prime number in C++? -

How to create a random 160 bit prime number in C++? - i working on project in school , need create 160 bit value. haven't programmed in while can't figure out how implement this. help appreciated. you need library big integers (assuming can't take ready-to-use cryptographic library). first create random 160-bit value, not prime. depending on platform, may utilize /dev/random , cryptgenrandom , or other enthropy source(s), (possible several ones, combined). then increment value in loop, applying e.g. miller-rabin (pseudo-)primality test each candidate, until find prime number. c++

How to get text of an element in xml with two attributes in java -

How to get text of an element in xml with two attributes in java - i text within element has 2 attributes, sample xml below <?xml version="1.0" encoding="utf-8"?> <queries> <query pagename="master" param="default"> select * test; </query> <query pagename="uftl" param="default"> select uftl, lop dwells lop='a' </query> </queries> input: 2 attributes, output: query. i.e, on giving input 'master','default' query element, in case 'select * test;" oh. write dom parser while waiting answer private string parse(document document) { element root = document.getdocumentelement(); nodelist queries = root.getelementsbytagname("queries"); int querieslength = queries.getlength(); (int = 0; < querieslength; i++) { element currentquery = (element) queries.item(i); ...

php - mail() headers not preventing mail going to junk mail folders -

php - mail() headers not preventing mail going to junk mail folders - im using these headers in php create sure emails avoiding junk mail service folder dont seem working well. $headers .= "content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "from: hello@somebodylovesyou.co.uk <hello@somebodylovesyou.co.uk>\r\n"; $headers .= "reply-to: hello@somebodylovesyou.co.uk <hello@somebodylovesyou.co.uk>\r\n"; $headers .= "return-path: hello@somebodylovesyou.co.uk <hello@somebodylovesyou.co.uk>\r\n"; $headers .= "x-priority: 3\r\n"; $headers .= "x-msmail-priority: normal\r\n"; is there anythin above code u alter or remover might help work? agreed @marcb: phpmailer dead easy, , stuff you. go here , download it. follow examples here. should , running in 10 minutes. however, key point should swing you can tell phpmailer send mail service via different method using php's mai...

prolog - Deducing facts from a set via a predicate by metaprogramming -

prolog - Deducing facts from a set via a predicate by metaprogramming - suppose have set of literals (represented list instance) , predicate specified dynamically, want produce set of literals contains previous ones in add-on ones can deducted applying predicate set. an example, having defined predicate pred(a, b) :- base(a, b). pred(a, c) :- base(a, b), pred(b, c). and supposing such signature predicate deduce_set(+set, +pred, ?deducedset) the next statement holds (is true): deduce_set([base(a,b), base(a,c), base(b,d), base(d, e)], pred/2, [base(a,b), base(a,c), base(b,d), base(d,e), pred(a,d), pred(a,e), pred(b,e)] ). what efficient , general way so? i've been thinking like: asserting literals in set call pred if succeeds assert head collect asserted facts in resulting set , set list isn't there improve way? update solution, improve defined capellic, using metaprogramming can't cope vars in set under obj...

iphone - UILocalNotification app crash when repeat interval set to hourly -

iphone - UILocalNotification app crash when repeat interval set to hourly - otherrepeat intervals work fine, when set notification repeat hourly , timer goes off, app freezes, , can't reopen app until clear local notifications. switch(repeattype) { case krepeathourly: notif.repeatinterval = nshourcalendarunit; break; case krepeatdaily: notif.repeatinterval = nsdaycalendarunit; break; case krepeatweekly: notif.repeatinterval = nsweekcalendarunit; break; case krepeatmonthly: notif.repeatinterval = nsmonthcalendarunit; break; case krepeatannually: notif.repeatinterval = nsyearcalendarunit; break; default: break; } - (void)schedulenotification { [remindertext resignfirstresponder]; [[uiapplication sharedappl...

javascript - How does one remove the question mark displayed while an image is being downloaded? -

javascript - How does one remove the question mark displayed while an image is being downloaded? - when user clicks on button, images downloaded. while beingness downloaded safari shows question mark. how can rid of this? i considered onerror event listener not error. takes time images download. not image not @ specefied src. the image tag beingness added dom of page after ajax call. while image element waits access actual image shows annoying question mark. how can rid of it? hide wrapping element until image has loaded. can hook onload event image, have show wrapping element when complete. javascript image

python - linear interpolation with interp2d or scipy.interpolate.RectBivariateSpline -

python - linear interpolation with interp2d or scipy.interpolate.RectBivariateSpline - i'm quite new python , want interpolate in regular grid. first, tried interp2d. worked cases, cases (the difference values) there warning , result not expected. code: img=sys.argv[1] latitude=np.loadtxt(img+'/'+'geolayer.lat.txt') longitude=np.loadtxt(img+'/'+'geolayer.lon.txt') n=int(sys.argv[2]) rows=int(sys.argv[3]) cols=int(sys.argv[4]) m=len(latitude)/n #latitude column=latitude[:,0].reshape((m,n)) row=latitude[:,1].reshape((m,n)) val=latitude[:,2].reshape((m,n)) # create interpolation object interp=interp2d(column,row,val) # interpolate values lattmp=interp(np.arange(cols),np.arange(rows)) lat=np.degrees(np.arctan(1.0067395*np.tan(np.radians(lattmp)))) this warning occasionally: warning: no more knots can added because number of b-spline coefficients exceeds number of info points m. causes: either s or m small. (fp>s) kx,ky=1,...

c++ - Read a text file containing random sized integers separated by a space -

c++ - Read a text file containing random sized integers separated by a space - my text file contains integers like: 123 879709789 43536 8768768 i want read whole number in 1 array index array[1]=123 array [2]=879709789. here's i've tried: ifstream myfile("numbers.txt"); if (myfile.is_open()) { while ( myfile.good() && !myfile.eof() ) { for(i=1; i<myfile.eof(); i++) { myfile >> ar[i]; if(ar[i]=="") { i++; } } } } like this: #include <vector> #include <fstream> #include <iterator> std::ifstream infile("myfile.txt"); // or utilize `std::cin` std::vector<int> v(std::istream_iterator<int> { infile }, std::istream_iterator<int> { } ); now v contains numbers. if there's input error anywhere along way, won't see , input stop. if that's issue,...

repository - Checkout Code from CodePlex to remote SVN -

repository - Checkout Code from CodePlex to remote SVN - hi need checkout 1 project maintained on codeplex our private repository - svn hosted on server. is there way using can straight checkout code codeplex hosted svn? you can't checkout repository repository straight (checkout transfer repository working re-create only) if want have read-only mirror of codeplex locally - can seek build svnsync if can create local repository same uuid, codeplex's repo - can sync manually (update wc codeplex, relocate wc, commit, homecoming codeplex binding of wc) svn repository checkout codeplex

Kohana 3.3 force SSL in controller -

Kohana 3.3 force SSL in controller - i have few controllers. https redirected webserver (ligttpd) itself, security-check want php redirect specific controllers https. does kohana contain function check if url running on ssl , redirect if needed? found out own reply :) make class called url: class url extends kohana_url { public static function ssl() { if (!isset($_server['https']) || $_server['https'] == "") { $redirect = "https://" . $_server['http_host'] . $_server['request_uri']; header("location: $redirect"); } } } call in controller this: url::ssl(); please note: using above method unsafe. should redirect server (lighttpd/nginx/apache) too. ssl controller kohana

jquery - on hover how to show inner absolute position div to outside scrollable div -

jquery - on hover how to show inner absolute position div to outside scrollable div - i have fixed width , height div overflow:auto property, under div have 1 table multiple row , on 1 td showing 1 div(pop-content) onhover fade-in effect. when hovered on lastly td div showing comes under scroll area , create much blank space in bottom don't want. i want show div(pop-content) outside scrollable area if row lastly or sec lastly without losing scroll property. below code jquery:- $(function () { $(".pop-outer").each(function () { $(this).hover(function () { $(this).find(".pop-content").stop(true, true).fadein(300); }, function () { $(this).find(".pop-content").stop(true, true).fadeout(300); }); }); }); html:- <div class="grid-inner clearfix" style="overflow:auto; height:135px"> <table width=...

java - Getting Updated JTable Values -

java - Getting Updated JTable Values - i'm trying utilize jtable in order update users in java swing application, when edit cell results of edit can obtained if click different cell firing tablemodellistener. want able these changed values on button event without clicking other cells. my table definitions: defaulttablemodel tablemodel = new defaulttablemodel(); table = new jtable(tablemodel); tablemodel.addcolumn("key"); tablemodel.addcolumn("value"); if (patientview.getselected() != null){ tablemodel.addrow(new object[]{"name", patientview.getselected().getname()}); tablemodel.addrow(new object[]{"age", patientview.getselected().getage()}); tablemodel.addrow(new object[]{"height", patientview.getselected().getheight()}); tablemodel.addrow(new object[]{"weight", patientview.getselected().getweight()}); tablemodel.addrow(new object[]{"bmi", patientview.getselected().getcalculatedb...

marshalling - using JAXB, the XML is loaded into a class. This class is then used within another class to be marshalled out differently -

marshalling - using JAXB, the XML is loaded into a class. This class is then used within another class to be marshalled out differently - given xml file of offerings loaded class called offerings via jaxb. this class has following: name, cost sub-class, modifiers, ordering rules etc. i create order , within order order public class productorder { private string orderid; private date createdate; private orderstatus orderstatus; private int customerorderid; private arraylist<productorderitem> productorderitems = new arraylist<productorderitem>(); } order item public class productorderitem { private int orderitemid; private **offering** offering; private map<string, integer> qtylist = new hashmap<string, integer>(); private arraylist<modifier> modifiers = new arraylist<modifier>(); private int qty; } offering @xmlrootelement(name = "offering") @xmlaccessortype(xmlaccesstype.fi...

php - strpos() within while loop never ends -

php - strpos() within while loop never ends - there's string, $string = 'foo, bar, test,'; all want count number of commas within string. but leads infinite while loop. so, i've tried #1: $count = 0; while($pos = strpos($string, ',') !== false){ $count++; // never ends } and #2, while(true){ if ( strpos($string, ',') !== false ){ $count++; } else { break; } } they both never end. where's problem? you utilize substr_count() : substr_count($string, ','); in code, strpos() requires 3rd parameter start searching particular offset, e.g.: strpos($string, ',', 12); // start searching index 12 it doesn't work iterator. work: $start = 0; while (($pos = strpos($string, ',', $start)) !== false) { $count++; $start = $pos + 1; } update if want real fancy: class indexofiterator implements iterator { private $haystack; private $needle; priva...

entity framework - Simple EF 5 Query brings back no results -

entity framework - Simple EF 5 Query brings back no results - strange issue: trying simple query against email notifications table: using (mycontext context = new mycontext()) { iqueryable<emailnotification> query = context.emailnotifications.where(q => (q.lastsendattemptstatus == emailnotificationsendstatuses.pending) || (q.lastsendattemptstatus == emailnotificationsendstatuses.resend)); homecoming query.tolist(); } it brings no results though rows there. in fact, looked @ sql generates , ran without changes, , does bring right results. select [extent1].[emailnotificationid] [emailnotificationid], [extent1].[from] [from], [extent1].[to] [to], [extent1].[cc] [cc], [extent1].[bcc] [bcc], [extent1].[subject] [subject], [extent1].[body] [body], [extent1].[lastsendattempton] [lastsendattempton], [extent1].[lastsendattemptstatus] [lastsendattemptstatus], [extent1].[failurecomments] [failurecomments] [dbo].[...

javascript - Pass a route segment as callback argument -

javascript - Pass a route segment as callback argument - i'm building first app in express. possible somehow pass route segment argument callback? app.get('/connect/:mysegment', mycallback(mysegment)); specifically, i'm using passport several strategies authentication. rather doing, app.get('/connect/twitter', passport.authorize('twitter') ); app.get('/connect/facebook', passport.authorize('facebook') ); i along lines of... app.get('/connect/:service', passport.authorize(service)); of course, can do app.get('/connect/:mysegment', function(req, res){ // can utilize req.params.mysegment }); javascript node.js express

android - Implement a share Intent -

android - Implement a share Intent - i have created share intent implementation,this works fine normal, when click button of sharing nil happen...any ideas public class radyo extends activity{ public void oncreate(bundle savedinstancestate){ super.oncreate(savedinstancestate); setcontentview(r.layout.radyo); sharingbutton.setonclicklistener(new view.onclicklistener() { public void onclick(view v) { shareit(); } private void shareit() intent sharingintent = new intent(android.content.intent.action_send); sharingintent.settype("text/plain"); } }); } @override protected void ondestroy() { // todo auto-generated method stub super.ondestroy(); } } you still need phone call startactivity() private void shareit() { intent sharingintent = new intent(android.content.intent.action_send); sharingintent.putextra(intent.extra_text, "text share"); sharingintent.settype("text/plain...

c# - How to select all checkboxes in just one particular column in GridView? -

c# - How to select all checkboxes in just one particular column in GridView? - i have gridview in there 2 columns of checkboxes want add together 2 seperate "check all" text boxes @ top, "check all" above column should check checkboxes in column only. "check all" above column b should check columns in column b only. not able apply groupvalidation. every row 1 of 2 columns should selected. tried finding solution when click on check @ top checks checkboxes nowadays in gridview , there no grouping validation. here code.. head: <script type = "text/javascript"> function check_click(objref) { //get row based on checkbox var row = objref.parentnode.parentnode; if (objref.checked) { //if checked alter color aqua row.style.backgroundcolor = "aqua"; } else { //if not checked alter original color if (row.rowindex % 2 == 0) { ...

vector - Ray-tracer in C, Ray-plane intersection -

vector - Ray-tracer in C, Ray-plane intersection - im working on raytracer in c. trying figure out math ray-plane intersection. have d = ((po-lo) (dot) n) / (l (dot) n) now if correct... n - planes normal ray po = single point on plane l = vector represents ray shooting lo = point on line i confused how works. point on line (lo) need land on plane if going pixel pixel? if true couldn't represent point direction vector of ray (l) casting? i sense on complicating utterly lost on how working in code. edit: d = scalar in real world domain. so d needs equal 0 in order plane , ray (at point i'm looking at) intersect? , can utilize direction vector coordinates represent point on line> for point p on plane, equation true: dot(po-p,n) = 0 for point p on line, equation true: p = lo+l*d if point going both on plane , on line (the intersection), both must true. hence can substitute: dot(po-(lo+l*d),n) = 0 by doing algebra, can solv...

c# - how to create dynamic link labels in window form application -

c# - how to create dynamic link labels in window form application - on clicking go button name given in textbox should displayed link label , should increment dynamically. here code: private void buttongo_click(object sender, eventargs e) { linklabelname.text = textboxname.text; } private void btngo_click(object sender, eventargs e) { linklabel link = new linklabel(); link.text = txttext.text; pantable.controls.add(link); } c# winforms events

Assign only if condition is true in ternary operator in JavaScript -

Assign only if condition is true in ternary operator in JavaScript - is possible in javascript? max = (max < b) ? b; in other words, assign value if status true. if status false, nil (no assignment). possible? don't utilize ternary operator then, requires 3rd argument. need reassign max max if don't want alter ( max = (max < b) ? b : max ). an if-statement much more clear: if (max < b) max = b; and if need expression, can (ab)use short-circuit-evaluation of and: (max < b) && (max = b) btw, if want avoid repeating variable names (or expressions?), utilize maximum function: max = math.max(max, b); javascript ternary-operator

php - div text not positioning correctly with css? -

php - div text not positioning correctly with css? - hi can help me please, computers driving me insane, working yesterday , not, ive tried on computer , on different browser nil correcting problem. basically have news board, news feeds pull through mysql. i trying encase text in div called 'news_feeds_board_text' can position how want. whatever width or padding give text still overflows right hand side. please can please show me im going wrong, appreciate thanks. for illustration instead of looking how want it: the cat sat on fence , licked on , on again. its doing this: the cat sat on fence , licked on , on again. it overflowing out of news board , dont know why. know css issue dont know how? here's how divs laid out php: <?php $social_feeds_set = get_social_feeds_set(); while ($feeds = mysql_fetch_array($social_feeds_set)) { ?> <div class="socialcase" id="socialcase"> ...

javascript - Draggable font on RaphaelJS -

javascript - Draggable font on RaphaelJS - im trying create text added using print() draggable. i've found post code doesn't work - i've reposted fiddle - on chrome , ff text flies off screen. if set getbbox() parameter false works first drag then, on subsequent drags, mouse offset. var w = document.body.clientwidth, h = document.body.clientheight, paper = raphael(0, 0, w, h); var font = paper.getfont("vegur"); var text = paper.print(20,20,"my dragable text",font,50); var start = function () { text.obb = text.getbbox(); }, move = function (dx, dy) { var bb = text.getbbox(true); // setting false works 1 time text.transform('...t'+[text.obb.x - bb.x + dx, text.obb.y - bb.y + dy]); }, = function () { }; text.drag(move, start, up); figured out... var start = function() { //get original position before transform var obb = this.getbbox(true); //get position after lastly transform var nbb = this.getbbox(...

c - there is an error shows up to be "comparison between pointer and integer ('int' and 'const char *')" -

c - there is an error shows up to be "comparison between pointer and integer ('int' and 'const char *')" - char * piglatin(const char s[], int len) { char * result[len+3] = s[]; char * current[len+3] = s[]; if(s[0]=="o"||"u"||"e"||"a"||"i"){ result[len-1] = "y"; result[len-2] = "a"; result[len-3] = "-"; } else{ for(int = 0; i<len-1; i++){ result[i] = current[i+1]; result[len-1] = "-"; result[len] = current[0]; result[len+1] = "a"; result[len+2] = "y"; } } } i met problem when doing programme homework computer science class. professor want append "-ay" after string s if first letter of s vowel, otherwise remove first letter of s , append "-?ay". error appears @ "if(s[o]=="o"||...

google drive sdk - Is there a way to get changes.list with a maxResults limit in reverse chronological order? -

google drive sdk - Is there a way to get changes.list with a maxResults limit in reverse chronological order? - i'm interested in seeing recent changes, though if specify cap, oldest changes first. you should set startchangeid query parameter if want subset of recent changes: https://developers.google.com/drive/v2/reference/changes/list google-drive-sdk

iphone - How to get name and creation date of all files in a folder in ios? -

iphone - How to get name and creation date of all files in a folder in ios? - i using next code creation date of file @ given path , works fine. nsdictionary* attrs = [fm attributesofitematpath:@"/users/me/desktop/ios" error:nil]; if (attrs != nil) { nsdate *date = (nsdate*)[attrs objectforkey: nsfilecreationdate]; nslog(@"date created: %@", [date description]); } else { nslog(@"not found"); } now want names , creation dates of files in folder given @ path.how can that? can help me? first list of files directory & loop until file completes nsstring *bundleroot = [[nsbundle mainbundle] bundlepath]; nsfilemanager *fm = [nsfilemanager defaultmanager]; nsarray *dircontents = [fm contentsofdirectoryatpath:bundleroot error:nil]; for(int i=0;i<[dircontents count];i++) { nsdictionary* attrs = [fm attributesofitematpath:[dircontents objectatindex:i] error:nil]; if (attrs != nil) { n...

ios - Google Drive as a video hosting/streaming platform? -

ios - Google Drive as a video hosting/streaming platform? - i'm developing ios app generate video files , have social gallery users display clips. after lot of research found google drive perfect fit needs did testing , sucessfully made app upload file gdrive , everything. now need stream uploaded file in mpmovieplayerviewcontroller, need kind of direct link, i'm right? after initial tests used variable webcontentlink source url , worked flawlessly, happy result, doesn't work anymore, don't know happened , think method used not realiable? tried other possible links , none of them seems work. can give guidance if supported google drive , how it's best way archive in reliable way? thank much ! i encounter same error when seek download 28 times (testing) same 24mb file. however realise if download using content owner id, allow downloading after 28th time https://docs.google.com/a/onwardsct.com/uc?id=0byvxjalppqqpywnqy0v3mgs0ujg&export=downloa...

c# - Creating a visualizer Unity3d -

c# - Creating a visualizer Unity3d - i have been trying find things online how create own visualizer responds sound, far find tutorials on mac. i found premade visualizer prefer not spend 50$ on asset theasset i wondering of maybe tell me how basicly code particle scheme respond sound interactions such frequency's i've found nice tutorial here: http://www.41post.com/4776/programming/unity-making-a-simple-audio-visualization. able different frequencies sounds , accordingly. can seek , alter variables of particle it. another thing found project analyses spectrum of sound. can download here. i found this tutorial generates level based on sound. these links no longer works try them out , allow know thought of them , if helped! luck. c# audio unity3d visualizer

asp.net - Should my custom RoleProvider throw an exception in AddUsersToRoles? -

asp.net - Should my custom RoleProvider throw an exception in AddUsersToRoles? - i'm implementing custom asp.net role provider, , i'm wondering whether adduserstoroles method should throw providerexception if user passed in in role passed in. default microsoft sql server role provider sqlroleprovider exhibits behaviour, though official microsoft documentation doesn't recommend it: exception details: system.configuration.provider.providerexception: user 'mytestuser' in role 'mytestrole'. i think useful provider not throw exception in case move on when given user in given role; way calling code doesn't need worry duplicates. there existing role provider-using code relies on exception beingness thrown in case? if there is, should doing given microsoft don't seem recommend it? if want implement method similar adduserstoroles doesn't throw exception when user in role, can see 3 alternatives: implement adduserstoroles , have ...

Add a dotted circle on android camera interface -

Add a dotted circle on android camera interface - i'm developing face recognition app.i need display little dotted circle on photographic camera interface place face of person user can train app taking pictures different scales. followed "this link" don't know how on photographic camera interface. can please upload sample project or give me move on project? in advance.. edit-2013-02-14 ok code working. got 2 problems. i can draw circle. it's not in same position. when screen size changes, it's position changing. tried getwidht() , getheight() methods couldn't draw circle in center of screen.do have thought that? according reply have create views programatically. need add together capture button interface. can please explain answer? edit : code edited draw circle @ center , add together capture image button on surface view. import java.io.file; import java.io.filenotfoundexception; import java.io.fileoutputstream; import java....

upnp - How to push DLNA content from the command line -

upnp - How to push DLNA content from the command line - i going integrate broadcasted channels iptv channels 1 menu on tvs. problem swithing between different sources pain. need create menu on tv select channel want watch , switch tv channel. know how create menu. the other part of solution force itpv channel mediaserver tv screen. hard part. ended installing gupnp , playing it. works , i'll able write application. may have thought of improve solution pushing content via dlna? there command line utility or mediaserver can controlled command line? that'll ideal option. the basic question how programmatically play resource mediaserver on renderer? thanks. the basic question how programmatically play resource mediaserver on renderer the basic reply is, can't. upnp mediaserver in not designed ability start playing content renderer, same way http server can't start displaying html on particular browser window without browser making @ to the low...

jquery - Change icon size on mouse over - (FontAwesome + Bootstrap) -

jquery - Change icon size on mouse over - (FontAwesome + Bootstrap) - i want display 2x icon size on mouse on element. i'm using fontawesome bootstrap. have list this: <ul> <li><a href ="#"><i class="icon-inbox"></i> inbox<a/></li> <li><a href ="#"><i class="icon-print"></i> print<a/></li> .... </ul> i want add together "icon-2x" fontawesome css class, on mouse on element, display larger icon, , remove class on mouse leave. i want fontawesome homepage examples. this: i tried finding elemets jquery add together css class, couldn't it. can help me? thanks why don't utilize css :hover ? li i[class^="icon-"] { font-size:12px; } li:hover i[class^="icon-"] { font-size:24px; } fontawesome uses font icons, double icon size double font size. of course of study you'd need cat...

How "puts" statement works in Ruby? -

How "puts" statement works in Ruby? - i knew puts homecoming nil itself. but knowing fact have started play around it. here is: >> puts => nil # good, doing expected. >> puts 15 15 => nil # nil puts , 15 printed,as assigned do. perfect still. >> puts = 5 + 2 7 => nil # still good. now bit more puts see how robust is. >> puts a= 5 + 2;b= 2+3 7 => 5 #ahh! nil? >> puts a= 5 + 2;b= 2+3;c= 4+8 7 => 12 # 1 time again no nil. confusion created here why 12 , 7 only, how 5 has been skipped? how puts nil value has been suppressed ? okay, lets test way nil has been gone. >> x=puts a= 5 + 2;b= 2+3;c= 4+8 7 => 12 >> puts x => nil # humm, nil there. why not nil => nil? confusion here 1 time again goes up. nil it? can help me saying actual behaviour of puts in ruby's world? the repl, irb assume, evaluating statement(s) come in , displaying value of lastly statement eval...

jquery - JQM closing multiple select dialog will duplicate browser back button event -

jquery - JQM closing multiple select dialog will duplicate browser back button event - its 3 days i'm trying around pb, searching around web , so. problem: go page 1 page 2, page 3, open in page 3 multiple select , close it. press browser button goes page 2... , page 1 instantly (as if button pressed twice). multiple select has go fullscreen pb occur, explains why sample has many <option> . i isolated pb in 3 html files: page1.html <html> <head> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script> </head> <body> <div data-role="page" id="page1"> <div data-role="content"> page 1 <a...