Posts

Showing posts from July, 2011

Setting httpPort for Jetty Grails plugin -

i want change httpport default of 8080 jetty grails plugin. cannot set jetty httpport property via system property and/or gradle property. system property: gradle jettyrun -djettyhttpport=9090 gradle property (gradle.properties): jettyhttpport=9090 right have make change gradle build script (like adding configuration task) make work. there jettypluginconventions function sethttpport(int) not know how implement it. http://www.gradle.org/releases/1.0-milestone-3/docs/javadoc/org/gradle/api/plugins/jetty/jettypluginconvention.html#sethttpport(java.lang.integer) http://www.gradle.org/jetty_plugin.html i had same problem, , documentation gradle general , vague. think gradle developers able full potential of great tool :) right way add following gradle build script: jettyrun { httpport = 9000 } it looks cannot set value in command line. there issue that, gradle-1224 , closed "won't fix" because the jetty plugin has been deprecated , schedule

windows phone 7 - Azure, Sync Framework and Access Control Service: Are there obvious shortcomings or problems in using this technologies together? -

i have desktop application uses flat files (some xml , small pictures) data. want data available on other pcs have desktop application installed , usable smartphone client (wp7 @ moment) well. the user should have easy synchronize data. should able use accounts possesses (live-login, googlemail, facebook,...). i thought using azure blob storage save data in azure, sync framework perform actual synchronization , access control service handle authentication. i have not used of technologies before advice great i'm searching foremost errors or shortcomings in strategy don't see yet. approach viable @ all? windows azure virtualized datacentre. elaborate , complicated , pitched @ corporations don't want own server infrastructure or hardware. if understand correctly, want cloud fileserver, not whole lan. windows skydrive fulfils requirement nicely , offers 25gb of storage per member no charge membership. about hotmail , windows live people confuse hotm

sql - trigger writing for different column names in two different tables -

i creating trigger , understand how if columns in 2 different tables have same name. ex, write trigger if new record added in salary column table take salary table , insert salary in table b. what don't understand how do, populate data table b if table has different column name. have table column name salary , table b column name pastsalary. how write trigger able that? i don't see difference between two.. insert statment reflect column want insert into: insert tableb(pastsalary) values (:new.salary);

jquery - How can I make my footer stay at the bottom with a dynamically re-sizable form? -

i have form adds rows in jquery .afer() method (on push of button). footer positioned @ bottom of page when loads, if click button enough times, footer stays was, , overlaps rows. how can make recognize table getting larger, , needs move down? willing , comfortable using solutions involving css or javascript. css .footer { position:absolute; bottom:0px; width:100%; } jquery $(".gameschedule .addevent").bind('click', function () { $(".gameschedule tr:nth-child(2)").after('<tr><td><input type="text"</td><td><input type="text"</td><td><input type="text"</td><td><input type="text"<td><td><input type="text"</td></tr>'); }); html <form name="gameform" class="gameschedule"><!--form games--> <table > <tr> <td colspan="5"

asp.net - What is the intended use case of a RadAjaxManager w/ Ajax requests versus an UpdatePanel/RadAjaxPanel -

i'm confused @ benefits of using radajaxmanager ajax requests versus using , updatepanel/radajaxpanel. have both in solution , creating havoc. design methodologies typically deemed best (a bit subjective realize) should perform data operations using ajax , gui updates using updatepanels/radajaxpanels? currently updating controls via ajax manager triggered ajax request , control postback entirely. if decide via ajax, have make sure nothing ever posts back? check official statement . think mixing ms ajax telerik not idea.

Changing content on a page using javascript via a url string -

i'm designer not js coder great on this. using javascript or jquery how replace content on page via string in url? so if content 'a' normal content via http://www.example.com , if 'a' replaced content 'b' via http://www.example.com/index.html?content=b . example: content a <div id="video-player"> vimeo code </div> to replaced content b <div id="video-player"> youtube code </div> via string in url http://www.example.com/index.html?player=youtube if there no string in url default , show vimeo code edit ok on html page now <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="js/test.js"></script> </head> <body> <div id="video-player"> vimeo </div> </body> </html> and in js page window.location.href.split('?')[1].split('&')[0].spl

iphone - Xcode 4 - "Valid signing identity not found" error on provisioning profiles on a new Macintosh install -

Image
i had macintosh used develop iphone apps using xcode 4. have new macintosh new install of... everything. when opening xcode projects built on old mac, cannot run app on iphone configured development iphone. xcode 4 organizer tells me "valid signing identity not found" on provisioning profiles. i guess .certsigningrequest file had generated before on old mac (i have backup of file), have on new mac? another strange thing, don't see 5 existing provisioning profiles (defined on apple provisioning portal) in organizer, after refresh , after having entered provisioning portal login , password : with xcode 4.2 , later versions, including xcode 4.6, there better way migrate entire developer profile new machine. on existing machine, launch xcode , this: open organizer (shift-command-2). select devices tab. choose developer profile in upper-left corner under library, may under heading library or under heading called teams. choose export near bottom lef

nested - Use python to crawl a website -

so looking dynamic way crawl website , grab links each page. decided experiment beauitfulsoup. 2 questions: how do more dynamically using nested while statements searching links. want links site. don't want continue put nested while loops. toplevellinks = self.getalluniquelinks(baseurl) listoflinks = list(toplevellinks) length = len(listoflinks) count = 0 while(count < length): twolevellinks = self.getalluniquelinks(listoflinks[count]) twolistoflinks = list(twolevellinks) twocount = 0 twolength = len(twolistoflinks) twolinks in twolistoflinks: listoflinks.append(twolinks) count = count + 1 while(twocount < twolength): threelevellinks = self.getalluniquelinks(twolistoflinks[twocount]) threelistoflinks = list(threelevellinks) threelinks in threelistoflinks: listoflinks.append(threelinks) twocount =

How do I create an XAML file from an object graph in Silverlight? -

this code use in .net, system.xaml doesn't exist in silverlight. public static string createxaml(object source) { var reader = new xamlobjectreader(source); var xamlstring = new stringwriter(); var writer = new xamlxmlwriter(xamlstring, reader.schemacontext); while (reader.read()) { writer.writenode(reader); } writer.close(); return xamlstring.tostring(); } well xamlwriter doesn't exist in silverlight. you may want @ blog post creating 1 david poll's xamlwriter the silverlightcontrib project has 1 silverlightcontrib

javascript - AJAX FilteredTextBoxExtender allow carriage return -

i have multi-line text box using ajax filteredtextboxextender limit user input numbers. i'd allow user add new line using enter key. i've searched , haven't found works. know how this? thanks in advance! here's code reference: <asp:textbox id="txteidentrybox" runat="server" cssclass="prettyentrybox" textmode="multiline" height="300px" width="100px"></asp:textbox> <ajaxtoolkit:filteredtextboxextender id="ftbeeid" runat="server" targetcontrolid="txteidentrybox" filtertype="custom" validchars="0123456789"></ajaxtoolkit:filteredtextboxextender> add custom filtertype , add following in code-behind: protected sub filter_identifierfilter_init(byval sender object, byval e system.eventargs) handles filter_identifierfilter.init filter_identifierfilter.validchars = filter_ident

Windows scheduled task to git push to github -

i hope add windows scheduled task git push github every night. have cmd file. when run cmd file on windows command prompt, works fine. when run via windows scheduled task. it's stuck forever. status "running". , log can see started git bash shell. idea? echo git push > i:\gitpush echo 'pushing' >>log1 c:\windows\syswow64\cmd.exe /c ""c:\program files (x86)\git\bin\sh.exe" --login i:\gitpush" >>log1 2>>error echo 'done pushing' >>log1 del i:\gitpush here log output: 'pushing' welcome git (version 1.7.4-preview20110204) run 'git git' display index. run 'git <command>' display specific commands. then did experiment rename gitpush script wrong file name. , exited error "no such file or directory", expected. shows gitpush script passing in correctly bash reason it's stuck. the reason have go through git bash shell because don't know how

c++ - Building my own LPARAM variable -

i want create own lparam pass win32 function getkeynametext(), (the first parameter takes lparam var). this may seem doing things hard way, work around not having specific amounts of information & working @ bit level confusing me why want familiarise myself this. so want put in lparam var is: - set 16-23 bits keyboard scan code: i've got scan code dont know how combine 32bit variable? - set 24th bit extended-key flag (i have no idea how yet alone how combine 32 bit variable) - set 25th bit dont care bit care - set bit 1? so understand way binary & bits work...i think, amazing understand higher lvl concepts polymorphism not lower lvl computer hardware stuff :p so have 32 bit(or byte?) variable, mean have 32 0's & 1's: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx or have variable xxxxxx, eg 100011(which 35), last number 2^0(so 1), 2^1(2), 2^2(4), .... 2^5(32). so create lparam this: dword scancode = 0x??; // dword 32bit var, scan code 7 bits long? bit extfl

Is it possible to find out who created a tag in Git? -

commits have author associated them; possible find out user created tag on git repository? if it's annotated tag, yes. can git show other object. if it's lightweight tag, don't believe so. 1 of reasons why should annotate tags you're going share.

What does "->" mean in php? -

possible duplicate: reference - symbol mean in php? what -> in php? i have understanding of basics of php never understood this. tend see in apps use codeignitor. -> accessing varible inside of class, that $class->variableinclass it can work functions, same syntax above. if you're not familiar oop, i'd suggest looking here

java - Disable Cache in URLClassLoader -

so making server, lot irc, learn more, , here's problem. i have commands each person can call depending on rights, , each "command" has it's own class located in 1 directory. load classes hashmap, , works great if add new commands, if change old one, nothing changes in it. so how can use urlclassloader load classes without caching them? thanks help. this code i'm using classloader loader = new urlclassloader(scripturls); try { for(url u : scripturls) { if(u == null) continue; string filename = u.getfile(); int beginindex = filename.indexof("commands/") + 9; int endindex = filename.indexof(".c"); filename = filename.substring(beginindex, endindex); string name = filename.tolowercase(); class<command> c = (class<command>) loader.loadclass("chat.commands."+filename); i realize it's no

iphone - What is the purpose of %new & %class? -

what %new , %class mean in terms of mobilesubstrate tweaks? instance: %class tpbottomlockbar; and %new(v@:) sorry double question! these both logos constructs. %new adding new methods class @ runtime, , syntax %new(typeencoding) ; can information on objective-c type encodings in apple's objective-c runtime documentation . note first 2 arguments these methods id , sel, second 2 characters of type encoding have " @: ". first character return type, , else set of custom arguments. as example, here pretty un-useful method: %hook nsmutablestring %new(v@:) - (void)appendawesomethings { [self appendstring:@"awesome."]; } %end (this not work nsstring class cluster, serves example no less!) %class deprecated directive forward-declaring class used @ runtime; it's been replaced %c(classname) , used inline. example, [[%c(nsstring) alloc] initwithstring:@"cool."];

c# - Test Driven Development and Unit Tests in .net -

ok, fresh .net developer, did in college, came out of college doing coldfusion work , have switched on new project in mvc3, using tdd, ef, whole 9 yards. i trying wrap head around 1 issue tdd. first off, understand it, tdd more of "design practice" actual way of merely writing unit tests before code? mostly confused how unit testing , tdd coexist. are tdd tests unit tests, or tdd tests way assist in designs , still use unit tests cover code? anyone have thoughts? tdd tests (but not always) unit tests. examples on non-unit tests may ui tests using waitin . simplest way of thinking tdd think of discipline of ensuring many of requirements (both business , technical requirements) possible expressed programatically, can consistently , regularly apply them codebase ensure still meeting req's make changes. in practice, tends result in different (some argue better) patterns in architecture, towards decoupling allow modules tested in isolation. in more

jquery loop links -

i have php-loop generates different results database, output might this: <a href="blablabla">blabla</a> <a href="blablabla">blabla</a> <a href="blablabla">blabla</a> <a href="blablabla">blabla</a> <a href="blablabla">blabla</a> <a href="blablabla">blabla</a> now, know how clicked element #id or .class don't know (and havent found) how clicked link. (i wont show content of it's link in other div. have solution? $("a").click(function(e){ e.preventdefault(); $("targetdivselector").load(this.href); });

Update only div panel on button click in Ruby on Rails -

is there functionality in ror create dynamic panels within ror website? trying accomplish in main page able update panel click of navigation button instead of loading entirely new page. located in pages view here want load new content in dynamicloadingpanel button click in navbutton span in home.html.erb : <span id="navbutton" class="button">content2</span> <div id="dynamicloadingpanel"></div> the page want show in dynamicloadingpanel _categoryone.html.erb file located under pages view folder. thanks help! like other answers said, want use ajax. rails has nice ajax integration jquery now, via jquery_ujs.js file , gem. should start installing gem , running generators readme mentions: https://github.com/rails/jquery-ujs there's 4-5 steps take: in view, add remote link along div receive returned content. create .js.erb file named same controller action, partial .js.erb file renders view, , controller

c# - Onion Architecture -

Image
i setting project structure upcoming internal application trialling onion architecture proposed palermo ( http://jeffreypalermo.com/blog/the-onion-architecture-part-3/ ). i have followed guidelines, need verification on structure of project far. before diagrams, questions: i think references correct (set per diagram arrow means 'has reference to') verification good. what should put in dependency resolution layer? helpers go? has reference other projects? how web services & ui, communicate dal? (through core? how?) what should go where? [broad question know...] the simplified conceptual diagram follows (folders represent namespaces): i think references correct (set per diagram arrow means 'has reference to') verification good. 1 looks ok not sure it's idea insert dependency resolution diagram. what should put in dependency resolution layer? helpers go? has reference other projects? 2 believe dependency injection stuff he

asp.net mvc - How to use subdomain like user.test.com in IIS 7 -

how use subdomain user.test.com in iis 7. suppose have main domain test.com. want when call user.test.com iis use test.com domain. , subdomains may lot of amount. thanks, in advance just create new site/application in iis management console. click on newly created site , in actions/edit site/bindings... bindings dialog opened. there can define subdomain url site. click 'add' , put user.domain.com host name;

Sharepoint event receiver and document library and version is deleted -

i developing sharepoint event receiver project , need fetch event according when version associated file deleted. there event receiver this? none of following events being fired when version associated file deleted. itemdeleted itemupdated itemattachmentdeleted am missing or not supported? this list of eventreceiver methods http://msdn.microsoft.com/en-us/library/ff407299.aspx i'm afraid none of these able provide functionally looking for. try using 1 of synchronous methods i.e itemdeleting

c# - Cannot make nunit test exception to work .Using .net 2.0 -

for whatever reason cannot seem syntax right. how make following test work. have simple method testthrowexception , pass doing wrong here? [testfixture] public class exceptionstests { [test] public void when_calling_my_method_it_should_throw_an_exception() { //this not work person person=new person(); personexception ex = assert.throws<personexception>(delegate { person.throwpersonexception(); }, has.property("message").equalto("test person exception throw")); } } public class person { public void throwexception() { throw new exception("test exception thrown"); } public void throwpersonexception()

ruby on rails - RSpec stopped working after upgrading to OSX Lion -

dyld: library not loaded: /system/library/frameworks/opencl.framework/versions/a/libraries/libclparser.dylib referenced from: /opt/local/bin/identify reason: image not found does have solution? upgrading xcode 4.1 help? your /opt/local/bin/identify imagemagick’s identify . you need rebuild installation of imagemagick. based on pathname ( /opt/local/ ), installed part of macports. you should follow instructions migrating macports install new major os version or cpu architecture : install new xcode, install latest macports base, record installed ports, remove ports, reinstall ports. unfortunately, macports’ bug #30322 indicates imagemagick port may not yet build under lion (found via macports’ lion problems page ).

c# - Idendifying caller number. What is the easiest way? -

i have pc , voip phone. when calls account , answer using voip phone, want phone number stored on pc. what easiest way receive caller number? finding voip java/c# sdk , developing application (just caller number) way or there clever shortcuts? note: familiar softphones displaying callerid there no (reasonble, non hack'ish) way can read softphone. depending on softphone might able configure save calls log. alternatively obtain cdrs (call detail records) voip server. another route go monitor incoming voip tcp connections , extract caller data sniffed packets. or write small program run in background , check periodically active window. if active window softphone, take screenshot , dump folder.

c# - ASP.NET GridView use FindControl() on BoundField to manipulate field -

i'm working old app had hard coded columns different locations, new locations being added decided try , make things populate dynamically. 1 of features of app displaying red text , bolding text when status deemed "bad". executed using "findcontrol()" function cells within selected row templatefields. now i've set use bound field, how go changing text color, size, etc. during databound event? boundfield being added gridview boundfield statusfield = new boundfield(); statusfield.datafield = "exceptionstatuscode"; statusfield.headertext = "status"; statusfield.sortexpression = "exceptionstatuscode"; this.gvview.columns.add(statusfield); databound event gridview protected void gvview_databound(object sender, eventargs e) { foreach (gridviewrow row in this.gvview.rows) { //no longer works, need know how reproduce //what below bound

Python: Convert Unicode-Hex-String to Unicode -

i have hex-string made unicode string function: def tohex(s): res = "" c in s: res += "%02x" % ord(c) #at least 2 hex digits, can more return res hex_str = tohex(u"...") this returns string one: "80547cfb4eba5df15b585728" that's sequence of 6 chinese symbols. u"knödel" converts to "4b6ef664656c" what need function convert original unicode. chinese symbols seem have 2-byte representation while second example has 1-byte representations characters. can't use unichr() each 1- or 2-byte block. i've tried binascii.unhexlify(hex_str) but seems convert byte-by-byte , returns string, not unicode. i've tried binascii.unhexlify(hex_str).decode(...) with different formats. never got original unicode string. thank lot in advance! this seems work fine: binascii.unhexlify(binascii.hexlify(u"knödel".encode('utf-8'))).decode('utf-8') c

Selecting dates next to each other in Mysql -

been trying figure out while now. i looking select rows database table in mysql 2 dates next each other. e.g. 2011-07-20 next 2011-07-21. many thanks neil i guess can join using adddate() : select t1.id, t2.id mytable t1 inner join mytable t2 on t1.date = adddate(t2.date, -1) t1.id < t2.id; the where verify t1 , t2 don't contain duplicates.

webmatrix - How to remove web matrix dependency from web platform installer -

i wonder how remove web matrix dependecy web platform installer. example, saw screencast "how install wordpress wpi" , there fine without installinb web matrix. ide sucks, have visual studio installed, don't want install web matrix components. same happens on installing blogengine.net. has dealed problem? when install applications web application gallery, web platform installer default including webmatrix if on client os (like windows xp, vista, or 7). users able application once installed - assuming don't have visual studio installed. now, if happen not need webmatrix, can change behavior - can click on options link within web platform installer , change "which web server use?" iis instead of webmatrix - prevent chaining in of webmatrix. hope helps!

how to modify this code to stretch the image to full screen in android -

i got code draws images according size of image. want stretch image full screen. tried lot nothing helped. can me? in advance public bitmap getbitmap(int width, int height, int index) { bitmap b = bitmap.createbitmap(width, height, bitmap.config.argb_8888); b.erasecolor(0xf000ffff); canvas c = new canvas(b); drawable d = getresources().getdrawable(mbitmapids[index]); int margin = 1; int border =1 ; rect r = new rect(margin, margin, width - margin, height - margin); int imagewidth = r.width() - (border * 2); int imageheight = imagewidth * d.getintrinsicheight() / d.getintrinsicwidth(); if (imageheight > r.height() - (border * 2)) { imageheight = r.height() - (border * 2); imagewidth = imageheight * d.getintrinsicwidth() / d.getintrinsicheight(); } r.left += ((r.width() - imagewidth) / 2) - border;

c# - Another application architecture question -

i trying ddd , try describe in simple manner have done. core project core project contains entities, vo , domain services. example have user entity , userrelation entity. think know user entity. userrelation contains information how users connected each other follow , connect(bidirectional follow). because of have userdomainservice stateless methods follow(user,user) , connect(user, user). public class user { public string name { get; set; } public string username { get; set; } public void changeusername(stirng newusername) { applyevent(new userusernamechanged(newusername)); } } public class userrelation { ctor(user1, user2, isbidirectional) public user user1 { get; set; } public user user2 { get; set; } public bool isbidirectional { get; set; } } public class userdomainservice { public userrelation follow(user user1, user user2) { return new userrelation(user1,user2,false); } } repository project

visual studio 2008 - CruiseControl.NET automated build version numbers -

this complicated one, hope explain enough. background i'm in process of automating build process cruisecontrol.net , nant. biggest headache i'm encounting version number format , cruisecontrol.net requiring label labeller before running build project. currently developer runs visual studio 2008 produce debug, release , custom build. each of these configurations invoke buildinc (a custom tool) reads file (version.ver) increments read version number, generates .rc2 file executable properties , writes new version version.ver. version.ver , .rc2 change , need checking backing source before developer labels release in source control. label in source control version number i.e. 1.2.3.4 -> 1-2-3-4. currently new automated build triggers cruisecontrol.net project invokes nant script. nant script runs visual studio , publishes builds release directory. works fine, nant script able previous , new version number reading version.ver. problem getting cruisecontrol.net label s

Java - Overloading and Overriding -

01 class subclass extends superclass {} 02 class appsuperclass { 03 /** 04 * @param superclass 05 */ 06 public void print(superclass superclass) { 07 system.out.println("appsuperclass:superclass parameter"); 08 09 } 10 /** 11 * @param subclass 12 */ 13 public void print(subclass subclass) { 14 system.out.println("appsuperclass:subclass parameter"); 15 16 } 17 } 18 19 class appsubclass extends appsuperclass { 20 /** 21 * @param superclass 22 */ 23 public void print(superclass superclass) { 24 system.out.println("appsubclass:superclass parameter"); 25 26 } 27 /** 28 * @param subclass 29 */ 30 public void print(subclass subclass) { 31 system.out.println("appsubclass:subclass parameter"); 32 33 } 34 } 35 public class overloadedtest { 36 public st

google chrome - Chromedriver in Selenium and SSL certificate -

i using selenium test web site has http auth , ssl certificate. as workaround http basic authentification using chromedriver - http://code.google.com/p/selenium/wiki/chromedriver , opening urls in format https://username:password@my-test-site.com but security reasons, client certificate needs installed on pc in order log application. however, chromedriver cannot see "select certificate" prompt , cannot switch alert. did solved issue? instead of installing client certificate tell chrome ignore untrusted certificate error using --ignore-certificate-errors command line switch. to this, create instance of chromedriver follows: desiredcapabilities capabilities = desiredcapabilities.chrome(); capabilities.setcapability("chrome.switches", arrays.aslist("--ignore-certificate-errors")); driver = new chromedriver(capabilities);

linux - My Perl module is found but not being applied -

i have created own perl module. reference file config.pm. when take content perl module , copy config.pm, script triggered appropriately. when include this: use severalnines; kernel::severalnines::config_severalnines($self); it not triggered. sure file found because when try change name of file, errors (premature end of script headers: ). this file (severalnines.pm) want include in config.pm: package kernel::severalnines; sub config_severalnines { $self->{ticketacl}->{'acl-name-typer'} = { properties => {frontend => {action => ['customerticketmessage']}, # current ticket match properties customeruser => { group_rw => [ 'incident management severalnines', ], }, }, possible => { ticket => { type => ['incident',],}, }, }; } 1; the severalnines.pm located in /usr/lib/p

tfs - Why is selenium producing this error? -

i'm using selenium 2.0.3 (from nuget package) browser tests. work fine on local maching. on our tfs build machine i'm getting following error when selenium test run. system.io.fileloadexception : not load file or assembly 'newtonsoft.json, version=3.5.0.0, culture=neutral, publickeytoken=30ad4fe6b2a6aeed' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040) teardown : system.nullreferenceexception : object reference not set instance of object. how ensure assembly loaded. isn't referenced in project required selenium. update i don't know i've done, works now.... it's mystery. sorry can't post solution, don't know was. you need install selenium 2.0.3 , dependencies on build server. thanks m.radwan

html - presenting long lists on screen without javascript -

a user sees form on screen. has fill in field selecting item long list. list may number thousands of items. what ui mechanism have employed deal problem without resorting javascript, ajax or such techniques? if it's thousands of choices , can't use javascript, break multiple pages, user chooses general category, chooses sub-category if appropriate, chooses more manageable list.

asp.net - Nested REST Routing -

simple situation: have server thousands of pictures on it. want create restful business layer allow me add tags (categories) each picture. that's simple. want lists of pictures match single tag. that's simple too. want create method accepts list of tags , return pictures match these tags. that's bit more complex, can still that. problem this, however. say, rest service @ pictures.example.com, want able make following calls: pictures.example.com/image/{id} - should return specific image pictures.example.com/images - should return list of image ids. pictures.example.com/images/{tag} - should return list of image ids tag. pictures.example.com/images/{tag}/{tag} - should return list of image ids these tags. pictures.example.com/images/{tag}/{tag}/{tag} - should return list of image ids these tags. pictures.example.com/images/{tag}/{tag}/{tag}/{tag}/{tag} - should return list of image ids these tags. etcetera... so, how set restful web service projects allow me

iOS >> ShareKit >> Lots of Warnings / Latest Version? -

i'm implementing sharekit in app; i'm using xcode4 , have downloaded sharekit version official site (i think it's official one). everything working fine, many warnings sharekit inner files; things like: 'setfont:' deprecated (declared @ /developer/platforms/iphonesimulator.platform/developer/sdks/iphonesimulator4.3.sdk/system/library/frameworks/uikit.framework/headers/uibutton.h:106) class 'fbxmlhandler' not implement 'nsxmlparserdelegate' protocol etc... can there newer version? sharekit hasn't been updated authors in on year. being said, things have changed since (apis updated, method deprecated, etc.) however, sharekit should still work. if warnings bother (as should), shouldn't difficult fix. if need help, google specific warnings

How Can i get Two column winform listbox in C#? -

Image
i doing student attendance project college in win form mysql(c#). in want move data 1 listbox listbox. done that. load student name in that. client want name , adminno datagridview columns. i search this,. vb has type of coding. see multi column listbox . possible in c#?. see below picture. form.,.. my code loading listbox mysqlconnection connection = new mysqlconnection(myconstring); mysqlcommand command = connection.createcommand(); mysqldatareader reader; command.commandtext = "select name,admin_no student_admision_master course='" + course_code + "' , year='" + year_code + "' , sem='" + semester_code + "' , batch='" + batch_code + "'"; connection.open(); reader = command.executereader(); while (reader.read()) { listbox1.items.add(reader[0].tostring() + "," + reader[1].tostring()); }

java - JAXB: Can't unmarshal JAXBElement<?>, getting ElementNSImpl instead -

related jaxb: how implement jaxb-compatible variant wrapper class? , tried use jaxbelement represent "variant" or "any-type". marshalling went fine, during unmarshalling, jaxb tries assign elementnsimpl jaxbelement field. test code (copy+paste+run) import static java.lang.system.*; import java.io.*; import java.util.*; import javax.xml.bind.*; import javax.xml.bind.annotation.*; import javax.xml.namespace.*; import org.junit.*; public class _jaxbelementproblem { @xmlrootelement @xmltype @xmlaccessortype(xmlaccesstype.none) static class myobject { public static final qname variant_name = new qname("qqq"); @xmlanyelement(lax = true) private jaxbelement<object> single = null; @xmlelementwrapper(name = "elements") @xmlanyelement(lax = true) final list<jaxbelement<object>> elements = new linkedlist<jaxbelement<object>>();

Yii framework - picking up field value from other model -

i have been struggling this, have 2 models , showing data in cgridview 1 model, model contains id's values in different table so, have added 'value'=> 'tblareaoflaw::model()->findbypk($data->typeoflaw)->areaoflaw' which giving error "trying property of non-object" might due reason records doesn't exist in tblareaoflaw. can't check in line through isset? when put static value, work well, like 'value'=> 'tblareaoflaw::model()->findbypk(5)->areaoflaw', could please help thanks lot the error because expression tblareaoflaw::model()->findbypk($data->typeoflaw) returning null . means trying null->areaoflaw won't work (this error message "trying property of non-object" clarifies). my best guess $data->typeoflaw returns non-existing primary key tblareaoflaw model.

Not able to connect https server using SharpSvn in C# , Could not connect to server error -

i developing windows application in vs2010. using sharpsvn connect subversion repository. have tried repository items using svnclient.getlist(targeturi, out list); function. working fine local( file\\: ) repository. when try connect https server, giving error. i have used sample https server given in codespeces. have tried in tortoisesvn connect. saying "could not connect server". , have tried through c# , getting same error. please see below https server url , username , password https://svn.codespaces.com/cw/com_codespaces_api_net username: api_guest password password1 below code have used connect. using (svnclient svnclient = new svnclient()) { svnclient.authentication.defaultcredentials = new system.net.networkcredential("api_guest", "password1"); svntarget targeturi = new svnuritarget(new uri(sourcepath)); var list = new collection<svnlisteventargs>(); svnclient.g

android - How can I catch intents of running or launched apps using Bcast receivers -

i want catch intents of running applications, have tried using action_main doesn't work, other way receive intents of running apps or launched apps ?? basically want receive running app if found. how can catch intents of running or launched apps using bcast receivers there no such broadcasts. any other way receive intents of running apps or launched apps no.

php - Character encoding issues - UTF-8 / Issue while transmitting data on the internet? -

i've got data being sent client side sending this: // $booktitle = "comí habitación bailé" $xml_obj = new domdocument('1.0', 'utf-8'); // node created booktitle , added xml_obj // no htmlentities / other transformations done $returnheader = drupal_http_request($url, $headers = array("content-type: text/xml; charset=utf-8"), $method = 'post', $data = $xml_data, $retry = 3); when receive @ end (via drupal_http_request) , htmlentities on it, following: com&atilde;&shy; habitaci&atilde;&sup3;n bail&atilde;&copy; which when displayed looks gibberish: comí habitación bailé what going wrong? edit 1) <?php $title = "comí habitación bailé"; echo "title=$title\n"; echo 'encoding '.mb_detect_encoding($title); $heutf8 = htmlentities($title, ent_compat, "utf-8"); echo "heutf8=$heutf8\n"; ?> running test script on windows machine , redirectin

c# - system timers timer dispose problem -

i developing 1 chat application on c#,and on use system.timer.timer getting data new request , zone request also. all thing running fine when ever sign out application system timer still running on background , generate error.so dispose system timer when signout. please me this. thanks in advance i immagine tried stop() , close() . if so, solution be: during closing of applicaiton make sleep() couple of seconds main thread let timer's thread release resources allocated before. there bug in application, blocks timer's thread reason, it's difficult me, should check yourself. hope helps. regards.

Jquery and search form problem -

i can't jquery code clear search form when user clicks in search field can tell me i'm doing wrong? jquery $('#text').focus(function () { if ($(this).val() == $(this).attr("title")) { $(this).val(""); } }).blur(function () { if ($(this).val() == "") { $(this).val($(this).attr("title")); } }); $("#searchform").submit(function() { $("#text").each(function() { if($(this).val() == this.title) { $(this).val(""); } }); }); html5 code <header id="header"> <div id="header-con"> <h1> <a href="" title=""><img src="" alt="" /></a> </h1> <nav id="nav"> <ul> <li>a href="" title=""></a></li> <li>a href="" title="

asp.net - Find out client-side ID of HTML element created by .NET? -

how write client-side script access html element when .net has generated element's id @ runtime? at present have in aspx: <asp:content contentplaceholderid="middle_area" runat="server"> <asp:image id="imagebarchart" runat="server" /> </asp:content> <script> var oimage = document.getelementbyid('ctl00_middle_area_imagebarchart') </script> it working @ present, doubt reliable! clientid: documentation you <%= imagebarchart.clientid %> put in javascript

c++ - wrapping a list of structs with boost.python -

i have c++ function returns list of structs. inside struct, there more lists of structs. struct camerainfo { camname name; std::list<camimageformat> limgformats; std::list<camcontrols> lcamcontrols; }; std::list<camerainfo> getcamerainfo() { std::list<camerainfo> lcamerasinfo; // fill lcamerasinfo return lcamerasinfo; } then exporting using: class_<cameranode....> >("cameranode", no_init) ... ... .def("listcamerainfo", make_function(&cameranode::listcamerainfo)) .staticmethod("listcamerainfo") ... ; and ok since using cout print data on screen... use return value , it's content python properties, way: cameras = [] cameras = cameranode.getcamerainfo() print cameras[0].name print cameras[0].limgformats[0] , on... is possible?? should using add_property instead? don't think can create class every struct. design made sense while working on c