Posts

Showing posts from August, 2013

php - error control operator not working -

php - error control operator not working - my question similar one. however, error command operator not work me. with next code: $this->fp = @fsockopen($this->ip, $this->port, $errno, $errstr, $this->timeout); i still error message: fsockopen(): unable connect xxx.xxx.xxx.xx:xxxxx (a connection effort failed because connected party did not respond after period of time, or established connection failed because connected host has failed respond. ) is possible can have error command operators disabled? i found problem! i've been using own error handler set_error_handler('my_error_handler'); and prints out errors irregardless if @ has been prefixed or not. fyi - code php manual demonstrates how errors can suppressed within user defined error handler: // if error has been supressed @ if (error_reporting() == 0) { return; } php

shell - Recursively strip pattern from filename? -

shell - Recursively strip pattern from filename? - is there way me utilize find command recursively loop through directory , strip pattern filename? for example, if have: styles.css?c=123456 as saved file, able loop through files , match has wildcard *.css?* , turn styles.css?c=123456 styles.css . try this: find -type f -name '*.css*' -exec echo 'file="{}"; mv ${file} ${file%\?*} ' \; | bash shell sed

iphone - Is there a way to force an object to free memory in Cocoa? -

iphone - Is there a way to force an object to free memory in Cocoa? - i'm working on ios app 2 different view controllers , 3 different views. first view controller has 1 view, menu kind screen. other view controller has 2 views, both of display content heavily (videos, images, sounds, etc.). problem sec view of view controller absolutely has deallocate of it's objects, when dismissed, , it's not. there object class (a custom video player) not beingness deallocated, , that's causing app deed erratically. know not beingness deallocated because of it's objects still live in memory, so, before go through whole code (1500+ lines of code) looking objects might not free when want, there way forcefulness object free it's memory? flush or something? as rough test, phone call dealloc on video player object, free memory. if other object still using it, app crash when object tries send message. when happens, @ stack trace gain more info hanging onto i...

sql server - T-SQL: sorting results by year, month -

sql server - T-SQL: sorting results by year, month - i have next statement: select (datename(mm, somedate) + ' ' + datename(day, somedate)) d, count(someid) ids dbo.sometable datename(mm, somedate) = @month , datename(yyyy, somedate) = @year grouping datename(yyyy, somedate), datename(mm, somedate), datename(dd, somedate); it works sorts result this: july 1, 2011 - 2 july 10, 2011 - 4 july 2, 2011 - 10 how create display july 10 after july 2? know it's simple can't find problem. help! edit: guys, know there must "order by", thought it's quite obvious. "normal" ordering produces same result (see comments). think it's related collation i'm not expert there. you losing info somedate and isn't available order anyway sorting datename isn't want because july after august so, add together more derived columns grouping sort on later utilize datepart gives numbers select ...

tfs2010 - TFS Query - History section - comments added by date -

tfs2010 - TFS Query - History section - comments added by date - how write query in tfs show me users have added comments in history section of work item in past 2 days? team project = @ project , work item type = [any] , history contains my_key_phrase , changed date >= @today - 2 since contains cannot null have add together value history search. my_key_phrase = whatever want set in comments field, standard, identify changes (such "comments" or "cc" or "." etcetera). tfs2010

implementing interfaces during VB to VB.NET class migration -

implementing interfaces during VB to VB.NET class migration - i'm migrating centersnap.cls vb version vb.net , i'm confused next 2 errors after import vb6 project vs 2008. err 1 imports system.runtime.interopservices imports esri.arcgis.esrisystem <system.runtime.interopservices.progid("stackmap.centersnap")> public class centersnap implements esri.arcgis.editor.isnapagent implements esri.arcgis.esrisystem.ipersistvariant ' <<<<error 1 error 1 class 'centersnap' must implement 'readonly property id uid' interface 'esri.arcgis.esrisystem.ipersistvariant'. implementing property must have matching 'readonly' or 'writeonly' specifiers. c:\projects\vb_activex_dll\stackmap\stackmap\centersnap.vb 9 16 stackmap err 2 private readonly property ipersistvariant_id() esri.arcgis.esrisystem.iuid _ implements esri.arcgis.esrisystem.ipersistvariant.id '<<<< error 2 ...

jsf 1.2 - Richfaces and Google Chart API -

jsf 1.2 - Richfaces and Google Chart API - i using google chart api working fine jsf 1.2 , richfaces 3.3.1 when utilize or in same page.. chart api not working (chart image not coming).. can help me out .. in advance ... the next fixed same problem me: <script type="text/javascript"> array.prototype.reduce = undefined; </script> source: http://code.google.com/p/google-visualization-api-issues/issues/detail?id=501 jsf-1.2 google-visualization

Eclipse for PHP Developers needs JRE -

Eclipse for PHP Developers needs JRE - i have downloaded eclipse php development. after execution asks me install java runtime environment, why need it, if want develop php? usual case eclipse distribution php needs jre well? you need because eclipse ide written in java, hence, run it, need java runtime environment. you won't using java straight compile or develop php scripts though... php eclipse java

php - CMS suggestions -

php - CMS suggestions - i pleased script suggested me lastly time asked 1 here sense trying 1 time again :) i looking cms, not settled on language. know php self taught , don't sense messing lot anymore because i've read bit mvc , think way more elegant. also, starting september i'll have java classes, getting know language syntax close java fine (python? ruby?). the hottest , of import thing there website handling of single file uploads. rest pretty basic: members section, lost password page, content rating, comments, subscribing other members' posts, etc. which framework or language should work with? thanks! hy man. i think bridgeo or worpress should site. know worpress in php , bridgeo think it's in ruby i'm not sure. php python ruby content-management-system

Memory limit for external class-loaded Java class -

Memory limit for external class-loaded Java class - i loading external class using class-loader. have custom security manager keeps track of class allowed do. works fine. however, monitor memory requirements of class. in particular, set limit on amount of memory class may use. not able edit class in question. if understand correctly, way invoke separate jvm. how do that? need wrap in process? class need execute not have main method - instantiated 'main' program. thought run program, instantiate external class in question , communicate resulting object (calling selection of methods , passing objects). thanks time. you need write short programme has main, can interact e.g. via socket/rmi/jms input+outputstream phone call library you. java memory jvm classloader

publish - Publishing my first android application in Android market -

publish - Publishing my first android application in Android market - i want publish app in android market. how much time take create android developer business relationship verified google. other things should ? google has extensive guide on steps take things need publish application on market: preparing publish: http://developer.android.com/guide/publishing/preparing.html publishing on android market: http://developer.android.com/guide/publishing/publishing.html after paying developer account, takes less day approved. in experience, when have prepared everything, time takes upload apk , images, , paste description text 10 minutes. after pressing 'publish' takes around 15 minutes app appear on market. android publish google-play

php - Query Isn't Working like others -

php - Query Isn't Working like others - i life of me cannot figure out why not outputting 0 when seek echo it. works on previous query not lastly one. // 1 works , if there no movies above 0 outpus 0 fine $tag_movies_result = mysql_query("select * tags tagname='$n' , film > 0"); $total_times_used_movies = mysql_num_rows($tag_movies_result); // query returns error $tag_shows_result = mysql_query("select * tags tagname='$n' , show > 0"); <-- `show` $total_times_used_shows = mysql_num_rows($tag_shows_result); <-- line 12 // error warning: mysql_num_rows(): supplied argument not valid mysql result resource in /home/a5410474/public_html/tags/tag.php on line 12 this utilize phone call it <li><a href="#shows" rel="shows">shows (<?php echo $total_times_used_shows; ?>)</a></li> demo: http://mydb.host56.com/tags.php?n=the the column name shows needed enclosed in `. top...

python - unit testing gae with login setting in app.yaml -

python - unit testing gae with login setting in app.yaml - i'm unit testing google app engine app uses login setting in app.yaml file. e.g., - url: /profile script: main.py login: required i'm using testbed, nose, nose-gae, , webtest though not sure of matter. my problem login setting app.yaml ignored during testing. if don't have logged in user , call response = self.app.get("/profile") i requested page instead of beingness redirected login page. is there way test login settings app.yaml? not using unit test. tests calling handler directly, doesn't involve dev_appserver , component enforces these restrictions. if want test these restrictions, you'll need end-to-end test invokes dev_appserver , calls on http. python unit-testing google-app-engine nose testbed

mysql - Update a record in SQL but not overwrite....add text at the start -

mysql - Update a record in SQL but not overwrite....add text at the start - please how can update table text? example: have text "said hello" , want create "peter said hello" - want add together word peter... understand? thanks much. try : update table_name set field = concat('peter ',field) condition; mysql sql sql-update

ios - Zxing compiles for device fine, but fails in simulator -

ios - Zxing compiles for device fine, but fails in simulator - i have downloaded latest zxing library via svn, integrated according readme file. able integrate, compile , test on device. however, when compiling in simulator get: missing required architecture i386 in file "_objc_class_$_zxingwidgetcontroller", referenced from: objc-class-ref-to-zxingwidgetcontroller in scannerviewcontroller.o and error: 'avcapturedevice' undeclared (first utilize in function) i have attempted "weak" link (optional in xcode 4) avfoundation library prepare sec error no dice. anyone know why occur? search seems pull opposite problem, failing on device succeeding in simulator. weird. edit: one more thing forgot mention have tried delete build folders , simulator, trying rebuild. same errors occur. after revisiting project update ios5, next solution fixed this. swap out compiler llvm gcc 4.2 zxing.xcodeproj. ios zxing

python - Toggle boolean fields from a Queryset using F objects -

python - Toggle boolean fields from a Queryset using F objects - i've tried these queries these results: queryset.update(done=not f('boolean')) {'time': '0.001', 'sql': u'update "todo_item" set "done" = true'} queryset.update(done=(f('boolean')==false)) {'time': '0.001', 'sql': u'update "todo_item" set "done" = false'} what this: queryset.update(done=f('done')) {'time': '0.002', 'sql': u'update "todo_item" set "done" = "todo_item"."done"'} but set "done" = !"todo_item"."done" to toggle boolean value i developing django-orm extension, , have partially implemented solution problem. >>> django_orm.expressions import f >>> niwi.models import testmodel >>> testmodel.objects.update(done=~f('...

iphone - Detect collision between multiple UIImageViews that are animated with the same name -

iphone - Detect collision between multiple UIImageViews that are animated with the same name - i trying observe collision between falling/animated uiimageview created every sec nstimer. here's code: -(void)newobject{ int randomx = 76+ arc4random() %(290); int randomduration = 2+ arc4random() %(6); int randomimage = 1+ arc4random() %(3) ; newobject = [[uiimageview alloc] initwithframe:cgrectmake(randomx,0,36 ,36)]; uiimage *imag = [uiimage imagenamed:@"ball.png"]; [newobject setimage:imag]; [self.view addsubview:newobject]; numberofobjects += 1; newobject.tag = numberofobjects; [uiview beginanimations:nil context:nil]; [uiview setanimationduration:randomduration]; [uiview setanimationbeginsfromcurrentstate:yes]; [uiview setanimationdelegate:self]; [uiview setanimationdidstopselector:@selector(animationdone:finished:context:)]; newobject.frame = cgrectmake(randomx, 300,newobject.frame.size.wid...

vb.net - RaiseEvent from a UserControl that's placed on a UserControl that's on a Form -

vb.net - RaiseEvent from a UserControl that's placed on a UserControl that's on a Form - i have windows form contains custom command container usercontrol. sake of question, custom command container called dashboard. container called dashboard contains numerous other controls depending on permissions. need raise events contained on these controls through dashboard command , on windows form. how can bubble event? i'm using vb.net project, can convert c# vb.net. also, complicate matters, main windows form vb6 project. so, i'm using interopformstoolkit accomplish this. i figured out. did had said wanted , created event custom eventargs class , bubbled vb6 app. each command needed implement custom event such as: public event onmycustomevent(source object, e mycustomeventargs) and go on raising event vb6. in vb6 event exposed function me handle necessary. vb.net winforms events winforms-interop raiseevent

iphone - Can I implement the input and display for some custom icons by UITextField? -

iphone - Can I implement the input and display for some custom icons by UITextField? - i want implement input , display custom icons such ":)", ":(", "@name", etc. can finish work uitextfield? or there open source library can refered? you hook action of valuechanged text field method scans text, finding range of of smilies etc in text, , if found, replace characters corresponding emoji characters? iphone

objective c - How to convert NSString to C string? -

objective c - How to convert NSString to C string? - i know question possible duplicate, after looking @ google tutorials , questions on forum none of them gives me decent reply subject. i have: nsstring *str = @"text"; and like: char cstring [512] = str; (this shows want do, after looking @ apple's nsstring class ref didn't think using it). up have: char command [512] = [[nsstring stringwithformat:@"text"] cstringusingencoding:nsutf8stringencoding]; still, errors. any solution? try const char *command = [str utf8string]; objective-c

ruby on rails - Including a .text.erb partial in a .html.erb template? (Invoice) -

ruby on rails - Including a .text.erb partial in a .html.erb template? (Invoice) - i'm porting application rails 3. we're e-commerce site , naturally send copies of taxation invoices email. utilize plain text, .text.erb seems logical. we display invoices in area of user profile, within <pre></pre> tags. there way can share partial between plain text mailer templates, , views in html? if seek render "shared/invoice" within html erb template, says partial doesn't exist, , that's because it's .text.erb partial. what options, without duplicating code? i haven't tried in rails 3, in rails 2 specify format of partial. might worth giving go on rails 3. render :partial => "shared/invoice.text.erb" ruby-on-rails partial erb invoice

visual studio 2010 - Best practices for testing a netTcp WCF service at development environment -

visual studio 2010 - Best practices for testing a netTcp WCF service at development environment - i have got nettcp wcf service. service hosted @ iis 7.5 @ production time. but necessary install iis 7.5 @ development machine debug service? i'm not able utilize built-in cassini server or iis express , because both not back upwards nettcp . don't have feeling when installing total web server debugging, want know if there other possibilities. how debug nettcp wcf services? of course of study there several options: install iis 7.5 self-host wcf app , port iis 7.5 later something wcfsvchost.exe ... note wcfsvchost.exe: i can't find such tool in visual web developer express 2010. still possible utilize tool in visual web developer express 2010? if alternative wcfsvchost.exe suggested, nice hear solution problem. what advantages/disadvantages of each alternative in next aspects? how close reality? installation effort security (is installi...

jquery stars rating control -

jquery stars rating control - im trying create functionality described below: ive got 5 images of stars. on server decide image color should displayed in each image. if rating computed on server 3 first 3 stars yello , lastly 2 grey. i accomplish functionality (using jquery). when user hovers star 1 , previous colors changed reddish (image url changed) , next stars have gray color when cursor leaves stars state of 5 stars should before entering. i wrote not , not working to: var stars = { initstars: function initstars() { $('.starsholder').hover(function() { this.star1imageurl = $(this).children('.star').eq(0).attr('src'); this.star2imageurl = $(this).children('.star').eq(1).attr('src'); this.star3imageurl = $(this).children('.star').eq(2).attr('src'); this.star4imageurl = $(this).children('.star').eq(3).attr('src'); this.star5imageurl = ...

php - Regular expression to match time and IRC-Nick -

php - Regular expression to match time and IRC-Nick - i'm not experienced in regular expressions , tried lot match string this: 16:02 &lt;dj_bjarne&gt; with regex, didn't working result. want replaced by <strong>16:02&lt;dj_bjarne&gt;</strong> with regex works in php. give thanks you. $post = "16:02 &lt; dj_bjarne&gt; hello mate!"; preg_replace("/(.*?&gt;)/", "<strong>$1</strong>", $post); php regex irc

xml - XSLT Not Taking When Test Selection -

xml - XSLT Not Taking When Test Selection - i've been working on boss, website displays web-services of ticketing system. web-service spits out xml file based on query. problem is, when seek set conditions output, either error or skips way "otherwise" entry when array containing xml entries each ticket match have in test. i'm new xslt , have i've looked go off of. can @ have , explain why isn't working? know it's test expression. xml (output in array, don't have original xml file) array ( [rowcount] => 3 [haserror] => false [errormessage] => array ( ) [stacktrace] => array ( ) [incidentlist] => array ( [incident] => array ( [0] => array ( [groupname] => external_support [incidentnumber] => 229178 ...

switch statement - Java, questions about switches and cases? -

switch statement - Java, questions about switches and cases? - so want action 60 % of time , action 40% of time. , have doing neither. best way can think through switches , making bunch of cases. illustration below if doesn't create sense ya'll. question is, there improve way? there way case 0-5 action 1 in 1 statement? random rand = new random(50); switch(rand.nextint()) { case 1: { action 1 } break; case 2: { action 1 } break; case 3: { action 1 } break; case 4: { action 1 } break; case 5: { action 1 } break; case 6: { action 1 } break; case 7: { action 2 } break; case 8: { action 2 } ...

iphone - Working with Landscape Views designed with interface builder -

iphone - Working with Landscape Views designed with interface builder - i'm trying understand , googling around, seems bug in iphone sdk, maybe hidden im not sure of. i designed new view in interface builder, in landscape mode. looks this: but when load in 1 of other views, though landscape, content doesnt looks within interface builder, looks this: i found code in google helped sort-of prepare issue, solution isn't perfect , , kind of ugly workaround, code (in viewdidload): class="lang-cpp prettyprint-override"> // first rotate screen: [uiapplication sharedapplication].statusbarorientation = uiinterfaceorientationlandscaperight; // rotate view , re-align it: cgaffinetransform landscapetransform = cgaffinetransformmakerotation( 1.570796327 ); // 90 degrees in radian [self.view settransform:landscapetransform]; this code solves problem, still doesn't xib: i'd love know if of creative minds have improve solution this, , if not, i...

c++ - How do I create child elements using msxml parser? -

c++ - How do I create child elements using msxml parser? - i have users.xml <?xml version="1.0"?> <data> <users> <user name="xyz" email="xyz@xyz.com"> <tasks/> </user> </users> </data> i have got reference users element using next code ixmldomdocumentptr pxmldom; // code load xml dox ixmldomelementptr pxmldocelement = null; ixmldomnodelistptr pxmlusers = null; //gets <data> pxmldocelement = pxmldom->getdocumentelement(); //gets <users> pxmlusers = pxmldocelement->childnodes; now how create kid element user in users element. i have tried using createelement() on pxmlusers , says ixmldomnodelistptr has no fellow member appendchild . i don't know how create new element. thanks. you cannot utilize ixmldomnodelistptr append kid - it's iterating existing children. you can utilize ixmldomelementptr str...

android - How to secure stored data -

android - How to secure stored data - ive been working on multiplayer android game sends locally stored info server every minute. find out locally stored info not secure. encrypt data, how effective be? whole game based on updating server user data. should do? lastly resort have take place on server-side. sorry choppy sentences. you cannot trust client. can't trust info stored on client. you can trust people seek hack game. so, go ahead , server side. android database security storage

objective c - 60 hz NSTimer and autoreleased memory -

objective c - 60 hz NSTimer and autoreleased memory - i have nstimer firing @ 60 fps. updates c++ model , draws via quartz 2d. works except memory accumulates though not allocating anything. instruments reports no leaks many cfrunlooptimers (i guess repeating nstimer ?) seem accumulating. clicking window or pressing key purges of them seem point autorelease pool not beingness drained enough. have rely on events cycle autorelease pool(s) or there improve way clear out memory? any help appreciated, thanks -sam timer creation ( timer ivar): timer = [nstimer scheduledtimerwithtimeinterval:1.0f / 60 target:self selector:@selector(update:) userinfo:nil repeats:yes]; update: method: - (void)update:(nstimer *)timer { controller->update(); [self.view setneedsdisplay:yes]; } update: after messing around little more i've made couple of additional observations. 1.) [self.view setneedsdisplay:yes] seems culprit in spawning these cfrunlooptimers...

DES encryption in Java and PHP -

DES encryption in Java and PHP - i need create class encrypt text , sends php server. php server decode that. but problem that, don't know php can not write code same logic (as used in java) decrypt text, dependent on codes @ internet, unable find code same logic(same in java , php). need des encryption. can provide me links or codes, please? the mcrypt-extension want use. find plenty of examples in documentatin , comments. java php des

can't loop out data from json array? -

can't loop out data from json array? - i can't loop info out response array. $.post(myurl , function(response){ (var = 0; < response.result.length; i++) { alert(response.result[i]); } },"json"); result of returned json array : {"result":["data one","data two","data three"]} did u seek using json.parse obtain info in json object format? always utilize jslint see if json proper, before using json.parse. edit : in head tag add together json2.js. go here , download it. whenever u have json string 1 in question. utilize json.parse(somejsonstring); var t = '{"result":["data one","data two","data three"]}' ; //response text var p = json.parse(t); //p.result[0] give u "data one" json

javascript - all() function not working in Firefox -

javascript - all() function not working in Firefox - in ie below line working . popup div element. popup.all("submenu").innerhtml = ""; but in other browsers below error coming popup.all not function. is there alternative function in other browsers. please suggest me. thanks. try this: var popup=document.getelementbyid('popup'); (i in popup.childnodes) { if (popup.childnodes[i].nodetype == 1) { popup.childnodes[i].innerhtml = ''; } } javascript

jQuery Year, Half Year and Quarter year picker -

jQuery Year, Half Year and Quarter year picker - i'm looking jquery plugin pick year (no months , dates) [i can pretty much utilize regular drop downwards this] half year - 1st half , 2nd half (half yearly) eg. jan -jun, 2010; jul dec, 2010 quarter year - 1st quarter, 2nd quarter, 3rd quarter, 4th quarter eg. jan-mar, 2010; apr-jun, 2010 etc. is there such plugin or how edit regular jquery date-picker accomplish this? yeah, using select boxes choice, think, because simple solutions. then can have html file looking this: index.html: <!doctype html> <html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"> </script> <script src="picker.js"></script> <script> $(function() { $('#year').yearpicker(); $('#halfyear').halfyearpicker(); $('#quar...

python - CTRL-click behavior in wx.ListBox with multiple selections -

python - CTRL-click behavior in wx.ListBox with multiple selections - i have wx.listbox user select if holding downwards ctrl key. - if click on item not selected, selected (without modifying other selections), , if click on selected item, deselected (again without modifying other selections). the code create listbox is: self.mylistbox = wx.listbox(self, -1, choices=self.keys, style = wx.lb_hscroll | wx.lb_multiple | wx.lb_needed_sb | wx.lb_sort) self.bind(wx.evt_listbox, self.onselection, self.mylistbox) problems / questions: is there easy way this? either wx.lb_multiple or wx.lb_extended might want, i've tried both , doesn't appear alter anything. description in documentation little vague - difference between tw...

sql - Error in handling Cursor -

sql - Error in handling Cursor - code: declare c cursor select name [trial].[dbo].[student] declare @name varchar(20) set @name = '' open c fetch c @name close c select @name could 1 help me solving error: msg 207, level 16, state 1, line 1 invalid column name 'name'. your cursor usage, illustration give, pulling (random) row student table. functionally equivalent following: declare @name varchar(20) select @name = select top 1 sname trial.dbo.student if you're using cursor, syntax should more this: declare c cursor select sname trial.dbo.student open c fetch next c @name while @@fetch_status = 0 begin /* work involving @name */ /* fetch next row cursor */ fetch next c @name end close c deallocate c you'll need do work in loop, of course, unless trying pull (random) row pupil table. sql sql-server tsql sql-server-2008

javascript - Same origin policy problem calling sharepoint web service -

javascript - Same origin policy problem calling sharepoint web service - i trying phone call pre-defined web services sharepoint server unable due same origin policy problem , cannot find solution it. tried setting document.domain server name , server port instead throws dom security error 18 same problem previous error. trying phone call getlists method test whether works , code taken tutorial have seen online here. help much appreciated. in advance. my code follow: <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.1.js" type="text/javascript"></script> </head> <body> <div> <script type="text/javascript"> $(document).ready(function () { document.domai...

How visible is a SharePoint Site Collection to users without access? -

How visible is a SharePoint Site Collection to users without access? - i've received request create new "secret" site in our sp farm have restricted set of users, , should exclusively invisible other users of our sp site. ideally, nobody* should have thought site exists. i'm planning on creating site collection, partially won't exist sub-site in other site's site content. also, intend exclude sc search indexing, , of course of study it's permissions restricted. is there other way normal (non admin) user see site collection exists if don't have permission it? the thing can think of if user guessed url. see "not authorized" page , know there. sharepoint sharepoint-2007 moss

jQuery accordion 'stutters' on load, but then behaves pretty normally -

jQuery accordion 'stutters' on load, but then behaves pretty normally - i'm using jquery accordion website (site link). first panel opens on load, , when does, stutters bit, behaves, part, pretty normally. here's <head> portion: <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="css/accordion.css" /> <link rel="stylesheet" type="text/css" href="css/grid.css" /> <link rel="stylesheet" href="css/reset.css" type="text/css" media="all"> <script language="javascript" type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script language="javascript" type="text/javascript" src="js/jquery.msaccordion.js"></script> <title>accordion</title> ...

iphone - Dismissing UIAlertView programatically -

iphone - Dismissing UIAlertView programatically - i have uialertview next delegate method: - (void)alertview:(uialertview *)alertview willdismisswithbuttonindex:(nsinteger)buttonindex { but have problem. in method, logic , perform lines of code take little amount of time. dismiss alertview before of this. want dismiss alert view @ top of method. way, when user taps button on alertview, app doesn't seem frozen sec while next lines of code executed. either utilize delegate method -alertview:diddismisswithbuttonindex: instead—it gets called 1 time alert view’s been removed screen, @ to the lowest degree conceal lag app’s having—or, better, utilize background thread, e.g. -performselectorinbackground:withobject: , handle whatever processing need do. iphone ios ipad uiviewcontroller uialertview

wpf - Windows Application to Windows Service communication/synchronization. What's a best way to do this? -

wpf - Windows Application to Windows Service communication/synchronization. What's a best way to do this? - (i've got wpf windows application) i forcefulness utilize windows service (for it's features) contain business logic , utilize wpf ui. i utilize binding, when value changes on service side should alter in ui right away. what's best way communicate between two, can 2 way? wpf windows windows-services synchronization

c# - Determining when Listbox has finished loading bound elements -

c# - Determining when Listbox has finished loading bound elements - i have listbox bound collection of objects, , works except don't know how phone call code need executed when item in list selected. to clear, have hooked listbox_selectionchanged event when user selects different item - , works fine. when listbox is first shown, though, want phone call same code on first item in list, defaults to. listbox_bounddatafinishloading , or something.. any ideas? you hook itemlist-changed event , select first item after added: public mywindow() { initializecomponent(); ((inotifycollectionchanged)listbox.items).collectionchanged += listbox_collectionchanged; } private void listbox_collectionchanged(object sender, notifycollectionchangedeventargs e) { if (e.action == notifycollectionchangedaction.add && listbox.selecteditem == null) { listbox.selecteditem = e.newitems[0]; } } c# wpf dat...

python - OAuth and the YouTube API -

python - OAuth and the YouTube API - i trying utilize youtube services oauth. have been able obtain request tokens, authorize them , transform them access tokens. now trying utilize tokens requests youtube services. instance trying add together video playlist. hence making post request to https://gdata.youtube.com/feeds/api/playlists/xxxxxxxxxxxx sending body of <?xml version="1.0" encoding="utf-8"?> <entry xmlns="http://www.w3.org/2005/atom" xmlns:yt="http://gdata.youtube.com/schemas/2007"> <id>xxxxxxxxx</id> </entry> and headers gdata-version: 2 content-type: application/atom+xml authorization: oauth oauth_consumer_key="www.xxxxx.xx", oauth_nonce="xxxxxxxxxxxxxxxxxxxxxxxxx", oauth_signature="xxxxxxxxxxxxxxxxxxx", oauth_signature_method="hmac-sha1", ...

How to play flv video in android? -

How to play flv video in android? - i want display flv video in emulator. have work on this? need play video particular url , assets folder. help on topic. you can play flv video using flash plugin within webview. see here. hope help you. edit: these done using action scripts. call action script play flv using action script flv programming also this android

java - Why doesn't Autowiring work for this Spring MVC String bean property? -

java - Why doesn't Autowiring work for this Spring MVC String bean property? - @autowired private string defaultlanguage; when seek @autowire defaultlanguage field of countrybean class follows: <beans:bean id="countrybean" class="geoapp.countrybean"> <beans:property name="defaultlanguage" value="english" /> </beans:bean> i error: error creating bean name 'countrybean': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private java.lang.string geoapp.countrybean.defaultlanguage; nested exception org.springframework.beans.factory.nosuchbeandefinitionexception: no matching bean of type [java.lang.string] found dependency: expected @ to the lowest degree 1 bean qualifies autowire candidate dependency. dependency annotations: {@org.springframework.beans.factory.annotation.autowired(required=true)}: ...

c# - Visual C # process arguments not working -

c# - Visual C # process arguments not working - ok working other day , it's not... don't remember changing anything, can run reg.exe command arguments below cmd , works fine , creates output file. running in vc# not create file test_output.txt??? system.diagnostics.process proc_cmd = new system.diagnostics.process(); proc_cmd.startinfo.filename = @"c:\windows\system32\reg.exe"; proc_cmd.startinfo.arguments = @"query ""hklm\software\test\test software"" /v buildnumber >c:\test\test_output.txt"; proc_cmd.startinfo.createnowindow = true; proc_cmd.startinfo.redirectstandarderror = true; proc_cmd.startinfo.redirectstandardoutput = true; proc_cmd.startinfo.redirectstandardinput = true; proc_cmd.startinfo.useshellexecute = false; proc_cmd.start(); proc_cmd.close(); you should utilize registry class instead. c#

MySQL Query not returning specific search parameters via php script -

MySQL Query not returning specific search parameters via php script - i have php driven page allows me come in search parameters. 1 of these numbers id consists of several digits. when search 1 these specific digits returns results. i have done exact same statement in phpmyadmin , sql terminal , returns item searched for. suppose problem lies php using submit search query based on html form. the drop downwards status options works fine - of fields requires input not. also sure fields submitting database because can view them , finish sql statements them in phpadmin edit echo result when numericidentider entered , default status of selected: select * table closed != ' ' <?php if($_request['search']) { $sql = "select"; if(strlen($_request['numericidentifier']) > 0) { $sql .= " * table numericidentifier = ".$_request['numericidentifier']; } if(strlen($_request['begindate']) > ...

php - modify (simplify) topic title for displaying in url -

php - modify (simplify) topic title for displaying in url - i creating little message board in php , need "simplify" topic title display in url of topic. examples: ceci est united nations sujet d'exemple becomes ceci-est-un-sujet-d-exemple j'ai été à la plage becomes j-ai-ete-a-la-plage i dislike sp&cial character$ becomes i-dislike-spcial-character (if there improve translation, take it) edit 1 : strings must utf-8 encoded edit 2 : learned result of type of operation called "slug" or "friendly url" here's i've done. think i've covered of "common" characters. obviously, it's going missing however. /** * replaces special characters in string "non-special" counterpart. * * useful friendly urls. * * @param string * @return string */ function convertaccentsandspecialtonormal($string) { $table = array( 'À'=>'a', 'Á'=>'a',...

java - Exclude Some URL from getting crawled -

java - Exclude Some URL from getting crawled - i writing crawler , in crawler not want crawl page(exclude link not crawl). wrote exclusions page. wrong code.. http://www.host.com/technology/ url getting called despite writing exclusions.. not want url starts url http://www.host.com/technology/ crawled.. public class mycrawler extends webcrawler { pattern filters = pattern.compile(".*(\\.(css|js|bmp|gif|jpe?g" + "|png|tiff?|mid|mp2|mp3|mp4" + "|wav|avi|mov|mpeg|ram|m4v|pdf" + "|rm|smil|wmv|swf|wma|zip|rar|gz))$"); list<string> exclusions; public mycrawler() { exclusions = new arraylist<string>(); //add here exclusions //i not want url crawled.. exclusions.add("http://www.host.com/technology/"); } public boolean shouldvisit(weburl url) { string href = url.geturl().tolowercase(); system.out.println(href); if (filters.matcher...

Facebook Article Problem -

Facebook Article Problem - ok here think suppose want submit link mates wall, you copy/paste link , facebook generates title, image , description. curently working on http://www.compra.gr when want submit link (http://www.compra.gr) facebook generates characters not recognised. when want submit http://compra.gr/index.php?option=com_content&view=category&layout=blog&id=35&itemid=54 facebook generates title,image , description normally. i know facebook takes info metadata. corrected metadata, nil happened. please help me if has a clue going on. thank in advance. ps site has copyright protection, in order view source code utilize google chrome , @ address bar come in view-source:http://compra.gr/ i know whats problem, site not have open graph tags! check out: https://developers.facebook.com/docs/opengraph/ here's snippet understand, add together site , utilize url linter debug: http://developers.facebook.com/tools/lint/ op...

networking - Command to transmit Data over wlan -

networking - Command to transmit Data over wlan - i doing experiment need collect info wlan driver. i interested in transmitting ieee 802.11b packets more flexibility in terms of info rate, packet size etc. basically, have laptop transmitter , have built custom receiver ieee 802.11b read packets ( ieee 802.11b 1/2/5.5 or 11mbps) . so, looking @ linux tool gives alternative of setting these parameters while transmitting data. i thinking @ commands iwpriv set parameters wireless driver, , iperf commands generate traffic. i not sure, how utilize them accomplish info traffic, 1mbps / , 1024 bytes psdu (packet size). the receiver dedicated hardware ( not computer). suggestion or thought in direction helpful. thanks use wireshark or pcap (via perl,python etc) capture want. networking wifi wireless wlan

php - Websocket port problem because already in use? -

php - Websocket port problem because already in use? - based on expert recommendation of iana, websocket protocol default uses port 80 regular websocket connections. how can create websocket hear port 80 when apache server listening port? i made works when websocket using port 12345 not want open port , iana recommend port 80... not how create works port? idea #1 i have read jabber server can utilize apache redirect call. here illustration this website : <virtualhost *:80> servername yourdomain.com documentroot /var/www adddefaultcharset utf-8 rewriteengine on rewriterule ^/http-bind/ http://jabber.yourdomain.com:5280/http-bind/ [p] </virtualhost> maybe can websocket... thought? you don't. rule, in every os know of, 1 process, 1 port. , makes sense. if have 2 processes listening same port, 1 should handle it? you'll have expose other port on machine. php html5 websocket

javascript - How can I add a style to a child div when hovering the parent? -

javascript - How can I add a style to a child div when hovering the parent? - i have table of venue records , each venue has map icon absolutely positioned on page (using top , left integer fields each record). each venue displayed on index page partial each venues icon plopped on map displayed away main partial. (all partials shown in grid style on 1 side of screen , map icons shown on png map on other side of screen.) venue partial <%= link_to venue %> <div class="venue_partial"> <div class="venue_icon"> <%= image_tag venue.venuetype.icon.url(:thumb), :class => 'image' %> </div> <span class="venue_partial_name"><%= venue.name %></span> <div id="venue_map_icon_<%= venue.id %>" style="position:absolute;" class="mapicon"> <%= image_tag (venue.venuetype.mapicon.mapicon.url(:mapicon)) %></div> </div> ...

python - AppEngine confusion - CGI, WSGI-compliant? -

python - AppEngine confusion - CGI, WSGI-compliant? - i'm confused. if appengine supposed allow running of wsgi-employing apps .. # somewhere in webapp.requesthandler env = dict(os.environ.items()) key, value in env.items(): self.response.out.write(key+': '+value+'<br/>') req_uri = wsgiref.util.request_uri(env) .. why env not contain variables pep 333 lists must-be-present -- causing wsgiref.util.request_uri() raise keyerror ? i'm writing libraries need work either appengine or typical apache + modwsgi setup. thought plenty write wsgi compliant app, seems appengine .. not? the environ must contain wsgi specific keys environ passed wsgi application callable. pep-333 not require value os.environ . cgi applications find many of keys in os.environ , because gateway server has provided them, , cgi wsgi gateway interface (say, wsgiref.handlers.cgihandler ,) need add together wsgi specific keys before calling wsgi application. ...

c# - updating an entity in entity framework -

c# - updating an entity in entity framework - i have entity ( terminalcertification ) has relation other entities. want create user able update terminalcertification i'm not able update related object updated user. update code here: public void updateterminalcertification(terminalcertification terminalcertification) { var lastcertification = db.terminalcertifications.find(terminalcertification.terminalcertificationid); if (lastcertification==null) throw new terminalcertificationnotfoundexception(terminalcertification) db.entry(lastcertification).currentvalues.setvalues(terminalcertification); } i have searched stackoverflow , found below code there not such objectstatemanager in dbcontext class. objectstatemanager statemgr = db.objectstatemanager; objectstateentry stateentry = statemgr.getobjectstateentry(model); stateentry.setmodified(); what should do? you can cast dbcontext iobjectconte...

need help in understanding sprite animation for cocos2d? -

need help in understanding sprite animation for cocos2d? - i using next code sprite animation in cocos2d [[ccspriteframecache sharedspriteframecache] addspriteframeswithfile: @"animbear.plist"]; ccspritebatchnode *spritesheet = [ccspritebatchnode batchnodewithfile:@"animbear.png"]; [self addchild:spritesheet]; nsmutablearray *walkanimframes = [nsmutablearray array]; for(int = 1; <= 8; ++i) { [walkanimframes addobject: [[ccspriteframecache sharedspriteframecache] spriteframebyname: [nsstring stringwithformat:@"bear%d.png", i]]]; } ccanimation *walkanim = [ccanimation animationwithframes:walkanimframes delay:0.1f]; cgsize winsize = [ccdirector shareddirector].winsize; self.bear = [ccsprite spritewithspriteframename:@"bear1.png"]; _bear.position = ccp(winsize.width/2, winsize.height/2); ...

actionscript 3 - Flash AS3 on URLLoader.load POST - getting http status=0 and no data. Works in Flash IDE -

actionscript 3 - Flash AS3 on URLLoader.load POST - getting http status=0 and no data. Works in Flash IDE - i making rest calls urlload.load(urlrquest) . also urlrequest.method = urlrequestmethod.post; urlrequest.contenttype = "application/xml"; when create calls within flash ide, httpstatusevent.status = 400 (or whatever) when error occurs. , ioerrorevent.data contains xml (or string). however, when run swf in browser (firefox mac or pc), httpstatusevent.status = 0 , , ioerrorevent.data empty. (interestingly in safari mac, 400 status, still no data.) any ideas on may occurring? (i need errors!) running swf in firefox generate 0, since firefox not pass status codes flash player, according action script reference. actionscript-3 flash http-status-codes ioerror

Getting the date from PHP's date() function -

Getting the date from PHP's date() function - how can utilize php's date() function next day's date? can current day's date. example, if today july 14, july 15. date('j f', strtotime('+1 day')); php date

Android image handling- Any other better way to do this? -

Android image handling- Any other better way to do this? - i have next code show multiple big images using viewflipper viewflipper = (viewflipper)findviewbyid(r.id.flipper); // mimage = (imageview) findviewbyid(r.id.imageview1); imageview = new imageview(this); i.setscaletype(scaletype.fit_xy); i.setimageresource(mimageids[0]); imageview i2 = new imageview(this); i2.setscaletype(scaletype.fit_xy); i2.setimageresource(mimageids[1]); imageview i3 = new imageview(this); i3.setscaletype(scaletype.fit_xy); i3.setimageresource(mimageids[2]); ....... ....... viewflipper.addview(i); viewflipper.addview(i2); viewflipper.addview(i3); i have 30 images, i'm going create 30 kid views viewflipper. my question is 1.what performance if create 30 views @ time (see above) 2.can cut down code 3.any other right technique? use for-each loop cut down code void addimageview(){ (int imag...

iphone - Memory leak for variables created inside methods -

iphone - Memory leak for variables created inside methods - to me, next code looks create leak -- might wrong though: -(nsstring*) mystring{ nsstring* foo = @"bar"; homecoming foo; } my question is: 1) create memory leak foo not released? 2) if memory leak how avoid it? short answer. code not give leak. long answer: with nsstring not visible leak, because of strings intern , because not phone call alloc/new/copy methods. yes, classic point of memory leak in general. there 2 ways of dealing it. tracing objects returning (or similar) method , releasing them. that's extremely buggy possibility , bad 1 every time. returning autoreleased instance. in fact, did implicitly here. string assignment similar to: nsstring *foo = [nsstring stringwithstring:@"bar"]; and 1 similar to: nsstring *foo = [[[nsstring alloc] initwithstring:@"bar"] autorelease]; so, homecoming object, has retain count 1, autoreleased....

actionscript 3 - as3 flash multiple checkboxes get selected on single click -

actionscript 3 - as3 flash multiple checkboxes get selected on single click - i have datagrid filling mysql successfully.but when click on checkbox , scroll down, found 1 more checkbox selectd. same number of checkboxes selected select manually. illustration if select 10 checkboxes , scroll downwards there 10 more chekboxes selected. unusual :( any help code appreciated much! i used bellow cellrender class checkbox show in datagrid. http://www.actionscript.org/forums/showthread.php3?t=234416 here code. for (varname in returnobj) { var plid = int (returnobj[varname]["plid"]); var varstate = string(returnobj[varname]["state"]); var varcity = string(returnobj[varname]["city"]); arrdp.push({ //arrdp array defined //column value select : plid, state : varstate, city : varcity }); var select:datagridcolumn = dg.addcolumn("select...

3d - Realtime raytracing -- Sult (Loonies, 4k Intro) -

3d - Realtime raytracing -- Sult (Loonies, 4k Intro) - i'd know how effects sult (link: http://www.youtube.com/watch?v=fwmv1ykgzis) achieved. how possible intro realtime raytracing ? it simple reflection cube mapping. in fast moving scenes it's hard find inaccuracies of cube maps instead of raytracing. realtime raytracing in intro not unheared of: there's 64k intro called "heaven 7" http://www.pouet.net/prod.php?which=5 and article developer on technical details: http://www.exceed.hu/h7/subsample.htm 3d raytracing demoscene

java - How do you pipe an OutputStream and InputStream to console? -

java - How do you pipe an OutputStream and InputStream to console? - when running process, how pipe it's output system.out , it's input system.in : process p = runtime.getruntime().exec("cubc.exe"); // p.getoutputstream()) edit: think explained wrong; don't want input program, want user input program, , don't want read output, want user read output. using ioutils class apache commons io: process p = runtime.getruntime().exec("cubc.exe"); ioutils.copy(p.getinputstream(), system.out); java inputstream outputstream

How can I pull a data from any a web site through webrequest in c#? -

How can I pull a data from any a web site through webrequest in c#? - how can pull info web site through webrequest in c#? e.g cost of product in www.xxx.com thanks, i suggest take @ html agility pack. provides lot of functionality parsing web pages. c#

Go back after call Intent.ACTION_VIEW in android -

Go back after call Intent.ACTION_VIEW in android - my app has 3 activity a, b, c. activity calls b. in b, phone call intent.action_view authentication twitter below: public static void doauthen(context context, string callbackurl) throws oauthmessagesignerexception, oauthnotauthorizedexception, oauthexpectationfailedexception, oauthcommunicationexception { httpoauthconsumer = new commonshttpoauthconsumer(context.getstring(r.string.twitter_consumerkey), context .getstring(r.string.twitter_consumersecret)); httpoauthprovider = new defaultoauthprovider("http://twitter.com/oauth/request_token", "http://twitter.com/oauth/access_token", "http://twitter.com/oauth/authorize"); string authurl = httpoauthprovider.retrieverequesttoken(httpoauthconsumer, callbackurl); context.startactivity(new intent(intent.action_view, uri.parse(authurl))); } after authentication, app called @ activity b. here b calls c. if ...

Is there a way to run a debugger on SmartDevice C++ DLL when it runs inside SmartDevice C# application? -

Is there a way to run a debugger on SmartDevice C++ DLL when it runs inside SmartDevice C# application? - i using smartdevice c++ dll smartdevice c# application follows: using system.runtime.interopservices; [dllimport("mycppdll.dll")] private static extern bool foo(); but seems there lot of bugs within dll. strange thing when test dll on visual c++ project, every method within dll works fine. it seems problems when import dll smartdevice c# application. i want run debugger on dll not c# application. but visual studio 2008 not back upwards option. (i think. maybe wrong.) please tell me wrong , can run debugger on dll in situation. c# c++ debugging import smart-device

windows - Disable auto-completion of remote branches in Git Bash? -

windows - Disable auto-completion of remote branches in Git Bash? - i'm working on big git repo couple of one thousand (remote) branches. used using auto-completion (using [tab]) in console (git bash in case), unconsciously git commands, too. e.g. i'd type git checkout task[tab] with effect console stalls minutes. there way limit auto-completion local branches only? you can hack /etc/bash_completion.d/git you'll need edit __git_refs () note alter in behaviour apply every (so git push/pull might not want to). of course, create re-create of function or pass parameter, leave you windows git

tomcat6 - How to set up a icon for a web application in java? -

tomcat6 - How to set up a icon for a web application in java? - i have web application running on tomcat. want setup favicon it. should place in tomcat web application. if place file called favicon.ico in document root ( / ), automatically used. tomcat6 favicon

scripting - Error "The object invoked has disconnected from its clients" - automate IE 8 with python and win32com -

scripting - Error "The object invoked has disconnected from its clients" - automate IE 8 with python and win32com - i automate net explorer 8 (using python 2.7 on windows 7) machine. here code after a post found on so: import sys, time win32com.client import withevents, dispatch import pythoncom import threading stopevent=threading.event() class eventsink(object): def onnavigatecomplete2(self,*args): print "complete",args stopevent.set() def waituntilready(ie): if ie.readystate!=4: while 1: print "waiting" pythoncom.pumpwaitingmessages() stopevent.wait(.2) if stopevent.isset() or ie.readystate==4: stopevent.clear() break; if __name__ == '__main__': time.clock() ie=dispatch('internetexplorer.application',eventsink) ev=withevents(ie,eventsink) ie.visible=true ie.addressbar = true ...

c# - Restricting access to a directory -

c# - Restricting access to a directory - i have subfolder in project. want users roles come in it.. how accomplish while redirecting user login page..this have far in webconfig in subdirectory (i have web.config in virtual directory of project) <?xml version="1.0"?> <configuration> <system.web> <authorization> <deny users="?"/> <allow roles="moderator"/> <deny users="*"/> </authorization> </system.web> </configuration> edited, in root web.config, add together bottom. no need sec web.config then. <location path="subfolder"> <system.web> <authorization> <deny users="?" /> <allow roles="moderator"/> </authorization> </system.web> </location> c# asp.net visual-studio-2010 security

java - Android Performance - 'Avoid Internal Getters/Setters' -

java - Android Performance - 'Avoid Internal Getters/Setters' - just read on dev site: avoid internal getters/setters in native languages c++ it's mutual practice utilize getters (e.g. = getcount()) instead of accessing field straight (i = mcount). first-class habit c++, because compiler can inline access, , if need restrict or debug field access can add together code @ time. on android, bad idea. virtual method calls expensive, much more instance field lookups. it's reasonable follow mutual object-oriented programming practices , have getters , setters in public interface, within class should access fields directly. without jit, direct field access 3x faster invoking trivial getter. jit (where direct field access inexpensive accessing local), direct field access 7x faster invoking trivial getter. true in froyo, improve in future when jit inlines getter methods. so saying utilize field access within class: public class myobject { ...

.net - RtlCompressBuffer API in C# -

.net - RtlCompressBuffer API in C# - i'm trying utilize rtlgetcompressionworkspacesize , rtlcompressbuffer functions in c# project. here have far: class programme { const uint compression_format_lznt1 = 2; const uint compression_engine_maximum = 0x100; [dllimport("ntdll.dll")] static extern uint rtlgetcompressionworkspacesize(uint compressionformat, out uint pneededbuffersize, out uint unknown); [dllimport("ntdll.dll")] static extern uint rtlcompressbuffer(uint compressionformat, byte[] sourcebuffer, uint sourcebufferlength, out byte[] destinationbuffer, uint destinationbufferlength, uint unknown, out uint pdestinationsize, intptr workspacebuffer); static void main(string[] args) { uint dwsize = 0; uint dwret = 0; uint ret = rtlgetcompressionworkspacesize(compression_format_lznt1 | compression_engine_maximum, out dwsize, out dwret); intptr pmem = marshal.allochglobal((int)dws...