Why Is Facebook Worth $50 Billion? Check Out These Charts.
Nice timing from JP Morgan’s Imran Khan: The Internet analyst’s 2011 forecast is out this morning and leads off with the bull case for Facebook–the one Goldman just made with a $500 million bet. Here’s a condensed version, in chart form: Facebook is really, really big. It doesn’t have quite the reach of Google and Yahoo yet. But it’s still growing–fast–getting very close:
How to (fully) integrate WordPress with Facebook
Posted by
jasper22
at
17:51
|
There are a number of Facebook tutorials, including my own offering examples of FBML to add additional functionality to a Facebook fan page.However, on many occasions these tutorials fall short of the mark, with no server side functionality currently available via FBML, connecting to databases, or consuming information from other sources is difficult.Third party services fill the gap, but are often expensive, or cumbersome to implement. One of the most common questions I get asked regarding FBML is how to integrate a WordPress blog, or blog posts on a Facebook fan page tab. This tutorial takes you through the steps of doing just that, with no third party application required. For my own Facebook page, I have opted to offer exclusive content (not available on my main blog) via Facebook. In addition to that, fans and non fans see a different opening tab, giving them incentive to ‘Like’ the page. Here’s what we are going to end up with:1). A tease and reveal tab created via a Facebook application
2). Exclusive content which is only available to Facebook fans
3). Some added spice in the form of Facebook Javascript (FBJS) to cycle the posts elegantly. Here’s what the final result looks like:
2). Exclusive content which is only available to Facebook fans
3). Some added spice in the form of Facebook Javascript (FBJS) to cycle the posts elegantly. Here’s what the final result looks like:
Android Isn’t About Building a Mobile Platform
Posted by
jasper22
at
17:34
|
Google isn’t a web application company—they’re an advertising company. That’s what they do best, and that’s what drives their company. Of Google’s $23.6 billion of revenue in 2009, all but $760 million of it was derived from advertising, and nearly 70 percent of it was from Google’s own websites. Everything Google does must be understood within this context. Google builds services like Google Maps, Gmail and Docs and gives them away for free not because they have a philosophical belief that web applications should be free, but rather because giving them away for free gives them a competitive advantage. Free services, running Google ads, are obviously advantageous because free means more people will use them than if they charged and thus they can realize greater advertising revenues. There’s another reason they don’t charge for their services, though. Since Google’s business is advertising, shifting industries away from paying business models is in their interest. If people are willing to pay for email, mapping and documents, Google’s business model is limited. Thus, using the outsized revenues they make from advertising on search, Google gives away Gmail, Maps, Docs, navigation, translation, et cetera, so no one can compete in those areas—to make free the norm for these services. If Google is giving away a quite good service, it’s hard to compete with them in that area, and so the economics of that business shift away from paid services to advertising-supported. And if a business becomes dependent on advertising for revenue, that’s good for Google, because they’re better at it than everyone else. Google, though, doesn’t just want to run ads. If that’s all they wanted to do, they could strike deals with other companies to provide ads for their services. That, however, is a risky proposition; a competitor could come along and supplant Google as the leading ad-provider, and they would be finished. So, that’s not Google’s strategy. Instead, Google’s strategy is to weaken other companies’ businesses (say, email) by offering something quite good or good enough for free, take over that market, and then use their new dominant position to rake in advertising revenue. Android’s Business Strategy
This helps explain Google’s motivation for Android. Google could, of course, just extend their search advertising to mobile phones, Adsense for mobile devices and build mobile versions of their web applications so anyone can use them. That might make for a fine business, but it’d also be a rather weak position to be in compared to where Google is now. Phone makers could change the default search engine on their phones to something other than Google; mobile devices might change how people find information—they might switch away entirely from using a search engine, and in that case, Google would be dead in the water; or, worse, perhaps mobile devices could move people away from using advertising-supported web applications, and toward primarily using paid-for applications; in that case, Google would really be screwed. Read more: TightWind is written by Kyle Baxter.
This helps explain Google’s motivation for Android. Google could, of course, just extend their search advertising to mobile phones, Adsense for mobile devices and build mobile versions of their web applications so anyone can use them. That might make for a fine business, but it’d also be a rather weak position to be in compared to where Google is now. Phone makers could change the default search engine on their phones to something other than Google; mobile devices might change how people find information—they might switch away entirely from using a search engine, and in that case, Google would be dead in the water; or, worse, perhaps mobile devices could move people away from using advertising-supported web applications, and toward primarily using paid-for applications; in that case, Google would really be screwed. Read more: TightWind is written by Kyle Baxter.
Google already knows its search sucks (and is working to fix it)
Posted by
jasper22
at
17:03
|
It’s a popular notion these days Google has lost its “mojo” due to failed products like Google Wave, Google Buzz, and Google TV. But Google’s core business — Web search — has come under fire recently for being the ultimate in failed tech products. I can only ask: What took so long? I first blogged about Google’s increasingly terrible search results in October 2007. If you search for any topic that is monetizable, such as “iPod Connectivity” or “Futon Filling”, you will see pages and pages of search results selling products and very few that actually answer your query. In contrast, if you search for something that isn’t monetizable, say “bridge construction,” it is like going 10 years back into a search time machine. Search has been increasingly gamed by link and content farms year by year, and users have been frogs slowly getting boiled in water without realizing it. (Bing has similarly bad results, a testament to Microsoft’s quest to copy everything Google.) But here’s what these late-blooming critics miss: Yes, Google’s search results do indeed suck. But Google’s fixing it.The much acclaimed PageRank algorithm, which ranks search results based on the highest number of inbound links, has failed since it’s easy for marketers to overwhelm the number of organic links with a bunch of astroturfed links. Case in point: The Google.com page that describes PageRank is #4 in the Google search results for the term PageRank, below two vendors that are selling search engine marketing. Read more: MediaBeat
11 טיפים ליזם המתחיל
Posted by
jasper22
at
16:44
|
מגיע יזם עם רעיון נהדר, יש פידבק חיובי מהח'ברה ומודל עסקי שנלקח מהאינטרנט שיושב בול על הרעיון. זה כל כך טוב, שתוך שנה מסיום הפיתוח כבר קונים את הוילה של מסודרים. מה שאנשים לא ראו בסדרה, זה את כל מה שקרה לפני שהחבר'ה הגיעו לאקזיט ובכלל באופן כללי, החיים לא תמיד נראים כמו מסודרים.
גם לכם יש רעיון לסטארטאפ? גם אתם רוצים לעשות אקזיט? בואו לשמוע מיזמים שכבר עשו את זה באירוע GeekU שיערך ב-26 בינואר.
אספנו עבור היזם המתחיל 11 טיפים ונקודות שרצוי שכל יזם מתחיל יקח בחשבון לפני שהוא יוצא לדרך.
1. האם אתם מתחברים לתחום שבחרתם? יזמות, ובמיוחד ניהול עסק, זה קשה ומסובך. לקוחות, ספקים, בעיות במוצר – הרבה דאגות והרבה מאמץ והשקעה. יזמות זה לא 9 עד 5. תהיו מוכנים לעבוד 26 שעות ביממה – וזה אומר שיהיו הרבה ויתורים בדרך. אפשר כבר על ההתחלה להגיד שלום לתחביבים וחברים ובהמשך גם ללימודים ולעבודה. אם אתם לא באמת אוהבים את התחום ורק רוצים לעשות כסף – חבל על הזמן שלכם*
2. תמכרו מה שאנשים קונים, לא מה שאתם רוצים למכור. הקומקום שסופר זמן עד שהוא מוכן ואז שופך אוטומטית את המים לכוס זה רעיון מגניב, אבל עלויות הייצור הגבוהות שלו ימנעו מאנשים לקנות אותו. תחשבו על מה הלקוחות באמת צריכים ונסו לעקוב אחר דפוסי הקנייה שלהם.
3. פוקוס אפשר לנסות להשתלט על כל השוק בכל העולם. אבל עדיף להתחיל במומחיות ספציפית במדינה או אזור גיאוגרפי אחד. קשה להשיג לקוחות, וככל שתתמקדו בפתרון הייחודי שאתם מספקים כך יהיה קל יותר להשיג לקוחות.
4. אתם לא הלקוח של עצמכם. אתם בהגדרה מאוהבים במוצר שלכם. לעולם לא תראו את החסרונות שלו. גשו לחבר הכי כנה שלכם והשביעו אותו להגיד לכם את האמת, כל האמת ורק את האמת – ואז תקשיבו למה שיש לו לאמר.
5. סודי ביותר vs ללמוד מהתעשייה. יש יזמים ששומרים על הרעיון עד לדקה ה-90 ויש כאלו שמספרים לכל העולם על מנת לנסות וללמוד כמה שיותר ממומחים בתעשייה אליה הם מכוונים. אין חוק ברור בעניין, אבל אני ממליץ לכם לאסוף כמה שיותר דעות. אם אתם מפחדים על הרעיון השמיטו פרט או שניים שעושים אותכם מיוחדים, אבל תשאפו להיפגש עם כמה שיותר אנשים מהתעשייה אליה אתם מכוונים.
6. בנו את המוצר לפני פגישה עם משקיעים. מוצר מוכן עושה וואו! אבל אם לא ניתן להכין דמו טוב של המוצר, תשקיעו בהצגה ויזואלית אחרת (לא powerpoint) – זה ימשוך יותר תשומת לב לרעיון שלכם. גם כי רואים שהשקעתם זמן וכסף וגם כי יש על מה להסתכל.
Read more: NewsGeek AMBER Alert Partners With Facebook
Posted by
jasper22
at
16:27
|
The AMBER Alert program, credited with the safe recovery of 525 children across the country, has a new ally today: Facebook. Facebook users are able to sign up to receive AMBER Alert bulletins for their state which will be sent to them through the Facebook 'News Feed' feature. An estimated 800,000 children are reported missing every year. AMBER Alert is a voluntary partnership involving law-enforcement agencies and broadcaster's. The new Facebook AMBER Alert pages represent an important expansion of the secondary distribution system and will enable AMBER Alerts to dramatically increase the reach of and impact of these life-saving bulletins. Read more: Slashdot
Reinstalling / Rebuilding COM+ on Windows 2008
Posted by
jasper22
at
13:56
|
Unlike on Windows 2003 it is not possible to Reinstall/Rebuild COM+ on Windows 2008 without effectively reinstalling the operating system. Before undertaking such an extreme step the question of why COM+ needs to be installed should be addressed. A common reason for this is due to the errors shown below:For example:
The COM+ Event System detected a bad return code during its internal processing. HRESULT was 800700e6 from line 45 of d:\longhorn\com\complus\src\events\tier \eventsystemobj.cpp. Please contact Microsoft Product Support Services to report this error.
The COM+ Event System detected a bad return code during its internal processing. HRESULT was 80080005 from line 45 of d:\longhorn\com\complus\src\events\tier1\eventsystemobj.cpp. Please contact Microsoft Product Support Services to report this error
To address this issue without reinstalling the OS, consider reviewing the registry key:
“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EventSystem”
Read more: ChrisForster.com
The COM+ Event System detected a bad return code during its internal processing. HRESULT was 800700e6 from line 45 of d:\longhorn\com\complus\src\events\tier \eventsystemobj.cpp. Please contact Microsoft Product Support Services to report this error.
The COM+ Event System detected a bad return code during its internal processing. HRESULT was 80080005 from line 45 of d:\longhorn\com\complus\src\events\tier1\eventsystemobj.cpp. Please contact Microsoft Product Support Services to report this error
To address this issue without reinstalling the OS, consider reviewing the registry key:
“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EventSystem”
Read more: ChrisForster.com
3D (well actually 2.5D) in HTML5
Posted by
jasper22
at
12:46
|
It’s been released for a little while now, but I just wanted to make sure you hadn’t missed this rather cool HTML5 demo that was developed by the National Museum of China.You’ll need a HTML5 capable browser, I tested Google Chrome, FireFox, Safari and IE9 Beta. All Browsers except Safari were capable of running the site, however, IE9 performs slightly better due to it’s full hardware rending support. Read more: thebeebs
Read more: http://www.visitnmc.com/
Hawkeye - The .Net Runtime Object Editor
Posted by
jasper22
at
12:44
|
Project Description
Debugging a managed Windows application is, most of the time, not an easy task. Thus, any tool that can help will make your life easier.Hawkeye is the only .Net tool that allows you to view, edit, analyze and invoke (almost) any object from a .Net application. Whenever you try to debug, test, change or understand an application, Hawkeye can help. With a unique option to Attach to any running .Net process, Hawkeye offers an impressive set of functionalities seen in no other product.Features
A properties editor like the VS editor that can be used to change the properties of any object or control at runtime. Shows you all the properties that are defined on an object (even if they are not normally visible in the designer). Shows you all the fields of an object organized by the class in the hierarchy that owns that property. Shows all the methods of an object organized by the class and visibility of the method. Shows you all the events defined on an object and all the event listeners registered to listen to a specific event (e.g.: Form_Load). Shows process information including static information about Application, CurrentContext, CurrentThread, CurrentPrincipal, CurrentProcess, and garbage collection. Supports back/forward navigation between the last edited objects, and supports navigation to child items in collections, enumerations or arrays (E.g.: the Controls collection of a Control). Changes that you do to the code can be logged as C# code that can be just Copy&Pasted back into code. How about "Show Source Code"?
Read more: Codeplex
Debugging a managed Windows application is, most of the time, not an easy task. Thus, any tool that can help will make your life easier.Hawkeye is the only .Net tool that allows you to view, edit, analyze and invoke (almost) any object from a .Net application. Whenever you try to debug, test, change or understand an application, Hawkeye can help. With a unique option to Attach to any running .Net process, Hawkeye offers an impressive set of functionalities seen in no other product.Features
- Attach to any .Net Process.
- Hawkeye can be injected in any .NET process allowing you to easily hook and modify other processes.
- You can even hook into Visual Studio and modify some of its (.NET) properties (E.g.: the Properties Editor from VS).
- Since version 1.1.9, Hawkeye has support for 64bit so you can now attach Hawkeye to any x86 or x64 process.
- Provides a simple way to invoke methods on objects and pass arguments on any method (public, private ...).
- You can even Invoke an event listener.
- You just started in a new project and you don't know where to start? Select your element, open Red Gate's .NET Reflector (formerly Lutz Roeder's .NET Reflector) and select Show source code. Hawkeye will immediately ask Reflector to show you the source code of the selected element being it a field, property, event, method or class.
Read more: Codeplex
Средство оценки качества кода в MS Visual Studio
Posted by
jasper22
at
12:41
|
Достаточно часто программистам приходится поддерживать чужой код, очень часто этот код выглядит не самым лучшим образом, и сопровождать его очень сложно. Если это приложение не придется выбросить в скором времени, то естественно его стоит привести в человеческий вид, т.е. отрефакторить. Было бы хорошо иметь какую-нибудь метрику, которая позволила бы оценить качество кода и определить места, которые стоит улучшить. Такая метрика позволила бы оценить, например, то, как программист пишет исходный код или то, насколько качественен код в том приложении, которое Вы собираетесь поддерживать. Microsoft предоставляет встроенное в Visual Studio средство, которое позволяет оценить код вашего проекта.
Получить оценку вашего кода можно нажав правой кнопкой на проекте и выбрав пункт “Calculate Code Metrics” (Эта функциональность доступна в Visual Studio 2008 Team System и Visual Studio 2010 начиная с Premium версии). Описание метрикРезультаты содержат 5 метрик для вашего кода. Maintainability Index – комплексный показатель качества кода. Этот показатель разработан специалистами из Carnegie Mellon Software Engineering Institute. Рассчитывается метрика по следующей формуле: MI = MAX(0, (171 — 5.2 * ln(HV) — 0.23 * CC — 16.2 * ln(LoC)) * 100 / 171)HV – Halstead Volume, вычислительная сложность. Чем больше операторов, тем больше значение этой метрики;
CC – Cyclomatic Complexity. Эта метрика описана ниже;
LoC – количество строк кода.Эта метрика может принимать значения от 0 до 100 и показывает относительную сложность поддержки кода. Чем больше значение этой метрики, тем легче поддерживать код.Visual Studio помечает методы/классы зеленым цветом, если значение метрики находится в пределах от 20 до 100, желтым цветом, если значение находится в пределах от 10 до 20, и красным цветом, когда значение меньше 10.
Read more: Habrahabr.ru
Получить оценку вашего кода можно нажав правой кнопкой на проекте и выбрав пункт “Calculate Code Metrics” (Эта функциональность доступна в Visual Studio 2008 Team System и Visual Studio 2010 начиная с Premium версии). Описание метрикРезультаты содержат 5 метрик для вашего кода. Maintainability Index – комплексный показатель качества кода. Этот показатель разработан специалистами из Carnegie Mellon Software Engineering Institute. Рассчитывается метрика по следующей формуле: MI = MAX(0, (171 — 5.2 * ln(HV) — 0.23 * CC — 16.2 * ln(LoC)) * 100 / 171)HV – Halstead Volume, вычислительная сложность. Чем больше операторов, тем больше значение этой метрики;
CC – Cyclomatic Complexity. Эта метрика описана ниже;
LoC – количество строк кода.Эта метрика может принимать значения от 0 до 100 и показывает относительную сложность поддержки кода. Чем больше значение этой метрики, тем легче поддерживать код.Visual Studio помечает методы/классы зеленым цветом, если значение метрики находится в пределах от 20 до 100, желтым цветом, если значение находится в пределах от 10 до 20, и красным цветом, когда значение меньше 10.
- Cyclomatic Complexity – показывает структурную сложность кода, т.е. количество различных ветвей в коде. Чем больше этот показатель, тем больше тестов должно быть написано, для полного покрытия кода.
- Depth of Inheritance – глубина наследования. Эта метрика показывает для каждого класса, какой он по счету в цепочке наследования. Например, есть 3 класса A, B, C, B унаследован от А, а С унаследован от В, то значение этой метрики для классов A,B и C будет равно соответственно 1, 2 и 3.
- Class Coupling – показывает степень зависимости классов друг с другом. В расчет берутся уникальные классы из параметров, локальных переменных, возвращаемого типа, базового класса, атрибутов (полный список можно найти в MSDN). Хороший дизайн программного обеспечения предполагает небольшое количество связанных классов. Чем их больше, тем сложнее в дальнейшем переиспользовать этот класс, а также поддерживать, т.к. существует очень много зависимостей.
- Lines of Code – показывает количество строк кода. Этот показатель показывает не точное количество строк в вашем файле, т.к. подсчет основан на IL-коде. В расчет не берутся пустые строчки, комментарии, строчки со скобками, объявление типов и пространств имен. Большое количество строк в методе/классе может показывать на ошибки в проектировании и на то, что этот код можно разделить на несколько частей.
Read more: Habrahabr.ru
Want a Job on the Silverlight Team?
Posted by
jasper22
at
12:22
|
The Silverlight team is hiring (all positions are for folks to be in Redmond). Here is one job posting that recently opened as Sr Program Manager (job posting says PM II, but I am told it is really a Sr PM position). And here are some more …Software Development Engineer IISoftware Development Engineer IISoftware Development Engineer, SeniorRead more: JohnPapa.net
Компоненты для отображения PDF для WinForms/WPF
Posted by
jasper22
at
12:18
|
В одном из проектов была потребность отображать PDF (с изображениями, достаточно большие размеры файлов, около 50-100 страниц) на клиентской стороне – десктопное приложение на WPF. Также необходимыми условиями были возможность выделения текста, манипуляции с аннотациями и покупка большого количества лицензий по вменяемой цене, либо вообще с бесплатным дальнейшим распостранением, также желательно, чтобы компонент был обычной библиотекой, не ActiveX, чтобы позволить установку через ClickOnce. Были произведены поиски подходящих решений. Вкратце расскажу о результатах:1) Foxit PDF SDK – ActiveX компонент, либо стандартная DLL библиотека, один из самых быстрых на рынке. По поводу цен и лицензий необходимо связываться напрямую. Их предложения нас не устроило в плане количества лицензий. 2) PDFTron: PDFNet SDK - бибилиотека, отличная производительность, удобная работа с файлом, текстом, аннотациями. Есть вариант покупки одной лицензии, а также договориться по поводу OEM / корпоративной версии. 3) GDPicture – ActiveX, недорогой аналог Foxit с бесплатным дальнейшим распостранением. Но отображение цветов несколько хуже чем в Foxit. Работа с текстом и аннотациями не идеальна.4) http://www.codeproject.com/KB/files/xpdf_csharp.aspx - библиотека, OpenSource решение с использованием Xpdf и muPDF, приемлимое быстродействие, но нету выделения текста, создание аннотаций. 5) http://www.codeproject.com/KB/applications/PDFViewerControl.aspx - библиотека, пример готового решения на основе Ghostscript. Подробности ниже. 6) http://code.google.com/p/gouda/ - .NET обертка для Ghostscript. Есть известные баги с отображением некоторых цветов достаточно давно, но никак не исправляются. Если необходимо отображать отчеты/простые документы без кучи картинок - отличное решение. Read more: <a href="http://devlanfear.com/komponenty-dlya-otobrazheniya-pdf-dlya-winformswpf/
Internet Information Services (IIS) 7.5 Express
Posted by
jasper22
at
12:15
|
IIS 7.5 Express is a simple and self-contained version of IIS 7.5 that is optimized for developers.Read more: MS Download
What is Dalvik, Anyway?
If you have heard much about Google’s mobile operating system, Android, or have been following the recent Oracle lawsuit against Google, you have probably encountered the term “Dalvik”. If Android is “Java based”, what exactly is Dalvik and what does it do? To understand Dalvik, you must first understand that Android is not Java. Android being “Java based” is a great oversimplification that many in the media and tech news have used to avoid getting too deep into the details. However, Android has never claimed that it was 100% compatible with Java. Java syntax is used to create the source code for Android applications. It is then compiled into Java bytecode. For those of you not familiar with Java, bytecode is a type of “virtual” machine code. Java programs are turned into bytecode which is then run on a Java virtual machine (VM). The virtual machine is what allows Java programs to run on diverse platforms. It interprets the bytecode and adjusts for the actual hardware. Android programs take an additional step though. The Java bytecode is converted into Dalvik bytecode. This is because Android does not have a Java virtual machine. Dalvik replaces the Java VM on the Android platform. Dalvik differs from the Java virtual machine in a number of ways. Many of these differences are necessary because mobile phones typically have lower memory and less powerful hardware than the platforms that Java typically runs on. Read more: Learn computer
Uri scheme ‘Http's’ is invalid; expected http when using SSL in WCF
Posted by
jasper22
at
18:01
|
Ok, so I still working on setting up SSL on my WCF endpoints. I thought I had everything working nicely but when I was porting my changes from a test application into my real application I of course screwed a few things up (go figure). When I would try to open the service host I would get the error below. {"The provided URI scheme 'https' is invalid; expected 'http'.\r\nParameter name: context.ListenUriBaseAddress"}This was odd as I knew I was using my SSL binding and everything else looked correct (See Below).
However after looking at the binding for a minute I realized what I had done. When coping over the security info I pasted None in the Mode attribute rather than the clientCredentialType attribute. Once I noticed this i changed it to be like below.
Read more: Derik Whittaker
However after looking at the binding for a minute I realized what I had done. When coping over the security info I pasted None in the Mode attribute rather than the clientCredentialType attribute. Once I noticed this i changed it to be like below.
Read more: Derik Whittaker
Where do my Visual States come from in Blend?
Posted by
jasper22
at
17:59
|
In Silverlight this is fairly straightforward. Here are the Visual States for a CheckBox, as displayed in Blend:
And here is the corresponding code for a CheckBox as provided by Reflector:[TemplateVisualState(Name="MouseOver", GroupName="CommonStates"),
TemplateVisualState(Name="Normal", GroupName="CommonStates"),
TemplateVisualState(Name="Checked", GroupName="CheckStates"),
TemplateVisualState(Name="InvalidFocused", GroupName="ValidationStates"),
TemplateVisualState(Name="Disabled", GroupName="CommonStates"),
TemplateVisualState(Name="Unfocused", GroupName="FocusStates"),
TemplateVisualState(Name="Focused", GroupName="FocusStates"),
TemplateVisualState(Name="Pressed", GroupName="CommonStates"),
TemplateVisualState(Name="Unchecked", GroupName="CheckStates"),
TemplateVisualState(Name="Indeterminate", GroupName="CheckStates"),
TemplateVisualState(Name="Valid", GroupName="ValidationStates"),
TemplateVisualState(Name="InvalidUnfocused", GroupName="ValidationStates")]
public class CheckBox : ToggleButton
{
}
All those TemplateVisualState attributes give Blend the information it needs. It can just enumerate the metadata for the control, and present the UI. How about WPF?Read more: endjin blog
And here is the corresponding code for a CheckBox as provided by Reflector:[TemplateVisualState(Name="MouseOver", GroupName="CommonStates"),
TemplateVisualState(Name="Normal", GroupName="CommonStates"),
TemplateVisualState(Name="Checked", GroupName="CheckStates"),
TemplateVisualState(Name="InvalidFocused", GroupName="ValidationStates"),
TemplateVisualState(Name="Disabled", GroupName="CommonStates"),
TemplateVisualState(Name="Unfocused", GroupName="FocusStates"),
TemplateVisualState(Name="Focused", GroupName="FocusStates"),
TemplateVisualState(Name="Pressed", GroupName="CommonStates"),
TemplateVisualState(Name="Unchecked", GroupName="CheckStates"),
TemplateVisualState(Name="Indeterminate", GroupName="CheckStates"),
TemplateVisualState(Name="Valid", GroupName="ValidationStates"),
TemplateVisualState(Name="InvalidUnfocused", GroupName="ValidationStates")]
public class CheckBox : ToggleButton
{
}
All those TemplateVisualState attributes give Blend the information it needs. It can just enumerate the metadata for the control, and present the UI. How about WPF?Read more: endjin blog
An Animated Custom Panel base class for WPF and Silverlight
Posted by
jasper22
at
17:57
|
If you have used XAML at all, you will have used some of the built in layout panels such as Grid and StackPanel and if you are a developer you have probably developed a custom panel that implements your own layout logic. In case you haven’t, here’s a brief explanation. WPF and Silverlight use a two-pass scheme, where first all elements are measured by calling the panel’s MeasureOverride method. In this method you are supposed to call Measure on all your children and ask them how much space they would like. In the second pass, your ArrangeOverride method is called and the panel then actually performs the layout of its children, usually taking note of the child’s DesiredSize property and then calling Arrange passing the size and position of the children. There is really not much more to a custom panel than the ArrangeOverride and MeasureOverride methods but obviously the custom layout logic can be as complicated as you like. Way back in 2006, Martin Grayson and I published an article showing an animated custom Fish-Eye panel that implemented a layout not dissimilar to Apple’s hyperbar on OSX that grows as you mouse over each element. Obviously we’ve done lots of custom panels since then, but one recurring theme is that really a panel should not modify its children. In the Fish-Eye example, the panel arranged all the children at (0,0) and applied animated transforms to move the children into place. If the child wanted to set its RenderTransform itself, it couldn’t, as the panel would overwrite it. Also creating lots of animations in code seemed a bit wasteful. Another technique was used by a colleague, Stuart Richardson, which is not to use Animations at all, but hook CompositeTarget.Render and call InvalidateArrange on each frame redraw, then recalculate the positions of all the children and arrange them in the right place. This way you are not modifying the children at all, just positioning them. After we had successfully used this technique for many panels, Martin suggested a base class that would handle all the CompositeTarget.Render logic that panels requiring animation could inherit from. So I took the idea and wrote the AnimatedPanel class that this article is about. Read more: MCS UK Solution Development Team
Customize the Debugging Windows : Change Debugging Window View as per your requirements
Posted by
jasper22
at
17:56
|
In this blog post I am going to explain how you can customize the complete view of the debugging window during debugging of application. By complete view means, where you can add own Properties, can customize the result, manipulate the data, hide properties which may not need during debugging etc. In one of my previous blog post, I have explained how we can customize the view of the debugging windows using DebuggerBrowseable and DebuggerDisplay attributes over Few Tips on Customizing Debugging Window View in Visual Studio . But, both these two attributes are limited to customize the view for a specific class and they can only show you the information for the particular class members . In this blog post you will see how we can create new view for some existing debugging view using “DebuggerTypeProxy” attributes. From the below snaps you can understand what kind of customization we can do inside a debugging window.
Read more: Daily .Net Tips
Read more: Daily .Net Tips
Kinect socket server hack brings gesture recognition to Flash, Silverlight, and more
Posted by
jasper22
at
17:18
|
Thanks to the clever work of Blitz, a marketing agency, you will soon be able to easily interface any program to Microsoft Kinect. Rather than having to hack at the low-level C++ OpenKinect driver, Blitz's solution is to create a socket server, which other programs -- including Flash and Silverlight websites -- can then interrogate. The installation process is a bit finickity -- it's a very quick and dirty hack -- but the potential applications are immense. Take a look at the demo video from Blitz (after the break), and then imagine playing all of our Time Wasters with just a few hand gestures... Read more: DownloadSquad
Feature-length film, The Trashmaster, made entirely in Grand Theft Auto IV
Posted by
jasper22
at
15:35
|
If you're familiar with The Sims-style gaming, where actual life, art, and the game can easily blur, this little story may not come as a huge surprise to you. Grand Theft Auto IV player / enthusiast Mathieu Weschler spent two years making The Trashmaster, a feature-length 'film' made entirely in the game, about a garbage man who has another gig on the side. Now, we'll freely admit that we did not watch the entire thing (yet), but from what we have seen, it actually looks fairly engaging! The film is embedded after the break. Read more: Engadget
How Do You Visualize 100 GB of Google Text Data?
Posted by
jasper22
at
15:27
|
There is an amazing series of charts that visualizes trigrams and bigrams, portions of sentences that have been extracted from Google's web data set. The graphs highlight word associations and the frequency with which we use them on web pages. Chris Harrison from Carnegie Mellon University found, for example, that the word 'he' is often tied to 'argues,' while 'she' is found often with 'loves.' There are also word-relation charts that highlight words used in combination with their opposites, such as good and bad, peace and war, and PC and Mac Read more: Slashdot
How Google Speeds Up The Chrome Release Cycle (Slideshow)
Posted by
jasper22
at
15:25
|
Google’s approach to developing its Chrome browser is to release updates early and often. Its goal is to put out a new release every six weeks or so. Updates have become so routine that Google barely even mentions them anymore. Anthony LaForge, the technical program manager at Google overseeing Chrome development, created the presentation below (and posted it on Google Docs) to explain how Chrome’s development cycles work. Instead of a traditional software development cycle where features are crammed into each release or delay the release, Chrome puts out a new release no matter what every six weeks. If new features aren’t ready, they wait for the next release, just like waiting for the next scheduled train at Grand Central. Read more: TechCrunch
Here’s How to Create a Blue Screen of Death in Any Color You Want
Posted by
jasper22
at
14:51
|
Everybody that’s ever used Windows has at least heard of the Blue Screen of Death, even if they have been lucky enough to never encounter one themselves. Here’s how to make a BSOD in any color you want, using a couple of clicks. Note: following the technique in this article WILL crash your PC, every single time, without fail… it’s kinda the point, after all. Isn’t the black and green BSOD a lot more geeky? Keep reading at your own risk. How to Crash Your PC With a Customized “Blue Screen” Color
To accomplish this, we’ll use a little utility created by Windows Expert Mark Russinovich, the same guy that wrote all those SysInternals utilities we love so much. The point of this utility is to illustrate a driver crash, but he’s added a little feature to customize the blue screen color while you’re at it. Simply download the Not My Fault utility from his blog, head into the exe folder and either pick the Release or x64\Release folder, depending on whether you are using 32-bit or 64-bit Windows. Click the BSOD Colors button to customize the colors, and then click the Do Bug button to crash Windows. Read more: How-to-geek
Move Firefox and Chrome's Cache to a RAM Disk for Faster Browsing
Posted by
jasper22
at
11:22
|
We've previously shown you how to move your Firefox cache to system memory, but a dedicated RAM disk might be a better solution for serious browsing speed. The Hack a Day blog points out the how-tos for Mac and Linux. If you've got a solid-state drive (SSD), you'll definitely want to create a RAM disk—a section of system memory that's used like a small hard drive, just faster—rather than your SSD to reduce wear. That previous post covered a Windows method of creating a RAM disk, but there are means for Mac and Linux, too. They're not for those looking to lightly twiddle with some settings—you have to follow step by step, or possibly bring down your browser. But for those willing to tweak, it may be a nice performance boost. Hack a Day points to Esperance DV (CNET link, as the original seems down) for creating a System Preference on a Mac to create a RAM disk, and a batch of Terminal commands at Linux Readers blog for getting the job done on Linux. Read more: Lifehacker
So Google, You’ll Be Dropping Support For Flash Next, Right?
Posted by
jasper22
at
11:21
|
Do you smell that? Just wait a second. You will.Though H.264 plays an important role in video, as our goal is to enable open innovation, support for the codec will be removed and our resources directed towards completely open codec technologies. The bolding is mine, but that’s Google’s actual statement as to why they’re dropping support for the H.264 video codec from the Chromium open source browser (from which Chrome is built).Erick wrote up the main story earlier today, but in my opinion, he didn’t go far enough in calling bullshit on this maneuver. Namely, how on Earth can Google get away with dropping support for one popular codec under the guise of “open” when baked into their browser is Flash, the decidedly un-open plug-in? I’ve talked to Google a number of times about the Chrome/Flash issue over the past year. Namely because the only time Chrome ever fails or has performance issues is due to Flash. And because they bake it in, you have no choice but to live with it or manually disable it (which most users have no idea how to do, obviously). Anyway, Google’s stance is essentially that they bake it in for security and performance purposes. Flash is a huge security risk in web browsers because flaws are not only found often but the patches take a lot time to matriculate to users — if they ever do. That’s because users are forced to install updates. Of course, that’s one big problem with being a plug-in in the first place rather than a standard part of the browser itself. So Google thought they could solve this problem just auto-updating Flash within Chrome. And that’s all well and good. I don’t like getting Flash installed by default because of the performance issues, but I agree that this helps the vulnerability issues. The problem is that Google’s stated stance is now that they’re all about enabling “open innovation” by removing non-open technologies like H.264. That’s fine too. But you can’t be hypocritical, Google. Remove Flash too if that’s your real stance. Read more: Techcrunch
Fatal error led to access the private key can not start SQL Server
Posted by
jasper22
at
11:01
|
And certificates can not start SQL Server related problems may have many causes. Today, one of the cases described. This situation is relatively rare, but also the hidden root causes relatively deep.
Symptoms of SQL Server can not start
SQL Server does not start when the time generally required to check the SQL error log and Windows event log to make judgments on the issue. Sometimes you see in the SQL error log the following error.
2010-06-28 17:40:47.72 server Encryption requested but no valid certificate was found. SQL Server terminating.
2010-06-28 17:40:47.72 server Error: 17826, Severity: 18, State: 1
2010-06-28 17:40:47.72 server Could not set up Net-Library 'SSNETLIB' ..
2010-06-28 17:40:47.72 server Unable to load any netlibs.
2010-06-28 17:40:47.72 server SQL Server could not spawn FRunCM thread. More critical is that you in the Windows Security log in will see the following error.
A fatal error occurred when attempting to access the SSL server credential private key. The error code returned from the cryptographic module is 0x80090022. General Certificate of such problems are due to illegal, or SQL Server can not access the specified certificate made. Cause of the problem
See the above error message, we can clearly see the direct cause of the problem is SQL Server the certificate is detected at startup, but can not access the certificate's private key. Therefore, our first reaction was to check the existence of the private key within the certificate, and whether the SQL Server startup account has full permissions to access the certificate. Check this private key access issues for most is the effect. But unfortunately, it does not solve the problem we are discussing today.
The key issue is that the error code 0x80090022. 0x80090022 means "Provider could not perform the action since the context was acquired as silent". How to understand it? You can think of is the SQL Server can not access the private key of the certificate because the silent mode can not provide the private key password.
The question then like to understand. Certificate of SQL Server when accessing the database engine is the internal access, there is no interface for the user to input something, this is called silent mode.Read more: Microsoft Asia-Pacific database technical support group official blog (Original), (Translated)
Symptoms of SQL Server can not start
SQL Server does not start when the time generally required to check the SQL error log and Windows event log to make judgments on the issue. Sometimes you see in the SQL error log the following error.
2010-06-28 17:40:47.72 server Encryption requested but no valid certificate was found. SQL Server terminating.
2010-06-28 17:40:47.72 server Error: 17826, Severity: 18, State: 1
2010-06-28 17:40:47.72 server Could not set up Net-Library 'SSNETLIB' ..
2010-06-28 17:40:47.72 server Unable to load any netlibs.
2010-06-28 17:40:47.72 server SQL Server could not spawn FRunCM thread. More critical is that you in the Windows Security log in will see the following error.
A fatal error occurred when attempting to access the SSL server credential private key. The error code returned from the cryptographic module is 0x80090022. General Certificate of such problems are due to illegal, or SQL Server can not access the specified certificate made. Cause of the problem
See the above error message, we can clearly see the direct cause of the problem is SQL Server the certificate is detected at startup, but can not access the certificate's private key. Therefore, our first reaction was to check the existence of the private key within the certificate, and whether the SQL Server startup account has full permissions to access the certificate. Check this private key access issues for most is the effect. But unfortunately, it does not solve the problem we are discussing today.
The key issue is that the error code 0x80090022. 0x80090022 means "Provider could not perform the action since the context was acquired as silent". How to understand it? You can think of is the SQL Server can not access the private key of the certificate because the silent mode can not provide the private key password.
The question then like to understand. Certificate of SQL Server when accessing the database engine is the internal access, there is no interface for the user to input something, this is called silent mode.Read more: Microsoft Asia-Pacific database technical support group official blog (Original), (Translated)
AssemblyFileVersionAttribute and AssemblyVersionAttribute: A subtle difference
Posted by
jasper22
at
10:58
|
In Visual Studio 2008 (and possibly other versions) when you create a C# project in many cases the wizard also creates the AssemblyInfo.cs file for you. That's quite handy but it can also come with a surprise caused by a subtle difference. Usually both the AssemblyFileVersionAttribute and the AssemblyVersionAttribute are created for you. The generated code looks as follows: // Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]The issue that you may run in is that when you read the comment and infer that it applies to both AssemblyVersion and AssemblyFileVersion. That is not the case! AssemblyVersion can deal with wild cards as the generated comment suggests. For AssemblyFileVersion "wild cards are not supported". There is a solution however. If you simply remove the AssemblyFileVersion, the version will be picked up from AssemblyVersion. as the Win 32 file version. Read more: Manni on DotNet
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]The issue that you may run in is that when you read the comment and infer that it applies to both AssemblyVersion and AssemblyFileVersion. That is not the case! AssemblyVersion can deal with wild cards as the generated comment suggests. For AssemblyFileVersion "wild cards are not supported". There is a solution however. If you simply remove the AssemblyFileVersion, the version will be picked up from AssemblyVersion. as the Win 32 file version. Read more: Manni on DotNet
Secret Project
Posted by
jasper22
at
10:57
|
Well I said I would reveal the secret project I've been working on. 99% of people won't be interested, but if you're a .NET developer you probably will be very interested. Especially if you do a lot of UI work. I actually came up with this idea 6 years ago and wrote a fairly successful codeproject article on it, but then I abandoned it. I've since started a new job, and wished I had this tool, so built it.Enter Event Spy - Event spy is a development/debugging tool that subscribes to all events a .NET object can raise, it then records when events are raised on the object, and allows you to explore the value of any event arguments. Event spy works on any event of any object, no matter what the event handler type is. It does this by using a combination of runtime code generation through CodeDOM and Reflection.Emit to compile handlers on the fly. Usage is pretty simple, just add Event Spy as a reference, then call:var spy = new EventSpy();
spy.Register(o);where o is any object. Event spy will then start listening to all events the object exposes, and will pop up a window that shows these events in real time. You can even register more than 1 object at once with event spy. The reasoning behind event spy is that when you're faced with using a new control or API library it's a massive pain to trawl through documentation to work out what events are available, when they are raised and what gets passed to the handler. With this you can simply register the control or object, and play about with it to work all this out. Read more: Martin's Blog
spy.Register(o);where o is any object. Event spy will then start listening to all events the object exposes, and will pop up a window that shows these events in real time. You can even register more than 1 object at once with event spy. The reasoning behind event spy is that when you're faced with using a new control or API library it's a massive pain to trawl through documentation to work out what events are available, when they are raised and what gets passed to the handler. With this you can simply register the control or object, and play about with it to work all this out. Read more: Martin's Blog
Profiling of C++-Applications in Visual Studio for free
Posted by
jasper22
at
10:55
|
IntroductionWhile the Team- or Premium-editions of Visual Studio contain a profiler, users of e.g. the professional edition are lacking such a feature. In this article, I present a method for profiling C++-applications with freely available tools and a simple application for presenting the results in an informative view. Of course the resulting solution will not be as comfortable as an integrated profiler, but if you use profiling only when you find bottlenecks, this method is certainly sufficient - and €5.000 cheaper.The following method was tested with Visual Studio 2008 Professional and Visual C++ 2010 Express. The MethodThe method consists of four steps
Generate a special "/PROFILE" build using Visual Studio (all editions can do this)
Profile the freshly compiled application with the freely available MS tool "VSPerfCmd"
Convert the resulting .vsp-file to .csv-files using "VSPerfReport"
Analyze the resulting - huge - csv-files with the attached Profile Result Viewer.
Generate a /PROFILE-buildNote: the following steps should of course be done with a release build and with debugging symbols enabled. In Visual Studio 2008, go to the solution explorer, select the project and open the properties page.
In the section "Configuration Properties" choose "Linker" - "Advanced".
Set "Profile" to "Enable Profiling information (/PROFILE)" (the exact steps for other versions of Visual Studio might differ).
Generate a special "/PROFILE" build using Visual Studio (all editions can do this)
Profile the freshly compiled application with the freely available MS tool "VSPerfCmd"
Convert the resulting .vsp-file to .csv-files using "VSPerfReport"
Analyze the resulting - huge - csv-files with the attached Profile Result Viewer.
Generate a /PROFILE-buildNote: the following steps should of course be done with a release build and with debugging symbols enabled. In Visual Studio 2008, go to the solution explorer, select the project and open the properties page.
In the section "Configuration Properties" choose "Linker" - "Advanced".
Set "Profile" to "Enable Profiling information (/PROFILE)" (the exact steps for other versions of Visual Studio might differ).
WPF: XmlDataProvider Two-Way Data Binding - Enhanced
Posted by
jasper22
at
10:54
|
IntroductionIn my previous article WPF: XmlDataProvider Two-Way Data Binding, I discussed how the XmlDataProvider does not natively support two-way binding and provided a simple work-a-round to address the issue. The binding in the previous article only demonstrated read and update operations. In response to several reader comments inquiring about insert and delete operations, I have updated the demo code and provided this brief article. BackgroundThe application in my previous article was developed with Visual Studio 2008 and targeted the 3.5 version of the .NET framework. The downloadable project above for this article was upgraded to Visual Studio 2010. Using the codeYou will notice from the screenshot below that I have added two new buttons to the form for the purpose of inserting and deleting records. Each button has a corresponding event handler to persist the changes to the source XML file. Read more: Codeproject
How to Identify Bad Queries in MySQL
Posted by
jasper22
at
10:43
|
Finding bad queries is a big part of optimization. A scientific optimization process can be simplified to “can anything be improved for less than it costs not to improve it? – if not, we’re done.” In databases, we care most about the work the database is doing. That is, queries. There are other things we care about, but not as much as queries. The key here is that the question “can anything be improved” requires a process for identifying queries that can be improved. The easiest way to do that is to look for things that indicate sub-optimality. All of the above might seem to be obvious, but I wanted to frame the rest of this post with a logical starting point. Next let’s see what kinds of things about queries might indicate that they aren’t optimal.
A responsible approach to a task such as finding bad queries begins with a definition of badness that we can be pretty sure is complete. I am interested in knowing whether I’m missing anything, but I believe the definition of badness in this article is fairly complete. (Post comments if I’m wrong.) Here is my definition:
A responsible approach to a task such as finding bad queries begins with a definition of badness that we can be pretty sure is complete. I am interested in knowing whether I’m missing anything, but I believe the definition of badness in this article is fairly complete. (Post comments if I’m wrong.) Here is my definition:
- Queries are bad either singly (an individual query is bad) or in aggregate (a group or class of queries is bad). I think this is a complete definition because the only other kind of number besides “one” and “many” is “zero”, and a nonexistent query can’t be bad.
- Queries, or groups of queries, are bad because
- they are slow and provide a bad user experience, or
- they add too much load to the system, or
- they block other queries from running
- It finds queries (or groups of queries) that are slow and provide a bad user experience by the parameters to the –outliers option. If a query is slower than X more than N times, it’s bad. You can look at factors such as the variance-to-mean ratio, the Apdex score, and the explain sparkline to see whether the query is likely to be possible to optimize.
This last three-part definition is where I can’t be sure that I’ve got a complete definition.Now, given the definition above, how do we find these queries in some input such as a log of queries? It shouldn’t surprise you that there is a working implementation of most of this in a tool, Maatkit’s mk-query-digest. Here’s how:
Read more: MySQL Performance Blog
Read more: MySQL Performance Blog
Wonders of shell command
Posted by
jasper22
at
10:41
|
It is often said that there is never any justification for things being complex when they could be simple. Most of the time we spend a lot of effort trying to a complete a task which in fact can be accomplished by a single stroke in the command line. For instance, to remove all the empty files in a graphical environment, you have to go through the search options, select the files and finally delete them. Whilst if you working on a terminal the same task can be done via a single command. Generally when we talk about command line, we start relating command-line stuff with geek stuffs which is not true. All I am saying is that, it is worth trying to learn a few commands if it saves your time and reduces complexities. So, if you go through this article, you will eventually appreciate the wonders of the shell commands.1. Extract specific field from a colon delimited file and save it to another file# cut -d: -f 2,5 sourcefile.txt > targetfile.txt This is really useful when the source file has hundreds of lines.2. Sort a file in ascending order removing duplicate entries and save the result to a file# sort -u -o target.txt sourcefile.txt 3. Sort specific field from a colon delimited file removing duplicate entries and save the result to a file# sort -t: -u -k 2 -o target.txt sourcefile.txt ( to sort in descending order use -r option )4. Display the largest file (in size) of the current directory. # du -s * | sort -nr | head -1or# ls -al | sort -nr -k5 | head -1( to display top 5 largest files in size, use: head -5 )5. Combine two files and save the result in a fileRead more: Fortystones
Embedding a Sound File in Windows Phone 7 app (Silverlight)
Posted by
jasper22
at
10:40
|
Normally, I wouldn’t blog something that seems obvious, but it took me hours to figure this out and I always try to write blog posts for stuff that it took me a long time to figure out. Enormous props to Walt Ritscher (Twitter: @walktritscher) who helped me figure this out. This blog post is for you if you have a sound file and you want it to:be included with the application when the user downloads the app
play no matter what… even if the user is listening to music
First, grab the audio you want to add to the application and, if it’s not already a .wav file, make it so. If you’re just trying this out for kicks (or for the learning experience), download this files. Coyote.wavWhen prepping your audio, keep in mind if you want the user to hear it over their music. If so, make sure it is LOUD. I spent almost an hour thinking this method didn’t work because I couldn’t hear the sound over my music. Next, create a directory in your Windows Phone 7 project and add your audio file like so:
play no matter what… even if the user is listening to music
First, grab the audio you want to add to the application and, if it’s not already a .wav file, make it so. If you’re just trying this out for kicks (or for the learning experience), download this files. Coyote.wavWhen prepping your audio, keep in mind if you want the user to hear it over their music. If so, make sure it is LOUD. I spent almost an hour thinking this method didn’t work because I couldn’t hear the sound over my music. Next, create a directory in your Windows Phone 7 project and add your audio file like so:
Issues Debugging Managed Code in WinDbg with SOS and PSSCOR2 (e.g. "Failed to request ThreadStore")
Posted by
jasper22
at
10:39
|
Yesterday I found myself back in "WinDbg-land" after a long, long time (since 99% of my debugging is performed in development environments using Visual Studio).However, I couldn't get the managed code debugging to work in WinDbg. I initially tried SOS and later PSSCOR2, but they both refused to produce anything even remotely helpful. For example, when I ran the "!threads" command, WinDbg simply reported the following:Failed to request ThreadStore
Similarly, when I ran "!eeheap", the following message was displayed: Unable to get system domain info
I have to admit, I was completely stumped. My initial research on the "Failed to request ThreadStore" error suggested that this problem occurs when the symbols are not loaded. However, even after purging my local symbol cache and downloading fresh copies from http://msdl.microsoft.com/download/symbols, I still got the same errors. Consequently I sent an email out last night to one of the debugging groups. Fortunately, I didn't have to wait very long for a response.This morning, Sukesh Ashok Kumar, a Support Escalation Engineer in the PSS group, told me to check a few things:
Similarly, when I ran "!eeheap", the following message was displayed: Unable to get system domain info
I have to admit, I was completely stumped. My initial research on the "Failed to request ThreadStore" error suggested that this problem occurs when the symbols are not loaded. However, even after purging my local symbol cache and downloading fresh copies from http://msdl.microsoft.com/download/symbols, I still got the same errors. Consequently I sent an email out last night to one of the debugging groups. Fortunately, I didn't have to wait very long for a response.This morning, Sukesh Ashok Kumar, a Support Escalation Engineer in the PSS group, told me to check a few things:
- Use "lm v m mscorwks" and see if the symbols are loaded
- Use .cordll and see if the right mscordacwks is loaded
- Use correct architecture of extension sos/psscor2
As I mentioned before, I purged my symbol cache yesterday and downloaded fresh copies from the Microsoft public symbol server, so the first suggestion didn't seem to be the problem. However, I ran "ld mscorwks" anyway and verified the symbols were loaded as expected. Read more: Random Musings of Jeremy Jameson
SQL SERVER: ROW_NUMBER () vs. DENSE_RANK ()
Posted by
jasper22
at
10:35
|
ROW_NUMBER() will be used to achieve first two goals as ROW_NUMBER() return sequential row number within a partition of result set. And for last column we will use DENSE_RANK(), which will return rank of rows within the partition of a result set. --Create temporary table for query testing
CREATE TABLE #TeamPlayer
(
Team VARCHAR(25),
PlayerName VARCHAR(25)
)
GO
-- Insert temporary records
INSERT INTO #TeamPlayer ( Team, PlayerName )
SELECT 'South Zone',
'SZ_Player1'
UNION ALL
SELECT 'South Zone',
'SZ_Player2'
UNION ALL
SELECT 'South Zone',
'SZ_Player3'
UNION ALLRead more: Connect SQL
CREATE TABLE #TeamPlayer
(
Team VARCHAR(25),
PlayerName VARCHAR(25)
)
GO
-- Insert temporary records
INSERT INTO #TeamPlayer ( Team, PlayerName )
SELECT 'South Zone',
'SZ_Player1'
UNION ALL
SELECT 'South Zone',
'SZ_Player2'
UNION ALL
SELECT 'South Zone',
'SZ_Player3'
UNION ALLRead more: Connect SQL
שימוש יצירתי במדיה דיגיטלית–קישור און ליין אוף ליין
Posted by
jasper22
at
10:34
|
סרטון שמראה פעילות יפה מאוד של חברת KLM. דיילות KLM איתרו בעזרת טוויטר ופורסקוור נוסעים שטסים איתם, למדו את תחומי העניין שלהם מטוויטים קודמים או עמוד פייסבוק וקנו להם מתנה צנועה שמתאימה להם. הנוסעים אותרו בשדה התעופה בטרם העליה למטוס וכמובן הופתעו מאוד מהמחווה , ההשקעה וממה שטוויט קטן יכול לעשות….
Read more: בלוג של מיכל Basic command line tips and tricks
Posted by
jasper22
at
10:32
|
This article is a continuation of our previous stone – 40 Basic Command Line Tips and Tricks. The terminal is a really powerful tool when it comes to Linux, anything and almost everything on Linux can be done via the command line. Therefore it is necessary for us to have a basic idea of all the important commands and a few really important options that come along with them. 1. BASH ( Bourne-Again SHell ) is the most common shell in Linux. It’s freeware shell.cat /etc/shells -> To find the available shells in your system
/bin/shell-name -> For temporary changing of the shell /bin/sh : To change to the sh shell.To return back to the bash shell : /bin/bash2. To print your home directory location:echo $HOME3. To print colouful textecho -e ” \ 033[31m Hello World” Note : There is no space between the \ and 0
Output :
Hello World ( in Red )Set foreground color:
echo -e ” \ 033[3xm” ( where x = 0 – 7 ) Note : There is no space between the \ and 0
Set background color :
echo -e ” \ 033[4ym” ( where y = 0 – 7 ) Note : There is no space between the \ and 0 4. The sort command can be used to sort lines of text files. It can be used for sorting of both numbers and characters or words.For example if your file myfile.txt contains the following data :Raju
Khanal
aayushIf you want to sort it the following command gives you the sorted listsort myfile.txt
Output :
aayush
Khanal
Raju5. The cut command is used for removing sections from each line of files. For instance consider a file myfile.txt with the following data
Read more: Fortystones
/bin/shell-name -> For temporary changing of the shell /bin/sh : To change to the sh shell.To return back to the bash shell : /bin/bash2. To print your home directory location:echo $HOME3. To print colouful textecho -e ” \ 033[31m Hello World” Note : There is no space between the \ and 0
Output :
Hello World ( in Red )Set foreground color:
echo -e ” \ 033[3xm” ( where x = 0 – 7 ) Note : There is no space between the \ and 0
Set background color :
echo -e ” \ 033[4ym” ( where y = 0 – 7 ) Note : There is no space between the \ and 0 4. The sort command can be used to sort lines of text files. It can be used for sorting of both numbers and characters or words.For example if your file myfile.txt contains the following data :Raju
Khanal
aayushIf you want to sort it the following command gives you the sorted listsort myfile.txt
Output :
aayush
Khanal
Raju5. The cut command is used for removing sections from each line of files. For instance consider a file myfile.txt with the following data
Read more: Fortystones
January 2011 Security Release ISO Image
Posted by
jasper22
at
10:31
|
This DVD5 ISO image file contains the security updates for Windows released on Windows Update on January 11th, 2011.Read more: MS Download
HierarchicalDataTemplate and TreeView
This post is about flexible styling for databound TreeViews in WPF. We will see how nested trees of any depth and structure can be bound easily with the HierarchicalDataTemplate.In the next posts I will demonstrate use of the Composite Pattern to describe the hierarchical data and LINQ to XML to read the data from an XML file. Finally, I will put all the pieces together in an application that displays a trivial organization chart. We will start with a set of classes that all have Composite as their base class. Composite might be defined like so: class Composite
{
public string Name { get; set; }
public List<Composite> Children { get; set; }
}
Here is method that builds some sample data: private List<Composite> GetData()
{
List<Composite> list = new List<Composite>()
{
new Composite { Name = "1", Children = new List<Composite>()
{
new Composite { Name = "1.1", Children = new List<Composite>()
{
new Composite { Name = "1.1.1" },
new Composite { Name = "1.1.2" },
new Composite { Name = "1.1.3" }
}
new Composite { Name = "2.1", Children = new List<Composite>()
{
new Composite { Name = "2.1.1" },
new Composite { Name = "2.1.2" },
new Composite { Name = "2.1.3" }
}
}
}
},
new Composite { Name = "3", Children = null }
};
return list;
}
We would like to bind this data to a TreeView named treeView like so: treeView.ItemsSource = GetData();
Here is a first attempt at the XAML for treeView. <TreeView Name="treeView">
<TreeView.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name}" />
</DataTemplate>
</TreeView.ItemTemplate>
</TreeView>
But this results in the display of the top level nodes only – like a ListBox. The key is to introduce the HierarchicalDataTemplate like so: <TreeView Name="treeView">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Path=Children}">
<TextBlock Text="{Binding Path=Name}" />
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>This is the result:
{
public string Name { get; set; }
public List<Composite> Children { get; set; }
}
Here is method that builds some sample data: private List<Composite> GetData()
{
List<Composite> list = new List<Composite>()
{
new Composite { Name = "1", Children = new List<Composite>()
{
new Composite { Name = "1.1", Children = new List<Composite>()
{
new Composite { Name = "1.1.1" },
new Composite { Name = "1.1.2" },
new Composite { Name = "1.1.3" }
}
new Composite { Name = "2.1", Children = new List<Composite>()
{
new Composite { Name = "2.1.1" },
new Composite { Name = "2.1.2" },
new Composite { Name = "2.1.3" }
}
}
}
},
new Composite { Name = "3", Children = null }
};
return list;
}
We would like to bind this data to a TreeView named treeView like so: treeView.ItemsSource = GetData();
Here is a first attempt at the XAML for treeView. <TreeView Name="treeView">
<TreeView.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name}" />
</DataTemplate>
</TreeView.ItemTemplate>
</TreeView>
But this results in the display of the top level nodes only – like a ListBox. The key is to introduce the HierarchicalDataTemplate like so: <TreeView Name="treeView">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Path=Children}">
<TextBlock Text="{Binding Path=Name}" />
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>This is the result:
Access your Google Chrome bookmarks from the right-click context men
Posted by
jasper22
at
12:28
|
Last week we shared a Google Chrome extension with you that adds installed apps to your right-click context menu. It's a very welcome enhancement, since you normally need to hit Chrome's new tab page to launch a Chrome Web app. You know what would fit nicely right below apps in Chrome's right-click menu? Access to your bookmarks, of course! And as you can see in the screenshot, there's an extension that does a nice job of integrating the contents of your bookmarks bar. Install "Bookmark list in context menu" and you've got two-click access to your favorite sites. It's a nice alternative to the horizontal bookmark bar, especially on smaller screens where every pixel counts. As its author points out, it's also a handy way to open bookmarks in full screen mode -- when there are no toolbars to click on. Read more: DownloadSquad
Avatar Kinect Chat …
Posted by
jasper22
at
11:53
|
Chat was yesterday. Kinect chat is the future, at least up to the Beaming properly.Read more: o-LIVE-r
Experience with the development of 3D presentations in Silverlight
Posted by
jasper22
at
11:51
|
Silverlight does not yet have access to low-level graphics card and high-level API to display the 3D models. Today's current processors are so powerful that there is no problem to show a relatively complex 3D models without the support of graphic cards. Silverlight for this creates the ideal conditions, by using. NET and compile MSIL to native code, allowing processing power to reach the approaching native applications. From the perspective of the programmer's lack of a hardware card very interesting, it's a small step into the past, thanks to the limited performance of dealing with similar problems as the old computer game creators, we are a great inspiration. You are forced to cheat, try to create a realistic illusion. There are several open source projects aimed at rendering 3D objects in Silverlight. Balder is probably the most advanced ( http://balder.codeplex.com/ ). Another well-known is Kit3D ( http://kit3d.codeplex.com/ ). Read more: United MSDN Blog (Original) (Translated)
Tip of the day on NHibernate: IntelliSense for the hbm files
Posted by
jasper22
at
11:48
|
If you're using NHibernate and writing your NHibernate mapping files (*.hbm.xml) by hand, (as opposed to using Fluent NHibernate for example), then you'll probably be interested in the following tip (unless you already done that :-) ) You can have IntelliSense validation and auto-completion in the XML editor for NHibernate xml files (both the *.hbm.xml and hibernate.cfg.xml) by following the following steps:1. Inside VS, select XML->Schemas. 2. Click "Add..."3. Browse to the "Required_bins" folder inside of your NHibernate folder (e.g. "C:\Nhibernate3.0\Required_bins")4. Select both "nhibernate-configuration.xsd" and "nhibernate-mapping.xsd" file and click "Open". The 2 schemas will be added to the list:Read more: ArnonA
Typed styles in WPF
Posted by
jasper22
at
11:47
|
Based on my previous post, WPF Quiz #2, I would like to shed some light on a very important mechanism in WPF related to styles.WPF has a very handy feature called typed-style, which is a style located in a resource dictionary, has no explicit key (or the key explicitly set as the type of the target) and is type specific. For an instance: <Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="Red" />
</Style>
Having such a style in the Application's resource dictionary, every element of type Button will be automatically applied with this style unless explicitly set with a different style. This is a very important mechanism in WPF which provides an intuitive and automatic option to create themes for the whole application just by creating a style for each relevant element and place them in the Application's resource dictionary (Silverlight programmers, you should wait for the next version… ;-)). Using this neat feature, you should be aware of some facts.1. Type specific style is not automatically applied on derived typed. For example, having a typed style for Window, Button or ListBox types, it won't be automatically applied on MyWindow, MyButton and MyListBox, but it could be explicitly set on them. <Application x:Class="Quiz2.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Quiz2"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="Red" />
</Style>
<Style TargetType="{x:Type local:MainWindow}"> Read more: Essential WPF and Young Brothers
<Setter Property="Background" Value="Red" />
</Style>
Having such a style in the Application's resource dictionary, every element of type Button will be automatically applied with this style unless explicitly set with a different style. This is a very important mechanism in WPF which provides an intuitive and automatic option to create themes for the whole application just by creating a style for each relevant element and place them in the Application's resource dictionary (Silverlight programmers, you should wait for the next version… ;-)). Using this neat feature, you should be aware of some facts.1. Type specific style is not automatically applied on derived typed. For example, having a typed style for Window, Button or ListBox types, it won't be automatically applied on MyWindow, MyButton and MyListBox, but it could be explicitly set on them. <Application x:Class="Quiz2.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Quiz2"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="Red" />
</Style>
<Style TargetType="{x:Type local:MainWindow}"> Read more: Essential WPF and Young Brothers
Demystifying Silverlight Dependency Properties
Posted by
jasper22
at
11:25
|
I have the opportunity to teach a lot of people about Silverlight (among other technologies) and one of the topics that definitely confuses people initially is the concept of dependency properties. I confess that when I first heard about them my initial thought was “Why do we need a specialized type of property?” While you can certainly use standard CLR properties in Silverlight applications, Silverlight relies heavily on dependency properties for just about everything it does behind the scenes. In fact, dependency properties are an essential part of the data binding, template, style and animation functionality available in Silverlight. They simply back standard CLR properties. In this post I wanted to put together a (hopefully) simple explanation of dependency properties and why you should care about them if you’re currently working with Silverlight or looking to move to it.
What are Dependency Properties?XAML provides a great way to define layout controls, user input controls, shapes, colors and data binding expressions in a declarative manner. There’s a lot that goes on behind the scenes in order to make XAML work and an important part of that magic is the use of dependency properties. If you want to bind data to a property, style it, animate it or transform it in XAML then the property involved has to be a dependency property to work properly. If you’ve ever positioned a control in a Canvas using Canvas.Left or placed a control in a specific Grid row using Grid.Row then you’ve used an attached property which is a specialized type of dependency property. Dependency properties play a key role in XAML and the overall Silverlight framework. Any property that you bind, style, template, animate or transform must be a dependency property in Silverlight applications. You can programmatically bind values to controls and work with standard CLR properties, but if you want to use the built-in binding expressions available in XAML (one of my favorite features) or the Binding class available through code then dependency properties are a necessity. Dependency properties aren’t needed in every situation, but if you want to customize your application very much you’ll eventually end up needing them. For example, if you create a custom user control and want to expose a property that consumers can use to change the background color, you have to define it as a dependency property if you want bindings, styles and other features to be available for use. Now that the overall purpose of dependency properties has been discussed let’s take a look at how you can create them. Creating Dependency PropertiesWhen .NET first came out you had to write backing fields for each property that you defined as shown next:
Brush _ScheduleBackground;public Brush ScheduleBackground
{ get { return _ScheduleBackground; }
set { _ScheduleBackground = value; }}
Although .NET 2.0 added auto-implemented properties (for example: public Brush ScheduleBackground { get; set; }) where the compiler would automatically generate the backing field used by get and set blocks, the concept is still the same as shown in the above code; a property acts as a wrapper around a field. Silverlight dependency properties replace the _ScheduleBackground field shown in the previous code and act as the backing store for a standard CLR property. Read more: Dan Wahlin's WebLog
What are Dependency Properties?XAML provides a great way to define layout controls, user input controls, shapes, colors and data binding expressions in a declarative manner. There’s a lot that goes on behind the scenes in order to make XAML work and an important part of that magic is the use of dependency properties. If you want to bind data to a property, style it, animate it or transform it in XAML then the property involved has to be a dependency property to work properly. If you’ve ever positioned a control in a Canvas using Canvas.Left or placed a control in a specific Grid row using Grid.Row then you’ve used an attached property which is a specialized type of dependency property. Dependency properties play a key role in XAML and the overall Silverlight framework. Any property that you bind, style, template, animate or transform must be a dependency property in Silverlight applications. You can programmatically bind values to controls and work with standard CLR properties, but if you want to use the built-in binding expressions available in XAML (one of my favorite features) or the Binding class available through code then dependency properties are a necessity. Dependency properties aren’t needed in every situation, but if you want to customize your application very much you’ll eventually end up needing them. For example, if you create a custom user control and want to expose a property that consumers can use to change the background color, you have to define it as a dependency property if you want bindings, styles and other features to be available for use. Now that the overall purpose of dependency properties has been discussed let’s take a look at how you can create them. Creating Dependency PropertiesWhen .NET first came out you had to write backing fields for each property that you defined as shown next:
Brush _ScheduleBackground;public Brush ScheduleBackground
{ get { return _ScheduleBackground; }
set { _ScheduleBackground = value; }}
Although .NET 2.0 added auto-implemented properties (for example: public Brush ScheduleBackground { get; set; }) where the compiler would automatically generate the backing field used by get and set blocks, the concept is still the same as shown in the above code; a property acts as a wrapper around a field. Silverlight dependency properties replace the _ScheduleBackground field shown in the previous code and act as the backing store for a standard CLR property. Read more: Dan Wahlin's WebLog
איחוד תוצאות של שתי שאילתות שונות לשאילתא אחת בעמודות
Posted by
jasper22
at
11:07
|
עלה לי הצורך לאחד תוצאות של שתי שאילתות לאחת, מה הכוונה ?
שאילתה אחת החזירה את התוצאות הבאות:
a
bc
d
שאילתה נוספת החזירה את התוצאות הבאות:
12
3
4
כעת הייתי צריך לאחד את התוצאות, במידה והצורך היה לחבר אותם ולהחזיר כמה שורות השאילתא הייתה פשוטה - בעזרת union
SELECT Column1 FROM Table1
UNION
SELECT Column2 FROM Table2
ואז הייתי מקבל
ab
c
d
1
2
3
4
אבל כפי שציינתי הצורך היה לחבר אותם בעמודות. בצורה הבאה:
a 1
b 2
c 3
d 4Read more: שלמה גולדברג (הרב דוטנט)
SQL SERVER: 9 Most Forbidden Things
Posted by
jasper22
at
11:05
|
DBCC SHRINKDATABASE
Most of SQL Server developers and even some DBAs think that we can shrink size of a database by executing DBCC SHRINKDATABASE. You can just reacquire unused space of database and it’s never going to compress your database and change magically low size. Advantage is very very low as compared to performance loss. Why DBCC SHRINKDATABASE is so awful SQL Server Guru Pinal Dave has explained it here.
Most of SQL Server developers and even some DBAs think that we can shrink size of a database by executing DBCC SHRINKDATABASE. You can just reacquire unused space of database and it’s never going to compress your database and change magically low size. Advantage is very very low as compared to performance loss. Why DBCC SHRINKDATABASE is so awful SQL Server Guru Pinal Dave has explained it here.
SET AUTO_CREATE STATISTICS OFF
SQL Sever by default SET this option to ON and create statistics for all the columns used in join and filters, for even those columns on which no index exists. SQL Server is made quite intelligent to create statistics on required columns only and even drop statistics which are no more in use. So always keep AUTO_CREATE STATISTICS ON.
SQL Sever by default SET this option to ON and create statistics for all the columns used in join and filters, for even those columns on which no index exists. SQL Server is made quite intelligent to create statistics on required columns only and even drop statistics which are no more in use. So always keep AUTO_CREATE STATISTICS ON.
RECOMPILE hint in Stored Procedures
You can provide RECOMPILE hint for stored procedure to recompile it every time it is executed. RECOMPILE hint for SPs is nothing but a performance overhead.
You can provide RECOMPILE hint for stored procedure to recompile it every time it is executed. RECOMPILE hint for SPs is nothing but a performance overhead.
Query hint to force some index usage
Index of your own choice can be forced to use for a query BUT never ever do this on production servers. Query Optimizer is intelligent enough to select, which index is better to use for a query. Let optimizer work.
Index of your own choice can be forced to use for a query BUT never ever do this on production servers. Query Optimizer is intelligent enough to select, which index is better to use for a query. Let optimizer work.
Heap table structureRead more: Connect SQL
Mikogo
Posted by
jasper22
at
11:01
|
What is Mikogo?Looking to host an online meeting without paying through the teeth? Look no further. Mikogo is a free desktop sharing tool full of features to assist you in conducting the perfect online meeting or web conference.
Take advantage of the opportunity to share any screen content or application over the Internet in true color quality with up to 10 participants simultaneously, while still sitting at your desk.Mikogo can be employed for a range of professional, academic, or personal uses, including: online meetings
web conferences
product demonstrations
web presentations
remote support
webinars
and more!
Provide online technical support for your customers. Conduct product demonstrations for business customers. Use Mikogo to discuss and edit a current team project. The ideal tool for free online group collaboration. Download it today and broadcast your screen between your guests with just 2 mouse-clicks.Read more: Mikogo
Take advantage of the opportunity to share any screen content or application over the Internet in true color quality with up to 10 participants simultaneously, while still sitting at your desk.Mikogo can be employed for a range of professional, academic, or personal uses, including: online meetings
web conferences
product demonstrations
web presentations
remote support
webinars
and more!
Provide online technical support for your customers. Conduct product demonstrations for business customers. Use Mikogo to discuss and edit a current team project. The ideal tool for free online group collaboration. Download it today and broadcast your screen between your guests with just 2 mouse-clicks.Read more: Mikogo
Practical guidelines for beautiful Python code
Posted by
jasper22
at
10:54
|
Every now and then Liraz and I find ourselves chatting about how much we love Python, but more so the lessons we have learned from coding, and how to apply them to create beautiful Python code. I've tried to refine some of the "lessons" into practical guidelines that I apply religiously to all new code I write, and the refactoring of old code I written. When reading other peoples code it sometimes ties my mind into knots, and on occasions I want to pull my hair out in frustration and disgust. That's not to say I'm perfect, but hopefully these guidelines will benefit others (and indirectly help reduce my hair loss). I couldn't possibly include everything I wanted to in one post, so this will be the first, and more will follow...
#1 - OO structure == Well defined mental conceptsObject Orientated structure should always map to well defined mental concepts in the problem domain. If you don't have a well defined mental model of the problem domain, start with that. Class Responsibility Collaboration (CRC) cards are really useful in this. Basically you need a sketch of the architecture. What parts does your system have, what are their names, what does each part do? What parts is that part made out of? How do the parts interact with each other? You can save quite a bit of effort if you come up with a good architecture up-front, but sometimes it may be easier to start without and figure it out a bit later after you have a bit more knowledge about the problem you are solving. The rule is that the sooner you refine your architecture, the better. It is easy to dig yourself further and further into a complexity hole that makes restructuring very difficult later on. So do that as early as possible. Refining the architecture is part of the "refactor mercilessly" rule. #2 - Leverage built-in Python types
It is often a good idea to build on top of built-in Python types or at least emulate them. Read more: Turnkey
#1 - OO structure == Well defined mental conceptsObject Orientated structure should always map to well defined mental concepts in the problem domain. If you don't have a well defined mental model of the problem domain, start with that. Class Responsibility Collaboration (CRC) cards are really useful in this. Basically you need a sketch of the architecture. What parts does your system have, what are their names, what does each part do? What parts is that part made out of? How do the parts interact with each other? You can save quite a bit of effort if you come up with a good architecture up-front, but sometimes it may be easier to start without and figure it out a bit later after you have a bit more knowledge about the problem you are solving. The rule is that the sooner you refine your architecture, the better. It is easy to dig yourself further and further into a complexity hole that makes restructuring very difficult later on. So do that as early as possible. Refining the architecture is part of the "refactor mercilessly" rule. #2 - Leverage built-in Python types
It is often a good idea to build on top of built-in Python types or at least emulate them. Read more: Turnkey
Spaghetti Hot Dog
Posted by
jasper22
at
10:50
|
Warning: this is NOT a technical post. At all.A few days ago I stumbled upon this picture:
I can’t find the tweet I got it from so if you know its origin, please let me know and I’ll add it here!So I saw that and it hit me instantly – this is THE BEST IDEA EVER!!!!! I had to try it myself. And I’m proud to introduce…. my own Spaghetti Hot Dogs! Step 1 – Buy Cheap Spaghetti and Hot DogsRead more: IronShay
I can’t find the tweet I got it from so if you know its origin, please let me know and I’ll add it here!So I saw that and it hit me instantly – this is THE BEST IDEA EVER!!!!! I had to try it myself. And I’m proud to introduce…. my own Spaghetti Hot Dogs! Step 1 – Buy Cheap Spaghetti and Hot DogsRead more: IronShay
Five tips for choosing the right Linux distribution
Posted by
jasper22
at
10:48
|
I have, on a number of occasions, stressed to new Linux users how crucial the right distribution is. Choosing the distribution that suits your needs is the single most important key to success when attempting to migrate from another operating system. But how do you know which one to choose out of the hundreds of variations? Believe it or not, there are some key questions to ask yourself when making this decision. It has been my goal for more than a decade to help prospective Linux users make the plunge with ease and success. Let’s see if I can do the same for you with these five tips. 1: Decide what you need Linux to doThis is essential to your initial success. There are Linux distributions geared for specific needs. Do you need Linux to act as a server OS? A desktop OS? A router? A firewall? Once you have answered the question of what you need Linux to do, you’re more than halfway home. But if you don’t ask this question, you might very well install a distribution (such as CentOS) geared for a server environment and wonder why it makes a lousy desktop environment. Choosing the Ubuntu Desktop distribution and using it as a server will find you in the same state — constantly frustrated. 2: Choose between stable and cutting edgeThis should be a black-and-white area and all new users should pay close attention to it. New-to-Linux users who choose a distribution like Fedora will be frustrated. No matter how polished and stable Fedora might seem, it is geared toward the bleeding edge. Fedora is used as a test bed distribution for its bigger brother Red Hat Enterprise Linux, so it’s constantly updating to the latest releases. This leads to users having to fix problems. Even out of the box, you might find Fedora broken in one respect or another. 3: Consider your desktop preferencesAlthough this issue is about to be tipped on its head (when distributions start migrating to GNOME 3 or Unity), it is still a big factor in the success of a new Linux user. Read more: TechRepublic
Allowing Access to HttpContext in WCF REST Services
Posted by
jasper22
at
10:45
|
If you’re building WCF REST Services you may find that WCF’s OperationContext, which provides some amount of access to Http headers on inbound and outbound messages, is pretty limited in that it doesn’t provide access to everything and sometimes in a not so convenient manner. For example accessing query string parameters explicitly is pretty painful: [OperationContract]
[WebGet]
public string HelloWorld()
{
var properties = OperationContext.Current.IncomingMessageProperties;
var property = properties[HttpRequestMessageProperty.Name] as HttpRequestMessageProperty;
string queryString = property.QueryString;
var name = StringUtils.GetUrlEncodedKey(queryString,"Name"); return "Hello World " + name;
}
And that doesn’t account for the logic in GetUrlEncodedKey to retrieve the querystring value. It’s a heck of a lot easier to just do this:[OperationContract]
[WebGet]
public string HelloWorld()
{
var name = HttpContext.Current.Request.QueryString["Name"] ?? string.Empty;
return "Hello World " + name;
}Ok, so if you follow the REST guidelines for WCF REST you shouldn’t have to rely on reading query string parameters manually but instead rely on routing logic, but you know what: WCF REST is a PITA anyway and anything to make things a little easier is welcome. Read more: Rick Strahl's blog
[WebGet]
public string HelloWorld()
{
var properties = OperationContext.Current.IncomingMessageProperties;
var property = properties[HttpRequestMessageProperty.Name] as HttpRequestMessageProperty;
string queryString = property.QueryString;
var name = StringUtils.GetUrlEncodedKey(queryString,"Name"); return "Hello World " + name;
}
And that doesn’t account for the logic in GetUrlEncodedKey to retrieve the querystring value. It’s a heck of a lot easier to just do this:[OperationContract]
[WebGet]
public string HelloWorld()
{
var name = HttpContext.Current.Request.QueryString["Name"] ?? string.Empty;
return "Hello World " + name;
}Ok, so if you follow the REST guidelines for WCF REST you shouldn’t have to rely on reading query string parameters manually but instead rely on routing logic, but you know what: WCF REST is a PITA anyway and anything to make things a little easier is welcome. Read more: Rick Strahl's blog
VB Core – New compilation mode in Visual Studio 2010 SP1
Posted by
jasper22
at
10:42
|
While most servicing releases do not include new functionality, Visual Studio 2010 SP1 introduced an important new compiler feature that enables Visual Basic to target new platforms that were not previously supported. This was mentioned in some of the initial SP1 blog posts such as Jasonz blog. This is a strategic investment by Microsoft in the future of VB. This provides VB with an increased agility in the future for new platforms to support Visual Basic. This blog provides more information about the feature; let me know if you have more questions. WHAT IT IS?The new command line option /vbruntime* (with an asterisk) will embed a reduced version of the Visual Basic runtime into the compiled assembly and therefore eliminate the dependency on the VB Runtime assembly since this assembly does not ship on all .Net platforms such as Windows Phone 7 and XNA.
The feature can be used from the VBC command line compiler or by adding an entry <VBRuntime>Embed</VBRuntime> into the .vbproj file.
In general, its intended use is only for specific project templates that target platforms that don’t ship with a VB runtime.
WHEN SHOULD I USE IT?The simple answer to this is you should never need to use this directly. The feature has been implemented to allow Microsoft Partner teams to create Visual Basic project templates for platforms that previously didn’t support VB. When such VB project templates eventually become available, you as a VB developer will be able to do File>New Project for the new project types, and /vbruntime* will be used under-the-hood. Read more: The Visual Basic Team
The feature can be used from the VBC command line compiler or by adding an entry <VBRuntime>Embed</VBRuntime> into the .vbproj file.
In general, its intended use is only for specific project templates that target platforms that don’t ship with a VB runtime.
WHEN SHOULD I USE IT?The simple answer to this is you should never need to use this directly. The feature has been implemented to allow Microsoft Partner teams to create Visual Basic project templates for platforms that previously didn’t support VB. When such VB project templates eventually become available, you as a VB developer will be able to do File>New Project for the new project types, and /vbruntime* will be used under-the-hood. Read more: The Visual Basic Team
How to Create .Net DataGridView Image Buttons
Posted by
jasper22
at
10:41
|
As you may have guessed by now, here at Switch On The Code, we are very big advocates of the .Net framework and all it has to offer. Sometimes however, things can be a little bit on the tricky side. Recently I ran into a tricky solution when I was trying to get image buttons in a DataGridView control, and in this tutorial I will go over the solution I came up with, which may just give you the edge the next time you need a fancy DataGridView. DataGridViews do offer a few different column types, including fairly simple ways to brew up your own custom column types. However, none of the default column types offer a truly good solution for clickable images. What we want here is an image that does something when we click it. Sure we can have a button with an image in it if we use a Button Column, but that is not really what I am looking for. This is where the tricky solution comes in. For a moment, we have to step back and consider all the options a DataGridView offers, especially the events that can be captured by it. One of these events happens to be CellClick, which is the key to our solution. Using this event we can capture which row and column is clicked, and therefore we can determine if one of our image cells is being clicked. Even better, we can even tell which actual cell was clicked. Using this information we can have image cells that act like buttons, and the best part is that it is not that complicated to get working. So the first part is pretty strait forward, we need a DataGridView with some image columns. It doesn't matter what images you use, or how you set up your columns, but you just have to keep track of the column names. Once you have your DataGridView all set up, we need to give it a couple test rows to work with, which we will do during initialization: public Form1()
{
InitializeComponent();
dataGridView1.Rows.Add(5);
}Read more: Switch-on-code
{
InitializeComponent();
dataGridView1.Rows.Add(5);
}Read more: Switch-on-code
More Big News: .NET Reflector 7 Beta, Integrating Jason Haley's PowerCommands Add-in is Now Available
Posted by
jasper22
at
10:40
|
I'm very pleased to announce the release of .NET Reflector 7 Beta. As ever, you can get it fromhttp://reflector.red-gate.com/Download.aspx I've been holding off for a week or so because I wanted to be able to announce the great news that we've acquired the excellent PowerCommands add-in from Jason Haley, and have integrated it directly into .NET Reflector. The amount of time Jason's invested in PowerCommands really shows, because it provides an extremely powerful set of extensions to the core Reflector functionality. To illustrate, here's a summary of the complete feature list which Jason provided us: Assembly browser treeview
Read more: Simple-talk
- Import/export assembly lists
- Sort assembly list alphanumerically
- Find what other assemblies reference an assembly
- Open assemblies embedded as resources
- Open items with an external application, e.g.,
- Open code with Notepad
- Open modules with ildasm
- Open zip files
- Run executable assemblies
- Copy assembly path to clipboard
- Open containing folder
- Create desktop shortcut to item using code:// URL
- Open Visual Studio 2005/2008/2010 command prompt in containing folder
- Create assembly binding redirect XML for .config file
- Collapse all nodes in the assembly browser tree
- Toggle assembly browser on/off
- View enumerations and calculate bit flags for those marked with the [Flags] attribute
- Copy decompiled code as HTML, RTF or plain text
- Email decompiled member code
- Export embedded resources (.resources files) as .resx files
- Open resources with Paint
Read more: Simple-talk
Google URL Shortener gets an API
Posted by
jasper22
at
10:31
|
When we launched Google’s URL shortener externally back in September, there was no accompanying API to allow people to integrate goo.gl into their applications and web pages. However, we said that we were working on one, and today we're happy to announce that we’ve launched the goo.gl API in Google Code Labs. The documentation can be found on the Google Code site, with example code in the Getting Started section. With this API, developers are able to programmatically access all of the fast, sleek goo.gl goodness that we currently provide via the web interface. You can shorten and expand URLs using the API, as well as fetch your history and analytics. You could use these features for a wide variety of applications, enabling behaviors ranging from auto-shortening within Twitter or Google Buzz clients to running regular jobs that monitor your usage statistics and traffic patterns. You can check out the Google APIs console to get started. Read more: Google Blog
Subscribe to:
Posts (Atom)