Daily Archives

Articles indexed Thursday April 29 2010

Page 5/119 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Hardware Emulator / Simulator for Winforms .Net Application

    - by Suneet
    I have a WinForms .Net HMI software which talks to hardware over USB. I check for communication with the hardware at Load time and if communication is active then run it (The hardware manufacturer has provided a communication library to talk over USB). I want to build an emulator for cases when communication with hardware is not possible (not connected) and want the software to run in simulated mode by providing dummy values for different states of hardware. Has anyone implemented something similar? Any pointers will be helpful. Are there any design patterns to handle such implementations. TIA

    Read the article

  • TinyMCE Editor acts weird on IE

    - by Sam Kong
    Hi, I use TinyMCE and it works fine on FireFox but it shows weird icons on IE 8.0. As you can see, forecolor and backcolor icons are repeated. This doesn't happen on FF. Has anybody seen this? How do I fix this? Sam

    Read the article

  • linux: disable using loopback and send data via wire between 2 eth cards of one comp

    - by osgx
    Hello I have a comp with 2 eth cards, connected with patch-cord (direct eth. cable from 1st to 2nd). The linux is installed, I want to send data from 1st network card to 2nd. And I want to force the packet to pass via cable. I can set up any ip on cards. With ping I get counters on cards constant. Is it possible with tcp/ip sockets? PS. I need to write a program. which will send packets via eth, so stackoverflow-related question. There can be some OS-dependent way, they will help me too

    Read the article

  • Problems with blocking reads using libudev on Linux

    - by Steve Hawkins
    We are using the following routine (on Linux, with libudev) to read data from a PIC microcontroller configured as a USB HID device. The data is sent only when a button connected to the PIC microcontroller is pressed or released. The routine is missing messages from the PIC controller, and I suspect that this is because the call to poll below is not behaving as it should. The call to poll will reliably block for 1 second util the first message is read. As soon as the first message is read, the call to poll returns immediately instead of blocking for 1 second (1000 milliseconds) like it should. I have worked around this problem by closing and re-opening the device after each read. This makes poll behave correctly, but I think that closing and re-opening the device may be the reason for the lost messages. bool PicIo::Receive (unsigned char* picData, const size_t picDataSize) { static hiddev_report_info hidReportInfo; static hiddev_usage_ref_multi hidUsageRef; if (-1 == PicDeviceDescriptor()) { return false; } // Determine whether or not there is data available to be read pollfd pollFd; pollFd.fd = PicDeviceDescriptor(); pollFd.events = POLLIN; int dataPending = poll (&pollFd, 1, 1000); if (dataPending <= 0) { return false; } // Initialize the HID Report structure for an input report hidReportInfo.report_type = HID_REPORT_TYPE_INPUT; hidReportInfo.report_id = 0; hidReportInfo.num_fields = 64; if (-1 == ioctl(PicDeviceDescriptor(), HIDIOCGREPORT, &hidReportInfo)) { return false; } // Initizlize the HID Usage Reference for an Input report hidUsageRef.uref.report_type = HID_REPORT_TYPE_INPUT; hidUsageRef.uref.report_id = 0; hidUsageRef.uref.field_index = 0; hidUsageRef.uref.usage_index = 0; hidUsageRef.num_values = 64; if (-1 == ioctl(PicDeviceDescriptor(), HIDIOCGUSAGES, &hidUsageRef)) { return false; } // Transfer bytes from the usage report into the return value. for (size_t idx=0; (idx < 64) && (idx < picDataSize); ++idx) { picData[idx] = hidUsageRef.values[idx]; } return true; } The function PicDeviceDescriptor() does checking on the device to make sure that it is present. Here are the pertinent details of the PicDeviceDescriptor function, showing how the device is begin opened. int PicIo::PicDeviceDescriptor(int command) { struct stat statInfo; static int picDeviceDescriptor = -1; string picDevicePath = "/dev/usb/hiddev0"; if ((-1 != picDeviceDescriptor) && (CLOSE == command)) { close (picDeviceDescriptor); picDeviceDescriptor = -1; } else if ((-1 != picDeviceDescriptor) && (-1 == fstat(picDeviceDescriptor, &statInfo))) { // Handle the case where the PIC device had previously been detected, and // is now disconnected. close (picDeviceDescriptor); picDeviceDescriptor = -1; } else if ((-1 == picDeviceDescriptor) && (m_picDevice.IsConnected())) { // Create the PIC device descriptor if the PIC device is present (i.e. its // device node is present) and if the descriptor does not already exist picDeviceDescriptor = open (picDevicePath.c_str(), O_RDONLY); } return picDeviceDescriptor; } I'm sure that I'm doing something wrong, but I've Googled the issue and cannot seem to find any relevant answers. Any help would be very much appreciated -- Thx.

    Read the article

  • In Subversion, I know when a file was added, what's the quickest way to find out when it was deleted

    - by Eric Johnson
    OK, so suppose I know I added file "foo.txt" to my Subversion repository at revision 500. So I can do a svn log -v http://svnrepo/path/foo.txt@500, and that shows all the files added at the same time. What's the fastest way to find when the file was deleted after it was added? I tried svn log -r500:HEAD -v http://svnrepo/path/foo.txt@500, but that gives me "path not found" - perhaps obviously, because the file "foo.txt" doesn't exist at "HEAD". I can try a binary search algorithm going forward through revisions (and that would certainly be faster than typing this question), but is there a better way?

    Read the article

  • How to get Django url correctly?

    - by Satoru.Logic
    Hi, all. I have set up a url mapping that goes like this: (r'enroll/$', 'enroll') In my development environment this mapping is used when I visit '/enroll/'. But in the production environment, the Django application is under '/activity/' and '/activity/enroll/' should be used. Please tell me how do I get the correct url in both cases. Thanks in advance.

    Read the article

  • AS3 microphone recording/saving works, in-flash PCM playback double speed

    - by Lowgain
    I have a working mic recording script in AS3 which I have been able to successfully use to save .wav files to a server through AMF. These files playback fine in any audio player with no weird effects. For reference, here is what I am doing to capture the mic's ByteArray: (within a class called AudioRecorder) public function startRecording():void { _rawData = new ByteArray(); _microphone.addEventListener(SampleDataEvent.SAMPLE_DATA, _samplesCaptured, false, 0, true); } private function _samplesCaptured(e:SampleDataEvent):void { _rawData.writeBytes(e.data); } This works with no problems. After the recording is complete I can take the _rawData variable and run it through a WavWriter class, etc. However, if I run this same ByteArray as a sound using the following code which I adapted from the adobe cookbook: (within a class called WavPlayer) public function playSound(data:ByteArray):void { _wavData = data; _wavData.position = 0; _sound.addEventListener(SampleDataEvent.SAMPLE_DATA, _playSoundHandler); _channel = _sound.play(); _channel.addEventListener(Event.SOUND_COMPLETE, _onPlaybackComplete, false, 0, true); } private function _playSoundHandler(e:SampleDataEvent):void { if(_wavData.bytesAvailable <= 0) return; for(var i:int = 0; i < 8192; i++) { var sample:Number = 0; if(_wavData.bytesAvailable > 0) sample = _wavData.readFloat(); e.data.writeFloat(sample); } } The audio file plays at double speed! I checked recording bitrates and such and am pretty sure those are all correct, and I tried changing the buffer size and whatever other numbers I could think of. Could it be a mono vs stereo thing? Hope I was clear enough here, thanks!

    Read the article

  • Changing a column collation

    - by Stefan
    Hey there, I have a database already set up. I am trying to change the collation to case sensitive on my username column so it restricts login parameters to what they signed up with. However I keep getting this: #1025 - Error on rename of './yebutno_ybn/#sql-76dc_8581dc' to './yebutno_ybn/user' (errno: 150) there is foreign key constraints due to related tables.... any ideas? this will save me a lot of hassle with the php side of things! Thanks, Stefan

    Read the article

  • Ive just created a site! [closed]

    - by Steven Pollock
    Hi i just recently made a website and i need to get decent hits on it! The URL is http://www.aussiebac kpackersclan.net It is a clan website that also has its own gaming tournament ladder system and we want teams to sign up!!! What is the best method of achieving this promotion?

    Read the article

  • problem with pagestate when two links in aspx page

    - by TT.LTT
    I have two links in my aspx page. one link "A" when i click it ...it is downloading some document when i click it other link "B" when I click it ....it redirects me to some other page. Both links triggers function from code behind. Both links works fine when i first come onto page but when i click A it shows me message to download it "open" "save" "cancel" problem is when i click cancel I remain on the same page but now no links work neither link A nor link B. I guess there is some problem with the state my page is in . How i can avoid this? Code so far: <asp:Linkbutton ID="linkbutton1" runat="server" Text="A" onClick="Codebehindmethod" /> <asp:Linkbutton ID="linkbutto2" runat="server" Text="B" onClick="Codebehindmethod1" >

    Read the article

  • Postgres query optmization

    - by hdx
    Hey guys, trying to optimize this query to solve a duplicate user issue: SELECT userid, 'ismaster' AS name, 'false' AS propvalue FROM user WHERE userid NOT IN (SELECT userid FROM userprop WHERE name = 'ismaster'); The problem is that the select after the NOT IN is 120.000 records and it's taking forever. Any suggestion?

    Read the article

  • JavaScript Same Origin Policy - How does it apply to different subdomains

    - by DaveDev
    How does the Same Origin Policy apply to the following two domains? http://server1.MyDomain.com http://server2.MyDomain.com Can I run JS on a page hosted on server1, if the content is retreived from server2? edit according to Daniel's answer below, I can include scripts between different subdomains using the <script> tag, but what about asynchronous requests? What if I download a script from server2 onto the page hosted on server1. Can I use the script to communicate asynchronously with a service on server2?

    Read the article

  • rs232 communication, general timing question

    - by Sunny Dee
    Hi, I have a piece of hardware which sends out a byte of data representing a voltage signal at a frequency of 100Hz over the serial port. I want to write a program that will read in the data so I can plot it. I know I need to open the serial port and open an inputstream. But this next part is confusing me and I'm having trouble understanding the process conceptually: I create a while loop that reads in the data from the inputstream 1 byte at a time. How do I get the while loop timing so that there is always a byte available to be read whenever it reaches the readbyte line? I'm guessing that I can't just put a sleep function inside the while loop to try and match it to the hardware sample rate. Is it just a matter of continuing reading the inputstream in the while loop, and if it's too fast then it won't do anything (since there's no new data), and if it's too slow then it will accumulate in the inputstream buffer? Like I said, i'm only trying to understand this conceptually so any guidance would be much appreciated! I'm guessing the idea is independent of which programming language I'm using, but if not, assume it is for use in Java. Thanks!

    Read the article

  • More Blogginess

    Hello everyone, and welcome to a rare (in this space) blog about blogging. My name is Tim Bray, and I’m the new editor of this Android Developers’ Blog...

    Read the article

  • CodePlex Daily Summary for Wednesday, April 28, 2010

    CodePlex Daily Summary for Wednesday, April 28, 2010New ProjectsArgument Handler: This project aims to help the handling of arguments in command line programs.Bing for BlackBerry: Bing for BlackBerry is a SDK that allows intergration and searching Bing in there applications.C4F - GeoWallpaper: This is an extension for my MEF Utility Runner to change desktop wallpaper based on Flickr images geotagged with your current location. Uses Windo...CRM 4.0 Contract Utilities: List of Contract Utilities (i.e. custom workflow actions) 1. Change contract status from Active to Draft 2. Copy Contract (with custom start/end da...ELIS: Multimedia player based on WPFEnterprise Administration with Powershell: The EnterpriseShell aims to produce a powershell code library that will enable Enterprise Administrators to quickly reconfigure their IT infrastruc...ExposedObject: ExposedObject uses dynamic typing in C# to provide convenient access to private fields and methods from code outside of the class – for testing, ex...F# Project Extender: Installing F# Project Extender provides tools to better organize files in F# projects by allowing project subdirectories and separating file manage...Hack Framework: Code bundle with the internets brains connected into one piece of .Net frameworkKrypton XNA: Krypton allows users of the XNA framework to easily add 2D lighting to their games. Krypton is fast, as it utilizes the GPU and uses a vertex shade...Net Darts: Provides an easy way to calculate the score left to throw. Users can easily click on the score.PlayerSharp: PlayerSharp is a library written entirely in C# that allows you to communicate your C# programs with the Player Server by Brian Gerkey et al (http:...Ratpoid: RatpoidRedeemer Tower Defense: 2d tower defense game. It is developed with XNA technology, using .Net Visual Studio 2008 or .Net Visual Studio 2010SelfService: Simple self service projectSharePoint Exchange Calendar: a jQuery based calendar web part for displaying Exchange calendars within SharePoint.SharpORM, easy use Object & Relation Database mapping Library: AIM on: Object easy storeage, Create,Retrieve,Update,Delete User .NET Attribute marking or Xml Standalone Mapping eg. public class Somethin...Silverlight Calculator: Silverlight Calculator makes it easier for people to do simple math calculations. It's developed in C# Silverlight 2. Silverlight Calendar: Silverlight Calendar makes it easier for people to view a calendar in silverlight way. It's developed in C# Silverlight 2.SPSocialUtil for SharePoint 2010: SPSocialUtil makes it easier for delevoper to use Social Tag, Tag Cloud, BookMark, Colleague in SharePoint 2010. It's developed in C# with Visual S...Sublight: Sublight open source project is a simple metadata utility for view models in ASP.NET MVC 2Veda Auto Dealer Report: Create work item tasks for the Veda Auto Dealer ReportWPF Meta-Effects: WPF Meta-Effects makes it easier for shader effect developpers to develop and maintain shader code. You'll no longer have to write any HLSL, instea...New ReleasesBing for BlackBerry: Bing SDK for BlackBerry: There are four downloadable components: The library, in source code format, in its latest stable release. A "getting started" doc that will gui...DotNetNuke® Store: 02.01.34: What's New in this release? Bugs corrected: - Fixed a bug related to encryption cookie when DNN is used in Medium Trust environment. New Features:...Encrypted Notes: Encrypted Notes 1.6.4: This is the latest version of Encrypted Notes, with general improvements and bug fixes for 'Batch Encryption'. It has an installer that will create...EPiServer CMS Page Type Builder: Page Type Builder 1.2 Beta 2: For more information about this release check out this blog post.ExposedObject: ExposedObject 0.1: This is an initial release of the ExposedObject library that lets you conveniently call private methods and access private fields of a class.Extended SSIS Package Execute: Ver 0.01: Version 0.01 - 2008 Compatible OnlyF# Project Extender: V0.9.0.0 (VS2008): F# project extender for Visual Studio 2008. Initial ReleaseFileExplorer.NET: FileExplorer.NET 1.0: This is the first release of this project. ---------------------------------------------------------------- Please report any bugs that you may en...Fluent ViewModel Configuration for WPF (MVVM): FluentViewModel Alpha3: Overhaul of the configuration system Separation of the configuratior and service locator Added support for general services - using Castle Wind...Home Access Plus+: v4.1: v4.1 Change Log: booking system fixes/additions Uploader fixes Added excluded extensions in my computer Updated Config Tool Fixed an issue ...ILMerge-GUI, merge .NET assemblies: 1.9.0 BETA: Compatible with .NET 4.0 This is the first version of ILMerge-GUI working with .NET 4.0. The final version will be 2.0.0, to be released by mid May...iTuner - The iTunes Companion: iTuner 1.2.3769 Beta 3c: Given the high download rate and awesome feedback for Beta 3b, I decided to release this interim build with the following enhancements: Added new h...Jet Login Tool (JetLoginTool): In then Out - 1.5.3770.18310: Fixed: Will only attempt to logout if currently logged in Fixed: UI no longer blocks while waiting for log outKooboo CMS: Kooboo CMS 2.1.1.0: New features Add new API RssUrl to generate RSS link, this is an extension to UrlHelper. Add possibility to index and search attachment content ...Krypton XNA: Krypton v1.0: First release of Krypton. I've tried to throw together a small testbed, but just getting tortoisehq to work the first time around was a huge pain. ...LinkedIn® for Windows Mobile: LinkedIn for Windows Mobile v0.5: Added missing files to installer packageNito.KitchenSink: Version 7: New features (since Version 5) Fixed null reference bug in ExceptionExtensions. Added DynamicStaticTypeMembers and RefOutArg for dynamically (lat...Numina Application/Security Framework: Numina.Framework Core 51341: Added multiple methods to API and classic ASP libraryOpenIdPortableArea: 0.1.0.3 OpenIdPortableArea: OpenIdPortableArea.Release: DotNetOpenAuth.dll DotNetOpenAuth.xml MvcContrib.dll MvcContrib.xml OpenIdPortableArea.dll OpenIdPortableAre...Play-kanaler (Windows Media Center Plug-in): Playkanaler 1.0.5 Alpha: Playkanaler version 1.0.5 Alpha Skärmsläckar-fix. helt otestad!PokeIn Comet Ajax Library: PokeIn v0.81 Library with ServerWatch Sample: Release Notes Functionality improved. Possible bugs fixed. Realtime server time sample addedSharpORM, easy use Object & Relation Database mapping Library: Vbyte.SharpOrm 1.0.2010.427: Vbyte.SharpOrm for Access & SQLServer.7z 1.0 alpha release for Access oledb provider and Sql Server 2000+.Silverlight 4.0 Popup Menu: Context Menu for Silverlight 4.0: - Markup items can now be added seperately using the AddItem method. Alternatingly all items can be placed inside a listbox which can then be added...Silverlight Calculator: SilverCalculator: SilverCalculator version 1.0 Live demoSilverlight Calendar: Silverlight Calendar: Silverlight Calendar version 1.0 Live demoSpeakup Desktop Frontend: Speakup Desktop Frontend v0.2a: This is new version of Speakup Desktop Frontend. It requires .net 4.0 to be installed before using it. In this release next changes were done: - ...TwitterVB - A .NET Twitter Library: Twitter-2.5: Adds xAuth support and increases TwitterLocation information (html help file is not up to date, will correct in a later version.)VCC: Latest build, v2.1.30427.5: Automatic drop of latest buildXP-More: 1.1: Added a parent VHD edit feature. Moved VM settings from double-click to a button, and rearranged the buttons' layout.Yasbg: It's Static 1.0: Many changes have been made from the previous release. Read the README! This release adds settings tab and fixes bugs. To run, first unzip, then...Most Popular ProjectsRawrWBFS Managerpatterns & practices – Enterprise LibraryAJAX Control ToolkitSilverlight ToolkitMicrosoft SQL Server Product Samples: DatabaseWindows Presentation Foundation (WPF)ASP.NETMicrosoft SQL Server Community & SamplesPHPExcelMost Active ProjectsRawrpatterns & practices – Enterprise LibraryGMap.NET - Great Maps for Windows Forms & PresentationNB_Store - Free DotNetNuke Ecommerce Catalog ModuleIonics Isapi Rewrite FilterParticle Plot PivotFarseer Physics EngineBlogEngine.NETDotNetZip LibrarySqlDiffFramework-A Visual Differencing Engine for Dissimilar Data Sources

    Read the article

  • Connected host failed to respond (internal NAT address)

    - by MostRandom
    I'm writing my first C# web application that connects to an XML based service. It requires that I present a certificate and feed the XML stream. It seems to authenticate properly but then it gives the following error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 10.1.10.4:3128 The funny thing is that I'm not on a proxy or anything like that. I'm connecting directly to the internet. At one point I we did use a proxy that with internal NAT address. So my question is: Does Visual Studio have some sort of default proxy setting that I need to change? This IP is no longer used for anything, so I know that I don't need to use any proxy authentication code. using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Net; using System.Security.Cryptography.X509Certificates; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; namespace WebApplication1 { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Uri requestURI = new Uri("*site omitted*"); //Create the Request Object HttpWebRequest pageRequest = (HttpWebRequest)WebRequest.Create(requestURI); //After installing the cert on the server export a client cert to the working directory as Deluxe.cer string certFile = "*certificate omitted*"; X509Certificate cert = X509Certificate.CreateFromCertFile(certFile); //Pull in your Data, if it is from an external xml as below or create an xml string with variables if a dynamic post is required. string xmlPath = "*XML omitted*"; System.Xml.XmlDocument passXML = new System.Xml.XmlDocument(); passXML.Load(xmlPath); //XML String with the data needed to pass string postData = passXML.OuterXml; //Set the Request Object parameters pageRequest.ContentType = "application/x-www-form-urlencoded"; pageRequest.Method = "POST"; pageRequest.AllowWriteStreamBuffering = false; pageRequest.AllowAutoRedirect = false; pageRequest.ClientCertificates.Add(cert); postData = "xml_data=" + Server.UrlEncode(postData); pageRequest.ContentLength = postData.Length; //Create the Post Stream Object System.IO.StreamWriter postStream = new System.IO.StreamWriter(pageRequest.GetRequestStream()); //Write the data to the post stream postStream.Write(postData); postStream.Flush(); postStream.Close(); //Set the Response Object HttpWebResponse postResponse = (HttpWebResponse)pageRequest.GetResponse();

    Read the article

  • C programming getting back into it - the red pill

    - by JavaRocky
    Can someone provide recommended reading, website resources or best practices to follow when programming with C. I am a proficient software developer with strong skills in Java and PHP. Is there standard libraries these days which people use? Like what spring is to java? And standard design patterns for managing memory or even standard libraries for that fact? I want to write solid, maintainable C programs. GO THE RED PILL! :P

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >