Posts

c# - How can I implement IEnumerator<T>? -

this code not compiling, , it's throwing following error: the type 'testesinterfaces.mycollection' contains definition 'current' but when delete ambiguous method, keeps giving other errors. can help? public class mycollection<t> : ienumerator<t> { private t[] vector = new t[1000]; private int actualindex; public void add(t elemento) { this.vector[vector.length] = elemento; } public bool movenext() { actualindex++; return (vector.length > actualindex); } public void reset() { actualindex = -1; } void idisposable.dispose() { } public object current { { return current; } } public t current { { try { t element = vector[actualindex]; return element; } catch (indexoutofrangeexception e) { ...

sql - Get all rows with a matching field in a different row in the same table -

let's have table this: |id|userid|email |website | -------------------------------------- |1 |user1 |user1@test.com|website.com| |2 |user2 |user2@test.com|website.com| |3 |user3 |user3@test.com|website.com| |4 |user1 |user1@test.com|foo.com | |5 |user2 |user2@test.com|foo.com | and want of rows website='website.com' , have corresponding row matching userid website='foo.com' so, in instance return rows 1 , 2. any ideas? to user can do select userid your_table website in ('website.com', 'foo.com') group userid having count(distinct website) = 2 but if need complete row do select * your_table userid in ( select userid your_table website in ('website.com', 'foo.com') group userid having count(distinct website) = 2 )

wcf - The security protocol cannot secure the outgoing message -

i trying return custom fault exception using unity following error during rst\issue action: [service trace viewer exceptions][1] image: [1]: http://i.stack.imgur.com/oaxgt.png no signature message parts specified messages ' http://tempuri.org/iwcfservicelayer/getfirstorder ' action. the security protocol cannot secure outgoing message requestcontext aborted i using custmbinding resembles wshttpbinding. here manually throw exception in wcf method, in order test behaviour. when comment out throw new exception statement, service works fine , returns expected results. service cannot handle exceptions currently. so why can't service secure outgoing message when exception occurs? edit (bindingconfig): <custombinding> <binding name="myservicebinding" closetimeout="00:05:00" opentimeout="00:05:00" receivetimeout="00:05:00" sendtimeout="00:05:00"> <transactionflow /> ...

c# - Programmatically Assigning Roles to User in MVC 4 via Checkboxes -

i using mvc 4 razor engine , c# code behind logic. customised version of simplemembership database has been built meet requirements of website. the website can create , edit roles , users intended, having problem assigning role user. search results provide code assign particular role user on account creation. our requirements not have this, instead need manually assign them using ui via website. there plenty of tutorials asp.net (example below), finding difficult locate relevant tutorial mvc 4. http://www.asp.net/web-forms/tutorials/security/roles/assigning-roles-to-users-cs after reading above, asking following questions. question one: there mvc tutorial assigning user roles via ui? if so, can provide link tutorial. question two: if not have link tutorial, provide advice on following: when administrator loads user management ui table load list of users, when click edit button particular user following take effect , pass data view called 'edit.cshtml'. pu...

Unable to play video in android -

i want play video in video player unable so. when start application shows list of videos details thumbnail, video url, time, total no of views etc. want play video clicking on thumbnail, when click on thumbnail different event, , video_url must lost in event. how can capture ?

PDF Parsing tables in java with Pdfbox -

i've been looking quite long time answer, haven't found anything. problem in parsing pdf, have page made kind of tables. i've written code via can extract iformation specified rectangle, declaring values in code , not dynamic should. want find information cells , information able string need. in pdfbox api haven't found useful. graceful tips.

sql - One synonym in SSMS isn't showing up in the intellisense. But every other synonym is. -

Image
in following image, can see small section of our synonym list. in intellisense, can't see dbo.syn_mc_asset , see other synonyms. ideas on why occurring?