Search Results

Search found 79 results on 4 pages for 'terminator'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Are "backwards" terminators for if and case unique to shell scripting?

    - by tomjakubowski
    In bash at least, if and case blocks are closed like this: if some-expr then echo "hello world" fi case $some-var in [1-5]) do-a-thing ;; *) do-another-thing esac as opposed to the more typical close of end or endif/endcase. As far as I know, this rather funny convention is unique to shell scripting and I have never seen such an odd block terminator anywhere else. Sometimes things like this have an origin in another language (like Ruby's elsif coming from Perl), or a strange justification. Does this feature of shell scripting have a story behind it? Is it found in other languages?

    Read the article

  • Why is this class re-initialized every time?

    - by pinnacler
    I have 4 files and the code 'works' as expected. I try to clean everything up, place code into functions, etc... and everything looks fine... and it doesn't work. Can somebody please explain why MatLab is so quirky... or am I just stupid? Normally, I type terminator = simulation(100,20,0,0,0,1); terminator.animate(); and it should produce a map of trees with the terminator walking around in a forest. Everything rotates to his perspective. When I break it into functions... everything ceases to work. I really only changed a few lines of code, shown in comments. Code that works: classdef simulation properties landmarks robot end methods function obj = simulation(mapSize, trees, x,y,heading,velocity) obj.landmarks = landmarks(mapSize, trees); obj.robot = robot(x,y,heading,velocity); end function animate(obj) %Setup Plots fig=figure; xlabel('meters'), ylabel('meters') set(fig, 'name', 'Phil''s AWESOME 80''s Robot Simulator') xymax = obj.landmarks.mapSize*3; xymin = -(obj.landmarks.mapSize*3); l=scatter([0],[0],'bo'); axis([xymin xymax xymin xymax]); obj.landmarks.apparentPositions %Simulation Loop THIS WAS ORGANIZED for n = 1:720, %Calculate and Set Heading/Location obj.robot.headingChange = navigate(n); %Update Position obj.robot.heading = obj.robot.heading + obj.robot.headingChange; obj.landmarks.heading = obj.robot.heading; y = cosd(obj.robot.heading); x = sind(obj.robot.heading); obj.robot.x = obj.robot.x + (x*obj.robot.velocity); obj.robot.y = obj.robot.y + (y*obj.robot.velocity); obj.landmarks.x = obj.robot.x; obj.landmarks.y = obj.robot.y; %Animate set(l,'XData',obj.landmarks.apparentPositions(:,1),'YData',obj.landmarks.apparentPositions(:,2)); rectangle('Position',[-2,-2,4,4]); drawnow end end end end ----------- classdef landmarks properties fixedPositions %# positions in a fixed coordinate system. [ x, y ] mapSize = 10; %Map Size. Value is side of square x=0; y=0; heading=0; headingChange=0; end properties (Dependent) apparentPositions end methods function obj = landmarks(mapSize, numberOfTrees) obj.mapSize = mapSize; obj.fixedPositions = obj.mapSize * rand([numberOfTrees, 2]) .* sign(rand([numberOfTrees, 2]) - 0.5); end function apparent = get.apparentPositions(obj) %-STILL ROTATES AROUND ORIGINAL ORIGIN currentPosition = [obj.x ; obj.y]; apparent = bsxfun(@minus,(obj.fixedPositions)',currentPosition)'; apparent = ([cosd(obj.heading) -sind(obj.heading) ; sind(obj.heading) cosd(obj.heading)] * (apparent)')'; end end end ---------- classdef robot properties x y heading velocity headingChange end methods function obj = robot(x,y,heading,velocity) obj.x = x; obj.y = y; obj.heading = heading; obj.velocity = velocity; end end end ---------- function headingChange = navigate(n) %steeringChange = 5 * rand(1) * sign(rand(1) - 0.5); Most chaotic shit %Draw an S if n <270 headingChange=1; elseif n<540 headingChange=-1; elseif n<720 headingChange=1; else headingChange=1; end end Code that does not work... classdef simulation properties landmarks robot end methods function obj = simulation(mapSize, trees, x,y,heading,velocity) obj.landmarks = landmarks(mapSize, trees); obj.robot = robot(x,y,heading,velocity); end function animate(obj) %Setup Plots fig=figure; xlabel('meters'), ylabel('meters') set(fig, 'name', 'Phil''s AWESOME 80''s Robot Simulator') xymax = obj.landmarks.mapSize*3; xymin = -(obj.landmarks.mapSize*3); l=scatter([0],[0],'bo'); axis([xymin xymax xymin xymax]); obj.landmarks.apparentPositions %Simulation Loop for n = 1:720, %Calculate and Set Heading/Location %Update Position headingChange = navigate(n); obj.robot.updatePosition(headingChange); obj.landmarks.updatePerspective(obj.robot.heading, obj.robot.x, obj.robot.y); %Animate set(l,'XData',obj.landmarks.apparentPositions(:,1),'YData',obj.landmarks.apparentPositions(:,2)); rectangle('Position',[-2,-2,4,4]); drawnow end end end end ----------------- classdef landmarks properties fixedPositions; %# positions in a fixed coordinate system. [ x, y ] mapSize; %Map Size. Value is side of square x; y; heading; headingChange; end properties (Dependent) apparentPositions end methods function obj = createLandmarks(mapSize, numberOfTrees) obj.mapSize = mapSize; obj.fixedPositions = obj.mapSize * rand([numberOfTrees, 2]) .* sign(rand([numberOfTrees, 2]) - 0.5); end function apparent = get.apparentPositions(obj) %-STILL ROTATES AROUND ORIGINAL ORIGIN currentPosition = [obj.x ; obj.y]; apparent = bsxfun(@minus,(obj.fixedPositions)',currentPosition)'; apparent = ([cosd(obj.heading) -sind(obj.heading) ; sind(obj.heading) cosd(obj.heading)] * (apparent)')'; end function updatePerspective(obj,tempHeading,tempX,tempY) obj.heading = tempHeading; obj.x = tempX; obj.y = tempY; end end end ----------------- classdef robot properties x y heading velocity end methods function obj = robot(x,y,heading,velocity) obj.x = x; obj.y = y; obj.heading = heading; obj.velocity = velocity; end function updatePosition(obj,headingChange) obj.heading = obj.heading + headingChange; tempy = cosd(obj.heading); tempx = sind(obj.heading); obj.x = obj.x + (tempx*obj.velocity); obj.y = obj.y + (tempy*obj.velocity); end end end The navigate function is the same... I would appreciate any help as to why things aren't working. All I did was take the code from the first section from under comment: %Simulation Loop THIS WAS ORGANIZED and break it into 2 functions. One in robot and one in landmarks. Is a new instance created every time because it's constantly printing the same heading for this line int he robot class obj.heading = obj.heading + headingChange;

    Read the article

  • C++ Template const char array to int

    - by Levi Schuck
    So, I'm wishing to be able to have a static const compile time struct that holds some value based on a string by using templates. I only desire up to four characters. I know that the type of 'abcd' is int, and so is 'ab','abc', and although 'a' is of type char, it works out for a template<int v> struct What I wish to do is take sizes of 2,3,4,5 of some const char, "abcd" and have the same functionality as if they used 'abcd'. Note that I do not mean 1,2,3, or 4 because I expect the null terminator. cout << typeid("abcd").name() << endl; tells me that the type for this hard coded string is char const [5], which includes the null terminator on the end. I understand that I will need to twiddle the values as characters, so they are represented as an integer. I cannot use constexpr since VS10 does not support it (VS11 doesn't either..) So, for example with somewhere this template defined, and later the last line template <int v> struct something { static const int value = v; }; //Eventually in some method cout << typeid(something<'abcd'>::value).name() << endl; works just fine. I've tried template<char v[5]> struct something2 { static const int value = v[0]; } template<char const v[5]> struct something2 { static const int value = v[0]; } template<const char v[5]> struct something2 { static const int value = v[0]; } All of them build individually, though when I throw in my test, cout << typeid(something2<"abcd">::value).name() << endl; I get 'something2' : invalid expression as a template argument for 'v' 'something2' : use of class template requires template argument list Is this not feasible or am I misunderstanding something?

    Read the article

  • is there a way to designate the line token delimiter in Perl's file reader?

    - by Dr.Dredel
    I'm reading a text file via CGI in, in perl, and noticing that when the file is saved in mac's textEdit the line separator is recognized, but when I upload a CSV that is exported straight from excel, they are not. I'm guessing it's a \n vs. \r issue, but it got me thinking that I don't know how to specify what I would like the line terminator token to be, if I didn't want the one it's looking for by default.

    Read the article

  • Whats the difference between \z and \Z in a regular expression and when and how do I use it?

    - by Mister M. Bean
    From http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html: \Z The end of the input but for the final terminator, if any \z The end of the input But what does it mean in practice? Can you give me an example when I use either the \Z or \z. In my test I thought that "StackOverflow\n".matches("StackOverflow\\z") will return true and "StackOverflow\n".matches("StackOverflow\\Z") returns false. But actually both return false. Where is the mistake?

    Read the article

  • DIY a simple .inf on an existing .sys?

    - by Stijn Sanders
    In continuation of attempting to get an old Digi ST-1032 working on a new server, we've downgraded a server to Windows 2000 in an attempt to use the NT4 drivers. And it works, the old software setup works, finds the device on the SCSI bus, and connects the 32 ports to COM3..COM34 or any other set using the port remapper tool. The minor issue that remains is that Plug-and-Play still detects this device over SCSI and tries to wizard you into selecting a driver for it. Which doesn't exists (Digi Intl support confirms this device is so old, a 2000 or XP driver was never made). The exact name displayed is "DigiIntl ST-1032 SCSI Net Device" (Oddly enough, two devices get detected with this name, on two neighbouring LUN's, could one be the built-in terminator?) Is there a way to concoct a simple .inf that would (re-)register the existing sts.sys that appears to get registered by the (old) installer of the driver software?

    Read the article

  • What am I doing wrong with this cat 6 patch panel wiring?

    - by Max Hodges
    top number is transmitter bottom number is remote terminator 12345678 36145278 is this because I could be mixing T568A and T568B wiring? how do I know if my patch cord is A or B? Do I just look at the plug and match it up with the diagram on the back of the panel somehow? EDIT I read that 36145278 indicates a cross over cable, but I'm not trying to make a cross over. Where did I go wrong? I'm guessing the cable plug is T568A but I wired it to the panel using T568B. So I need to redo it as T568A. But in the future how do I know if I cable is A or B? Cheers!

    Read the article

  • When your field-terminating char appears within field values

    - by Jonathan Sampson
    I've had a very colorful morning learning the innerparts of Linux's sort command, and have come across yet another issue that I can't seem to find an answer for in the documentation. I'm currently using -t, to indicate that my fields are split by the comma character, but I'm finding that in some of my files, the comma is used (between double-quotes) within values: Jonathan Sampson,,[email protected],0987654321 "Foobar CEO,","CEO,",[email protected],, How can I use a comma to terminate my fields, but ignore the occurences of it within values? Is this fairly simple, or do I need to re-export all of my data using a more-foreign field-terminator?

    Read the article

  • Logging the client IP with Nginx/Varnish/Apache

    - by jetboy
    I have Nginx listening on port 443 as an SSL terminator, and proxying unencrypted traffic to Varnish on the same server. Varnish 3 is handling this traffic, and traffic coming in directly on port 80. All traffic is passed, unencrypted, to Apache instances on other servers in the cluster. The Apache instances use mod_rpaf to replace the logged client IP with the contents of the X-Forwarded-For header. My problem is that if the traffic is coming via Nginx, while the 'correct' client IP is getting logged in the VarnishNCSA logs, it looks as if Varnish is (understandably) replacing Nginx's X-Forwarded-For header with 127.0.0.1 downstream, and this is getting logged with Apache. Is there a nice simple way to stop Varnish rewriting X-Forwarded-For if it's already populated?

    Read the article

  • Is it possible to have environment variables in the path of the working directory : PS1?

    - by mthpvg
    I am on Lubuntu and I am using bash. My PS1 (in .bashrc) is : PS1="\w> " I like it because I need to paste the working directory all the time. The problem is that the path is always very long and since I use terminator I only have half of my screen's width available to display it... it is ugly and annoying. My command prompt looks like that : /this/is/a/very/long/path/that/i/want/to/make/shorter > I'd like to set in my environment variables : $tiavl=/this/is/a/very/long And then I'll get : $tiavl/path/that/i/want/to/make/shorter > The goal is to have something shorter in the command prompt but I still want to be able to copy paste it and do : cd $tiavl/path/that/i/want/to/make/shorter It is a bit like with $HOME : ~/path/that/i/want/to/make/shorter > I know where I am and I can copy paste the ~. Thanks.

    Read the article

  • Is “Application Programming Interface” a bad name?

    - by Taylor Hawkes
    Application programming interface seems like a bad name for what it is. Is there a reason it was named such? I understand that people used to call them Advanced Programming Interfaces and then renamed to Application Programming Interface. Is that why it is poorly named? Why is it not named Application (to) Programmer Interface. I guess I'm just confused of the meaning behind that name? I write more about my confusion around the name here: BREAKING DOWN THE WORD “APPLICATION PROGRAMMING INTERFACE” This is a very confusing word. We mostly understand what the word Interface means, but “Application Programming”, what even is that. Honestly I'm confused. Is that suppose to be two words like “Application”, “Programming” and then the “Interface” is suppose to mean between the two? Like would a “Computer Human Interface” be an interface between a “Computer” and a “Human” (monitor , keyboard, mouse ) or is a “Computer Human” a real thing - perhaps the terminator. So a CHI is our boy Kyle Reese who is the only way we are able to work with the computer human. I think more likely “Application Programming Interface” was simply poorly named and doesn't really make sense. It was originally called an “Advanced Programming Interface” , but perhaps being a bit to ostentatious merged into the now wildly accepted “Application Programming Interface”. So now, not wanting to change an acronym has confused the living heck out everyone.... Any thoughts or clarification would be great, I'm giving a lecture on this topic in a month, so I would prefer not to BS my way through it.

    Read the article

  • Desktop switcher appears to be broken for quick double-switches

    - by Jon Blackburn
    I'm wondering if anyone else has seen this. I have three virtual desktops aligned in a horizontal row. In the middle desktop I have only a single application window. I have keyboard shortcuts mapping to navigate between the desktops. Obviously, I never use the up/down arrows because I only have one row of workspaces. Here's the problem, which only started to happen after I installed 12.04.1: When I rapidly hit to go from workspace 1 to workspace 3, the window on workspace 2 gets moved to workspace 1. I have checked using both Unity and Gnome3, and the behavior is the same under both. If I change back to the default workspace setup (a 2x2 grid of desktops) things seem to settle down (i.e., no wandering windows). Not every type of application window behaves the same way. I couldn't get a Chrome browser to jump from 2 to 1, but both Terminal and Terminator exhibit the behavior. Any thoughts? Better workarounds? Thanks in advance.

    Read the article

  • How to sync Ubuntu/software/configurations between N computers with free software and/or without a cloud?

    - by skanatek
    Note: this question is not about syncing data in a Dropbox-like way (files, folders), it is more about syncing configurations. I would like to have exactly the same version of Ubuntu with all the software installed and configured both on my Desktop PC and on my Laptop PC (and maybe on my small netbook PC) without using Ubuntu Sync and with minimal maintenance effort (setup once, run for a long time). The use case is the following: I work on my Laptop PC and do some changes to software configuration, for example: configure vim to have a new plugin update the Search Tracker / Recoll file search index configure Thunderbird to have an additional IMAP account ('remember password') add some new bookmarks in Firefox/Chrome change the desktop background image install new software with apt-get install build and install new software with checkinstall etc. I do some 'sync' operation I switch to my Desktop PC and get all the changes from (1) working on the Desktop PC I work on my Desktop PC and do some changes to software configuration, for example: add new directory to the list of directories to be backed up by DejaDup add a new check spelling dictionary to the Libreoffice Writer configure the Terminator software to have colored fonts install new font into the Ubuntu system configure Ekiga to make phone calls etc. I do some 'sync' operation I switch to my Laptop PC and get all the changes from (1) and (4) working on the Laptop PC. Question: What free/open-source software can I use to sync both machines' Ubuntu systems, installed software and configurations? Is it possible to do that without any cloud services? Complementary question: It is obvious that the Desktop PC and the Laptop PC have different hardware configurations. How does the 'sync software' in question deal with video drivers, wlan drivers and their configurations? Note: I do not need all the PCs to be synced at the same time, because I work with only one single machine at once. Note: I considered to use Chef to solve the problem, but it seems that it might be really cumbersome to maintain such a setup. Note: I also considered using a bootable USB with Ubuntu installed (portable Linux), but I am not sure that the video drivers will work then.

    Read the article

  • Ternary and Artificial Intelligence

    - by user2957844
    Not much of a programmer myself, however I have been thinking about the future of AI. If a fully functional AI is programmed in a binary environment as is used in current computing, would that create a bit of a black and white personality? As in just yes/no, on/off, 1/0? I will use the Skynet computer from the Terminator series as a bad analogy; it is brought online and comes to the conclusion that humanity should just be destroyed so the problem is resolved, basically its only options were; fire the missiles or not. (The films do not really go into what its moves would be after doing such a thing, but that goes into the realms of AI evolution so does not really fit with this question.) It may also have been badly programmed. Now, the human mind has been akin to a ternary system which allows our "out of the box" thinking along with all the other wonderful things our minds can do. So, would it not be more prudent to create a functional ternary system and program an AI using it so the resulting personality would be able to benefit from the third "maybe" (so to speak) option? I understand that in binary there are ways to get around the whole yes/no etc. way of things, however the basic operations are still just 1's and 0's. Again with using the above bad Skynet analogy; if it could have had that third "maybe" option as part of its core system, it may have decided to not launch due to being able to make sense of the intricacies of human nature and the politics of such a move etc. In effect, my question is; Would an AI benefit more from ternary computing as opposed to binary due to the inclusion of -1, or 2, dependent on the system ("maybe," as I call it)?

    Read the article

  • CodePlex Daily Summary for Tuesday, November 23, 2010

    CodePlex Daily Summary for Tuesday, November 23, 2010Popular ReleasesSilverlight and WP7 Exception Handling and Logging building block: first version: Zipped full source code.Wii Backup Fusion: Wii Backup Fusion 0.8.2 Beta: New in this release: - Update titles after language change - Tool tips for name/title - Transfer DVD to a specific image file - Download titles from wiitdb.com - Save Settings geometry - Titles and Cover language global in settings - Convert Files (images) to another format - Format WBFS partition - Create WBFS file - WIT path configurable in settings - Save last path in Files/Load - Sort game lists - Save column width - Sequenz of columns changeable - Set indicated columns in settings - Bus...TweetSharp: TweetSharp v2.0.0.0 - Preview 2: Preview 2 ChangesIntroduced support for .NET Framework 2.0 Supported Platforms: .NET 2.0, .NET 3.5 SP1, .NET 4.0 Client Profile, Windows Phone 7 Twitter API coverage: accounts blocks direct messages favorites friendships notifications saved searches timelines tweets users Preview 1 ChangesIntroduced support for OAuth Echo Supported Platforms: .NET 4.0, Windows Phone 7 Twitter API coverage: timelines tweets Version 2.0 Overview / RoadmapMajor rewrite for simplic...SQL Monitor: SQL Monitor 1.3: 1. change sys.sysprocesses to DMV: http://msdn.microsoft.com/en-us/library/ms187997.aspx select * from sys.dm_exec_connections select * from sys.dm_exec_requests select * from sys.dm_exec_sessions 2. adjust columns to fit without scrollingMiniTwitter: 1.60: MiniTwitter 1.60 ???? ?? Twitter ?????????????????????????????? ??????????????????、?????????????????? ?????????????????????????????? ???????????????????????????????????????Minemapper: Minemapper v0.1.1: Fixed 'Generate entire world image', wasn't working. Improved Java detection for biome support. Biomes button is automatically unchecked if Java cannot be found in either the path environment variable or the Windows Registry. Fixed problem where Height + and - buttons would change the height more than one each click. Added keyboard shortcuts for navigation controls. You can now press and hold navigation buttons to continuously pan/zoom.VFPX: FoxBarcode v.0.11: FoxBarcode v.0.11 - Released 2010.11.22 FoxBarcode is a 100% Visual FoxPro class that provides a tool for generating images with different bar code symbologies to be used in VFP forms and reports, or exported to other applications. Its use and distribution is free for all Visual FoxPro Community. Whats is new? Added a third parameter to the BarcodeImage() method Fixed some minor bugs History FoxBarcode v.0.10 - Released 2010.11.19 - 85 Downloads Project page: FoxBarcodeDotNetAge -a lightweight Mvc jQuery CMS: DotNetAge 1.1.0.5: What is new in DotNetAge 1.1.0.5 ?Document Library features and template added. Resolve issues of templates Improving publishing service performance Opml support added. What is new in DotNetAge 1.1 ? D.N.A Core updatesImprove runtime performance , more stabilize. The DNA core objects model added. Personalization features added that allows users create the personal website, manage their resources, store personal data DynamicUIFixed the PageManager could not move page node bug. ...ASP.NET MVC Project Awesome (jQuery Ajax helpers): 1.3.1 and demos: A rich set of helpers (controls) that you can use to build highly responsive and interactive Ajax-enabled Web applications. These helpers include Autocomplete, AjaxDropdown, Lookup, Confirm Dialog, Popup Form and Pager tested on mozilla, safari, chrome, opera, ie 9b/8/7/6DotSpatial: DotSpatial 11-21-2010: This release introduces the following Fixed bugs related to dispose, which caused issues when reordering layers in the legend Fixed bugs related to assigning categories where NULL values are in the fields New fast-acting resize using a bitmap "prediction" of what the final resize content will look like. ImageData.ReadBlock, ImageData.WriteBlock These allow direct file access for reading or writing a rectangular window. Bitmaps are used for holding the values. Removed the need to stor...Sincorde Silverlight Library: 2010 - November: Silverlight 4 Visual Studio 2010 Microsoft Expression dependencies removed Design-Time bug fixedMDownloader: MDownloader-0.15.24.6966: Fixed Updater; Fixed minor bugs;WPF Application Framework (WAF): WPF Application Framework (WAF) 2.0.0.1: Version: 2.0.0.1 (Milestone 1): This release contains the source code of the WPF Application Framework (WAF) and the sample applications. Requirements .NET Framework 4.0 (The package contains a solution file for Visual Studio 2010) The unit test projects require Visual Studio 2010 Professional Remark The sample applications are using Microsoft’s IoC container MEF. However, the WPF Application Framework (WAF) doesn’t force you to use the same IoC container in your application. You can use ....NET Extensions - Extension Methods Library for C# and VB.NET: Release 2011.01: Added new extensions for - object.CountLoopsToNull Added new extensions for DateTime: - DateTime.IsWeekend - DateTime.AddWeeks Added new extensions for string: - string.Repeat - string.IsNumeric - string.ExtractDigits - string.ConcatWith - string.ToGuid - string.ToGuidSave Added new extensions for Exception: - Exception.GetOriginalException Added new extensions for Stream: - Stream.Write (overload) And other new methods ... Release as of dotnetpro 01/2011Microsoft All-In-One Code Framework: Visual Studio 2010 Code Samples 2010-11-19: Code samples for Visual Studio 2010Prism Training Kit: Prism Training Kit 4.0: Release NotesThis is an updated version of the Prism training Kit that targets Prism 4.0 and added labs for some of the new features of Prism 4.0. This release consists of a Training Kit with Labs on the following topics Modularity Dependency Injection Bootstrapper UI Composition Communication MEF Navigation Note: Take into account that this is a Beta version. If you find any bugs please report them in the Issue Tracker PrerequisitesVisual Studio 2010 Microsoft Word 2...Free language translator and file converter: Free Language Translator 2.2: Starting with version 2.0, the translator encountered a major redesign that uses MEF based plugins and .net 4.0. I've also fixed some bugs and added support for translating subtitles that can show up in video media players. Version 2.1 shows the context menu 'Translate' in Windows Explorer on right click. Version 2.2 has links to start the media file with its associated subtitle. Download the zip file and expand it in a temporary location on your local disk. At a minimum , you should uninstal...Free Silverlight & WPF Chart Control - Visifire: Visifire SL and WPF Charts v3.6.4 Released: Hi, Today we are releasing Visifire 3.6.4 with few bug fixes: * Multi-line Labels were getting clipped while exploding last DataPoint in Funnel and Pyramid chart. * ClosestPlotDistance property in Axis was not behaving as expected. * In DateTime Axis, Chart threw exception on mouse click over PlotArea if there were no DataPoints present in Chart. * ToolTip was not disappearing while changing the DataSource property of the DataSeries at real-time. * Chart threw exception ...Microsoft SQL Server Product Samples: Database: AdventureWorks 2008R2 SR1: Sample Databases for Microsoft SQL Server 2008R2 (SR1)This release is dedicated to the sample databases that ship for Microsoft SQL Server 2008R2. See Database Prerequisites for SQL Server 2008R2 for feature configurations required for installing the sample databases. See Installing SQL Server 2008R2 Databases for step by step installation instructions. The SR1 release contains minor bug fixes to the installer used to create the sample databases. There are no changes to the databases them...VidCoder: 0.7.2: Fixed duplicated subtitles when running multiple encodes off of the same title.New ProjectsAlien Terminator: Alien TerminatorArchWeb 2.0: ArchWeb è un'applicazione che unita al sito web permette di gestire documenti aziendali e mail preimpostate. ArchWeb supporta file di qualsiasi estensione (di dimensini variabili fino a 1.5 GB), tutti i tipi di documenti del pacchetto Microsoft Office o del pacchetto Adobe.Azure Table Sync Lib: Developing custom sync providers for Windows Azure Table Storage to support the following sync scenarios 1. Azure Table <-> SQL Server 2. Azure Table <-> SQL CE 3. Azure Table <-> SQL AzureColecaoFilmes: Prova de conceito usando DDD, ASP.NET MVC 3, NHibernate, Fluent Nhibernate e Ninject.Coleotrack: Coleotrack: ASP.NET MVC Issue Tracking.dmgbois: Personal repo.DNN Social Bookmark: DotNetNuke plugin for adding social media components.docNET: docNET grew out of my own battles creating system documentation from inline comments in code files. Using the XML documentation file as base to generate documentation in different formats. As I'm kinda biased towards my own needs I'm starting from C#/ASP.NET => web output. Event Trivia: A Silverlight trivia application which can be played in between sessions at an event. It has been used at PDC09, PDC10 and MIX10 so far. Written by Pete Brown at Microsoft.F# MathProvider: F# Math Provider wrappers native Blas+Lapack runtimes for F# users to perform linear algebra easily. Frets Terminator: Frets TerminatorGurfing projects: Few summaryHexa.xText: Hexa.xText is a .Net command line tool to extract text from source files for later translation, just like the GNU xgettext does. Extracted text are placed inside po files that must be compiled into satellite assemblies through the included PO2Assembly MSBuild task.Hold Popup for Touch: Hold Popup offers an optional solution to get an event while having pressed a mouse button or have a touchdown over time. Instead of handling everything by yourself (such as timer for holding or handling events), hold popup handles all itself. Developed in .Net 4.0 for WPF.HumanResourceManagementSystem: Project NIIT MMS901 - Quater 5 Human Resource Management System People Management ModuleLive Messenger: Live Messenger is a Windows Live Messenger module for DNNMtechSystem: MultipointMouse Technology Education ChainNerdOnRails.ActiveQuery: an object-relational mapper for url-parameter written in .net for .netPHMS: Publishing House Management SystemRabbitEars: Thread safe event driven message notification for RabbitMQ using the .net API. Implmenet in vb.net project is a Visual Studio 2010 solution with two project the RabbitEars project and a demo windows form to allow users to test drive RabbitMQScreen Snapshot Manager: Screen Snapshot Manager is a desktop winforms application, which runs in background, and keeps taking snapshots of current screen after every 30 seconds for tracking purpose. :)SharePoint 2010 Workflow Actions IntelliSense: This project hosts a SharePoint 2010 Workflow Actions Schema file to assist developers in building Workflow Actions File for SharePoint Designer. Show Reader for MSDN Shows: Show Reader is a viewer for MSDN Shows based on .NET Framweork. In a single Window you can view your favorite shows with transcripts. Moreover, in the same window you can browse Microsoft web-sites where you can find Shows about .NET technologies, like the .NET Show, Channel9 and MSDN TV. ShowReader is available in two editions. A Windows Forms edition, written in Visual Basic 2005 and a Windows Presentation Foundation, written in Visual Basic 2008 It was developed by the Italian developer ...Subtitles Matcher: WPF application using prism and MEF automaticlly find and download subtitles for you media fileTweakSP2010: "Because SharePoint 2010 needs some Tweak'n" SharePoint Administration and Development extensions.TweetsSaver: ?????????zlibnet - c# zlib wrapper library: zlibnet - c# zlib wrapper library Features: -zip -unzip -compression/decompression stream -fast, since using the unmanaged zlib library -64bit support ZupSch: ZupSch is a little cms for student

    Read the article

  • c windows connect() fails. error 10049

    - by Joshua Moore
    The following two pieces of code compile, but I get a connect() failed error on the client side. (compiled with MinGW). Client Code: // thanks to cs.baylor.edu/~donahoo/practical/CSockets/code/TCPEchoClientWS.c #include <stdio.h> #include <winsock.h> #include <stdlib.h> #define RCVBUFSIZE 32 // size of receive buffer void DieWithError(char *errorMessage); int main(int argc, char* argv[]) { int sock; struct sockaddr_in echoServAddr; unsigned short echoServPort; char *servIP; char *echoString; char echoBuffer[RCVBUFSIZE]; int echoStringLen; int bytesRcvd, totalBytesRcvd; WSAData wsaData; if((argc < 3) || (argc > 4)){ fprintf(stderr, "Usage: %s <Sever IP> <Echo Word> [<Echo Port>]\n", argv[0]); exit(1); } if (argc==4) echoServPort = atoi(argv[3]); // use given port if any else echoServPort = 7; // echo is well-known port for echo service if(WSAStartup(MAKEWORD(2, 0), &wsaData) != 0){ // load winsock 2.0 dll fprintf(stderr, "WSAStartup() failed"); exit(1); } // create reliable, stream socket using tcp if((sock=socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) DieWithError("socket() failed"); // construct the server address structure memset(&echoServAddr, 0, sizeof(echoServAddr)); echoServAddr.sin_family = AF_INET; echoServAddr.sin_addr.s_addr = inet_addr(servIP); // server IP address echoServAddr.sin_port = htons(echoServPort); // establish connection to the echo server if(connect(sock, (struct sockaddr*)&echoServAddr, sizeof(echoServAddr)) < 0) DieWithError("connect() failed"); echoStringLen = strlen(echoString); // determine input length // send the string, includeing the null terminator to the server if(send(sock, echoString, echoStringLen, 0)!= echoStringLen) DieWithError("send() sent a different number of bytes than expected"); totalBytesRcvd = 0; printf("Received: "); // setup to print the echoed string while(totalBytesRcvd < echoStringLen){ // receive up to the buffer size (minus 1 to leave space for a null terminator) bytes from the sender if(bytesRcvd = recv(sock, echoBuffer, RCVBUFSIZE-1, 0) <= 0) DieWithError("recv() failed or connection closed prematurely"); totalBytesRcvd += bytesRcvd; // keep tally of total bytes echoBuffer[bytesRcvd] = '\0'; printf("%s", echoBuffer); // print the echo buffer } printf("\n"); closesocket(sock); WSACleanup(); exit(0); } void DieWithError(char *errorMessage) { fprintf(stderr, "%s: %d\n", errorMessage, WSAGetLastError()); exit(1); } Server Code: // thanks cs.baylor.edu/~donahoo/practical/CSockets/code/TCPEchoServerWS.c #include <stdio.h> #include <winsock.h> #include <stdlib.h> #define MAXPENDING 5 // maximum outstanding connection requests #define RCVBUFSIZE 1000 void DieWithError(char *errorMessage); void HandleTCPClient(int clntSocket); // tcp client handling function int main(int argc, char **argv) { int serverSock; int clientSock; struct sockaddr_in echoServerAddr; struct sockaddr_in echoClientAddr; unsigned short echoServerPort; int clientLen; // length of client address data structure WSAData wsaData; if (argc!=2){ fprintf(stderr, "Usage: %s <Server Port>\n", argv[0]); exit(1); } echoServerPort = atoi(argv[1]); if(WSAStartup(MAKEWORD(2, 0), &wsaData)!=0){ fprintf(stderr, "WSAStartup() failed"); exit(1); } // create socket for incoming connections if((serverSock=socket(PF_INET, SOCK_STREAM, IPPROTO_TCP))<0) DieWithError("socket() failed"); // construct local address structure memset(&echoServerAddr, 0, sizeof(echoServerAddr)); echoServerAddr.sin_family = AF_INET; echoServerAddr.sin_addr.s_addr = htonl(INADDR_ANY); // any incoming interface echoServerAddr.sin_port = htons(echoServerPort); // local port // bind to the local address if(bind(serverSock, (struct sockaddr*)&echoServerAddr, sizeof(echoServerAddr) )<0) DieWithError("bind() failed"); // mark the socket so it will listen for incoming connections if(listen(serverSock, MAXPENDING)<0) DieWithError("listen() failed"); for (;;){ // run forever // set the size of the in-out parameter clientLen = sizeof(echoClientAddr); // wait for a client to connect if((clientSock = accept(serverSock, (struct sockaddr*)&echoClientAddr, &clientLen)) < 0) DieWithError("accept() failed"); // clientSock is connected to a client printf("Handling client %s\n", inet_ntoa(echoClientAddr.sin_addr)); HandleTCPClient(clientSock); } // NOT REACHED } void DieWithError(char *errorMessage) { fprintf(stderr, "%s: %d\n", errorMessage, WSAGetLastError()); exit(1); } void HandleTCPClient(int clientSocket) { char echoBuffer[RCVBUFSIZE]; // buffer for echostring int recvMsgSize; // size of received message // receive message from client if((recvMsgSize = recv(clientSocket, echoBuffer, RCVBUFSIZE, 0) <0)) DieWithError("recv() failed"); // send received string and receive again until end of transmission while(recvMsgSize > 0){ // echo message back to client if(send(clientSocket, echoBuffer, recvMsgSize, 0)!=recvMsgSize) DieWithError("send() failed"); // see if there's more data to receive if((recvMsgSize = recv(clientSocket, echoBuffer, RCVBUFSIZE, 0)) <0) DieWithError("recv() failed"); } closesocket(clientSocket); // close client socket } How can I fix this?

    Read the article

  • Defining tokens at runtime

    - by Peter Crenshaw
    I want to write a parser for EDIFACT messages with JavaCC. My problem is that I cannot define all terminal symbols before parsing a message because at the begining of each message there is a so called "Advice Segment" ("UNA" Segment) which defines things like element seperator symbol, escape symbol, segment terminator symbol and decimal notation (e.g. '.' or ','). So I think/guess the production rules need some kind of variables which must be set at runtime during parsing. Can this be done with JavaCC and if so how? Or is there another way I am missing?

    Read the article

  • Haskell optimization of the following function

    - by me2
    Profiling of some code of mine showed that about 65% of the time I was running the following code. What it does is use the Data.Binary.Get monad to walk through a bytestring looking for the terminator. If it detects 0xff, it checks if the next byte is 0x00. If it is, it drops the 0x00 and continues. If it is not 0x00, then it drops both bytes and the resulting list of bytes is converted to a bytestring and returned. Any obvious ways to optimize this code? I can't see it. parseECS = f [] False where f acc ff = do b <- getWord8 if ff then if b == 0x00 then f (0xff:acc) False else return $ L.pack (reverse acc) else if b == 0xff then f acc True else f (b:acc) False

    Read the article

  • c++ builder TClientWinSocket simbol substitution

    - by Vlad
    I have the following problem. I have to send a text telegram over tcp/ip to a host device. Telegram should be terminated using 0x1A (CTRL-Z) character. But when I send it, host told me that there is a wrong symbol in the telegram. When I terminate a telegram with 32 (0x20) everything is ok. I look the transfered data using WireShark and I see that when I send 0x1A it is substituted with 0x16, when I send 32 (0x20) as a terminator it is somehow substituted with 0x1A. Can you explain it please. P.S. I am working on windows 7, using c++builder xe2. Thanks, Vladimir

    Read the article

  • Cannot terminate process, "already terminated"

    - by felix-freiberger
    On Windows 8, I regularly get processes into a state where I can't terminate them. Skypekit.exe seems to be the process that's most likely to trigger that issue, but other processes can do that, too. When I try to terminate these processes, I sometimes get an "access denied" message, sometimes nothing happens - but every following attempt to kill that process results in an "access denied" message, too, even though I... have administrative rights (and ran the task manager with it) own that process have the right to terminate it "Process Hacker 2" shows a more detailed error message, stating that I couldn't terminate the process because it already is terminated. Still, the process is most definitely still there, because every task manager I tested still can see it. Process Hacker's "Terminator" is unable to kill such a process, but when running the "Close the process' handles" tactic, Process Hacker gets stuck himself, leaving its windows in "not responding". In that state, other task managers are in turn unable to kill Process Hacker. The only way I found to actually end these processes is to shutdown (which works without any problems). Why is this happening? How can I kill these processes?

    Read the article

  • Why is REMOTE_ADDR only sometimes available as an Apache environment variable?

    - by Xiong Chiamiov
    To avoid having to parse X-Forwarded-For in Varnish, I'm trying to just set a header on the SSL terminator (currently Apache) that stores the direct client IP in a header. On our development machine, this works: RequestHeader set X-Foo %{REMOTE_ADDR}e However, in staging it doesn't. Specifically, the header is empty, as illustrated by both varnishlog: 13 TxHeader b X-Foo: (null) (On the development machine, this shows the IP address as expected.) Similarly, logging REMOTE_ADDR shows that it only appears to be populated on the dev machine: # Config LogFormat "%{X-Forwarded-For}i %{REMOTE_ADDR}e" combined CustomLog "/var/log/httpd/access_log" combined # Log file, staging <my ip> - # Log file, development <my ip> <my ip> Since the dev machine is, well, a dev machine, it is different in a number of ways; however, I can't track down which difference is causing this. The versions of Apache are the same (2.2.22), and I don't see anything relevant in any of the standard config files or /etc/sysconfig/httpd. And the rest of the system is reasonably similar, since they're built off the same CentOS 5 base image. I can't even tell from the Apache documentation whether REMOTE_ADDR is expected to exist or not as an environment variable, but it clearly works on one machine, whether by fluke or design, and the inconsistency is driving me mad.

    Read the article

  • Ubuntu 13.10 problems in apt-get update

    - by user205814
    I recently install Ubuntu 13.10, but I had several difficulties on installing several programs from 'Ubuntu Software Center'. I tried to update the repositories but I get the follow result (the * are mine since I cant put more than 2 links): Ign http*://security.ubuntu.com saucy-security InRelease Ign http*://extras.ubuntu.com saucy InRelease Hit http*://security.ubuntu.com saucy-security Release.gpg Hit http*://extras.ubuntu.com saucy Release.gpg Hit http*://security.ubuntu.com saucy-security Release Hit http*://extras.ubuntu.com saucy Release Hit http*://security.ubuntu.com saucy-security/main Sources Hit http*://extras.ubuntu.com saucy/main Sources Hit http*://security.ubuntu.com saucy-security/restricted Sources Hit http*://extras.ubuntu.com saucy/main amd64 Packages Hit http*://security.ubuntu.com saucy-security/universe Sources Hit http*://extras.ubuntu.com saucy/main i386 Packages Hit http*://security.ubuntu.com saucy-security/multiverse Sources Hit http*://security.ubuntu.com saucy-security/main amd64 Packages Hit http*://security.ubuntu.com saucy-security/restricted amd64 Packages Hit http*://security.ubuntu.com saucy-security/universe amd64 Packages Hit http*://security.ubuntu.com saucy-security/multiverse amd64 Packages Hit http*://security.ubuntu.com saucy-security/main i386 Packages Hit http*://security.ubuntu.com saucy-security/restricted i386 Packages Hit http*://security.ubuntu.com saucy-security/universe i386 Packages Hit http*://security.ubuntu.com saucy-security/multiverse i386 Packages Ign http*://extras.ubuntu.com saucy/main Translation-en_US Ign http*://extras.ubuntu.com saucy/main Translation-en Hit http*://security.ubuntu.com saucy-security/main Translation-en Hit http*://security.ubuntu.com saucy-security/multiverse Translation-en Hit http*://security.ubuntu.com saucy-security/restricted Translation-en Hit http*://security.ubuntu.com saucy-security/universe Translation-en Ign http*://security.ubuntu.com saucy-security/main Translation-en_US Ign http*://security.ubuntu.com saucy-security/multiverse Translation-en_US Ign http*://security.ubuntu.com saucy-security/restricted Translation-en_US Ign http*://security.ubuntu.com saucy-security/universe Translation-en_US Err http*://us.archive.ubuntu.com saucy InRelease Err http*://us.archive.ubuntu.com saucy-updates InRelease Err http*://us.archive.ubuntu.com saucy-backports InRelease Err http*://us.archive.ubuntu.com saucy Release.gpg Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::14). - connect (101: Network is unreachable) [IP: 2001:67c:1562::14 80] Err http*://us.archive.ubuntu.com saucy-updates Release.gpg Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::14). - connect (101: Network is unreachable) [IP: 2001:67c:1562::14 80] Err http*://us.archive.ubuntu.com saucy-backports Release.gpg Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::14). - connect (101: Network is unreachable) [IP: 2001:67c:1562::14 80] Reading package lists... Done W: Failed to fetch http*://us.archive.ubuntu.com/ubuntu/dists/saucy/InRelease W: Failed to fetch http*://us.archive.ubuntu.com/ubuntu/dists/saucy-updates/InRelease W: Failed to fetch http*://us.archive.ubuntu.com/ubuntu/dists/saucy-backports/InRelease W: Failed to fetch http*://us.archive.ubuntu.com/ubuntu/dists/saucy/Release.gpg Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::14). - connect (101: Network is unreachable) [IP: 2001:67c:1562::14 80] W: Failed to fetch http*://us.archive.ubuntu.com/ubuntu/dists/saucy-updates/Release.gpg Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::14). - connect (101: Network is unreachable) [IP: 2001:67c:1562::14 80] W: Failed to fetch http*://us.archive.ubuntu.com/ubuntu/dists/saucy-backports/Release.gpg Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::14). - connect (101: Network is unreachable) [IP: 2001:67c:1562::14 80] W: Some index files failed to download. They have been ignored, or old ones used instead. I want to install Seaview, Dropbox, Terminator and the IDLE of python 2.7, but I can't since I get 'There isn’t a software package called “” in your current software sources' or 'Available from the "multiverse" source. However, for this last one, when I do click over "Use this Source" nothing happens. I need help. Tx to all.

    Read the article

  • Indentify Codecs & Technical Information About Video Files

    - by DigitalGeekery
    Have you ever wanted to play an audio or video file but didn’t have the proper codec installed? Today we’ll show how to determine codecs, along with a host of other technical details about your media files with MediaInfo. Installation Download and install MediaInfo. You can find the download link at the bottom of the page. Note: When installing MediaInfo there is a recommended software bundle which you can opt out of by selecting Do not install option. Each recommended software choice may be different, like in this example it offers Spyware Terminator. The cool thing though is they use Open Candy which opts you out of the install. Just double check to make sure you’re not installing extra crapware. Using MediaInfo The first time you run MediaInfo it will display the Preferences window. There are various option such as language, output format, and whether or not you want MediaInfo to check for new versions. Click OK. Select a file or folder to analyze by clicking on the File or Folder icons on the left of the application window or by selecting File > Open from the menu. You can also drag and drop a file directly onto the application. MediaInfo will display details of your media file. In Basic view, you’ll see basic information. Notice in the example below the video and audio codecs, along with file size, running time of the media file, and even the application used to create the video file (Writing application).    You can switch to some of the other views by selecting View from the Menu and choosing form the dropdown list.   Sheet View will present the information a bit more clearly. You can see in the example below that the video and audio codec are listing in clearly identified columns. (AVC is often more commonly referred to H.264.)   Tree View is perhaps the most detailed. You can see from the example below the codec used for this AVI file is XviD.   Scrolling down even further you’ll see additional information like video and audio bit rates, frame rate, aspect ratio, and more.   In Basic View (and also in Sheet view) you can click to find a player for your file. In this instance with an MP4 file, it took me to the download page for Quicktime. This is by no means the only media player for this file, but if you are stuck for how to play a media file, this will forward you to a solution that works. You can do the same thing with Video codec. Click Go to the web site of this video codec to find a download.   MediaInfo is a simple but powerful tool that can be used to discover the details of a media file, or just to find a compatible codec. It works with most any video file type and is available for Windows, Mac, and Linux. Some Mac and Linux versions, however, are currently command line only. Download MediaInfo Similar Articles Productive Geek Tips How to Convert Videos to 3GP for Mobile PhonesFix for VLC Skipping and Lagging Playing High-Def Video FilesUsing VLC Player Under VistaUse Your Mac Mini as a Media Server Part 2How to Play .OGM Video Files in Windows Vista TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Xobni Plus for Outlook All My Movies 5.9 CloudBerry Online Backup 1.5 for Windows Home Server Snagit 10 2010 World Cup Schedule Boot Snooze – Reboot and then Standby or Hibernate Customize Everything Related to Dates, Times, Currency and Measurement in Windows 7 Google Earth replacement Icon (Icons we like) Build Great Charts in Excel with Chart Advisor tinysong gives a shortened URL for you to post on Twitter (or anywhere)

    Read the article

  • The long road to bug-free software

    - by Tony Davis
    The past decade has seen a burgeoning interest in functional programming languages such as Haskell or, in the Microsoft world, F#. Though still on the periphery of mainstream programming, functional programming concepts are gradually seeping into the imperative C# language (for example, Lambda expressions have their root in functional programming). One of the more interesting concepts from functional programming languages is the use of formal methods, the lofty ideal behind which is bug-free software. The idea is that we write a specification that describes exactly how our function (say) should behave. We then prove that our function conforms to it, and in doing so have proved beyond any doubt that it is free from bugs. All programmers already use one form of specification, specifically their programming language's type system. If a value has a specific type then, in a type-safe language, the compiler guarantees that value cannot be an instance of a different type. Many extensions to existing type systems, such as generics in Java and .NET, extend the range of programs that can be type-checked. Unfortunately, type systems can only prevent some bugs. To take a classic problem of retrieving an index value from an array, since the type system doesn't specify the length of the array, the compiler has no way of knowing that a request for the "value of index 4" from an array of only two elements is "unsafe". We restore safety via exception handling, but the ideal type system will prevent us from doing anything that is unsafe in the first place and this is where we start to borrow ideas from a language such as Haskell, with its concept of "dependent types". If the type of an array includes its length, we can ensure that any index accesses into the array are valid. The problem is that we now need to carry around the length of arrays and the values of indices throughout our code so that it can be type-checked. In general, writing the specification to prove a positive property, even for a problem very amenable to specification, such as a simple sorting algorithm, turns out to be very hard and the specification will be different for every program. Extend this to writing a specification for, say, Microsoft Word and we can see that the specification would end up being no simpler, and therefore no less buggy, than the implementation. Fortunately, it is easier to write a specification that proves that a program doesn't have certain, specific and undesirable properties, such as infinite loops or accesses to the wrong bit of memory. If we can write the specifications to prove that a program is immune to such problems, we could reuse them in many places. The problem is the lack of specification "provers" that can do this without a lot of manual intervention (i.e. hints from the programmer). All this might feel a very long way off, but computing power and our understanding of the theory of "provers" advances quickly, and Microsoft is doing some of it already. Via their Terminator research project they have started to prove that their device drivers will always terminate, and in so doing have suddenly eliminated a vast range of possible bugs. This is a huge step forward from saying, "we've tested it lots and it seems fine". What do you think? What might be good targets for specification and verification? SQL could be one: the cost of a bug in SQL Server is quite high given how many important systems rely on it, so there's a good incentive to eliminate bugs, even at high initial cost. [Many thanks to Mike Williamson for guidance and useful conversations during the writing of this piece] Cheers, Tony.

    Read the article

< Previous Page | 1 2 3 4  | Next Page >