Archive for September, 2009

YouTube Direct Method Service Unavailable

Posted in APIs on September 30th, 2009 by Saba – 1 Comment

I am running into issues on Uploading and viewing a feed and displaying a site I am receiving Service Unavailable and unable to display the feed.

Below is my code:

Protected Sub TestMe1()

Dim developerkey = “AI39si4SeOiZv1ex3s6mfRLLycYbOBZQB03k29A4nrZ4I3JxUj3jhQdJpAjv5GUJIM_C9j7cF8ep2Zl3wZprpFqmWAx5cEdWbw”

Dim settings As New YouTubeRequestSettings(“example app”, “testapp”, developerkey, “mybeemd”, “Carrieann1″) Dim request1 As New YouTubeRequest(settings)

Dim uri As New Uri(“http://gdata.youtube.com/feeds/api/users/ mybeemd/uploads”) Dim videoFeed As Feed(Of Video) = request1.[Get](Of Video) (uri)

Dim ds As New DataSet() ds = New DataSet

ds.Tables.Add(printVideoFeed(videoFeed))

dlYoutube.DataSource = ds.Tables(0) dlYoutube.DataBind()

End Sub

Private Function printVideoFeed(ByVal feed As Feed(Of Video)) As DataTable Dim strResponse As String = “” Dim strVideoState As String = “”

Dim Table1 As DataTable Table1 = New DataTable(“YouTubeCollection”) ‘creating a table named Customers Dim Row1, Row2, Row3 As DataRow ‘declaring three rows for the table

Dim ImageURL As DataColumn = New DataColumn(“ImageURL”) ‘declaring a column named Name ImageURL.DataType = System.Type.GetType(“System.String”) ’setting the datatype for the column Table1.Columns.Add(ImageURL) ‘adding the column to table Dim strTitle As DataColumn = New DataColumn(“Title”) strTitle.DataType = System.Type.GetType(“System.String”) Table1.Columns.Add(strTitle) Dim ViewCount As DataColumn = New DataColumn(“ViewCount”) ViewCount.DataType = System.Type.GetType(“System.String”) Table1.Columns.Add(ViewCount) Dim strAuthor As DataColumn = New DataColumn(“Author”) strAuthor.DataType = System.Type.GetType(“System.String”) Table1.Columns.Add(strAuthor)

Try

For Each entry As Video In feed.Entries

Dim x As Int32 = 0 If entry.IsDraft = False Then Row1 = Table1.NewRow() For Each thumbnail As MediaThumbnail In entry.Thumbnails If x = 1 Then Row1.Item(“ImageURL”) = thumbnail.Url End If x += 1 Next Row1.Item(“Title”) = entry.Title Row1.Item(“ViewCount”) = entry.ViewCount Row1.Item(“Author”) = entry.Author ’strResponse &= “” & entry.Title & “
” ’strResponse &= “Description ” & entry.Description & “

” ’strResponse &= “View Count ” & entry.ViewCount & “

” ’strResponse &= “Thumbnails:

’strResponse &= “

Else

End If

strVideoState = “”

‘Set Counter x = 0 x = 0

Table1.Rows.Add(Row1)

Row1 = Nothing Next

Catch ex As Exception

Response.Write(ex.Message.ToString & ” Please try again later”)

End Try

Return Table1 End Function

The “testme” function is being called on the page load.

Shift left / Undo manager

Posted in Apple on September 30th, 2009 by Saba – Be the first to comment

I am currently busy re-inventing the wheel in the form a code editor.

I support Shift Left and Shift Right.

I would like to support Undo on Shift Left.

I’m wondering how this should be done as this operation modifies both the selected range(s) and the text.

I searched the archives, the NSTextView header, documentation, looked at some source code.

I am able to support the undo operation for the text changes but the selected range(s) is/are not reverted to the correct value(s).

From what I can see, Xcode (on Tiger) does not handle the selection correctly in this case either (though the result is better than mine)

Any idea?

Moinkhan – CCIE#25591

Posted in Cisco on September 30th, 2009 by Saba – 11 Comments

Just wanted to say I passed!!!!!!!!!!!!!!!! It’s pretty late here and I didn’t sleep whole night more details in the morning.

Thank God..It was not easy studying and fasting in the month of Ramdan.Allahamdulillah I did both and passed my CCIE as well. Very Happy

Bye for now

poor performance when scrolling scaled text view, with small number of characters per line only

Posted in Apple on September 30th, 2009 by Saba – Be the first to comment

I’m seeing very poor performance when programmatically scrolling an NSTextView under certain conditions.

The text view is scaled using [NSView scaleUnitSquareToSize:], and the scroll amounts are fractional (I need to exactly match the appearance of a smaller text view that is also being scrolled).

In most cases, performance is fine, but when the the number of characters is small (e.g. the first line contains a – i, separated by spaces), I see very poor performance when text is just leaving the top, or just entering the bottom of the text view. It’s so noticeable that you can see the text speed up when the characters start to overlap, and then speed up when the interval between lines reaches one of the edges.

When only the top or bottom overlaps, performance is fine, and when the number of characters per line is greater (e.g. a-o), performance is fine too.

Using the CPU Sampler template in Instruments clearly shows the performance slow down – the CPU graph is clearly saw-toothed in the pathological case, and flat and much lower in the non-pathological cases.

In the peaks, most 70% of CPU is spent in CGSScanConvolveAndIntegrateRGB, at the bottom of the following stack trace:

CGSScanConvolveAndIntegrateRGB CGSScanConverterRendermask glyph_path_end CGFontGetGlyphPaths CGFontCreateGlyphBitmaps32 CGFontCreateGlyphBitmaps create_missing_bitmaps CGGlyphLockLockGlyphBitmaps ripc_RenderGlyphs ripc_DrawGlyphs draw_glyphs CGContextShowGlyphsWithAdvances -[NSLayoutManager(NSTextViewSupport) showPackedGlyphs:length:glyphRange:atPoint:font:color:printingAdjustment:]

Can anyone shed any light on this, or how I might avoid it?

What’s weird, is that I only get the problem when the number of characters per line is small …

I need interpretation please on Router interface statistics

Posted in Cisco on September 30th, 2009 by Saba – 1 Comment

Hi,

My 7200 router is displaying some port statistics and i need interpretation on it as follows:

6419136 input errors 6419136 ignored

every other statistics seems to be ok like 0 CRC 0 frame 0overrun 0 watchdog 0 pause input packets 0 output errors 0 collisions 0 late collision 0 pause output 0 giants 0 runts 0 throttles

IKImageView imageCorrection property

Posted in Apple on September 30th, 2009 by Saba – Be the first to comment

Hi all,

Last night I was trying to use the imageCorrection property on an IKImageView, but it wasn’t working for me.

Setting the property to a CIFilter didn’t have any effect. The property remained nil.

Is there something I’m missing?

Thanks,

jon

Mapping agent in auto-rp

Posted in Cisco on September 30th, 2009 by Saba – 3 Comments

Hi All,

I have a question on auto-rp mapping agent.If there are 2 RPs advertising themself as RP for a group,the RP with highest IP address would be choosed as RP for that group(Please correct me if I am wrong) by mapping agent.Similarly is there a mechanism from whom the multicast domain router/switches would hear about the RP from(I mean from which mapping agent).Atleast when I labbed it up,it doesn’t seems have correlation with highest ip address for which mapping agent would be source of information about RP for a group.

Kindly clarify the same.

Thanks for the assistance

Regards Anantha Subramanian Natarajan

October CocoaHeads Mac Developer Meetings

Posted in Apple on September 30th, 2009 by Saba – Be the first to comment

Greetings,

CocoaHeads is an international Mac programmer’s group. Meetings are free and open to the public. We specialize in Cocoa, but everything Mac programming related is welcome.

Australia Sydney- Thursday, October 1, 2009 18:30.

Canada Ottawa/Gatineau- Thursday, October 8, 2009 19:00. Toronto- Tuesday, October 13, 2009 18:30. Victoria- Thursday, October 8, 2009 19:00.

Denmark Aarhus- Tuesday, October 13, 2009 19:00. Copenhagen- Tuesday, October 13, 2009 19:00.

Germany Berlin- Thursday, October 15, 2009 19:00. Stuttgart- Tuesday, October 6, 2009 19:00.

Sweden Malmö- Tuesday, October 13, 2009 19:00.

Switzerland Zürich- Thursday, October 8, 2009 19:00.

United States Ann Arbor- Thursday, October 8, 2009 19:00. Boulder- Tuesday, October 13, 2009 19:00. Colorado Springs- Thursday, October 8, 2009 19:00. Columbia- Tuesday, October 13, 2009 19:00. Dallas- Wednesday, October 7, 2009 19:00. Fayetteville- Thursday, October 8, 2009 18:00. Lake Forest- Wednesday, October 14, 2009 19:00. New York- Thursday, October 8, 2009 18:00. Philadelphia- Thursday, October 15, 2009 19:00. St. Louis- Saturday, October 31, 2009 14:00.

United Kingdom Swindon- Monday, October 5, 2009 20:00.

Some chapters may have yet to post their meeting for next month. Meeting times may change. Locations and more information here: http://cocoaheads.org

Also be sure to check for an NSCoder Night in your area: http://nscodernight.com/

Steve Silicon Valley CocoaHeads_______________________________________________

Error Code 1762

Posted in Apple on September 30th, 2009 by Saba – 1 Comment

I am running a script in a cocoa program with nsapplescript. I am receiving a 1762 error code. When I log the formatted string and then copy it into the script editor it works perfectly.

Running:

try error number -1762 on error errortext number errnum return errortext & ” ” & errnum end try

Gives: “An error of type -1762 has occurred. -1762″

This of course is useless.

Any ideas?

John MacMullin Email:john.macmullin@cox.net Skype: john_macmullin

Snow Leopard Location Manager sample code update

Posted in Apple on September 30th, 2009 by Saba – Be the first to comment

If you’re interested in playing with Core Location and Location Services on a Mac running Snow Leopard, I’ve posted updated sample code and version 1.0.3 of Lucubrator, a free test application, to my Web site at .

The only change is to improve detection of your AirPort card status.

So far, users have reported successfully finding themselves in places like Boston, Massachusetts; Hamburg, Germany; and Sydney, Australia. But failure in Bangkok.