Cutting Through the 4G Hype
0 commentsCell phone companies are about to bombard us with advertising for the next big thing — 4G access. The first 4G phone, Sprint Nextel's EVO, comes out this week. But just how big a deal is 4G? Is it fast enough to warrant the hype, or are consumers better off waiting a while? AP technology writer Peter Svensson looks at the differences between 4G and 3G technologies. Read more: Slashdot
Read more: Google hosted
Read more: Google hosted
MDOP error reporting for small, midsize, and large companies
0 commentsIt is time to do a blog post that points to some resources about the Microsoft Desktop Optimization Pack (MDOP), since we get a lot of questions about how Error Reporting can work better for small, mid-size, and large corporations. This is part of the Microsoft Software Assurance Program and provide many of the benefits of Windows Error Reporting that IT Professionals can customize. Part of the customizations enable IT Professionals to better analyze and respond to common problems within their organization. A SpringBoard Series is available here: http://technet.microsoft.com/en-us/windows/bb899442.aspxA great starting place to learn about all MDOP has to offer is here: http://technet.microsoft.com/en-us/windows/ff383366.aspx Read more: WER Services
A C# Version of DotNetNuke
0 commentsDid you hear the news? You can get DotNetNuke in C# now! What? Say it ain’t so, DotNetNuke has abandoned VB.NET? Well not quite, the release and production version of DotNetNuke is still in VB.NET, though a kind soul has spent some time lately converting DNN to C#. For all the details you can check out Scott’s blog post over on DotNetNuke.com Never fear VB lovers, DotNetNuke isn’t moving away from VB.NET anytime soon (afaik), but this C# port of the project is just another way for people to get involved with the project that had trepidations about it being written in VB.NET. Read more: Chris Hammond
Read more: DotNetNuke
Read more: DotNetNuke
Managed code using unmanaged memory: HeapCreate, Peek and Poke
0 commentsIn the old days of Basic (starting over 4 decades ago), there were functions called Peek and Poke that would allow you to read and write memory directly. These were incredibly powerful commands: you could, for example, read and write directly to the hardware, like the video display, the tape cassette recorder, or the speaker. More modern versions of the language dropped Peek/Poke. However, you can still read and write memory, even from managed code, and this ability is still extremely powerful. You can’t write directly to the speaker, but you can do other fun things: see What is your computer doing with all that memory? Write your own memory browser and Use Named Pipes and Shared Memory for inter process communication with a child process or two The word “Managed” when applied to languages means that the memory that the program uses is automatically managed for the program: you can just use memory without paying attention to freeing it (usually). there is an automatic unused memory (“garbage”) collector.
(see Examine .Net Memory Leaks). In this sample we’ll create our own heap into which we’ll write and then read some memory. Keep in mind that the memory could come from anywhere, not just our own heap. We define a TestData structure that has only 2 integer data members. Strings are more complicated because of variable length, encoding, allocation issues.
(see HeapCreate and Marshal.PtrToStructure) Start Visual Studio 2010. (you can use older versions, but you’ll have to remove some of the new features I’ve used in the code)
File->New Project->(VB or C#) Windows ->WPF Application. Double click on the form designer to get the code behind file. Replace with the respective version from below. Make sure you have Tools->Options->Debugger->Just My Code unchecked. Put a breakpoint (F9) on the first line and single step through. Observe the values change as each line is executed. If you choose Debug->Windows->Memory1, you can try to see the memory by putting the Address ptr ( like 0x09C307D0) in the address window to see the memory. (In C#, you can drag/drop the address from the Locals window to the Memory window.) Right click on the memory window and choose to display the memory as 4 byte integers. Read more: Calvin Hsia's WebLog
(see Examine .Net Memory Leaks). In this sample we’ll create our own heap into which we’ll write and then read some memory. Keep in mind that the memory could come from anywhere, not just our own heap. We define a TestData structure that has only 2 integer data members. Strings are more complicated because of variable length, encoding, allocation issues.
(see HeapCreate and Marshal.PtrToStructure) Start Visual Studio 2010. (you can use older versions, but you’ll have to remove some of the new features I’ve used in the code)
File->New Project->(VB or C#) Windows ->WPF Application. Double click on the form designer to get the code behind file. Replace with the respective version from below. Make sure you have Tools->Options->Debugger->Just My Code unchecked. Put a breakpoint (F9) on the first line and single step through. Observe the values change as each line is executed. If you choose Debug->Windows->Memory1, you can try to see the memory by putting the Address ptr ( like 0x09C307D0) in the address window to see the memory. (In C#, you can drag/drop the address from the Locals window to the Memory window.) Right click on the memory window and choose to display the memory as 4 byte integers. Read more: Calvin Hsia's WebLog
HOT GUIDS - Socializing the Guid
0 commentsFinally there's a place where people can vote on and discuss their favorite guids.I've built in pretty much all the best social features. You can vote on a guid, see other votes for a guid, adopt a guid, or email a guid to your friends. And if you get sick of the guid you're looking at: with the click of a button you can move onto a whole new guid. I'm trying to really take the long tail of human interest by storm. If I get just one customer for each guid, then I'll get... oh I don't know, it must be a *lot* of hits.Thanks to Stack Overflow for the guid generating snippet. The web template started out the same as 'CreditCardOlogy' but with a little (Powerpoint + MSPaint + PngOut) I took it to a new place entirely. If you're unsure what any of this is about, please read about guids (& UUIDs) at wikipedia, or try running this Simple Proof That Guid is not Unique.And make sure email me if you see any particular delicious looking guids. There's some beauties out there. Read more: SecretGeek
Read more: Hot GUID
Read more: Hot GUID
JoshDOS
0 commentsJoshDOS is a command line operating system kernel based off COSMOS. It can be booted from actual hardware and built in Visual Studio using .NET languages. It is developed in C#.Project Goal
Read more: Codeplex
- To create an easy way to create DOS like operating systems.
- To premote COSMOS, the C# open source managed operating system.
- Use .NET to create operating systems
- and just to have fun!
Read more: Codeplex
Read more: COSMOS
Kyoto Cabinet
0 commentsKyoto Cabinet is a library of routines for managing a database. The database is a simple data file containing records, each is a pair of a key and a value. Every key and value is serial bytes with variable length. Both binary data and character string can be used as a key and a value. Each key must be unique within a database. There is neither concept of data tables nor data types. Records are organized in hash table or B+ tree.
Kyoto Cabinet runs very fast. For example, elapsed time to store one million records is 0.9 seconds for hash database, and 1.1 seconds for B+ tree database. Moreover, the size of database of Kyoto Cabinet is very small. For example, overhead for a record is 16 bytes for hash database, and 4 bytes for B+ tree database. Furthermore, scalability of Kyoto Cabinet is great. The database size can be up to 8EB (9.22e18 bytes).
Kyoto Cabinet is written in the C++ language, and provided as API of C++, C, Java, Python, Ruby, and Perl. Kyoto Cabinet is available on platforms which have API conforming to C++03 with the TR1 library extensions. Kyoto Cabinet is a free software licensed under the GNU General Public License. Read more: Kyoto Cabinet
Kyoto Cabinet runs very fast. For example, elapsed time to store one million records is 0.9 seconds for hash database, and 1.1 seconds for B+ tree database. Moreover, the size of database of Kyoto Cabinet is very small. For example, overhead for a record is 16 bytes for hash database, and 4 bytes for B+ tree database. Furthermore, scalability of Kyoto Cabinet is great. The database size can be up to 8EB (9.22e18 bytes).
Kyoto Cabinet is written in the C++ language, and provided as API of C++, C, Java, Python, Ruby, and Perl. Kyoto Cabinet is available on platforms which have API conforming to C++03 with the TR1 library extensions. Kyoto Cabinet is a free software licensed under the GNU General Public License. Read more: Kyoto Cabinet
SQL Server: миф дня (1/30) - После сбоя, выполнение текущих транзакций будет продолжено
0 commentsВсем привет! Сегодня я хочу начать серию постов, в основу которых положены публикации известного и уважаемого человека в мире SQL Server - Пола Рэндала, в которых он описывает 30 наиболее распространённых мифов в работе с SQL Server. Пол писал по посту каждый день, на протяжении всего апреля. Подобную скорость обеспечить навряд-ли смогу :) но обещаю по мере сил развенчивать новые и новые мифы вместе с Полом. Итак, к делу! Миф №1 – После сбоя, выполнение текущих транзакций будет продолжено
После того как на сервере происходит аппаратный либо программный сбой, начинается ряд операций по восстановлению системы после сбоя. И если транзакция не была зафиксирована на сервере до сбоя, то не существует способа автоматически воссоздать контекст транзакции и "воскресить" выполнявшуюся транзакцию на резервном сервере, какой бы способ обеспечения отказоустойчивости вы бы ни избрали: отказоустойчивый кластер, зеркалирование, доставка журналов или SAN репликация. В отказоустойчивом кластере, когда происходит сбой на основном сервере, поднимается экземпляр на резервном. В процессе восстановления после сбоя все не завершённые транзакции (в том числе и аварийно завершённые) откатятся (механизм восстановления после сбоя более подробно описан в статье Ведение журнала и восстановление в SQL Server). При зеркалировании БД лог транзакций зеркальной базы постоянно пополняется записями лога основной БД. После чего эти инструкции выполняются на зеркальной базе. Этот механизм позволяет обеспечить согласованность основной и зеркальной баз. Когда происходит переключение серверов (ручное, либо автоматическое в результате сбоя) лог транзакций зеркальной базы переходит в режим восстановления после сбоя, в ходе которого все незавершённые транзакции будут откачены. После восстановления сервер разрешает соединения с базой данных. Механизм доставки журналов подразумевает периодическое снятие бэкапа лога транзакций БД первичного сервера, копирования и восстановление на произвольном количестве вторичных серверов. После сбоя администратор баз данных поднимает один из вторичных серверов. При этом он имеет возможность снять резервную копию лога транзакций с первичной БД (уже после отказа БД) и накатить её на вторичную. И опять таки, в этом случае, как часть процесса востановления произойдёт откат всех незафиксированных транзакций. В SAN репликации все I/O операции которые просходят на локальном SAN дублируются на удалённом, что позволяет иметь удалённую копию БД. Когда происходит сбой, система соединяется с удалённым SAN, и происходит процесс восстановления после сбоя, точно так же, как и в отказоустойчивом кластере (это упрощенное объяснение, - но идея ясна). *Единственный* способ, позволяющий поддерживать непрерывное соединение с БД во время сбоя – использование виртуализации с функцией "live migration", которая подразумевает то, что когда виртуальная машина поднимается, соединения не знают, что они обращаются к другому физическому узлу, на котором находится виртуальная машина. Но какой бы механизм вы ни использовали – если *соединение* разорвано, все данные выполняющихся в данный момент транзакций будут потеряны. Поэтому ваше приложение должно разрабатываться с учётом таких ситуаций: корректно обрабатывать разрыв соединения с базой данных и возможно выполнять повторный запуск команд. Read more: Denis Reznik's blog
После того как на сервере происходит аппаратный либо программный сбой, начинается ряд операций по восстановлению системы после сбоя. И если транзакция не была зафиксирована на сервере до сбоя, то не существует способа автоматически воссоздать контекст транзакции и "воскресить" выполнявшуюся транзакцию на резервном сервере, какой бы способ обеспечения отказоустойчивости вы бы ни избрали: отказоустойчивый кластер, зеркалирование, доставка журналов или SAN репликация. В отказоустойчивом кластере, когда происходит сбой на основном сервере, поднимается экземпляр на резервном. В процессе восстановления после сбоя все не завершённые транзакции (в том числе и аварийно завершённые) откатятся (механизм восстановления после сбоя более подробно описан в статье Ведение журнала и восстановление в SQL Server). При зеркалировании БД лог транзакций зеркальной базы постоянно пополняется записями лога основной БД. После чего эти инструкции выполняются на зеркальной базе. Этот механизм позволяет обеспечить согласованность основной и зеркальной баз. Когда происходит переключение серверов (ручное, либо автоматическое в результате сбоя) лог транзакций зеркальной базы переходит в режим восстановления после сбоя, в ходе которого все незавершённые транзакции будут откачены. После восстановления сервер разрешает соединения с базой данных. Механизм доставки журналов подразумевает периодическое снятие бэкапа лога транзакций БД первичного сервера, копирования и восстановление на произвольном количестве вторичных серверов. После сбоя администратор баз данных поднимает один из вторичных серверов. При этом он имеет возможность снять резервную копию лога транзакций с первичной БД (уже после отказа БД) и накатить её на вторичную. И опять таки, в этом случае, как часть процесса востановления произойдёт откат всех незафиксированных транзакций. В SAN репликации все I/O операции которые просходят на локальном SAN дублируются на удалённом, что позволяет иметь удалённую копию БД. Когда происходит сбой, система соединяется с удалённым SAN, и происходит процесс восстановления после сбоя, точно так же, как и в отказоустойчивом кластере (это упрощенное объяснение, - но идея ясна). *Единственный* способ, позволяющий поддерживать непрерывное соединение с БД во время сбоя – использование виртуализации с функцией "live migration", которая подразумевает то, что когда виртуальная машина поднимается, соединения не знают, что они обращаются к другому физическому узлу, на котором находится виртуальная машина. Но какой бы механизм вы ни использовали – если *соединение* разорвано, все данные выполняющихся в данный момент транзакций будут потеряны. Поэтому ваше приложение должно разрабатываться с учётом таких ситуаций: корректно обрабатывать разрыв соединения с базой данных и возможно выполнять повторный запуск команд. Read more: Denis Reznik's blog
ASP.NET MVC Time Planner
0 commentsMVC Time Planner is simple time planning solution for personal users and groups. Users can log in to time planner using LiveId. There are still a lot of things I plan to do to make this soution also suitable for groups and teams. As I am developing MVC Time Planner from my free time please don't expect commercial level speed of development. I wrote this application for one of my sessions and also published some development details in my blog. As my blog readers are asking more and more for source code of Time Planner application then I decided to port it over to Visual Studio 2010 and make it available to whole world. MVC Time Planner project is maintained by ASP/ASP.NET MVP Gunnar Peipman.
Tools and technologies used in this project:
Visual Studio 2010 Ultimate Edition
.NET Framework 4.0
ASP.NET MVC 2
SQL Server 2008 Express Edition
NHibernate
Unity
LiveId
jQuery
jQueryUI
FullCalendarRead more: Codeplex
Tools and technologies used in this project:
Visual Studio 2010 Ultimate Edition
.NET Framework 4.0
ASP.NET MVC 2
SQL Server 2008 Express Edition
NHibernate
Unity
LiveId
jQuery
jQueryUI
FullCalendarRead more: Codeplex
Static constructor in C#
0 commentsDid you ever implement a singleton in c#? For those who don't know what a singleton is, it is a class which can only have one instance, more on Wikipedia. The preferred implementation of a singleton in c# is the following. public sealed class Singleton
{
//single instance
private static readonly Singleton instance = new Singleton();
//private constructor
private Singleton(){} public static Singleton Instance
{
get
{
return instance;
}
}
}But what would you do if you want to execute some custom code before the instance of the singleton is initialized? You can use the classic singleton code which isn't really different than in other programming languages. Read more: Baldi's Blog
{
//single instance
private static readonly Singleton instance = new Singleton();
//private constructor
private Singleton(){} public static Singleton Instance
{
get
{
return instance;
}
}
}But what would you do if you want to execute some custom code before the instance of the singleton is initialized? You can use the classic singleton code which isn't really different than in other programming languages. Read more: Baldi's Blog
New Ebola Drug 100 Percent Effective In Monkeys
Sunday, May 30, 2010 0 commentsA team of scientists at Boston University has created a cure for the Ebola Virus, first discovered in 1976. After setting the correct dosages, all monkeys tested with the vaccine survived with only mild effects. No tests have been performed on humans yet, as outbreaks happen infrequently and are difficult to track. Quoting NPR: '[The drug] contains snippets of RNA derived from three of the virus' seven genes. That "payload" is packaged in protective packets of nucleic acid and fat molecules. These little stealth missiles attach to the Ebola virus' replication machinery, "silencing" the genes from which they were derived. That prevents the virus from making more viruses. Read more: Slashdot
Crypto Soft CSP
0 commentsРуководство программистаСтруктура данного руководстваОписание API CryptoSPI
Основные типы данных Crypto Soft CSP
Примеры использования API CryptoSPI
Исходный код приложения примеров
Источники технической информацииИнтерфейс Crypto Soft CSP соответствует спецификации Microsoft CryptoSPI. Для разработки приложений, использующих Crypto Soft CSP, можно работать с первоисточником - непосредственно с MSDN. Использование возможностей, расширяющих Microsoft CryptoSPI, рассматривается в данном руководстве.Расширение Microsoft CryptoSPI разаработано для реализации плагинной архитектуры Crypto Soft CSP, а также управления протоклированием его работы. Архитектура Crypto Soft CSP описывается в руководстве пользователя. Read more: Crypto Soft
Основные типы данных Crypto Soft CSP
Примеры использования API CryptoSPI
Исходный код приложения примеров
Источники технической информацииИнтерфейс Crypto Soft CSP соответствует спецификации Microsoft CryptoSPI. Для разработки приложений, использующих Crypto Soft CSP, можно работать с первоисточником - непосредственно с MSDN. Использование возможностей, расширяющих Microsoft CryptoSPI, рассматривается в данном руководстве.Расширение Microsoft CryptoSPI разаработано для реализации плагинной архитектуры Crypto Soft CSP, а также управления протоклированием его работы. Архитектура Crypto Soft CSP описывается в руководстве пользователя. Read more: Crypto Soft
IIOP.NET
0 commentsIIOP.NET allows a seamless interoperation between .NET, CORBA and J2EE distributed objects. This is done by incorporating CORBA/IIOP support into .NET, leveraging the remoting framework. IIOP.NET is released under the LGPL license.IIOP.NET was born on May, 2 2003, and grew from a small experimental project to a stable and useful application, mostly thank to the great feedback and dedication of our growing user's community. FEATURESTight coupling between distributed objects in .NET, CORBA and J2EE;
components on each platform can act in either client or server role.
Tranparency: existing servers can be used unmodified, without wrapping code or adapters.
Extensive coverage of CORBA/.NET type mappings.
Native integration in the .NET framework;
IIOP.NET is directly based on the standard remoting infrastructure.Read more: IIOP.NET
components on each platform can act in either client or server role.
Tranparency: existing servers can be used unmodified, without wrapping code or adapters.
Extensive coverage of CORBA/.NET type mappings.
Native integration in the .NET framework;
IIOP.NET is directly based on the standard remoting infrastructure.Read more: IIOP.NET
Creating a self-signed certificate in C#
0 commentsFor a personal project involving SSL, I wanted to create some certificates that could be used to authenticate the client and server to each other. Nothing fancy - self-signed is perfectly fine in this case since the client would have an actual copy of the server cert to use when validating the server, and having the cert on the filesystem is secure enough for the task. In any case, I was disappointed to find out that even with all of the other crypto and certificate support, .NET lacks support for this. I was also disappointed by how difficult it was to figure out how to do this.
CertCreateSelfSignCertificate sounds promising, but it ends up not being quite enough. It turns out that you have to do the following (as simple as I know how to make it, anyway):
In case anybody is interested, source code is attached and is free for use by anybody as long as you don't hold me or Microsoft liable for it -- I have no idea whether this is actually the right or best way to do this. Give it the X500 distinguished name, validity start and end dates, and an optional password for encrypting the key data, and it will give you the PFX file data. Let me know if you find any bugs or have any suggestions. Read more: Where are we going, and what's with the handbasket?
CertCreateSelfSignCertificate sounds promising, but it ends up not being quite enough. It turns out that you have to do the following (as simple as I know how to make it, anyway):
- CryptAcquireContext(out providerContext, randomContainerName, null, PROV_RSA_FULL, CRYPT_NEWKEYSET)
- CryptGenKey(providerContext, AT_KEYEXCHANGE, CRYPT_EXPORTABLE, out cryptKey)
- CertStrToName(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, name, CERT_X500_NAME_STR, 0, dataBuffer, ref dataLength, 0)
- cert = CreateSelfSignCertificate(providerContext, blob(dataBuffer, dataLength), 0, KeyProviderInfo(randomContainerName, PROV_RSA_FULL, AT_KEYEXCHANGE), 0, startTime, endTime, 0)
- certificateStore = CertOpenStore("Memory", 0, 0, CERT_STORE_CREATE_NEW_FLAG, 0)
- CertAddCertificateContextToStore(certificateStore, cert, CERT_STORE_ADD_NEW, out storeCert)
- CertSetCertificateContextProperty(storeCert, CERT_KEY_PROV_INFO_PROP_ID, 0, KeyProviderInfo(randomContainerName, PROV_RSA_FULL, AT_KEYEXCHANGE))
- PFXExportCertStoreEx(certificateStore, pfxBlob, password, 0, EXPORT_PRIVATE_KEYS)
- Free everything.
In case anybody is interested, source code is attached and is free for use by anybody as long as you don't hold me or Microsoft liable for it -- I have no idea whether this is actually the right or best way to do this. Give it the X500 distinguished name, validity start and end dates, and an optional password for encrypting the key data, and it will give you the PFX file data. Let me know if you find any bugs or have any suggestions. Read more: Where are we going, and what's with the handbasket?
Howto: Make Your Own Cert With OpenSSL
0 comments
Ever wanted to make your own public key certificate for digital signatures? There are many recipes and tools on the net, like this one. My howto uses OpenSSL, and gives you a cert with a nice chain to your root CA. First we generate a 4096-bit long RSA key for our root CA and store it in file ca.key:openssl genrsa -out ca.key 4096Generating RSA private key, 4096 bit long modulus
...................................................................................++
........................................................................++
e is 65537 (0x10001)
If you want to password-protect this key, add option -des3.Next, we create our self-signed root CA certificate ca.crt; you’ll need to provide an identity for your root CA: openssl req -new -x509 -days 1826 -key ca.key -out ca.crtYou are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:BE
State or Province Name (full name) [Berkshire]:Brussels
Locality Name (eg, city) [Newbury]:Brussels
Organization Name (eg, company) [My Company Ltd]:https://DidierStevens.com
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:Didier Stevens (https://DidierStevens.com)
Email Address []:didier stevens Google mail
The -x509 option is used for a self-signed certificate. 1826 days gives us a cert valid for 5 years.Read more: Didier Stevens
Creating your First Silverlight Client Application: Twitter and COM, of course
0 commentsI'm creating some "create your first" videos for MSDN, and thought it would be useful to offer up a text version of the Out-of-Browser one in addition to the video. In this example, we'll build a simple Twitter Search client, using Silverlight out-of-browser mode. I'll also show how to use the Automation (IDispatch) API to load the search results into Microsoft Excel.
XAMLThe XAML for this demo includes just a simple page with one button and a listbox. The button is there to retrieve the tweets, the listbox to display them. No data templates yet.<UserControl x:Class="SilverlightApplication50.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"> <Grid x:Name="LayoutRoot" Background="White">
<Button Content="Get Tweets"
Height="23"
HorizontalAlignment="Left"
Margin="12,12,0,0"
x:Name="GetTweets"
VerticalAlignment="Top"
Width="75"
Click="GetTweets_Click" />
<ListBox x:Name="TweetList"
Margin="12,41,12,12"/>
</Grid>
</UserControl>Read more: 10REM.NET
XAMLThe XAML for this demo includes just a simple page with one button and a listbox. The button is there to retrieve the tweets, the listbox to display them. No data templates yet.<UserControl x:Class="SilverlightApplication50.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"> <Grid x:Name="LayoutRoot" Background="White">
<Button Content="Get Tweets"
Height="23"
HorizontalAlignment="Left"
Margin="12,12,0,0"
x:Name="GetTweets"
VerticalAlignment="Top"
Width="75"
Click="GetTweets_Click" />
<ListBox x:Name="TweetList"
Margin="12,41,12,12"/>
</Grid>
</UserControl>Read more: 10REM.NET
Silverlight 4: Interoperability with Excel using the COM Object
0 commentsSilverlight 4 has the capability of accessing the COM object using the COM API. You can access any program installed in your PC using those APIs in Silverlight. You can open Notepad, Word, Excel or Outlook from Silverlight application. Here I will demonstrate you the step-by-step tutorial on opening an Microsoft Excel book followed by data sharing between the Silverlight application and the Excel Sheet. Here we will use a DataGrid which will load some customer information. Then we will pass the data to the Excel Sheet and then we will modify the data in the external application (i.e. inside the Excel sheet). You will see that, the modified data will reflect automatically to the Silverlight Application.
Table of Contents
- Introduction
- Prerequisite
- Getting Started
- Configuring Out-of-Browser settings
- Basic Design for Out-of-Browser appication
- “Export to Excel” event implementation
- “Export to Excel” Demo
- What Next?Introduction
Silverlight 4 has the capability of accessing the COM object using the COM API. You can access any program installed in your PC using those APIs in Silverlight. You can open Notepad, Word, Excel or Outlook from Silverlight application. Here I will demonstrate you the step-by-step tutorial on opening an Microsoft Excel book followed by data sharing between the Silverlight application and the Excel Sheet. Here we will use a DataGrid which will load some customer information. Then we will pass the data to the Excel Sheet and then we will modify the data in the external application (i.e. inside the Excel sheet). You will see that, the modified data will reflect automatically to the Silverlight Application. Read more: Kunal's Blog
Table of Contents
- Introduction
- Prerequisite
- Getting Started
- Configuring Out-of-Browser settings
- Basic Design for Out-of-Browser appication
- “Export to Excel” event implementation
- “Export to Excel” Demo
- What Next?Introduction
Silverlight 4 has the capability of accessing the COM object using the COM API. You can access any program installed in your PC using those APIs in Silverlight. You can open Notepad, Word, Excel or Outlook from Silverlight application. Here I will demonstrate you the step-by-step tutorial on opening an Microsoft Excel book followed by data sharing between the Silverlight application and the Excel Sheet. Here we will use a DataGrid which will load some customer information. Then we will pass the data to the Excel Sheet and then we will modify the data in the external application (i.e. inside the Excel sheet). You will see that, the modified data will reflect automatically to the Silverlight Application. Read more: Kunal's Blog
Git Source Control Provider
0 commentsVisual Studio users are used to see files' source control status right inside the solution explorer, whether it is SourceSafe, Team Foundation Server, Subversion or even Mercurial. This plug-in integrates Git with Visual Studio solution explorer. Read more: Visual Studio Gallery
LLBLGen Pro v3.0 has been released!
0 commentsAfter two years of hard work we released v3.0 of LLBLGen Pro today! V3.0 comes with a completely new designer which has been developed from the ground up for .NET 3.5 and higher. Below I'll briefly mention some highlights of this new release: Entity Framework (v1 & v4) support
NHibernate support (hbm.xml mappings & FluentNHibernate mappings)
Linq to SQL support
Allows both Model first and Database first development, or a mixture of both
.NET 4.0 support
Model views
Grouping of project elements
Linq-based project search
Value Type (DDD) support
Multiple Database types in single project
XML based project file
Integrated template editor
Relational Model Data management
Flexible attribute declaration for code generation, no more buddy classes needed
Fine-grained project validation
Update / Create DDL SQL scripts
Fast Text-DSL based Quick mode
Powerful text-DSL based Quick Model functionality
Per target framework extensible settings framework
much much more...
Of course we still support our own O/R mapper framework: LLBLGen Pro v3.0 Runtime framework as well, which was updated with some minor features and was upgraded to use the DbProviderFactory system. Please watch the videos of the designer (more to come very soon!) to see some aspects of the new designer in action. Read more: Frans Bouma's blog
NHibernate support (hbm.xml mappings & FluentNHibernate mappings)
Linq to SQL support
Allows both Model first and Database first development, or a mixture of both
.NET 4.0 support
Model views
Grouping of project elements
Linq-based project search
Value Type (DDD) support
Multiple Database types in single project
XML based project file
Integrated template editor
Relational Model Data management
Flexible attribute declaration for code generation, no more buddy classes needed
Fine-grained project validation
Update / Create DDL SQL scripts
Fast Text-DSL based Quick mode
Powerful text-DSL based Quick Model functionality
Per target framework extensible settings framework
much much more...
Of course we still support our own O/R mapper framework: LLBLGen Pro v3.0 Runtime framework as well, which was updated with some minor features and was upgraded to use the DbProviderFactory system. Please watch the videos of the designer (more to come very soon!) to see some aspects of the new designer in action. Read more: Frans Bouma's blog
How to exploit Google docs
0 commentsNow that google has removed the restriction on its documents, it is time for us to start exploiting it.No need to upload your pictures in some free image webhosting websites where you wont be having the 100% surity of whether it might come up all time or you'l see a "bandwidth exceeded" message. Upload it to your own google account and with some tweak, we can link it directly in the webpage. You can do the same with Picasa, but you will have to create an album every time and it becomes kind of annoying to maintain it. Same goes with the flash presentations as well. No need to host it to any unreliable free websites. Upload it to your own google document. Plus if you want any referring files you can very well upload it to Google Docs. Yes, there is a limit on the size per account but still 7+ GB will become handy for small and medium bloggers. Ok, the steps are very very simple.
1. Login to http://docs.google.com. Sign in with your google id and password.
2. Click on upload from the left top and select "any" file type you want only restriction is it cannot exceed 100 MB. Do not forget to uncheck "Convert documents, presentations, and spreadsheets to the corresponding Google Docs formats" if you feel you dont want Google mess up your documents.
3. After you upload the file, select the file and click on Share and select "Get the link to share". You should be getting a link in a text bar as shown belowRead more: Technicalypto
1. Login to http://docs.google.com. Sign in with your google id and password.
2. Click on upload from the left top and select "any" file type you want only restriction is it cannot exceed 100 MB. Do not forget to uncheck "Convert documents, presentations, and spreadsheets to the corresponding Google Docs formats" if you feel you dont want Google mess up your documents.
3. After you upload the file, select the file and click on Share and select "Get the link to share". You should be getting a link in a text bar as shown belowRead more: Technicalypto
Рост Silverlight технологии
0 commentsНа одном из мероприятий меня спросили, где можно посмотреть полный список возможностей каждой версии Silverlight расширения. Вот таблица возможностей Silverlight'а в каждой его версии:
Read more: SERGEY LUTAY'S BLOG
| Silverlight Versions | ||||
|---|---|---|---|---|
| Features | 1.0 | 2 | 3 | 4 |
| Cross-Browser Support for Firefox, IE, Safari | ![]() | ![]() | ![]() | ![]() |
| Cross-Platform Support for Windows and Mac (and Linux through the Moonlight Project) | ![]() | ![]() | ![]() | ![]() |
| 2D Vector Animation/Graphics | ![]() | ![]() | ![]() | ![]() |
| AJAX Support | ![]() | ![]() | ![]() | ![]() |
| HTML DOM Integration | ![]() | ![]() | ![]() | ![]() |
| HTTP Networking | ![]() | ![]() | ![]() | ![]() |
| Canvas Layout Support | ![]() | ![]() | ![]() | ![]() |
| JavaScript Support | ![]() | ![]() | ![]() | ![]() |
| XAML Parser | ![]() | ![]() | ![]() | ![]() |
| Media – 720P High Definition (HD) Video | ![]() | ![]() | ![]() | ![]() |
Programmed Hyper-V management
0 comments1. Introduction
1.1 The notion of hypervisor. Brief survey of existing products
1.2 Microsoft Hyper-V hypervisor
2. The program control of Hyper-V hypervisor
2.1 WMI technology
2.2 Description of main WMI objects for Hyper-V controlling
2.3 Connecting to a hypervisor
2.4 Receiving the list of virtual machines
2.5 Receiving the properties of the virtual machine
2.6 Launching, stopping, and checking the status of the virtual machine
3. Conclusion
4. Useful links
5. Attachment. The source code of the example, description.1. Introduction1.1. The notion of hypervisor. Brief survey of existing productsHypervisor, also called virtual machine monitor (VMM), is the special software that allows running several operating systems (OS) on the single physical computer. For each of these operating systems, the hypervisor creates an illusion of functioning on its own physical computer, which is called the virtual machine (VM). The operating system, on which the hypervisor works, is called the host OS, and operating systems that are launched on virtual machines are called guest OS. The hypervisor monitors the work of guest OS and influences the process of their launching (unnoticeably for these OS) in that way to eliminate conflicts between them and the host OS.
There are two types of hypervisors:Native or bare-metal hypervisors, which work directly with the computer hardware and do not require the presence of the conventional OS (such hypervisors are the operating systems in some way or they can be implemented on the basis of some cut universal OS).
Hosted hypervisors, which are the software that is running within a conventional OS (such as Windows or Linux).
Examples of hypervisors of the first type are the Microsoft Hyper-V (as a part of Windows Server 2008 (R2) and the self-contained version – Microsoft Hyper-V Server 2008 (R2)), VMware ESX(i), Citrix XenServer and others. The hypervisors of the second type are the VMware Workstation, Oracle (the former Sun) VirtualBox, Microsoft Virtual PC and others. 1.2. Microsoft Hyper-V hypervisorMicrosoft Hyper-V hypervisor was introduced in 2008 as a part of Windows Server 2008 and also was released as a free stand-alone version – Microsoft Hyper-V Server 2008. It is also included into the R2 (Release 2) version of these products. Hyper-V functions only on x86-64-compatible processors (the IA-64 architecture is not supported) with the AMD64/EM64T technology, which support the virtualization technology (AMD-V or Intel VT). For Windows Server 2008 (R2), the hypervisor is installed as a separate role. It is managed through the standard management console. Also the program control of the hypervisor is possible by means of Microsoft WMI technology. Read more: Codeproject
1.1 The notion of hypervisor. Brief survey of existing products
1.2 Microsoft Hyper-V hypervisor
2. The program control of Hyper-V hypervisor
2.1 WMI technology
2.2 Description of main WMI objects for Hyper-V controlling
2.3 Connecting to a hypervisor
2.4 Receiving the list of virtual machines
2.5 Receiving the properties of the virtual machine
2.6 Launching, stopping, and checking the status of the virtual machine
3. Conclusion
4. Useful links
5. Attachment. The source code of the example, description.1. Introduction1.1. The notion of hypervisor. Brief survey of existing productsHypervisor, also called virtual machine monitor (VMM), is the special software that allows running several operating systems (OS) on the single physical computer. For each of these operating systems, the hypervisor creates an illusion of functioning on its own physical computer, which is called the virtual machine (VM). The operating system, on which the hypervisor works, is called the host OS, and operating systems that are launched on virtual machines are called guest OS. The hypervisor monitors the work of guest OS and influences the process of their launching (unnoticeably for these OS) in that way to eliminate conflicts between them and the host OS.
There are two types of hypervisors:Native or bare-metal hypervisors, which work directly with the computer hardware and do not require the presence of the conventional OS (such hypervisors are the operating systems in some way or they can be implemented on the basis of some cut universal OS).
Hosted hypervisors, which are the software that is running within a conventional OS (such as Windows or Linux).
Examples of hypervisors of the first type are the Microsoft Hyper-V (as a part of Windows Server 2008 (R2) and the self-contained version – Microsoft Hyper-V Server 2008 (R2)), VMware ESX(i), Citrix XenServer and others. The hypervisors of the second type are the VMware Workstation, Oracle (the former Sun) VirtualBox, Microsoft Virtual PC and others. 1.2. Microsoft Hyper-V hypervisorMicrosoft Hyper-V hypervisor was introduced in 2008 as a part of Windows Server 2008 and also was released as a free stand-alone version – Microsoft Hyper-V Server 2008. It is also included into the R2 (Release 2) version of these products. Hyper-V functions only on x86-64-compatible processors (the IA-64 architecture is not supported) with the AMD64/EM64T technology, which support the virtualization technology (AMD-V or Intel VT). For Windows Server 2008 (R2), the hypervisor is installed as a separate role. It is managed through the standard management console. Also the program control of the hypervisor is possible by means of Microsoft WMI technology. Read more: Codeproject
SQL SERVER – DATE and TIME in SQL Server 2008
0 commentsI was thinking about DATE and TIME datatypes in SQL Server 2008. I earlier wrote about the about best practices of the same. Recently I had written one of the script written for SQL Server 2008 had to run on SQL Server 2005 (don’t ask me why!), I had to convert the DATE and TIME datatypes to DATETIME. Let me run quick demo for the same. DECLARE @varDate AS DATE
DECLARE @varTime AS TIME
SET @varDate = '10/10/2010'
SET @varTime = '12:12:12'
SELECT CAST(@varDate AS DATETIME) C_Date
SELECT CAST(@varTime AS DATETIME) C_Time Read more: Journey to SQL Authority with Pinal Dave
DECLARE @varTime AS TIME
SET @varDate = '10/10/2010'
SET @varTime = '12:12:12'
SELECT CAST(@varDate AS DATETIME) C_Date
SELECT CAST(@varTime AS DATETIME) C_Time Read more: Journey to SQL Authority with Pinal Dave
How to use Google Data API in ASP.NET MVC. Part 2
0 commentsPreviously on this series, I had talked about How to use Google Data API in ASP.NET MVC to interact with Google Analytics. In this second part I'm going to show you how to store and retrieve videos on/from YouTube using Google Data API and YouTube API. YouTube is the largest and most popular video sharing website and since Google has acquired it and integrated its API into GData it's been an ultimate choice for developers to choose it as a safe and powerful backend for their videos. I should mention that there are two types of YouTube APIs for developers:The Data API which lets you incorporate YouTube functionality into your own application or website. You can perform searches, upload videos, create playlists, and more.
The Player APIs which give you control over YouTube video playback on your website. Configure basic settings, drive the player interface, or even build your own player controls.
One may add the third Custom Player to the list above but indeed it's not an API. In our tutorial we will go through the first item: Data API; the second is left for JS and AS developers and maybe Pedram would write about it!Well, let's go!I'll divide my blog post main content into two seperate topics: Storing Videos and Retrieving Video. First of all your have to prepare required tools to interact with YouTube Data API. Here's what you would do:Sign up for a developer key. You will also need your Google account username and password. Download YouTube SDK.After installing YouTube SDK, reference the following assemblies in your project:public static YouTubeRequest GetRequest()
{ var request = HttpContext.Current.Session["YTRequest"] as YouTubeRequest; if (request == null) { var settings = new YouTubeRequestSettings("SampleWebApp", "NA",
ConfigurationManager.AppSettings["YouTubeAPIDeveloperKey"],
ConfigurationManager.AppSettings["YouTubeUsername"],
ConfigurationManager.AppSettings["YouTubePassword"]); request = new YouTubeRequest(settings); HttpContext.Current.Session["YTRequest"] = request; } return request;}Read more: Mahdi Taghizadeh
The Player APIs which give you control over YouTube video playback on your website. Configure basic settings, drive the player interface, or even build your own player controls.
One may add the third Custom Player to the list above but indeed it's not an API. In our tutorial we will go through the first item: Data API; the second is left for JS and AS developers and maybe Pedram would write about it!Well, let's go!I'll divide my blog post main content into two seperate topics: Storing Videos and Retrieving Video. First of all your have to prepare required tools to interact with YouTube Data API. Here's what you would do:Sign up for a developer key. You will also need your Google account username and password. Download YouTube SDK.After installing YouTube SDK, reference the following assemblies in your project:public static YouTubeRequest GetRequest()
{ var request = HttpContext.Current.Session["YTRequest"] as YouTubeRequest; if (request == null) { var settings = new YouTubeRequestSettings("SampleWebApp", "NA",
ConfigurationManager.AppSettings["YouTubeAPIDeveloperKey"],
ConfigurationManager.AppSettings["YouTubeUsername"],
ConfigurationManager.AppSettings["YouTubePassword"]); request = new YouTubeRequest(settings); HttpContext.Current.Session["YTRequest"] = request; } return request;}Read more: Mahdi Taghizadeh
Remics
0 commentsRemics is a toolkit for reverse engineering tools. Open source (MIT license).The goal of Remics is enabling developers (or researchers) quickly write their own tools for reverse engineering, on their own demands of investigating software products. The primal website of Remics is: http://www.remics.org.Read more: Codeplex
How to enumerate DirectSound DirectX Media Objects (DMOs) on your system
0 commentsSource and binaries (amd64 and x86) attached.Pseudocode:GUID dmo_categories[] = { ... }
for (each guid in dmo_categories) {
IEnumDMO = DMOEnum(guid, DMO_ENUMF_INCLUDE_KEYED, ...);
while (0 != items fetched by IEnumDMO::Next(&iid, &szName...)) {
print iid, szName
}
}Output on my system:>dmoenum.exe
-- Audio decoders ({57F2DB8B-E6BB-4513-9D43-DCD2A6593125}) --
WMAudio Decoder DMO ({2EEB4ADF-4578-4D10-BCA7-BB955F56320A})
WMAPro over S/PDIF DMO ({5210F8E4-B0BB-47C3-A8D9-7B2282CC79ED})
WMSpeech Decoder DMO ({874131CB-4ECC-443B-8948-746B89595D20})
MP3 Decoder DMO ({BBEEA841-0A63-4F52-A7AB-A9B3A84ED38A}) -- Audio effects ({F3602B3F-0592-48DF-A4CD-674721E7EBEB}) --
ParamEq ({120CED89-3BF4-4173-A132-3CB406CF3231})
AEC ({745057C7-F353-4F2D-A7EE-58434477730E})
WavesReverb ({87FC0268-9A55-4360-95AA-004A1D9DE26C})
Gargle ({DAFD8210-5711-4B91-9FE3-F75B7AE279BF})
Compressor ({EF011F79-4000-406D-87AF-BFFB3FC39D57})
Distortion ({EF114C90-CD1D-484E-96E5-09CFAF912A21})
Echo ({EF3E932C-D40B-4F51-8CCF-3F98F1B29D5D})
I3DL2Reverb ({EF985E71-D5C7-42D4-BA4D-2D073E2E96F4})
Flanger ({EFCA3D92-DFD8-4672-A603-7420894BAD98})
Chorus ({EFE6629C-81F7-4281-BD91-C9D604A95AF6})
Resampler DMO ({F447B69E-1884-4A7E-8055-346F74D6EDB3})-- Audio encoders ({33D9A761-90C8-11D0-BD43-00A0C911CE86}) --
WM Speech Encoder DMO ({1F1F4E1A-2252-4063-84BB-EEE75F8856D5})
WMAudio Encoder DMO ({70F598E9-F4AB-495A-99E2-A7C4D3D89ABF})-- Video decoders ({4A69B442-28BE-4991-969C-B500ADF5D8A8}) --
Mpeg4s Decoder DMO ({2A11BAE2-FE6E-4249-864B-9E9ED6E8DBC2})
WMV Screen decoder DMO ({7BAFB3B1-D8F4-4279-9253-27DA423108DE})
WMVideo Decoder DMO ({82D353DF-90BD-4382-8BC2-3F6192B76E34})
Mpeg43 Decoder DMO ({CBA9E78B-49A3-49EA-93D4-6BCBA8C4DE07})
MS ATC Screen Decoder 1 ({F1931D8E-51D3-496F-BE8A-3D08AEE9C9DB})
Mpeg4 Decoder DMO ({F371728A-6052-4D47-827C-D039335DFE0A})Read more: Matthew van Eerde's web log
for (each guid in dmo_categories) {
IEnumDMO = DMOEnum(guid, DMO_ENUMF_INCLUDE_KEYED, ...);
while (0 != items fetched by IEnumDMO::Next(&iid, &szName...)) {
print iid, szName
}
}Output on my system:>dmoenum.exe
-- Audio decoders ({57F2DB8B-E6BB-4513-9D43-DCD2A6593125}) --
WMAudio Decoder DMO ({2EEB4ADF-4578-4D10-BCA7-BB955F56320A})
WMAPro over S/PDIF DMO ({5210F8E4-B0BB-47C3-A8D9-7B2282CC79ED})
WMSpeech Decoder DMO ({874131CB-4ECC-443B-8948-746B89595D20})
MP3 Decoder DMO ({BBEEA841-0A63-4F52-A7AB-A9B3A84ED38A}) -- Audio effects ({F3602B3F-0592-48DF-A4CD-674721E7EBEB}) --
ParamEq ({120CED89-3BF4-4173-A132-3CB406CF3231})
AEC ({745057C7-F353-4F2D-A7EE-58434477730E})
WavesReverb ({87FC0268-9A55-4360-95AA-004A1D9DE26C})
Gargle ({DAFD8210-5711-4B91-9FE3-F75B7AE279BF})
Compressor ({EF011F79-4000-406D-87AF-BFFB3FC39D57})
Distortion ({EF114C90-CD1D-484E-96E5-09CFAF912A21})
Echo ({EF3E932C-D40B-4F51-8CCF-3F98F1B29D5D})
I3DL2Reverb ({EF985E71-D5C7-42D4-BA4D-2D073E2E96F4})
Flanger ({EFCA3D92-DFD8-4672-A603-7420894BAD98})
Chorus ({EFE6629C-81F7-4281-BD91-C9D604A95AF6})
Resampler DMO ({F447B69E-1884-4A7E-8055-346F74D6EDB3})-- Audio encoders ({33D9A761-90C8-11D0-BD43-00A0C911CE86}) --
WM Speech Encoder DMO ({1F1F4E1A-2252-4063-84BB-EEE75F8856D5})
WMAudio Encoder DMO ({70F598E9-F4AB-495A-99E2-A7C4D3D89ABF})-- Video decoders ({4A69B442-28BE-4991-969C-B500ADF5D8A8}) --
Mpeg4s Decoder DMO ({2A11BAE2-FE6E-4249-864B-9E9ED6E8DBC2})
WMV Screen decoder DMO ({7BAFB3B1-D8F4-4279-9253-27DA423108DE})
WMVideo Decoder DMO ({82D353DF-90BD-4382-8BC2-3F6192B76E34})
Mpeg43 Decoder DMO ({CBA9E78B-49A3-49EA-93D4-6BCBA8C4DE07})
MS ATC Screen Decoder 1 ({F1931D8E-51D3-496F-BE8A-3D08AEE9C9DB})
Mpeg4 Decoder DMO ({F371728A-6052-4D47-827C-D039335DFE0A})Read more: Matthew van Eerde's web log
Working with code based templates in Silverlight
0 commentsIn our Silverlight projects we are using the AgDataGrid of DevExpress to visualize data. I wrote some expressions that make it possible to use this data grid with Fluent Silverlight. During the writing of those expressions once again I hit some brick walls. In this post I want to show one specific solution to throw down such a wall and continue the journey… Please refer to this post regarding more detail about Fluent Silverlight.ProblemProvide a check box column header whose click action can be bound to an action on the view model.Read more: LosTechies.com
Ограничение скорости в Apache
0 commentsДля искуственного ограничения скорости закачки в Apache есть модуль mod_bandwidth. Опишу его установку и настройку для Linux Ubuntu.
В этой системе этот модуль называется libapache2-mod-bw. Для его установки необходимо выполнить команду sudo apt-get install libapache2-mod-bw
После установки модуля в каталоге /etc/apache2/mods-available/ должен появитсья файл bw.load, в котором написана команда для загрузки модуля. Для того, чтобы модуль загружался необходимо выполнить команду a2enmod bw
или создать линк на файл bw.load в каталоге /etc/apache2/mods-enabled/.
После этого нужно перезапустить апач командойsudo /etc/init.d/apache2 restart
После этого необходимо настроить требуемую функциональность модуля.
Документация по модулю находиться в каталоге /usr/share/doc/libapache2-mod-bw/ , там подробно описаны все директивы настройки.BandWidthModule [On|Off] - активация модуля
ForceBandWidthModule [On|Off] - если включено, то все запросы будут обрабатываться этим модулем. Если же необходимо ограничивать скорость только для определенных типов файлов, то эту директиву устанавливать не нужно, а необходимо направлять ответ через фильтр MOD_BW например так: AddOutputFilterByType MOD_BW text/html text/plain
Bandwidth [From] [bytes/s] - основная директива модуля, которая устанавливает скорость. Принимает два параметра: первый - источник запроса (клиент), который может устанавливаться как полное имя хоста, ip адрес, маска сети, часть домена или значение all. Второй параметр устанавливает скорость доступную для клиента, если установлено 0, то без ограничения.
Также можно идентифицировать клиента по user-agent, т.е. по браузеру Bandwidth u:[User-Agent] [bytes/s], например Bandwidth “u:wget” 102400.Read more: Scriptcoder
В этой системе этот модуль называется libapache2-mod-bw. Для его установки необходимо выполнить команду sudo apt-get install libapache2-mod-bw
После установки модуля в каталоге /etc/apache2/mods-available/ должен появитсья файл bw.load, в котором написана команда для загрузки модуля. Для того, чтобы модуль загружался необходимо выполнить команду a2enmod bw
или создать линк на файл bw.load в каталоге /etc/apache2/mods-enabled/.
После этого нужно перезапустить апач командойsudo /etc/init.d/apache2 restart
После этого необходимо настроить требуемую функциональность модуля.
Документация по модулю находиться в каталоге /usr/share/doc/libapache2-mod-bw/ , там подробно описаны все директивы настройки.BandWidthModule [On|Off] - активация модуля
ForceBandWidthModule [On|Off] - если включено, то все запросы будут обрабатываться этим модулем. Если же необходимо ограничивать скорость только для определенных типов файлов, то эту директиву устанавливать не нужно, а необходимо направлять ответ через фильтр MOD_BW например так: AddOutputFilterByType MOD_BW text/html text/plain
Bandwidth [From] [bytes/s] - основная директива модуля, которая устанавливает скорость. Принимает два параметра: первый - источник запроса (клиент), который может устанавливаться как полное имя хоста, ip адрес, маска сети, часть домена или значение all. Второй параметр устанавливает скорость доступную для клиента, если установлено 0, то без ограничения.
Также можно идентифицировать клиента по user-agent, т.е. по браузеру Bandwidth u:[User-Agent] [bytes/s], например Bandwidth “u:wget” 102400.Read more: Scriptcoder
Protecting ADO.NET applications
0 commentsThis article is based on concepts i have acquired on Microsoft Virtual Academy (MVA).Writing a secure ADO.NET application involves more than avoiding common coding pitfalls such as not validating user input. An application that accesses data has many potential points of failure that an attacker can exploit to retrieve, manipulate, or destroy sensitive data., so we need to understand all security aspects. .NET Framework provides many classes, services and tools that are useful to protect and manage database applications. The common language runtime (CLR) provides a type-safe environment for code to run in, with code access security (CAS) to restrict further the permissions of managed code.
Note that secure code does not guard against self-inflicted security holes when working with unmanaged resources such as databases.
Securing an application is an ongoing process. There will never be a point where a developer can guarantee that an application is safe from all attacks, because it is impossible to predict what kinds of future attacks new technologies will bring about. Conversely, just because nobody has yet discovered (or published) security flaws in a system does not mean that none exist or could exist. You need to plan for security during the design phase of the project, as well as plan how security will be maintained over the lifetime of the application. Design for security One of the biggest problems in developing secure applications is that security is often an afterthought, something to implement after a project is code-complete. Not building security into an application at the outset leads to insecure applications because little thought has been given to what makes an application secure.
Last minute security implementation leads to more bugs, as software breaks under the new restrictions or has to be rewritten to accommodate unanticipated functionality. Every line of revised code contains the possibility of introducing a new bug. For this reason, you should consider security early in the development process so that it can proceed in tandem with the development of new features. Read more: Codeproject
Note that secure code does not guard against self-inflicted security holes when working with unmanaged resources such as databases.
Securing an application is an ongoing process. There will never be a point where a developer can guarantee that an application is safe from all attacks, because it is impossible to predict what kinds of future attacks new technologies will bring about. Conversely, just because nobody has yet discovered (or published) security flaws in a system does not mean that none exist or could exist. You need to plan for security during the design phase of the project, as well as plan how security will be maintained over the lifetime of the application. Design for security One of the biggest problems in developing secure applications is that security is often an afterthought, something to implement after a project is code-complete. Not building security into an application at the outset leads to insecure applications because little thought has been given to what makes an application secure.
Last minute security implementation leads to more bugs, as software breaks under the new restrictions or has to be rewritten to accommodate unanticipated functionality. Every line of revised code contains the possibility of introducing a new bug. For this reason, you should consider security early in the development process so that it can proceed in tandem with the development of new features. Read more: Codeproject
SvnToTfs
0 commentsSimple tool that migrates every Subversion revision toward Team Foundation Server 2010. It is developed in C# witn a WPF front-end.
The project does what it says, helping you migrate your Subversion repository (including comments) toward TFS. After finishing the tool and gooing to Codeplex to publish, we found out of another tool built arount the same idea. We asked ourself if we should plce this one as well, and decided to do so, as one might be conceived in a way closer to what you are looking for. We are only looking to enlarge the community, not steel the sun over this other great project : http://svn2tfs.codeplex.com/ So tell us what you think of this, first time trying to put a project over on Codeplex.Read more: Codeplex
The project does what it says, helping you migrate your Subversion repository (including comments) toward TFS. After finishing the tool and gooing to Codeplex to publish, we found out of another tool built arount the same idea. We asked ourself if we should plce this one as well, and decided to do so, as one might be conceived in a way closer to what you are looking for. We are only looking to enlarge the community, not steel the sun over this other great project : http://svn2tfs.codeplex.com/ So tell us what you think of this, first time trying to put a project over on Codeplex.Read more: Codeplex
Last GUID used up - new ScottGuID unique ID to replace it
0 commentsYou might have heard in recent news that the last ever GUID was used up. The GUID {FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF} was just consumed by a soon to be released project at Microsoft. Immediately after the GUID's creation the word spread around the Microsoft campuses around the globe. Microsoft's approximately 100,000 worldwide employees then started blogging, tweeting, and facebooking about the dubious "achievement." The following screenshot shows GUIDGEN (the Windows tool for creating GUIDs) with the last ever GUID. Read more: Eilon Lipton's Blog
Linux for Consumers: MeeGo Updates
0 comments
Excited to see the work happening on the Linux consumer space in the MeeGo Universe. There is now a MeeGo 1.0 download available for everyone to try out. At Novell we have been contributing code, design and artwork for this new consumer-focused Linux system and today both Michael Meeks and Aaron Bockover blog about the work that they have been doing on MeeGo.These screenshots are taken directly from Aaron's and Michael's blog posts. Aaron discusses the new UI for the music player Banshee and Michael discusses the new UI for the Email/Calendar program. Read more: Miguel de Icaza's web log
WPL Code Released to CodePlex
0 commentsWe’ve just released the Web Protection Library code to CodePlex! As part of this release we included the May CTP – Code only and a tutorial document talking about the extensibility for the Security Runtime Engine (SRE). There are no binaries with this release because the code is not ready for production. We’re looking for feedback on the code and plug-in model. By using the plug-in model it allows users to write their own security modules. Please download the code and tell us what you think! Read more: A PM's View to Application Security
Official site: Codeplex
Official site: Codeplex
MultipointControls
0 commentsA collection of controls that applied Windows Multipoint Mouse SDK. Windows Multipoint Mouse SDK enable app to have multiple mice interact simultaneously. See more : http://www.microsoft.com/multipointmouse Read more: Codeplex
Accessing Hardware in Silverlight using COM
Saturday, May 29, 2010 0 commentsSilverlight 4 gives access to the user's microphone and camera, and adds printing capabilities, but as far as hardware goes, that's it. Fortunately Silverlight 4 also provides access in Elevated Trust Out-Of-Browser applications to COM. If you need to access other local hardware, providing a COM component is the solution. This example provides a COM object written in C# and addressed by a Silverlight application. BackgroundMy company provides vertical market software and normally supplies peripherals as well. Typical devices include things like cash drawers and card swipe readers. These are usually serial devices. Customers have also been asking for web based solutions to avoid the usual distribution and update issues of locally installed software. Silverlight now provides a great user experience but hardware access is essential. I have no experience writing COM objects (and not too much using them), so this was a voyage of discovery for me. I had to piece together a number of different articles and examples to get something to work. I hope you can benefit by having a complete example. Example ProblemFor my example, I'm simulating a three drawer cash drawer stack. The application needs three basic functions:Open a drawer by drawer number.
Check the status of a particular drawer.
Receive an event if a drawer is opened or closed.
The example solution contains a Windows class library which simulates the device class and exposes the necessary methods and events to COM. Also in the solution is a very simple Silverlight test application. The COM object targets the 2.0 Framework. The Silverlight application that consumes it is a Silverlight 4 project.Read more: Codeproject
Check the status of a particular drawer.
Receive an event if a drawer is opened or closed.
The example solution contains a Windows class library which simulates the device class and exposes the necessary methods and events to COM. Also in the solution is a very simple Silverlight test application. The COM object targets the 2.0 Framework. The Silverlight application that consumes it is a Silverlight 4 project.Read more: Codeproject
Subscribe to:
Posts (Atom)







