This is a mirror of official site: http://jasper-net.blogspot.com/

OK Go Goes HTML5

| Thursday, July 28, 2011
The YouTube sensation OK Go has just released their latest video using HTML5. The video is pretty cool itself, but the interactive feature is great.

It looks like the interactive stuff only works in Chrome.

Read more: Slashdot
Read more: Youtube
QR: watch?v=ur-y7oOto14&

Posted via email from Jasper-net

KDE 4.7.0 Released

|
KDE 4.7 releases provide many new features and improved stability and performance. Lots of visual polishing took place with an update to the Oxygen icons, and improved consistency between panel items such as clock and notification areas. The window manager KWin brings a new shadow system and can now run on OpenGL ES supporting hardware, making it better suited for mobile devices. Network management widget is much improved. Navigating through applications and recent files is easier with the addition of breadcrumbs to the Kickoff application launcher. Kontact groupware solution rejoins the rest of the KDE software, with increased stability, better connection to new services and sharing of communication information between more applications. Dolphin file manager has a cleaner default appearance. The menu bar is hidden, but easy to reach and restore. The file searching interface has been improved. Marble the virtual globe now has voice navigation support and a map creation wizard. Gwenview image viewer now offers the ability to compare two or more pictures side by side. Digikam photo management app brings face detection and recognition.

Read more: Slashdot
QR: KDE-470-Released

Posted via email from Jasper-net

חדש בפייסבוק: מדריך לעסקים במדיה החברתית

|
facebook-chzbx.png

השבוע (ג') השיקה פייסבוק מדריך מפורט המסביר צעד אחר צעד כיצד לעזור לבתי עסק להכנס אל עולם המדיה החברתית, תחת השם Facebook For Business. מטרתה של היוזמה החדשה לעזור לחברות קטנות ובינוניות למצות את היכולות שהרשת החברתית מציעה להן.
מרכז למידה

פייסבוק לעסקים מזכיר במעט את פייסבוק לעיתונאים. מדובר במרכז למידה מקוון שמטרתו לתת הדרכה למגוון הכלים שיכולים לעזור לעסק למנף את עצמו. המרכז מציג את כל האינפורמציה שיכולה להיות שימושית לאותם עסקים, במקום אחד ומרוכז. בין הנושאים ניתן למצוא הסבר לכיצד לבנות עמוד פרופיל, כיצד לייעד מודעות לקהל המתאים וכמובן כיצד ליצור קשר עם הלקוחות.

המדריך מציג הדרכה מפורטת, פשוטה ונוחה לקריאה, המלווה בצילומי מסך שיכולים לעזור גם למבולבלים להבין בדיוק מה עליהם לעשות על מנת להצליח. בנוסף ישנם מגוון עצות וטיפים מפייסבוק עצמה, האמורים לעזור לבעל העסק לגדול ולהגדיל את קהל הלקוחות שלו. בין הנושאים השונים ניתן למצוא הדרכות כיצד ליצור דף, לערב את הקהילה במוצר, להפיץ את העסק, לבנות אסטרטגיה עסקית, ליצור סיפור ועניין סביב המוצר ועוד רבים אחרים. בנוסף לטיפים הבסיסיים ישנם מגוון מדריכי PDF מלאים ומפורטים ונדמה כי המטרה העיקרית של פייסבוק היא באמת לעזור לבית העסק לצמוח.

ייתכן כי היתרון הגדול ביותר בהשקת השירות החדש, הוא בכך שהוא מזכיר לאותם עסקים כי פייסבוק מעודדת אותם להשתמש ברשת שלה על מנת להפיץ את עצמם ולבנות מותג. הרשת החברתית מאפשרת לאותם עסקים ליצור חוויה חברתית ללקוחותיה, לבנות מערכות יחסים עמם ולבסס את כלי הפרסום הטוב ביותר – העברת מידע מפה לאוזן.

כל מי שמבלה את מרבית זמנו בפייסבוק יודע כי לא מדובר בפעולות קשות או מסובכות במיוחד, אך השקת פייסבוק לעסקים יוצרת הרבה עניין ורעש בעיקר בגלל מתחרתה גוגל, שהחלה השבוע למחוק דפי מותג מעל דפי גוגל+.
פייסבוק vs גוגל

בשלב זה גוגל איננה מאפשרת לעסקים להקים דפי מותג כפי שניתן בפייסבוק. דבר זה גרם למרבית בתי העסק לפתוח דף פרופיל יעודי על שם אחד מעובדי החברה, דרכו יוכלו להפיץ את עצמם. גוגל, שלא קיבלה מהלך זה בעין יפה החלה להסיר גם את דפים אלה, גם אם רשומים תחת שם פרטי. כריסטיאן אוסטילן (Christian Oestlien) האחראי על מודעות בגוגל+ כתב סטטוס בו הוא טוען כי הפלטפורמה שלהם עדיין אינה מוכנה עבור מיתוג עסקי. הוא הוסיף וטען גוגל רוצה לעזור לחברות לבנות יחסים ארוכי טווח עם לקוחותיה והיא רוצה לעשות זאת בצורה הנכונה – כך ששווה לחכות.


Read more: newsGeek
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://www.newsgeek.co.il/facebook-for-business/

Posted via email from Jasper-net

Google Offers To Re-Write Your Webpages On The Fly, Promising 25% To 60% Speed Improvements

|
Google has long been obsessed with speed. It’s paramount in pretty much everything they do. Which is why the launch of Google+ with some — gasp — attention paid to design is even more surprising. But a new service Google is launching this evening very much puts the focus back on speed — an obsessive amount of focus, one might say.

Page Speed Service is the latest tool in Google’s arsenal to help speed up the web. This service is also their most ambitious yet. When you sign up and point your site’s DNS entry to Google, they’ll enable the tool which will fetch your content from your servers, rewrite your webpages, and serve them up from Google’s own servers around the world. Yes, you read all of that correctly.

“Your users will continue to access your site just as they did before, only with faster load times,” Google notes. They say that applying web performance best practices across these pages should improve speed by 25 to 60 percent. Google will allow you to test out how much they’ll be able to speed up your site before you commit to it, apparently.

Read more: TechCrunch
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://techcrunch.com/2011/07/28/google-page-speed-service/

Posted via email from Jasper-net

You don't need to ask me a question the compiler can answer more accurately

|
A customer reported having problems developing the correct p/invoke signature for the INPUT structure. "The code works on 32-bit machines, but on 64-bit machines, the call to Send­Input returns ERROR_INVALID_PARAMETER." The sample code included the lines

INPUT[] inputs = new INPUT[1];
inputs[0].type = INPUT_KEYBOARD;
...
int size = Marshal.SizeOf(inputs[0]);
if (!SendInput(1, ref inputs, size))
{
 Console.WriteLine("Failed with error {0}", GetLastError());
}

My response was simply, "I bet you are passing the wrong structure size. Note that on 64-bit Windows, the alignment of the inner structures is 8-byte rather than 4-byte. Write a C++ program that does the same thing and compare."

The customer decided to read only the first sentence of my reply, possibly the second, and ignore the third. "So what size should the INPUT structure be on 64-bit machines?"

There are a few ways you can go about finding out the size of a structure.

One method is to ask Raymond. This may work, but it makes Raymond rather grumpy since it demonstrates that you are lazy and just want the answer handed to you with no effort (or demonstration of understanding) on your part.

Read more: The old new thing
QR: 10190102.aspx

Posted via email from Jasper-net

The Top 5 .NET Memory Management Misconceptions

|
ET Memory management is an impressively complex process, and most of the time it works pretty well. However, it’s not flawless, and neither are we developers, so memory management problems are still something that a skilled developer should be prepared for. And while it’s possible to have useful information about .NET memory management and write better code without fully understanding the black box inside the framework, there are a few common misconceptions which need to be dispelled before you can really get started:
  •     A garbage collector collects garbage
  •     Doing lots of gen0 collections is bad
  •     Performance counters are great for understanding what is happening
  •     .NET doesn’t leak memory
  •     All objects are treated the same

Misconception #1: A Garbage Collector collects garbage

The run-time system has a notion of objects which it thinks it’s going to touch during the rest of its execution, and these are called the “live”, or reachable objects. Conversely, any object which isn’t live can be regarded as “dead”, and obviously we’d like to be able to reuse the memory resources that these dead objects are holding in order to make our program run more efficiently. So it is perhaps unintuitive that the focus of the .NET Garbage Collector (the GC, for short) is actually on the non-garbage; those so-called Live Objects.

One of the essential ideas behind the GC strategies that most people implement is that most objects die young. If you analyze a lot of programs, you find that, typically, a lot of them generate temporary objects while they’re doing some calculation, and then produce some other object to represent the results of that calculation (in some fashion). A lot of these young objects are therefore temporary, and are going to die quite quickly, so you want to design your GC to collect the dead items without having to process them all individually. Ideally, you’d like to only walk across the live objects, do something with those to keep them safe, and then get rid of all the objects which you now know are dead without going through them all one by one.

And this is exactly what the .NET GC algorithm does. It is designed to collect dead items without processing them individually, and to do so with minimal disruption to your system as a whole. This latter consideration is what gave rise to the generational model employed by the .NET GC, which I’ll mention again shortly. For now I’ll just say that there are three generations, labeled Gen0, Gen1 and Gen2, and that new objects are allocated to Gen0, which we’re going to focus on as we take a look at a simple example of how the GC works:

A Simple Mutator:

We’re going to try and illustrate what I’ve just explained using a simple C# program; a Mutator, as it’s called. This program makes an instance of a collection, which it then assigns into a local variable, and because this collection is assigned to the local variable, it’ll be live. And because this local variable is used throughout the execution of the While loop you can see below, it’ll be live for the rest of the program:

var collect = new List<B>();
while(true)
{
      collect.Add(new A());
      new A();
      new A();
}

Listing 1 – A simple mutator

What we’re doing is allocating three instances of a small class we’ve called A. The first instance we’ll put into the collection; it will remain live because it’s referenced by the collection, which is in turn referenced by the local variable. Then the two other instances will be allocated, but those won’t be referenced by anything, so they’ll be dead.


Read more: Simple talk
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://www.simple-talk.com/dotnet/performance/the-top-5-.net-memory-management-misconceptions/

Posted via email from Jasper-net

The top 10 hackers of all time

|
Hacking is not a recent invention. In fact, it has been around since the 1930s, although not always associated with computers. Here’s a rundown of some of the most noteworthy hackers in history.

1: Kevin Mitnick
Kevin Mitnick, once considered the most-wanted cybercriminal in the United States, is often touted as the poster child of computer hacking. Kevin mastered an early form of social engineering (scamming operators) and computer hacking to gain access to and modify telephony switching systems. After a very public two-year chase, arrest ,and incarceration, the hacker community collectively rose in protest against what they viewed as a witch hunt.

2: Robert Tappan Morris
On November 2, 1988, Robert Morris released a worm that brought down one-tenth of the Internet. With the need for social acceptance that seems to infect many young hackers, Morris made the mistake of chatting about his worm for months before he actually released it on the Internet, so it didn’t take long for the police to track him down. Morris said it was just a stunt and added that he truly regretted wreaking $15 million worth of damage, the estimated amount of carnage caused by his worm.

3: Vladimir Levin
Seeming like the opening of a James Bond movie, Vladimir Levin was working on his laptop in 1994 from his St. Petersburg, Russia, apartment. He transferred $10 million from Citibank clients to his own accounts around the world. As with most Bond movies, Levin’s career as a hacker was short lived — with a capture, imprisonment, and recovery of all but $400,000 of the original $10 million.

4: Yan Romanowski
Yan Romanowski, also known as MafiaBoy, was arrested in February 2000 for launching a denial-of-service attack that brought down many of the Internet’s largest sites, including Amazon, eBay, and Yahoo. Yan’s lawyer claimed, “If [MafiaBoy] had used all his powers, he could have done unimaginable damage.” It is widely believed that Romanowski is no more than a script kiddie. His attacks, however successful, were implemented using computer scripts that clogged networks full of garbage data.

Read more: TechRepublic
QR: 2610

Posted via email from Jasper-net

Open-Source CPU Architecture Pulled Into Linux 3.1 Kernel

|
The latest feature to be pulled into the Linux 3.1 kernel is support for OpenRISC, an open-source CPU architecture.

OpenRISC is the project from the OpenCores community that is designed to create an open-source RISC CPU with the hardware design, models, and firmware being released under the GPL/LGPL. The OR1200 implementation is able to run on FPGAs from a number of different hardware vendors and is evidently already being used within the industry.

While the OpenRISC project has been around for years, this is the first time that the necessary support for this open-source CPU architecture is landing in the mainline kernel tree. OpenCores developers have been tracking the upstream Linux kernel since 2.6.35, but now they've come to decide that they're ready to go for the gold in the Linux 3.1 kernel.


Read more: Phoronix
QR: scan.php?page=news_item&px=OTcwNg

Posted via email from Jasper-net

Stephen Toub says, "I've got your Samples for Parallel Programming with the .NET... right here..."

|
The .NET Framework 4 includes significant advancements for developers writing parallel and concurrent applications, including Parallel LINQ (PLINQ), the Task Parallel Library (TPL), new thread-safe collections, and a variety of new coordination and synchronization data structures.

This sample includes example applications and library functionality that demonstrate, utilize, and augment this support (it is not production quality). This sample is a single .zip containing a single Visual Studio .sln file, which then contains multiple Visual Studio projects that highlight key capabilities provided by the .NET Framework 4 and the parallel programming support it provides. Below are descriptions of the included examples.

(For discussions of Parallel Extensions and/or these samples, visit the forums at http://social.msdn.microsoft.com/Forums/en-US/parallelextensions/threads. For documentation on the parallelism constructs in .NET 4, see http://msdn.microsoft.com/en-us/library/dd460693(VS.100).aspx. For information direct from the Parallel Extensions team, subscribe to the team blog at http://blogs.msdn.com/pfxteam. For videos/articles on parallelism and Parallel Extensions, visit the Parallel Computing Developer Center at http://msdn.com/concurrency.)

Read more: Greg's Cool [Insert Clever Name] of the Day
QR: stephen-toub-says-got-your-samples-for.html

Posted via email from Jasper-net

Java Decompiler and its Missing Documentation

|
jdeclipse-settings.jpg?w=300&h=295

If you ever need a good decompiler for Java, there are plenty around. Nonetheless, I found one that integrates smoothly with Eclipse, which I’m guessing is not as common. The aptly named Java Decompiler is a newer one that has three parts: a core library (JD-Core), a GUI (JD-GUI) and an Eclipse plugin (JD-Eclipse). The purpose of the first two parts is fairly obvious. There is a core library that implements the decompiler and a GUI application you can use to view decompiled files. The Eclipse plugin is the most novel and interesting piece of the trio, so that’s what I’m going to discuss here.
It sounds like a great plugin, but what does it do?

That’s a good question, and it’s the natural one to ask when you’re looking for such a thing. The JD-Eclipse page makes an effort to help you through installing the promising plugin, but it tells no stories about what functionality it offers. Oddly enough, the page doesn’t even explain what settings are available for the plugin. In fact, it doesn’t even mention that there are any preferences (yet they do exist).

It turns out that JD-Eclipse is quite a nice plugin. It quietly and effectively handles many use cases. There are some quirks with it, but overall it’s a great tool to have around. The official JD-Eclipse website lacks documentation on what to expect when using the tool. To fill that void, here are some of the features of JD-Eclipse that I’ve stumbled upon so far.


Read more: Javalobby
QR: java-decompiler-and-its

Posted via email from Jasper-net

Игровой цикл в Silverlight

|
В этой статье, опишу использование в Silverlight игрового цикла. Функции, которая содержит всю логику по работе с анимацией и обработки действий пользователя, влияющие на анимацию. На примере управление машинкой.

Silverlight имеет отличную поддержку анимации. Дергаешь свойства в Blend, ставишь ключики. И все работает, контролы реагируют на действия пользователя. Программно, через Storyboard, анимация изменения свойства из состояния А в состояние Б, без происшествий по середине, тоже делается легко. Но когда дело доходит до сложной анимации (физика, расчет столкновений, динамическое изменение анимационной кривой), то реализация анимации через Storyboard значительно усложняет код или вообще не возможна.


Классический подход в этом вопросе, создать таймер и при каждом его обновление пересчитывать логику анимации.

В Silverlight это могут быть таймеры:

    System.Windows.Threading.DispatcherTimer – работающий в потоке UI
    System.Threading.Timer – работающий в отдельном потоке.


Read more: Habrahabr.ru
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://habrahabr.ru/blogs/silverlight/125037/

Posted via email from Jasper-net

The Cost of Testing or You don’t Know what You are Missing

|
Twice this week people challenged my belief in automated testing and Test Driven Development. The argument that was brought forward was simply: Unit tests are too expensive.

I actually believe the opposite is true. Let me tell you about a little dialog that happened in my development team after two developer where working on a feature for about an hour or two.

First Developer: “I think we got everything. Lets start the application and see if it works.” (starts the application)

Second Developer: “Hmm, doesn’t work.”

First: “Oh, I know, we forget to actually invoke the new feature” (fixes that and restarts the application)

Second: “Looks great. It works. Lets commit it to SVN”

What’s so special about this? They didn’t start the application a single time during the development process for over an hour. Can you do that without writing tests? Of course you can and you will spend restarting the application during the rest of the day until you fixed all the bugs. How long does your application need to restart? Including the time you need to navigate to the state where you can test your application. How long does that take?

Not having to do that. Or at least not very often is a huge time saver. And it’s not only the direct cost of restarting the application. Waiting for the application is often an interruption of your concentration. Do you really think about the next aspect of the feature to implement? Or do you check mail? Get a coffee? In my experience going Test Driven in Pairs is a way more concentrated type of working.

And that is not even considering that your tests will run over and over again, making sure later changes don’t break anything. This alone saved my butt a couple of times.

If you reached that level of TDD it will save money for you and your team. I promise.

Read more: DevOps Zone
QR: cost-testing-or-you-don%E2%80%99t-know

Posted via email from Jasper-net

Scala comes to .NET/Mono

|
scala.png

The Scala website, fount of all Scala information, has an interview and some details of a project to bring Scala to .NET and hence Mono. The project is sponsored by Microsoft which has interesting implications in itself.

The key person involved in the project is Miguel Garcia, part of the Scala group at EPFL ( École Polytechnique Fédérale de Lausanne) which is of course where the language was invented.

The current state of the project is that you can actually write Scala programs that run under .NET. There are a few limitations in using .NET libraries but these should be fixed in the near future. You can also use Visual Studio to build Scala programs but at the moment the plugin doesn't support nice features such as autocomplete etc. A new plugin, expected later in the year, is promised to provide full code support but you can use JVM IDE tools and simply import the completed code later.

Read more:  I Programmer
QR: 2790-scala-comes-to-netmono.html

Posted via email from Jasper-net

איך Windows יודעת את תאריך הקובץ.

|
LordPE%201.41.PNG

הייי

בכול קובץ PE קיים חלק שנקרא Resource Table , בחלק הזה מנגון הPE שומר פרטים על הקובץ כגון חתימת זמן ומספר הסיגמנטים סוג הלינקר בו השתמשתם כדי ליצור EXE וכדומה.

ובתוכו יש חלק שנקרא - TimeDateStamp

שבתוכו יש כתובת אשר מכילה את השינוי האחרון שהיה בקובץ (קריאה \ כתיבה)

היכרות עם LordPE:

במסך הראשוני אנו רואים את הפרוססים שרצים במערכת - לא רוולנטי לנו.

כאשר נלחץ על PE EDITOR תפתח בפננו תיבת דו שיח שמבקשת לפתוח קובץ אשר אותו אנו רוצים "לחקור" כביכול.

(במקרה הזה פתחתי קובץ רדומלי שהיה בתייקיה של Lordpe.)

המסך שלפננו מראה לנו ערכים של מגוון אופציות שנמצאות בResouce table.

כגון כתובת הכניסה או גודל הקובץ מספר המחלקות וכמובן אנו רואים את החלק החיוני לנו TimeDateStamp.


Read more: BnayaA
QR: windows.aspx

Posted via email from Jasper-net

Automated UI Testing - Part 1 - WatiN

|
A few months back I discovered a tool called WatiN. This is based on WatiR and is a web application testing tool for Dot Net developers. After doing a few little test applications i started to see the benefit of using this application in my development. The best thing i could see it could do for me was making sure my pre testing cycle smoke checks were all run and passing. This would save time in fixing little UI bugs spotted by QA testers.

For those who don't know what WatiN does then look at the following code:

[Test]
public void SearchForWatiNOnGoofle()
{
    using(IE browser = new IE("http://www.google.com"))
    {
        browser.TextField(Find.ByName("q")).TypeText("WatiN");
        browser.Button(Find.ByName("btnG")).Click();
        Assert.IsTrue(browser.ContainsText("WatiN"));
    }
}

Within the class add a reference to WatiN.Core.dll and Nutit.framework.dll and then run this little test app. What will happen is a new instance of IE will spin up [other browsers can be run if necessary using further references]. It will search teh page for the textbox with the name 'q' and enter the text 'WatiN'. It will then find the button called 'btnG' and click it.

Read more: DevOps zone
QR: automated-ui-testing-part-1

Posted via email from Jasper-net

Add Automatic Exception Reporting To Your .Net Software - Allow End-Users To Report Bugs Easily

|
exception_reporting.png

This article has been written by LogicNP Software and provides useful information about the Crypto Obfuscator Product

No matter how well you design and write your software, it is bound to encounter some errors or exceptions when out in the wild - they are a fact of life in software development. Therefore, it is crucial when an error or exception occurs on the end-user's site that you get to know about them. You must make it easy for the end-users to report errors and exceptions to you. Further, the exception report must contain enough information so that you are able to fix and resolve the cause of the problem.

Crypto Obfuscator's Automatic Exception Reporting functionality makes it extremely easy for you to catch any unhandled exceptions that occur in your software and for your users to easily report these exceptions to you with a single click of a button.

Contents Of The Exception Reports

The exception report prepared by Crypto Obfuscator contains the following information:

* Full stack trace info along with the values of all method arguments and local variables
* System information
* Miscellaneous info like the time of the exception, the build number, loaded assemblies, etc
* Optional developer defined custom data like log files, screenshots, etc.

Benefits of Automatic Exception Reporting

Automatic Exception Reporting helps you in the following ways:

* Increases the chances that the end-user will report the exception to you by making it very easy for them to send exception reports to you.
* Contains a variety of pertinent and useful information about the exception and its context.
* Increases the turnaround time of your bug-fixing process.
* Increases customer satisfaction and sales.

The Exception Reporting Service

Crypto Obfuscator comes with a ready-to-use Exception Reporting Service to which your software can upload exception reports to. The Exception Reports Viewer Dialog from Crypto Obfuscator allows you to download and view exception reports sent by users to the service.

Exception Reporting Consent Form

It is advisable to provide a choice to your end-users whether they want to send the exception report to you or not. To this end, Crypto Obfuscator can optionally show a consent form to the users of your software giving them the option to report exceptions automatically to the exception reporting service. Alternatively, they can also save the report to a file for sending at a later time. Users can also, if they so desire, provide their email address so that you can get back to them when the issue is resolved.


Read more: net curry com
QR: ShowArticle.aspx?ID=742

Posted via email from Jasper-net

SVN, Git, Mecurial, and CVS – Comparison of version control software

|
Version control (also called subversion control, or revision control) helps large projects from spinning out of control by letting individual programmers (or writers, or project managers), each tackle a project from a different angle without getting in each other’s way and without doing damage that can’t be undone. There’s a great visual introduction to version control here if you are completely unfamiliar with the concept.
Which version control is right for your project?

There are a number of solutions out there, and we’ve put together a definitive feature comparison so you can decide the best solution for you. It is a fairly technical topic, so if you don’t have a software background, read our comparison carefully, and consult with your lead technical personnel before you make any final decisions. Version control software, including the well known SVN and Git, was designed from the ground up to allow teams of programmers to work on a project together without wasting man-hours on paperwork. Instead of manually scanning branches of code and associated notes, version control allows for a central repository that is organized, logical, and facilitates file updates, notation, and even merging.

There are a lot of opinions regarding which version control framework is the best, and can force programmers and project management teams into fierce debate. When choosing the right version control for your project, you should consider that some of pros of one package you will come across are subjective, meaning the opinion of the programmer, and other factors, such as speed and IDE plug-in capabilities, overshadow the raw numbers.

The main difference between version control systems is whether they are server based or peer-to-peer. Either they have a centralized repository where code is checked out and back in with changes, or a setup where the code is frequently updated from peer sources, a more decentralized network, to keep code current.


Read more: Biz 3.0
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://www.timedoctor.com/biz3.0/git-mecurial-and-cvs-comparison-of-svn-software/

Posted via email from Jasper-net

C# Thrift Examples

| Wednesday, July 27, 2011
As I mentioned in my earlier post I have been working with Facebook’s Thrift messaging project.

Unfortunately there are not currently any C# examples of how to use the Data Transfer Objects the Thrift compiler generates for us on the official wiki.

We managed to figure out how to do it by following the Java instructions and converting them into C# code. Before writing any code we need to import Thrift.dll into our Visual Studio project.

Assuming that we have the following Thrift definition file:

namespace csharp Test.Thrift
 
struct FooBarMessageThrift {
1: string Foo
2: string Bar
}

When we run the Thrift compiler we will end up with the FooBarMessageThrift class. I won’t post this class here as it’s all codegen.

The easiest way to transport this class around is by converting it to a byte array and transporting that:

var fooBarMessage = new FooBarMessageThrift {Foo = "foo", Bar = "bar"};
var stream = new MemoryStream();
 
TProtocol tProtocol = new TBinaryProtocol(new TStreamTransport(stream, stream));
 
fooBarMessage.Write(tProtocol);
 
byte[] content = stream.ToArray();

Read more: Mark Needham
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://www.markhneedham.com/blog/2008/08/29/c-thrift-examples/

Posted via email from Jasper-net

Использование Thrift в .NET

|
Хочу поделиться с вами примером того как можно использовать такую удобную штуку как Thrift в своих .NET проектах.

Для тех кто не знает, Thrift — это фреймворк для облегчения взаимодействия между кодом написанным на разных языках, а именно C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, Smalltalk и OCaml.

Thrift используется и был изначально создан Facebook. Так же неоднократно упоминался здесь, на Хабре, но примеров для .NET я не нашел, кстати пошаговое руководство для .NET отсутствует и на официальном сайте. В гугле если честно, тоже не смог найти, хотя может плохо искал.

Thrift позволяет один раз описать сервис, структуры данных и даже исключения, а потом сгенерировать код для всех поддерживаемых языков. Таким образом, если вы, например, напишете сервер с использованием Thrift на .NET, то вы

    Сэкономите кучу времени для написания клиент серверного приложения, например с использованием сокетов.
    Почти автоматически получаете клиентов на всех поддерживаемых языках.

В своем примере я реализую простейший сервис, который просто будет возвращать время. Но имея такой макет достаточно легко расширить его до чего-нибудь полезного.


Итак нам понадобится:

  • Исходники Thrift — они нужны нам для того что бы собрать библиотеку (class library) для подключения в наш проект.
  • Thrift компилятор — консольная утилита которая генерирует код на необходимом нам языке из .thrift файлов

...
...

Шаг 3: Генерируем код из .thrift файла
Опишем наш сервис и структуру данных. Для этого создадим файл TimeService.thrift с таким содержанием:

    namespace csharp TimeServer.Thrift

    //Structure for returning Time
    struct TimeInfoStruct{
    1: string Time
    }

    //Service
    service TimeService
    {
      TimeInfoStruct GetTime()
    }


Read more: Habrahabr.ru
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://habrahabr.ru/blogs/net/106839/

Posted via email from Jasper-net

WCF Extensibility – Binding (and binding element) configuration extensions

|
Binding elements can be made “configurable” by using the BindingElementExtensionElement class (similar to the BehaviorExtensionElement class covered in a previous post). Bindings take a little more work, since we need two extension classes, one for the binding “section” (StandardBindingCollectionElement<TStandardBinding, TBindingConfiguration>) for the new binding type, and one for each specific binding “instance” (StandardBindingElement). The next sections will have more details about these classes.
Public implementations in WCF

Those are the public binding element extensions – those which can be used inside custom binding declarations in configuration. I’ll divide them in sections for the channel types which those binding elements create.

Encoders:

Transports:

Read more: Carlos' blog
QR: wcf-extensibility-binding-and-binding-element-configuration-extensions.aspx

Posted via email from Jasper-net

GPU.NET

|
splash_page_icon-r.png

Introducing GPU.NET, a developer platform with it's own Compiler and Runtime to easily hardware-accelerate .NET solutions.

Easily write GPU accelerated programs

    Intuitively write your application using .NET languages like C#, F#, VB.NET*.
        Kernel methods act like any other method, meaning you don’t need to spend time learning a new language or specific GPU's programming model.
    Debug and release correct code more quickly
        Now you can find errors at compile time instead of runtime. GPU.NET is integrated into Microsoft’s Visual Studio, so you can use all of the features you are used to: like IntelliSense, the Error List and more.

GPU.NET Excecution Model

Click here to learn how GPU.NET works

Get results faster than ever before

    Write code that runs orders of magnitude faster than your current code
        with the speed of GPU code written in proprietary languages. Visit our Benchmarks section to learn more.
    Be fast on all hardware architectures, not just one.
        At runtime, GPU.NET uses light-weight JIT compilation to generate code that is mapped to a hardware vendor's instruction set architecture (ISA). Due to our unique plug-in system, your code stays fast, even when the target hardware changes. Click here to view a list of currently supported hardware.


Protect your software investment

    Write code that can be deployed to all of your end users with a single binary!
        GPU.NET lets you create applications that stay 100% managed, meaning they work on 32/64 bit Windows on the .NET framework, or 32/64 bit Linux and Mac OSX through Mono.


Read more: Tidepowered
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://www.tidepowerd.com/

Posted via email from Jasper-net

How To Improve Server Performance by IO Tuning – Part 1

|
Many servers, especially databases like MySQL, are dealing with hard drive IO on every data insert, so in order to get much performance out of such databases with extensive amount of data inserts, it is critical to tune the IO writes.

Tuning IO is a tedious task which requires many iterations until you eventually reach your goals or see any results.

While tuning IO, I think that tuning for read performance is a different task from tuning for write performance. Combing them both can sometimes be one of the hardest tasks a SysAdmin can face.

I decided to focus on write performance in the first article.
Top-down

Wearing both hats of a SysAdmin and developer, I like to implement development methodologies into system administration. This time it is the ‘top-down‘ development methodology – analyzing all steps from the top – the application behavior, operating system, filesystem and then eventually – the bottom – the hardware.

When analyzing IO performance and designing for proper performance, always imagine IOPS as water running down a pipe – from your application to the hardware.

If any part of the pipe is narrower – it wouldn’t run properly. And our task here is to examine this pipe and widen it where needed.
Characterize your IO

Speaking of write performance, you would usually find your IO either very sequential – such as writing video blocks one after the other. Or rather fairly random – such as user driven DB updates in places you can’t really expect them. Tuning the latter is a rather harder task as the input would be rather random.
Tune your application

Developers are always afraid of using too much memory. Why? – I don’t know…

Memory today is cheap, and by far too many times I have found developers investing countless hours developing something more optimized and save a “huge” amount of 4kb of memory. Memory is by far cheaper than labor.


Read more: monitis
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://blog.monitis.com/index.php/2011/07/23/how-to-improve-server-performance-by-io-tuning-part-1/

Posted via email from Jasper-net

Console output with a transparent background color

|
In Windows land, if you want to print out colored text to a console, you will probably end up calling SetConsoleTextAttribute to set the desired color, then calling it again to restore the original settings. Unfortunately the documentation doesn't make it very clear how to change just the foreground color; which, in my experience, is a fairly common scenario. (You will still need to worry about clashing or unreadable text, but that is outside of the scope of this post.)

HANDLE consoleOut = GetStdHandle(STD_OUTPUT_HANDLE);

CONSOLE_SCREEN_BUFFER_INFO csbiInfo = {0};
GetConsoleScreenBufferInfo(consoleOut, &csbiInfo);

SetConsoleTextAttribute(consoleOut, FOREGROUND_INTENSITY | FOREGROUND_RED |
    (csbiInfo.wAttributes & (0x00F0)));

printf("Foreground red, background unchanged\n");

// restore the original colors
SetConsoleTextAttribute(consoleOut, csbiInfo.wAttributes);


Read more: Software Sleuthing
QR: console-output-with-a-transparent-background-color.aspx

Posted via email from Jasper-net

Avoiding common HTML5 mistakes

|
Between curating sites for the HTML5 gallery and answering readers’ questions here at HTML5 Doctor, I see a host of HTML5 sites and their underlying markup. In this post, I’ll show you some of the mistakes and poor markup practices I often see and explain how to avoid them.
Don’t use section as a wrapper for styling

One of the most common problems I see in people’s markup is the arbitrary replacement of <div>s with HTML5 sectioning elements — specifically, replacing wrapper <div>s (used for styling) with <section>s. In XHTML or HTML4, I would see something like this:

<!-- HTML 4-style code -->
<div id="wrapper">
  <div id="header"> 
    <h1>My super duper page</h1>
    <!-- Header content -->
  </div>
  <div id="main">
    <!-- Page content -->
  </div>12

Read more: HTML5 Doctor
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://html5doctor.com/avoiding-common-html5-mistakes/

Posted via email from Jasper-net

Microsoft Camera Codec Pack (think “1.97 bazillion custom camera codec’s, one download”) + Windows Photo Gallery gets RAW (support)

|
The Microsoft Camera Codec Pack enables the viewing of a variety of device-specific file formats. Note: Clicking Download means you agree to the Microsoft service agreement and privacy statement. Additional details below.

Version: 0652.0621
Date Published: 7/26/2011

Language: Basque, Bulgarian, Catalan, Croatian, Czech, Danish, English

MicrosoftCodecPack_amd64.msi, 8.0 MB
MicrosoftCodecPack_x86.msi, 4.0 MB

    The Microsoft Camera Codec Pack enables the viewing of a variety of device-specific file formats in Window Live Photo Gallery as well as other software that is based in Windows Imaging Codecs (WIC).
    Installing this package will allow supported RAW camera files to be viewable in Windows Explorer.
    This package is available in both the x86 and x64 versions .
    The Microsoft Camera Codec Pack provides support for the following device formats:
        Canon: EOS 1000D (EOS Kiss F in Japan and the EOS Rebel XS in North America), EOS 10D, EOS 1D Mk2, EOS 1D Mk3, EOS 1D Mk4, EOS 1D Mk2 N, EOS 1Ds Mk2, EOS 1Ds Mk3, EOS 20D, EOS 300D (the Kiss Digital in Japan and the Digital Rebel in North America) , EOS 30D, EOS 350D (the Canon EOS Kiss Digital N in Japan and EOS Digital Rebel XT in North America), EOS 400D (the Kiss Digital X in Japan and the Digital Rebel XTi in North America), EOS 40D, EOS 450D (EOS Kiss X2 in Japan and the EOS Rebel XSi in North America), EOS 500D (EOS Kiss X3 in Japan and the EOS Rebel T1i in North America), EOS 550D (EOS Kiss X4 in Japan, and as the EOS Rebel T2i in North America), EOS 50D, EOS 5D, EOS 5D Mk2, EOS 7D, EOS D30, EOS D60, G2, G3, G5, G6, G9, G10, G11, Pro1, S90
        Nikon: D100, D1H, D200, D2H, D2Hs, D2X, D2Xs, D3, D3s, D300, D3000, D300s, D3X, D40, D40x, D50, D5000, D60, D70, D700, D70s, D80, D90, P6000
        Sony: A100, A200, A230, A300, A330, A350, A380, A700, A850, A900, DSC-R1
        Olympus: C7070, C8080, E1, E10, E20, E3, E30, E300, E330, E400, E410, E420, E450, E500, E510, E520, E620, EP1
        Pentax (PEF formats only): K100D, K100D Super, K10D, K110D, K200D, K20D, K7, K-x, *ist D, *ist DL, *ist DS
        Leica: Digilux 3, D-LUX4, M8, M9
        Minolta: DiMage A1, DiMage A2, Maxxum 7D (Dynax 7D in Europe, α-7 Digital in Japan)
        Epson: RD1
        Panasonic: G1, GH1, GF1, LX3


Read more: Greg's Cool [Insert Clever Name] of the Day
QR: microsoft-camera-codec-pack-think-197.html

Posted via email from Jasper-net

Unity 3.4 released

|
184_9982_184_1461_184_8166_unity_logo_topimage.jpg?i=1311693518

New tech integrates Allegorithmic Substance; Android and iOS support enhanced

Unity has made available the newest edition of its popular game platform.

One headline new feature is integration of Allegorithmic Substance, the widely-applauded texture compression application.

Unity 3.4 also includes enhancements to the game editor, as well as increased support for Android and iOS platforms.

The full list of updates can be found below.

  • Allegorithmic Substance Integration:
  • Native support for Allegorithmic procedural Substance materials.
  • Tweak and change exposed substance parameters right inside of Unity.
  • Change substance parameters at runtime on PC and Mac.
  • Gain major file size savings due to the compactness of procedural textures on PC and Mac.
  • Bake substances into regular textures and materials on mobile platforms.

Read more: Develop
QR: Unity-34-released

Posted via email from Jasper-net

The Principles of Good Programming

|
by Christopher Diggins
July 24, 2011

    Summary
    Over the years I have found that following a relatively small number of fundamental guiding principles has helped me become a much more effective programmer.

Today's post is a lightly edited repost from my blog at The Area, a web-site dedicated to users of Autodesk media and entertainment products. I came up with this list of principles to help with a recent C# training I gave, and I thought that members of the Artima.com community could appreciate these principles and have some interesting insights to share.
Principles of Good Programming

The principles of good programming are closely related to principles of good design and engineering. The following programming principles have helped me over the years become a better programmer, and I believe can help any developer become more efficient and to produce code which is easier to maintain and that has fewer defects.

DRY - Don’t repeat yourself - This is probably the single most fundamental tenet in programming is to avoid repetition. Many programming constructs exist solely for that purpose (e.g. loops, functions, classes, and more). As soon as you start repeating yourself (e.g. a long expression, a series of statements, same concept) create a new abstraction. http://en.wikipedia.org/wiki/Don%27t_repeat_yourself

Abstraction Principle - Related to DRY is the abstraction principle “Each significant piece of functionality in a program should be implemented in just one place in the source code.” http://en.wikipedia.org/wiki/Abstraction_principle_(programming)

KISS (Keep it simple, stupid!) - Simplicity (and avoiding complexity) should always be a key goal. Simple code takes less time to write, has fewer bugs, and is easier to modify. http://en.wikipedia.org/wiki/KISS_principle

Avoid Creating a YAGNI (You aren’t going to need it) - You should try not to add functionality until you need it. http://en.wikipedia.org/wiki/YAGNI

Do the simplest thing that could possibly work - A good question to ask one’s self when programming is “What is the simplest thing that could possibly work?” This helps keep us on the path towards simplicity in the design. http://c2.com/xp/DoTheSimplestThingThatCouldPossiblyWork.html

Don’t make me think - This is actually the title of a book by Steve Krug on web usability that is also relevant in programming. The point is that code should be easily read and understood with a minimum of effort required. If code requires too much thinking from an observer to understand, then it can probably stand to be simplified http://www.sensible.com/dmmt.html

Open/Closed Principle - Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification. In other words, don't write classes that people can modify, write classes that people can extend. http://en.wikipedia.org/wiki/Open_Closed_Principle

(more..)

Read more: Artima developer

QR: viewpost.jsp?thread=331531

Posted via email from Jasper-net

Fix It to remove Microsoft Office 2003/2007/2010 when Add/Remove won’t

|
This article covers Office versions 2003, 2007 and 2010. Additionally, there is an article that covers steps to manually remove Office 2007.For more information, click the following article number to view the article in the Microsoft Knowledge Base: 971179 How do I uninstall the 2007 Office suites if I cannot uninstall it by using the "Add or Remove Programs" feature?

You can uninstall the Microsoft Office system by going to the appropriate "Fix it for me" section that matches your version of Microsoft Office. The Fix It solutions below do not remove any Office program that was installed separately from the Office suite. For example, if you have Microsoft Office Professional 2007 and Microsoft Office Visio 2007 installed on your computer, the Fix It solution only removes Microsoft Office Professional 2007 from your computer. Visio 2007 will not be removed. Additionally, you must reboot your machine if you use one of the Fix it solutions below.


Read more: Greg's Cool [Insert Clever Name] of the Day

QR: fix-it-to-remove-microsoft-office.html

Posted via email from Jasper-net

Virtualboxes.org Helps You Discover Your New Favorite Linux Flavor with Tons of Virtualbox Images

|
medium_virtualboxeslist.jpg

So you've gotten started with Linux, but you're looking for a new flavor besides Ubuntu to try out. Instead of installing a bunch of them from scratch, web site Virtualboxes provides a bunch of free Virtualbox images for you to test out, no installation required.

Virtualbox is a great way to try out software and operating systems without having to partition or reboot your machine, but you still have to download live CDs and go through installation procedures. Web site Virtualboxes hosts a number of Virtualbox images for a bunch of different Linux distributions and other operating systems. That way, if you're ready to move on but you aren't sure what you want to try next, you can give them a shot in Virtualbox without going through all the tedium of installation (or the annoyances that come with Live CDs).

Read more: Lifehacker


QR: virtualboxes-hepps-you-discover-your-next-flavor-of-linux-with-a-repository-of-virtualbox-images

Posted via email from Jasper-net

How to Create a Different Circular Loader using XAML?

|
Last Wednesday (July 6th 2011) we explored a way to create a Circular loader using XAML without writing any line in the code behind file. Lot of you gave a good feedback and discussed various findings on the same.

I did some more investigation to create a different type of circular loader which you can include in your Silverlight, WPF and Windows Phone 7 applications where you are using XAML code. In this article, I will be guiding to create similar kind of Circular loader as shown above. This will be more simple than the previous one. Let's start our discussion and create one loader like this.
Background

I hope that you read my previous article "How to Create a Circular Loader using XAML?" that I posted last week. If you didn't read that yet, I will suggest you to read that one first because, that will give you more idea while reading this article. This is the 2nd part of the series where I am going to showcase you another type of loader just using the XAML code.
Setting up the Project

First we need to setup our project.  First create your Silverlight project and add one UserControl named "CustomLoader.xaml" in the project. Then we need to create the UI of the UserControl. But before going to that step, we need three assembly references included in the project. the following three DLL references in it:

    Microsoft.Expression.Drawing.dll
    Microsoft.Expression.Interactions.dll
    System.Windows.Interactivity.dll

The first DLL will be useful to create a Circular Arc and the rest of the other two DLLs will be used to create the Triggers. We will discuss more on this later while adding them.


Read more: Codeproject


QR: How-to-Create-a-Different-Circular-Loader-using-XA

Posted via email from Jasper-net

Delegate :C# ( Digging , Explain , Use it)

|
Overview

.NET provides one nice characteristic that is delegate. Delegate is an object or instance which can hold reference of any function OR which can bind function. Referenced function may be static or any class object’s function. This can hold more than one function references. This also provides callback method. Developer’s perspective Delegate is two type single cast and multicast.

Every delegate base class is System.MulticastDelegate. System.MulticastDelegate class is inheriting from delegate class. Both classes are abstract class.

.NET provide standard constructor as follows:

Constructor for MultiCastDelegate : protected MulticastDelegate(object target, string method);

Constructor for Delegate : protected Delegate(object target, string method);
Declare Delegate

Declaring of the delegation is quite tricky, because when we declare delegation. We inform the compiler which kind of function signature’s reference could be hold by this delegate. Let’s explain by following: Fig-1.0 

Look at FIG-1.0:

Fig-001.png

  1.     public is Access modifier .
  2.     delegate is keyword which indicates this is delegate type.
  3.     Return type of function signature.
  4.     Delegate class name. (Explain below).
  5.     Parameter of function signature.
  6.     Parameter of function signature


Read more: Codeproject
QR: Delegate_in_C___Expain.aspx

Posted via email from Jasper-net

Hacking IPv6 Networks

|
Hacking IPv6 Networks. Hack In Paris 2011 Conference, June 14-17, 2011. Paris, France. (slides of part of the training

Read more: Hacking IPv6 Networks
QR: past-trainings

Posted via email from Jasper-net

Microsoft Diagnostic and Recovery Toolkit – DART

| Tuesday, July 26, 2011
clip_image006_thumb_44E119A5.jpg

שבוע טוב לכולם,

שוב איתכם, אורי הוסיט, יועץ תשתיות ב-Agile Solutions.

היום אכיר לכם את DART (Diagnostic and Recovery Toolkit), מוצר נוסף המגיע כחלק מחבילת ה-MDOP (Microsoft Desktop Optimization Pack).

כולנו מעת לעת נתקלנו בבעיות ב-Windows אשר לא מאפשרות לנו עליה מסודרת לשולחן העבודה שלנו. במקרים מסוג זה אנו זקוקים למערכת הפעלה נפרדת אליה נוכל לעלות ולשלוט בצורה מוחלטת וכך לתקן את המערכת ההפעלה הקיימת על הכונן הקשיח שלנו.

לשם כך נוכל להשתמש ב- Microsoft DART.

DART הינו אוגדן כלים מעולים המאפשרים לנו שליטה ב-Windows המותקן במחשב האישי מבלי להפעיל אותה.
ניתן לגשת ל-DART בשתי דרכים עיקריות:

א. דרך מדיה ניידת (תקליטור, כונן נייד...)

ב. התקנה על מערכת הפעלה לגישה דרך תפריט BOOT בעליית המחשב.

להלן תמונת מסך המפרטת את אפשרויות התוכנה ואני אפרט אותם מטה:

Posted via email from Jasper-net

Writing a Reusable WPF Control with Design Support

|
Code reusablity is one of the major concern to many of us. When dealing with large projects, modularizing your project is one of the primary thing that you should look for. I have talked about many of the approaches that you can use to deal with modularizing your code, eg, Prism. In this post our intent is not to talk hard on some pattern, rather I will discuss how your WPF application supports code reusability. There are a number of approaches that WPF supports to deal with reusable component. We can use Resources to define a Resource or even use CodeBehind to write our reusable component or even load the XAML from a file using XAML Loader. Each of the approaches has its own pros and cons. Today I will show you another cool technique to write a reusable XAML for your project which will allow you to easily use Visual Studio design surface to design the component.

Note : It is a very basic article, if you want to know about details on WPF, please read my tutorial on it.

Steps to Create your Reusable Component

Lets create a series of steps to create a reusable component for your application to make it easier for you to write one yourself.

Step 1 : Start Visual Studio and Create a new WPF project.
Step 2 : Add a new Page to the application and call it as GreetPanel. Just like the figure below.

loose1.PNG

Read more: Dot net tricks
QR: writing-reusable-wpf-control-with.html

Posted via email from Jasper-net

Visual Studio 2010 styles

|
Style_thumb%25255B4%25255D.png?imgmax=800

I have been working with Visual Studio 2010 yesterday and I was searching some thing and same time I have found one great site for Visual Studio styles. http://studiostyl.es/ This site is cool and you can find lots of visual studio 2010 styles of your choice. Here is the screenshot of site.

Read more: .NET Zone
QR: visual-studio-2010-styles

Posted via email from Jasper-net

How to be Creative Like Eminem

|
I’m pretty sure you’ve heard of Eminen, the rapper. But do you know what makes him great at what he does? His uncanny ability to play with words and create lyrics that don’t seem to rhyme.

Anderson Cooper, from 60 Minutes, interviewed Eminem late last year. In the interview, among other things, Eminem tells Anderson Cooper about his song writing method. I thought this was interesting because Eminem can helps us learn how to be more creative and thought I’d post some of my thoughts here.

I can’t post the video here because embedding is disabled but you can watch the video on YouTube (Editor: try below) and the part where he explains his creative process starts around the 5 minute mark.


Read more: Blogging Innovation
QR: https://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://www.business-strategy-innovation.com/wordpress/2011/07/how-to-be-creative-like-eminem/

Posted via email from Jasper-net

Automation of Internet Explorer Using shdocvw.dll and mshtml.tlb – A Case Study

|
Introduction

Microsoft Internet Explorer comes with a fairly comprehensive, although sparsely documented, Object Model. If you've used the Web Browser control in Access, you are already familiar with the capabilities of IE's Object Model. All of the functionality in IE's object model (not counting external support, like scripting support etc.) is provided by the following two DLLs:

    shdocvw.dll (Microsoft Internet Controls)
    mshtml.tlb (Microsoft HTML Object Library)

You can automate IE to save an HTML file locally, inspect all the elements, and parse out a particular item at runtime.

Here's some sample code that automates through Internet Explorer Windows login into rediffmail.com, if the user name and password are valid.

First, the application opens the http://rediff.com site. It types the user name and password at the specified location and clicks the Submit button so that it goes to the Inbox page. It also opens the Compose page for the particular user.

The application extensively uses the shdocvw.InternetExplorer object and the mshtml.Document object.

Private Sub Form1_Load(ByVal sender As System.Object, _
            ByVal e As System.EventArgs) Handles MyBase.Load
    Dim wbBrowser As New SHDocVw.InternetExplorer wbBrowser.Visible = True
    wbBrowser.Navigate("http://www.rediff.com", Nothing, Nothing, Nothing, Nothing)
    Do
    Loop Until Not wbBrowser.Busy
    LoginIntoSite(wbBrowser)
    OpennComposePage(wbBrowser)
End Sub

Public Sub LoginIntoSite(ByRef wbBrowser As SHDocVw.InternetExplorer)

    Dim HTMLDoc As mshtml.HTMLDocument

    Do
    Loop Until Not wbBrowser.Busy

    HTMLDoc = wbBrowser.Document

    Dim iHTMLCol As IHTMLElementCollection
    Dim iHTMLEle As IHTMLElement
    Dim str, userName, passwd As String
   
    iHTMLCol = HTMLDoc.getElementsByTagName("input")
   
    ' Type the user name in the username text box
    For Each iHTMLEle In iHTMLCol
        If Not iHTMLEle.getAttribute("name") Is Nothing Then
            str = iHTMLEle.getAttribute("name").ToString
            If str = "login" Then
                iHTMLEle.setAttribute("value", "<VALID USER NAME>")
                Exit For
            End If
        End If
    Next

Read more: Codeproject
QR:kirangoka.aspx

Posted via email from Jasper-net

פיתוח אתרי HTML5 מודרניים עם Modernizr

|
בזמן שפיתוח אתרים מודרניים העושים שימוש במגוון יכולות של HTML5, CSS3 ו- JavaScript API’s חדשים הולך וצובר תאוצה, עלינו להתמודד עם בעיית התאימות למגוון גירסאות הדפדפנים שנמצאים בשימוש אצל המשתמשים. כיוון שכל דפדפן תומך באלמנטים אחרים של הסטנדרטים המתקדמים באופן טיפה שונה וקצב שונה, עלינו לדעת אילו יכולות עומדות לרשות המשתמש שלנו בדפדפן בו הוא משתמש כדי להציג לו את האתר ולאפשר לו להינות ממנו.


image_06B0979E.png

Read more: Guy Burstein's Blog
QR: html5-modernizr.aspx

Posted via email from Jasper-net