Linear interpolator

i'm trying to design a linear interpolator as cleanly and performant as possible in pl/sql & sql
imagine i have a trade table
id
and a trade_profile table
id
profile_point
value
which i expect for every trade to contain the profile_points 1, 2, 3, 4 & 5, however that's not always the case.
i can't decide whether i should trawl trade by trade using bulk collect, inspecting each profile point to confirm it exists, and if not,
find the points to left and right and interpolate
or
define an uber sql query, possibly with analytic functions that give me all the inserts.
any thoughts would be appreciated.

Typically the solution, if done purely in SQL performs better then the PL/SQL equivalent.
If you can provide the information below you'll most likely get the solution, if not a good starting point.
1. Oracle version (SELECT * FROM V$VERSION)
2. Sample data in the form of CREATE / INSERT statements.
3. Expected output
4. Explanation of expected output (A.K.A. "business logic")
5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Linear interpolation problem of array

    hello evryone!a little problem catch me ,iwant to replace the value of array  by  Linear interpolation.  i wii attach my vi ,when you haven seen it ,you wii understand what i mean.thank you ,good luck for you !
    Attachments:
    Linear interpolation.vi ‏19 KB

    No, I don't understand what you mean, even after looking at your code.
    There is an array labeled "want". Which of the outputs do you want to look like that and how does it relate to the current default input?
    LabVIEW Champion . Do more with less code and in less time .

  • How To... Get linear Interpolation between Position keyframes ???

    Hi....
    cannot get my head around this one...
    When I do i..e opacity keyframes I can open video animation and add interpolation attributes like bezier & linear to the keyframes...
    However, for i.e. position and all other keyframe-attributes I cannot. And the promblem is that FCPx adds (automatically) a logarithmic start and end... So say I want to move a steady-shot from left to right over 2 seconds' worth of time, I'll set a keyframe to the beg. of the clips then go to the end od the clip and add another KF and then move the clip over by i.e. 20 pixels. The problem is that  the movement (interpolation) is NOT linear but logarithmic... Which ***** for what I am doing...
    I have tried right-clicking ANYTHING but I have NO control over the KF properties...
    Any ideas ?

    thanks for chiming in ;-)
    I know that I can create a motion effect that will handle this problem. And then load up that template in fcpx. As a matter of fact I have already built one since writing this message ;-)
    However, I thought that I HAD to be missing something VERY obvious since an app carrying the name PRO should be providing its user with the capability of the MOST basic stuff. Which is does -- but only for opacity keyframes...
    This app (in good and BAD) never seizes to amaze me.
    Clearly Mr. Ubilos is NOT an editor that is using keyframes much ;-)

  • Where can I find a linear interpolation VI for Labview?

    y=interpolation(X,Y,x), where x and y are either a scalar or vector. X and Y are 1D vector.

    Hi,
    there are two VIs in "Finctions->Array" palette.
    Interpolate 1D Array and
    Threshold 1D Array.
    For scalars y=interpolation(X,Y,x):
    you must first use "i=Threshold 1D Array (X,x)" to get the fractional index of "x" in "X" array. And at the second step you must calculate "y=Interpolate 1D Array(Y, i)" to get the interpolated value of Y.
    For arrays you just need to place tjis structure inside the loop and set the autoindexing.
    Example is attached
    Good luck.
    Oleg Chukto.
    Attachments:
    Ip.vi ‏15 KB

  • Data Interpolation for Automotive Mapping

    Hello all,
    I have a lookup table (see attached jpeg) for the main duration pulse (fuel injection) of a diesel engine, every data point (in msec) can be match to its respective speed (top row --RPM) and pressure (leftmost row --BMEP in bar). However, I do not have the complete map and thus I'm missing some points. I was told that LabVIEW has some neat data interpolation VIs that can be apply to this specific case, anyone knows one or knows how to tackle this problem?
    Thank you!
    Attachments:
    Lookup Table.JPG ‏77 KB

    Well, if you are running on a LabVIEW FPGA then the Linear Interpolation VI may be of interest. In LabVIEW for the PC the Curve Fitting Express VI or the 2D Interpolation.vi found in the NI Example finder can help out.
    Joshua B.
    National Instruments
    NI Services
    NI Support Resources
    NI Training Resources

  • Is spatial interpolation supported ?

    Is spatial interpolation supported in Oracle Spatial?
    And if it is not supported, where can I find good resources for doing it on Oracle ? Is there any free source code, on Java is preferable ?
    Regards.

    A string of coordinates in Oracle Spatial is a series of vertices in a poly-line. The line segments between vertices are always interpreted as straight lines (more properly, geodesics) in the particular coordinate system. In the case of a cartesian coordinate system, this is the same as a built-in linear interpolation as far as the internal computational geometry is concerned. And there is an implicit interpolation for line segments in geodetic space too. These implicit interpolations are used for all computational geometry in Oracle Spatial. In that sense interpolation is supported.
    If the sense of the question is can the user define the interpolation: to follow lines on constant bearing, latitude parallels, or any other curve in the space -- the answer is no. To follow such a curve, the SDO_GEOMETRY must contain a high enough vertex density to capture the desired curve if it departs from a geodesic between more coarsely spaced points.

  • Linear Interp Function for AppleWorks 6.2.9

    I am in search of a linear interpolation function or canned routine that I can use
    with AppleWorks to convert an X value, using an X Y Rating table to get a Y value.
    Does anyone know if such a function or routine exists for AppleWorks??
    Thanks much
    Kevin Richardson
    [email protected]

    Hi Kevin,
    Welcome to Apple Discussions and the AppleWorks forum.
    Keep in mind that AppleWorks and MS Excel had different target markets, different design considerations, and different executions. Excel is a standalone spreadsheet app designed for entepreneur level application, AppleWorks is a multi function application with no single mode as 'muscular' as a strong single purpose appstandalone of that type, but with the ability to integrate the various modes into a single document, and with a much smaller footprint (in terms of both RAM use and storage space required for the application).
    MS Excel is available for Macintosh, either as a standalone product or as part of MS Office. There are a number of other spreadsheet applications available, including the open source NeoOffice. Some of these may be better suited to your particular need than AW.
    Regards,
    Barry

  • Hold interpolation & square keyframes

    Third keyframe should be square shaped. Am I wrong? Why AFX only shows square-shaped KF after adding a keyframe to a previous hold interpolation? Since between second and third keyframes there's no linear interpolation, shouldn't the third KF automatically change to square?
    Thanks.

    I can see how that might be confusing. The shape of the keyframe icon is determined at the time that the keyframe is created; changing one keyframe's interploation type doesn't change the icon of the ones around it. If you think that it should, that would make a good feature request.

  • Reference Interest Rates Interpolation

    Hi experts,
    In our system we have upload Ref. Interest Rates for Euribor 1month (EURIBOR_1M), for 3 years, using transaction OB83. I would like ta ask if there is a tool in the TRM that can provide you the daily rate using the linear interpolation method.
    Thanks for your interest,
    George

    Hi again Gurus!
    Scenario changed.
    \We have uploaded in our system the reference interest rates for EURIBOR 1 DAY, EURIBOR 1 WEEK, EURIBOR 1 MONTH and EURIBOR 2 MONTHS (OB83) for 21/02/2012. Then we executed JBYC. After selecting YC and currency for 21/02/2012 we choose u201CDetailsu201D. In the Detailsu2019 tab we execute u201CInterpolate Int. Dateu201D for each day of the following 60s.
    Does anybody know if there is a way to calculate and STORE daily this information in the system, per yield curve and date?
    Our client wants every day to calculate the interpolated days based on daily yield curve and to report it. Is this possible in TRM?
    Special thanks,
    George

  • IMAQ Resample performanc​e. Any better choice for 50% downsample​? (average 2x2 - 1 pixel)

    My video source is a 4 Mpixel (2k x 2k resolution) USB3 camera. This is displaying a live image OK in Labview at 45 fps using only 20% CPU.  So far, so good.
    I added a "IMAQ Resample" block to downsize this to 1024 x 1024 image. That works with almost no additional processing time if I select "Zero Order" interpolation (eg. plain subsample to value of nearest pixel). However, I want to average each 2x2 block (4 pixels) in the input image into 1 output pixel. I *think* that is the effect of selecting Bi-Linear interpolation. Doing that works, but takes about 45% of CPU.  I want to do some other processing but am worried I will quickly run out of CPU time and start dropping frames.
    Is there any better way to do this simple 50% downsize (2x2 average), that would take less CPU overhead, or is this the best way?

    Hi jbeale1,
    In NI-MAX (Measurement & Automation Explorer) select your camera. Under the  'Acquistion Attributes' tab do you see an option to change the Video Mode of your camera to a different resolution? If your camera supports it, it would be more efficient to change the resolution there.
    If not , here is a little more info regarding the IMAQ Resample VI:
    http://zone.ni.com/reference/en-XX/help/370281P-01​/imaqvision/imaq_resample/
    You are correct, the Bi-Linear option uses a more intensive interpolation technique which is why it is more taxing on your CPU. I hope this is helpful.
    Robert S.
    Applications Engineer
    National Instruments

  • How can I get a list of BSSIDs without using netsh?

    I'm looking for an object that would have contents similar to the output of
    netsh wlan show networks mode=bssid
    I don't want to use unreliable parsing of text output, so using netsh is out.  The WMI interface that worked in windows xp doesn't work now.  There's an API, but there is no NET interface so it's pretty difficult to work with in powershell. 
    I know of a couple of adapters, but I'd like to keep this contained in one script.  I don't think I could find or write a type for the API that I could invoke in powershell.
    Is there anything else I'm missing?

    Oh, sorry, you have said that you don't want to use netsh.
    I will involve someone familiar with this to further look at this issue. Hope there is a way for you to use without the usage of netsh.
    There might be some time delay. Appreciate your patience.
    Thank you for your understanding and support.
    Regards,
    Yan Li
    Cataleya Li
    TechNet Community Support
    Thanks, but I think I got it all figured out.  I used the C# code from the managed wifi api project (http://managedwifi.codeplex.com/) though it needed a little tweaking - had to get everything in one
    namespace so powershell could easily consume it without external files.  Had to do a little manual type conversion with the output because yay unmanaged and untyped API output.  This still needs some tweaking to present it better, but this will do
    the basics.
    Note that this is two parts.  String all the code from this post and the next into one ps1.
    $NativeWifiCode = @'
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Runtime.InteropServices;
    using System.Net.NetworkInformation;
    using System.Threading;
    using System.Text;
    using System.Diagnostics;
    namespace NativeWifi
    /// <summary>
    /// Represents a client to the Zeroconf (Native Wifi) service.
    /// </summary>
    /// <remarks>
    /// This class is the entrypoint to Native Wifi management. To manage WiFi settings, create an instance
    /// of this class.
    /// </remarks>
    public static class Wlan
    #region P/Invoke API
    /// <summary>
    /// Defines various opcodes used to set and query parameters for an interface.
    /// </summary>
    /// <remarks>
    /// Corresponds to the native <c>WLAN_INTF_OPCODE</c> type.
    /// </remarks>
    public enum WlanIntfOpcode
    /// <summary>
    /// Opcode used to set or query whether auto config is enabled.
    /// </summary>
    AutoconfEnabled = 1,
    /// <summary>
    /// Opcode used to set or query whether background scan is enabled.
    /// </summary>
    BackgroundScanEnabled,
    /// <summary>
    /// Opcode used to set or query the media streaming mode of the driver.
    /// </summary>
    MediaStreamingMode,
    /// <summary>
    /// Opcode used to set or query the radio state.
    /// </summary>
    RadioState,
    /// <summary>
    /// Opcode used to set or query the BSS type of the interface.
    /// </summary>
    BssType,
    /// <summary>
    /// Opcode used to query the state of the interface.
    /// </summary>
    InterfaceState,
    /// <summary>
    /// Opcode used to query information about the current connection of the interface.
    /// </summary>
    CurrentConnection,
    /// <summary>
    /// Opcose used to query the current channel on which the wireless interface is operating.
    /// </summary>
    ChannelNumber,
    /// <summary>
    /// Opcode used to query the supported auth/cipher pairs for infrastructure mode.
    /// </summary>
    SupportedInfrastructureAuthCipherPairs,
    /// <summary>
    /// Opcode used to query the supported auth/cipher pairs for ad hoc mode.
    /// </summary>
    SupportedAdhocAuthCipherPairs,
    /// <summary>
    /// Opcode used to query the list of supported country or region strings.
    /// </summary>
    SupportedCountryOrRegionStringList,
    /// <summary>
    /// Opcode used to set or query the current operation mode of the wireless interface.
    /// </summary>
    CurrentOperationMode,
    /// <summary>
    /// Opcode used to query driver statistics.
    /// </summary>
    Statistics = 0x10000101,
    /// <summary>
    /// Opcode used to query the received signal strength.
    /// </summary>
    RSSI,
    SecurityStart = 0x20010000,
    SecurityEnd = 0x2fffffff,
    IhvStart = 0x30000000,
    IhvEnd = 0x3fffffff
    /// <summary>
    /// Specifies the origin of automatic configuration (auto config) settings.
    /// </summary>
    /// <remarks>
    /// Corresponds to the native <c>WLAN_OPCODE_VALUE_TYPE</c> type.
    /// </remarks>
    public enum WlanOpcodeValueType
    /// <summary>
    /// The auto config settings were queried, but the origin of the settings was not determined.
    /// </summary>
    QueryOnly = 0,
    /// <summary>
    /// The auto config settings were set by group policy.
    /// </summary>
    SetByGroupPolicy = 1,
    /// <summary>
    /// The auto config settings were set by the user.
    /// </summary>
    SetByUser = 2,
    /// <summary>
    /// The auto config settings are invalid.
    /// </summary>
    Invalid = 3
    public const uint WLAN_CLIENT_VERSION_XP_SP2 = 1;
    public const uint WLAN_CLIENT_VERSION_LONGHORN = 2;
    [DllImport("wlanapi.dll")]
    public static extern int WlanOpenHandle(
    [In] UInt32 clientVersion,
    [In, Out] IntPtr pReserved,
    [Out] out UInt32 negotiatedVersion,
    [Out] out IntPtr clientHandle);
    [DllImport("wlanapi.dll")]
    public static extern int WlanCloseHandle(
    [In] IntPtr clientHandle,
    [In, Out] IntPtr pReserved);
    [DllImport("wlanapi.dll")]
    public static extern int WlanEnumInterfaces(
    [In] IntPtr clientHandle,
    [In, Out] IntPtr pReserved,
    [Out] out IntPtr ppInterfaceList);
    [DllImport("wlanapi.dll")]
    public static extern int WlanQueryInterface(
    [In] IntPtr clientHandle,
    [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
    [In] WlanIntfOpcode opCode,
    [In, Out] IntPtr pReserved,
    [Out] out int dataSize,
    [Out] out IntPtr ppData,
    [Out] out WlanOpcodeValueType wlanOpcodeValueType);
    [DllImport("wlanapi.dll")]
    public static extern int WlanSetInterface(
    [In] IntPtr clientHandle,
    [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
    [In] WlanIntfOpcode opCode,
    [In] uint dataSize,
    [In] IntPtr pData,
    [In, Out] IntPtr pReserved);
    /// <param name="pDot11Ssid">Not supported on Windows XP SP2: must be a <c>null</c> reference.</param>
    /// <param name="pIeData">Not supported on Windows XP SP2: must be a <c>null</c> reference.</param>
    [DllImport("wlanapi.dll")]
    public static extern int WlanScan(
    [In] IntPtr clientHandle,
    [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
    [In] IntPtr pDot11Ssid,
    [In] IntPtr pIeData,
    [In, Out] IntPtr pReserved);
    /// <summary>
    /// Defines flags passed to <see cref="WlanGetAvailableNetworkList"/>.
    /// </summary>
    [Flags]
    public enum WlanGetAvailableNetworkFlags
    /// <summary>
    /// Include all ad-hoc network profiles in the available network list, including profiles that are not visible.
    /// </summary>
    IncludeAllAdhocProfiles = 0x00000001,
    /// <summary>
    /// Include all hidden network profiles in the available network list, including profiles that are not visible.
    /// </summary>
    IncludeAllManualHiddenProfiles = 0x00000002
    /// <summary>
    /// The header of an array of information about available networks.
    /// </summary>
    [StructLayout(LayoutKind.Sequential)]
    internal struct WlanAvailableNetworkListHeader
    /// <summary>
    /// Contains the number of <see cref="WlanAvailableNetwork"/> items following the header.
    /// </summary>
    public uint numberOfItems;
    /// <summary>
    /// The index of the current item. The index of the first item is 0.
    /// </summary>
    public uint index;
    /// <summary>
    /// Defines the flags which specify characteristics of an available network.
    /// </summary>
    [Flags]
    public enum WlanAvailableNetworkFlags
    /// <summary>
    /// This network is currently connected.
    /// </summary>
    Connected = 0x00000001,
    /// <summary>
    /// There is a profile for this network.
    /// </summary>
    HasProfile = 0x00000002
    /// <summary>
    /// Contains information about an available wireless network.
    /// </summary>
    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
    public struct WlanAvailableNetwork
    /// <summary>
    /// Contains the profile name associated with the network.
    /// If the network doesn't have a profile, this member will be empty.
    /// If multiple profiles are associated with the network, there will be multiple entries with the same SSID in the visible network list. Profile names are case-sensitive.
    /// </summary>
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
    public string profileName;
    /// <summary>
    /// Contains the SSID of the visible wireless network.
    /// </summary>
    public Dot11Ssid dot11Ssid;
    /// <summary>
    /// Specifies whether the network is an infrastructure or an ad-hoc one.
    /// </summary>
    public Dot11BssType dot11BssType;
    /// <summary>
    /// Indicates the number of BSSIDs in the network.
    /// </summary>
    public uint numberOfBssids;
    /// <summary>
    /// Indicates whether the network is connectable.
    /// </summary>
    public bool networkConnectable;
    /// <summary>
    /// Indicates why a network cannot be connected to. This member is only valid when <see cref="networkConnectable"/> is <c>false</c>.
    /// </summary>
    public WlanReasonCode wlanNotConnectableReason;
    /// <summary>
    /// The number of PHY types supported on available networks.
    /// The maximum value of this field is 8. If more than 8 PHY types are supported, <see cref="morePhyTypes"/> must be set to <c>true</c>.
    /// </summary>
    private uint numberOfPhyTypes;
    /// <summary>
    /// Contains an array of <see cref="Dot11PhyType"/> values that represent the PHY types supported by the available networks.
    /// When <see cref="numberOfPhyTypes"/> is greater than 8, this array contains only the first 8 PHY types.
    /// </summary>
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
    private Dot11PhyType[] dot11PhyTypes;
    /// <summary>
    /// Gets the <see cref="Dot11PhyType"/> values that represent the PHY types supported by the available networks.
    /// </summary>
    public Dot11PhyType[] Dot11PhyTypes
    get
    Dot11PhyType[] ret = new Dot11PhyType[numberOfPhyTypes];
    Array.Copy(dot11PhyTypes, ret, numberOfPhyTypes);
    return ret;
    /// <summary>
    /// Specifies if there are more than 8 PHY types supported.
    /// When this member is set to <c>true</c>, an application must call <see cref="WlanClient.WlanInterface.GetNetworkBssList"/> to get the complete list of PHY types.
    /// <see cref="WlanBssEntry.phyId"/> contains the PHY type for an entry.
    /// </summary>
    public bool morePhyTypes;
    /// <summary>
    /// A percentage value that represents the signal quality of the network.
    /// This field contains a value between 0 and 100.
    /// A value of 0 implies an actual RSSI signal strength of -100 dbm.
    /// A value of 100 implies an actual RSSI signal strength of -50 dbm.
    /// You can calculate the RSSI signal strength value for values between 1 and 99 using linear interpolation.
    /// </summary>
    public uint wlanSignalQuality;
    /// <summary>
    /// Indicates whether security is enabled on the network.
    /// </summary>
    public bool securityEnabled;
    /// <summary>
    /// Indicates the default authentication algorithm used to join this network for the first time.
    /// </summary>
    public Dot11AuthAlgorithm dot11DefaultAuthAlgorithm;
    /// <summary>
    /// Indicates the default cipher algorithm to be used when joining this network.
    /// </summary>
    public Dot11CipherAlgorithm dot11DefaultCipherAlgorithm;
    /// <summary>
    /// Contains various flags specifying characteristics of the available network.
    /// </summary>
    public WlanAvailableNetworkFlags flags;
    /// <summary>
    /// Reserved for future use. Must be set to NULL.
    /// </summary>
    uint reserved;
    [DllImport("wlanapi.dll")]
    public static extern int WlanGetAvailableNetworkList(
    [In] IntPtr clientHandle,
    [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
    [In] WlanGetAvailableNetworkFlags flags,
    [In, Out] IntPtr reservedPtr,
    [Out] out IntPtr availableNetworkListPtr);
    [Flags]
    public enum WlanProfileFlags
    /// <remarks>
    /// The only option available on Windows XP SP2.
    /// </remarks>
    AllUser = 0,
    GroupPolicy = 1,
    User = 2
    [DllImport("wlanapi.dll")]
    public static extern int WlanSetProfile(
    [In] IntPtr clientHandle,
    [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
    [In] WlanProfileFlags flags,
    [In, MarshalAs(UnmanagedType.LPWStr)] string profileXml,
    [In, Optional, MarshalAs(UnmanagedType.LPWStr)] string allUserProfileSecurity,
    [In] bool overwrite,
    [In] IntPtr pReserved,
    [Out] out WlanReasonCode reasonCode);
    /// <summary>
    /// Defines the access mask of an all-user profile.
    /// </summary>
    [Flags]
    public enum WlanAccess
    /// <summary>
    /// The user can view profile permissions.
    /// </summary>
    ReadAccess = 0x00020000 | 0x0001,
    /// <summary>
    /// The user has read access, and the user can also connect to and disconnect from a network using the profile.
    /// </summary>
    ExecuteAccess = ReadAccess | 0x0020,
    /// <summary>
    /// The user has execute access and the user can also modify and delete permissions associated with a profile.
    /// </summary>
    WriteAccess = ReadAccess | ExecuteAccess | 0x0002 | 0x00010000 | 0x00040000
    /// <param name="flags">Not supported on Windows XP SP2: must be a <c>null</c> reference.</param>
    [DllImport("wlanapi.dll")]
    public static extern int WlanGetProfile(
    [In] IntPtr clientHandle,
    [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
    [In, MarshalAs(UnmanagedType.LPWStr)] string profileName,
    [In] IntPtr pReserved,
    [Out] out IntPtr profileXml,
    [Out, Optional] out WlanProfileFlags flags,
    [Out, Optional] out WlanAccess grantedAccess);
    [DllImport("wlanapi.dll")]
    public static extern int WlanGetProfileList(
    [In] IntPtr clientHandle,
    [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
    [In] IntPtr pReserved,
    [Out] out IntPtr profileList
    [DllImport("wlanapi.dll")]
    public static extern void WlanFreeMemory(IntPtr pMemory);
    [DllImport("wlanapi.dll")]
    public static extern int WlanReasonCodeToString(
    [In] WlanReasonCode reasonCode,
    [In] int bufferSize,
    [In, Out] StringBuilder stringBuffer,
    IntPtr pReserved
    /// <summary>
    /// Defines the mask which specifies where a notification comes from.
    /// </summary>
    [Flags]
    public enum WlanNotificationSource
    None = 0,
    /// <summary>
    /// All notifications, including those generated by the 802.1X module.
    /// </summary>
    All = 0X0000FFFF,
    /// <summary>
    /// Notifications generated by the auto configuration module.
    /// </summary>
    ACM = 0X00000008,
    /// <summary>
    /// Notifications generated by MSM.
    /// </summary>
    MSM = 0X00000010,
    /// <summary>
    /// Notifications generated by the security module.
    /// </summary>
    Security = 0X00000020,
    /// <summary>
    /// Notifications generated by independent hardware vendors (IHV).
    /// </summary>
    IHV = 0X00000040
    /// <summary>
    /// Defines the types of ACM (<see cref="WlanNotificationSource.ACM"/>) notifications.
    /// </summary>
    /// <remarks>
    /// The enumeration identifiers correspond to the native <c>wlan_notification_acm_</c> identifiers.
    /// On Windows XP SP2, only the <c>ConnectionComplete</c> and <c>Disconnected</c> notifications are available.
    /// </remarks>
    public enum WlanNotificationCodeAcm
    AutoconfEnabled = 1,
    AutoconfDisabled,
    BackgroundScanEnabled,
    BackgroundScanDisabled,
    BssTypeChange,
    PowerSettingChange,
    ScanComplete,
    ScanFail,
    ConnectionStart,
    ConnectionComplete,
    ConnectionAttemptFail,
    FilterListChange,
    InterfaceArrival,
    InterfaceRemoval,
    ProfileChange,
    ProfileNameChange,
    ProfilesExhausted,
    NetworkNotAvailable,
    NetworkAvailable,
    Disconnecting,
    Disconnected,
    AdhocNetworkStateChange
    /// <summary>
    /// Defines the types of an MSM (<see cref="WlanNotificationSource.MSM"/>) notifications.
    /// </summary>
    /// <remarks>
    /// The enumeration identifiers correspond to the native <c>wlan_notification_msm_</c> identifiers.
    /// </remarks>
    public enum WlanNotificationCodeMsm
    Associating = 1,
    Associated,
    Authenticating,
    Connected,
    RoamingStart,
    RoamingEnd,
    RadioStateChange,
    SignalQualityChange,
    Disassociating,
    Disconnected,
    PeerJoin,
    PeerLeave,
    AdapterRemoval,
    AdapterOperationModeChange
    /// <summary>
    /// Contains information provided when registering for WLAN notifications.
    /// </summary>
    /// <remarks>
    /// Corresponds to the native <c>WLAN_NOTIFICATION_DATA</c> type.
    /// </remarks>
    [StructLayout(LayoutKind.Sequential)]
    public struct WlanNotificationData
    /// <summary>
    /// Specifies where the notification comes from.
    /// </summary>
    /// <remarks>
    /// On Windows XP SP2, this field must be set to <see cref="WlanNotificationSource.None"/>, <see cref="WlanNotificationSource.All"/> or <see cref="WlanNotificationSource.ACM"/>.
    /// </remarks>
    public WlanNotificationSource notificationSource;
    /// <summary>
    /// Indicates the type of notification. The value of this field indicates what type of associated data will be present in <see cref="dataPtr"/>.
    /// </summary>
    public int notificationCode;
    /// <summary>
    /// Indicates which interface the notification is for.
    /// </summary>
    public Guid interfaceGuid;
    /// <summary>
    /// Specifies the size of <see cref="dataPtr"/>, in bytes.
    /// </summary>
    public int dataSize;
    /// <summary>
    /// Pointer to additional data needed for the notification, as indicated by <see cref="notificationCode"/>.
    /// </summary>
    public IntPtr dataPtr;
    /// <summary>
    /// Gets the notification code (in the correct enumeration type) according to the notification source.
    /// </summary>
    public object NotificationCode
    get
    switch (notificationSource)
    case WlanNotificationSource.MSM:
    return (WlanNotificationCodeMsm)notificationCode;
    case WlanNotificationSource.ACM:
    return (WlanNotificationCodeAcm)notificationCode;
    default:
    return notificationCode;
    /// <summary>
    /// Defines the callback function which accepts WLAN notifications.
    /// </summary>
    public delegate void WlanNotificationCallbackDelegate(ref WlanNotificationData notificationData, IntPtr context);
    [DllImport("wlanapi.dll")]
    public static extern int WlanRegisterNotification(
    [In] IntPtr clientHandle,
    [In] WlanNotificationSource notifSource,
    [In] bool ignoreDuplicate,
    [In] WlanNotificationCallbackDelegate funcCallback,
    [In] IntPtr callbackContext,
    [In] IntPtr reserved,
    [Out] out WlanNotificationSource prevNotifSource);
    /// <summary>
    /// Defines flags which affect connecting to a WLAN network.
    /// </summary>
    [Flags]
    public enum WlanConnectionFlags
    /// <summary>
    /// Connect to the destination network even if the destination is a hidden network. A hidden network does not broadcast its SSID. Do not use this flag if the destination network is an ad-hoc network.
    /// <para>If the profile specified by <see cref="WlanConnectionParameters.profile"/> is not <c>null</c>, then this flag is ignored and the nonBroadcast profile element determines whether to connect to a hidden network.</para>
    /// </summary>
    HiddenNetwork = 0x00000001,
    /// <summary>
    /// Do not form an ad-hoc network. Only join an ad-hoc network if the network already exists. Do not use this flag if the destination network is an infrastructure network.
    /// </summary>
    AdhocJoinOnly = 0x00000002,
    /// <summary>
    /// Ignore the privacy bit when connecting to the network. Ignoring the privacy bit has the effect of ignoring whether packets are encryption and ignoring the method of encryption used. Only use this flag when connecting to an infrastructure network using a temporary profile.
    /// </summary>
    IgnorePrivacyBit = 0x00000004,
    /// <summary>
    /// Exempt EAPOL traffic from encryption and decryption. This flag is used when an application must send EAPOL traffic over an infrastructure network that uses Open authentication and WEP encryption. This flag must not be used to connect to networks that require 802.1X authentication. This flag is only valid when <see cref="WlanConnectionParameters.wlanConnectionMode"/> is set to <see cref="WlanConnectionMode.TemporaryProfile"/>. Avoid using this flag whenever possible.
    /// </summary>
    EapolPassthrough = 0x00000008
    /// <summary>
    /// Specifies the parameters used when using the <see cref="WlanConnect"/> function.
    /// </summary>
    /// <remarks>
    /// Corresponds to the native <c>WLAN_CONNECTION_PARAMETERS</c> type.
    /// </remarks>
    [StructLayout(LayoutKind.Sequential)]
    public struct WlanConnectionParameters
    /// <summary>
    /// Specifies the mode of connection.
    /// </summary>
    public WlanConnectionMode wlanConnectionMode;
    /// <summary>
    /// Specifies the profile being used for the connection.
    /// The contents of the field depend on the <see cref="wlanConnectionMode"/>:
    /// <list type="table">
    /// <listheader>
    /// <term>Value of <see cref="wlanConnectionMode"/></term>
    /// <description>Contents of the profile string</description>
    /// </listheader>
    /// <item>
    /// <term><see cref="WlanConnectionMode.Profile"/></term>
    /// <description>The name of the profile used for the connection.</description>
    /// </item>
    /// <item>
    /// <term><see cref="WlanConnectionMode.TemporaryProfile"/></term>
    /// <description>The XML representation of the profile used for the connection.</description>
    /// </item>
    /// <item>
    /// <term><see cref="WlanConnectionMode.DiscoverySecure"/>, <see cref="WlanConnectionMode.DiscoveryUnsecure"/> or <see cref="WlanConnectionMode.Auto"/></term>
    /// <description><c>null</c></description>
    /// </item>
    /// </list>
    /// </summary>
    [MarshalAs(UnmanagedType.LPWStr)]
    public string profile;
    /// <summary>
    /// Pointer to a <see cref="Dot11Ssid"/> structure that specifies the SSID of the network to connect to.
    /// This field is optional. When set to <c>null</c>, all SSIDs in the profile will be tried.
    /// This field must not be <c>null</c> if <see cref="wlanConnectionMode"/> is set to <see cref="WlanConnectionMode.DiscoverySecure"/> or <see cref="WlanConnectionMode.DiscoveryUnsecure"/>.
    /// </summary>
    public IntPtr dot11SsidPtr;
    /// <summary>
    /// Pointer to a <c>Dot11BssidList</c> structure that contains the list of basic service set (BSS) identifiers desired for the connection.
    /// </summary>
    /// <remarks>
    /// On Windows XP SP2, must be set to <c>null</c>.
    /// </remarks>
    public IntPtr desiredBssidListPtr;
    /// <summary>
    /// A <see cref="Dot11BssType"/> value that indicates the BSS type of the network. If a profile is provided, this BSS type must be the same as the one in the profile.
    /// </summary>
    public Dot11BssType dot11BssType;
    /// <summary>
    /// Specifies ocnnection parameters.
    /// </summary>
    /// <remarks>
    /// On Windows XP SP2, must be set to 0.
    /// </remarks>
    public WlanConnectionFlags flags;
    /// <summary>
    /// The connection state of an ad hoc network.
    /// </summary>
    public enum WlanAdhocNetworkState
    /// <summary>
    /// The ad hoc network has been formed, but no client or host is connected to the network.
    /// </summary>
    Formed = 0,
    /// <summary>
    /// A client or host is connected to the ad hoc network.
    /// </summary>
    Connected = 1
    [DllImport("wlanapi.dll")]
    public static extern int WlanConnect(
    [In] IntPtr clientHandle,
    [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
    [In] ref WlanConnectionParameters connectionParameters,
    IntPtr pReserved);
    [DllImport("wlanapi.dll")]
    public static extern int WlanDeleteProfile(
    [In] IntPtr clientHandle,
    [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
    [In, MarshalAs(UnmanagedType.LPWStr)] string profileName,
    IntPtr reservedPtr
    [DllImport("wlanapi.dll")]
    public static extern int WlanGetNetworkBssList(
    [In] IntPtr clientHandle,
    [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
    [In] IntPtr dot11SsidInt,
    [In] Dot11BssType dot11BssType,
    [In] bool securityEnabled,
    IntPtr reservedPtr,
    [Out] out IntPtr wlanBssList
    [StructLayout(LayoutKind.Sequential)]
    internal struct WlanBssListHeader
    internal uint totalSize;
    internal uint numberOfItems;
    /// <summary>
    /// Contains information about a basic service set (BSS).
    /// </summary>
    [StructLayout(LayoutKind.Sequential)]
    public struct WlanBssEntry
    /// <summary>
    /// Contains the SSID of the access point (AP) associated with the BSS.
    /// </summary>
    public Dot11Ssid dot11Ssid;
    /// <summary>
    /// The identifier of the PHY on which the AP is operating.
    /// </summary>
    public uint phyId;
    /// <summary>
    /// Contains the BSS identifier.
    /// </summary>
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
    public byte[] dot11Bssid;
    /// <summary>
    /// Specifies whether the network is infrastructure or ad hoc.
    /// </summary>
    public Dot11BssType dot11BssType;
    public Dot11PhyType dot11BssPhyType;
    /// <summary>
    /// The received signal strength in dBm.
    /// </summary>
    public int rssi;
    /// <summary>
    /// The link quality reported by the driver. Ranges from 0-100.
    /// </summary>
    public uint linkQuality;
    /// <summary>
    /// If 802.11d is not implemented, the network interface card (NIC) must set this field to TRUE. If 802.11d is implemented (but not necessarily enabled), the NIC must set this field to TRUE if the BSS operation complies with the configured regulatory domain.
    /// </summary>
    public bool inRegDomain;
    /// <summary>
    /// Contains the beacon interval value from the beacon packet or probe response.
    /// </summary>
    public ushort beaconPeriod;
    /// <summary>
    /// The timestamp from the beacon packet or probe response.
    /// </summary>
    public ulong timestamp;
    /// <summary>
    /// The host timestamp value when the beacon or probe response is received.
    /// </summary>
    public ulong hostTimestamp;
    /// <summary>
    /// The capability value from the beacon packet or probe response.
    /// </summary>
    public ushort capabilityInformation;
    /// <summary>
    /// The frequency of the center channel, in kHz.
    /// </summary>
    public uint chCenterFrequency;
    /// <summary>
    /// Contains the set of data transfer rates supported by the BSS.
    /// </summary>
    public WlanRateSet wlanRateSet;
    /// <summary>
    /// The offset of the information element (IE) data blob.
    /// </summary>
    public uint ieOffset;
    /// <summary>
    /// The size of the IE data blob, in bytes.
    /// </summary>
    public uint ieSize;
    /// <summary>
    /// Contains the set of supported data rates.
    /// </summary>
    [StructLayout(LayoutKind.Sequential)]
    public struct WlanRateSet
    /// <summary>
    /// The length, in bytes, of <see cref="rateSet"/>.
    /// </summary>
    private uint rateSetLength;
    /// <summary>
    /// An array of supported data transfer rates.
    /// </summary>
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 126)]
    private ushort[] rateSet;
    /// <summary>
    /// Gets an array of supported data transfer rates.
    /// If the rate is a basic rate, the first bit of the rate value is set to 1.
    /// A basic rate is the data transfer rate that all stations in a basic service set (BSS) can use to receive frames from the wireless medium.
    /// </summary>
    public ushort[] Rates
    get
    ushort[] rates = new ushort[rateSetLength / sizeof(ushort)];
    Array.Copy(rateSet, rates, rates.Length);
    return rates;
    /// <summary>
    /// Calculates the data transfer rate in mbit/s for a supported rate.
    /// </summary>
    /// <param name="rateIndex">The WLAN rate index (0-based).</param>
    /// <returns>The data transfer rate in mbit/s.</returns>
    /// <exception cref="ArgumentOutOfRangeException">Thrown if <param name="rateIndex"/> does not specify an existing rate.</exception>
    public double GetRateInMbps(int rateIndex)
    if ((rateIndex < 0) || (rateIndex > rateSet.Length))
    throw new ArgumentOutOfRangeException("rateIndex");
    return (rateSet[rateIndex] & 0x7FFF) * 0.5;
    /// <summary>
    /// Represents an error occuring during WLAN operations which indicate their failure via a <see cref="WlanReasonCode"/>.
    /// </summary>
    public class WlanException : Exception
    private readonly WlanReasonCode reasonCode;
    public WlanException(WlanReasonCode reasonCode)
    this.reasonCode = reasonCode;
    /// <summary>
    /// Gets the WLAN reason code.
    /// </summary>
    /// <value>The WLAN reason code.</value>
    public WlanReasonCode ReasonCode
    get { return reasonCode; }
    /// <summary>
    /// Gets a message that describes the reason code.
    /// </summary>
    /// <value></value>
    /// <returns>The error message that explains the reason for the exception, or an empty string("").</returns>
    public override string Message
    get
    StringBuilder sb = new StringBuilder(1024);
    return
    WlanReasonCodeToString(reasonCode, sb.Capacity, sb, IntPtr.Zero) == 0 ?
    sb.ToString() :
    string.Empty;
    // TODO: .NET-ify the WlanReasonCode enum (naming convention + docs).
    /// <summary>
    /// Defines reasons for a failure of a WLAN operation.
    /// </summary>
    /// <remarks>
    /// Corresponds to the native reason code identifiers (<c>WLAN_REASON_CODE_xxx</c> identifiers).
    /// </remarks>
    public enum WlanReasonCode
    Success = 0,
    // general codes
    UNKNOWN = 0x10000 + 1,
    RANGE_SIZE = 0x10000,
    BASE = 0x10000 + RANGE_SIZE,
    // range for Auto Config
    AC_BASE = 0x10000 + RANGE_SIZE,
    AC_CONNECT_BASE = (AC_BASE + RANGE_SIZE / 2),
    AC_END = (AC_BASE + RANGE_SIZE - 1),
    // range for profile manager
    // it has profile adding failure reason codes, but may not have
    // connection reason codes
    PROFILE_BASE = 0x10000 + (7 * RANGE_SIZE),
    PROFILE_CONNECT_BASE = (PROFILE_BASE + RANGE_SIZE / 2),
    PROFILE_END = (PROFILE_BASE + RANGE_SIZE - 1),
    // range for MSM
    MSM_BASE = 0x10000 + (2 * RANGE_SIZE),
    MSM_CONNECT_BASE = (MSM_BASE + RANGE_SIZE / 2),
    MSM_END = (MSM_BASE + RANGE_SIZE - 1),
    // range for MSMSEC
    MSMSEC_BASE = 0x10000 + (3 * RANGE_SIZE),
    MSMSEC_CONNECT_BASE = (MSMSEC_BASE + RANGE_SIZE / 2),
    MSMSEC_END = (MSMSEC_BASE + RANGE_SIZE - 1),
    // AC network incompatible reason codes
    NETWORK_NOT_COMPATIBLE = (AC_BASE + 1),
    PROFILE_NOT_COMPATIBLE = (AC_BASE + 2),
    // AC connect reason code
    NO_AUTO_CONNECTION = (AC_CONNECT_BASE + 1),
    NOT_VISIBLE = (AC_CONNECT_BASE + 2),
    GP_DENIED = (AC_CONNECT_BASE + 3),
    USER_DENIED = (AC_CONNECT_BASE + 4),
    BSS_TYPE_NOT_ALLOWED = (AC_CONNECT_BASE + 5),
    IN_FAILED_LIST = (AC_CONNECT_BASE + 6),
    IN_BLOCKED_LIST = (AC_CONNECT_BASE + 7),
    SSID_LIST_TOO_LONG = (AC_CONNECT_BASE + 8),
    CONNECT_CALL_FAIL = (AC_CONNECT_BASE + 9),
    SCAN_CALL_FAIL = (AC_CONNECT_BASE + 10),
    NETWORK_NOT_AVAILABLE = (AC_CONNECT_BASE + 11),
    PROFILE_CHANGED_OR_DELETED = (AC_CONNECT_BASE + 12),
    KEY_MISMATCH = (AC_CONNECT_BASE + 13),
    USER_NOT_RESPOND = (AC_CONNECT_BASE + 14),
    // Profile validation errors
    INVALID_PROFILE_SCHEMA = (PROFILE_BASE + 1),
    PROFILE_MISSING = (PROFILE_BASE + 2),
    INVALID_PROFILE_NAME = (PROFILE_BASE + 3),
    INVALID_PROFILE_TYPE = (PROFILE_BASE + 4),
    INVALID_PHY_TYPE = (PROFILE_BASE + 5),
    MSM_SECURITY_MISSING = (PROFILE_BASE + 6),
    IHV_SECURITY_NOT_SUPPORTED = (PROFILE_BASE + 7),
    IHV_OUI_MISMATCH = (PROFILE_BASE + 8),
    // IHV OUI not present but there is IHV settings in profile
    IHV_OUI_MISSING = (PROFILE_BASE + 9),
    // IHV OUI is present but there is no IHV settings in profile
    IHV_SETTINGS_MISSING = (PROFILE_BASE + 10),
    // both/conflict MSMSec and IHV security settings exist in profile
    CONFLICT_SECURITY = (PROFILE_BASE + 11),
    // no IHV or MSMSec security settings in profile
    SECURITY_MISSING = (PROFILE_BASE + 12),
    INVALID_BSS_TYPE = (PROFILE_BASE + 13),
    INVALID_ADHOC_CONNECTION_MODE = (PROFILE_BASE + 14),
    NON_BROADCAST_SET_FOR_ADHOC = (PROFILE_BASE + 15),
    AUTO_SWITCH_SET_FOR_ADHOC = (PROFILE_BASE + 16),
    AUTO_SWITCH_SET_FOR_MANUAL_CONNECTION = (PROFILE_BASE + 17),
    IHV_SECURITY_ONEX_MISSING = (PROFILE_BASE + 18),
    PROFILE_SSID_INVALID = (PROFILE_BASE + 19),
    TOO_MANY_SSID = (PROFILE_BASE + 20),
    // MSM network incompatible reasons
    UNSUPPORTED_SECURITY_SET_BY_OS = (MSM_BASE + 1),
    UNSUPPORTED_SECURITY_SET = (MSM_BASE + 2),
    BSS_TYPE_UNMATCH = (MSM_BASE + 3),
    PHY_TYPE_UNMATCH = (MSM_BASE + 4),
    DATARATE_UNMATCH = (MSM_BASE + 5),
    // MSM connection failure reasons, to be defined
    // failure reason codes
    // user called to disconnect
    USER_CANCELLED = (MSM_CONNECT_BASE + 1),
    // got disconnect while associating
    ASSOCIATION_FAILURE = (MSM_CONNECT_BASE + 2),
    // timeout for association
    ASSOCIATION_TIMEOUT = (MSM_CONNECT_BASE + 3),
    // pre-association security completed with failure
    PRE_SECURITY_FAILURE = (MSM_CONNECT_BASE + 4),
    // fail to start post-association security
    START_SECURITY_FAILURE = (MSM_CONNECT_BASE + 5),
    // post-association security completed with failure
    SECURITY_FAILURE = (MSM_CONNECT_BASE + 6),
    // security watchdog timeout
    SECURITY_TIMEOUT = (MSM_CONNECT_BASE + 7),
    // got disconnect from driver when roaming
    ROAMING_FAILURE = (MSM_CONNECT_BASE + 8),
    // failed to start security for roaming
    ROAMING_SECURITY_FAILURE = (MSM_CONNECT_BASE + 9),
    // failed to start security for adhoc-join
    ADHOC_SECURITY_FAILURE = (MSM_CONNECT_BASE + 10),
    // got disconnection from driver
    DRIVER_DISCONNECTED = (MSM_CONNECT_BASE + 11),
    // driver operation failed
    DRIVER_OPERATION_FAILURE = (MSM_CONNECT_BASE + 12),
    // Ihv service is not available
    IHV_NOT_AVAILABLE = (MSM_CONNECT_BASE + 13),
    // Response from ihv timed out
    IHV_NOT_RESPONDING = (MSM_CONNECT_BASE + 14),
    // Timed out waiting for driver to disconnect
    DISCONNECT_TIMEOUT = (MSM_CONNECT_BASE + 15),
    // An internal error prevented the operation from being completed.
    INTERNAL_FAILURE = (MSM_CONNECT_BASE + 16),
    // UI Request timed out.
    UI_REQUEST_TIMEOUT = (MSM_CONNECT_BASE + 17),
    // Roaming too often, post security is not completed after 5 times.
    TOO_MANY_SECURITY_ATTEMPTS = (MSM_CONNECT_BASE + 18),
    // MSMSEC reason codes
    MSMSEC_MIN = MSMSEC_BASE,
    // Key index specified is not valid
    MSMSEC_PROFILE_INVALID_KEY_INDEX = (MSMSEC_BASE + 1),
    // Key required, PSK present
    MSMSEC_PROFILE_PSK_PRESENT = (MSMSEC_BASE + 2),
    // Invalid key length
    MSMSEC_PROFILE_KEY_LENGTH = (MSMSEC_BASE + 3),
    // Invalid PSK length
    MSMSEC_PROFILE_PSK_LENGTH = (MSMSEC_BASE + 4),
    // No auth/cipher specified
    MSMSEC_PROFILE_NO_AUTH_CIPHER_SPECIFIED = (MSMSEC_BASE + 5),
    // Too many auth/cipher specified
    MSMSEC_PROFILE_TOO_MANY_AUTH_CIPHER_SPECIFIED = (MSMSEC_BASE + 6),
    // Profile contains duplicate auth/cipher
    MSMSEC_PROFILE_DUPLICATE_AUTH_CIPHER = (MSMSEC_BASE + 7),
    // Profile raw data is invalid (1x or key data)
    MSMSEC_PROFILE_RAWDATA_INVALID = (MSMSEC_BASE + 8),
    // Invalid auth/cipher combination
    MSMSEC_PROFILE_INVALID_AUTH_CIPHER = (MSMSEC_BASE + 9),
    // 802.1x disabled when it's required to be enabled
    MSMSEC_PROFILE_ONEX_DISABLED = (MSMSEC_BASE + 10),
    // 802.1x enabled when it's required to be disabled
    MSMSEC_PROFILE_ONEX_ENABLED = (MSMSEC_BASE + 11),
    MSMSEC_PROFILE_INVALID_PMKCACHE_MODE = (MSMSEC_BASE + 12),
    MSMSEC_PROFILE_INVALID_PMKCACHE_SIZE = (MSMSEC_BASE + 13),
    MSMSEC_PROFILE_INVALID_PMKCACHE_TTL = (MSMSEC_BASE + 14),
    MSMSEC_PROFILE_INVALID_PREAUTH_MODE = (MSMSEC_BASE + 15),
    MSMSEC_PROFILE_INVALID_PREAUTH_THROTTLE = (MSMSEC_BASE + 16),
    // PreAuth enabled when PMK cache is disabled
    MSMSEC_PROFILE_PREAUTH_ONLY_ENABLED = (MSMSEC_BASE + 17),
    // Capability matching failed at network
    MSMSEC_CAPABILITY_NETWORK = (MSMSEC_BASE + 18),
    // Capability matching failed at NIC
    MSMSEC_CAPABILITY_NIC = (MSMSEC_BASE + 19),
    // Capability matching failed at profile
    MSMSEC_CAPABILITY_PROFILE = (MSMSEC_BASE + 20),
    // Network does not support specified discovery type
    MSMSEC_CAPABILITY_DISCOVERY = (MSMSEC_BASE + 21),
    // Passphrase contains invalid character
    MSMSEC_PROFILE_PASSPHRASE_CHAR = (MSMSEC_BASE + 22),
    // Key material contains invalid character
    MSMSEC_PROFILE_KEYMATERIAL_CHAR = (MSMSEC_BASE + 23),
    // Wrong key type specified for the auth/cipher pair
    MSMSEC_PROFILE_WRONG_KEYTYPE = (MSMSEC_BASE + 24),
    // "Mixed cell" suspected (AP not beaconing privacy, we have privacy enabled profile)
    MSMSEC_MIXED_CELL = (MSMSEC_BASE + 25),
    // Auth timers or number of timeouts in profile is incorrect
    MSMSEC_PROFILE_AUTH_TIMERS_INVALID = (MSMSEC_BASE + 26),
    // Group key update interval in profile is incorrect
    MSMSEC_PROFILE_INVALID_GKEY_INTV = (MSMSEC_BASE + 27),
    // "Transition network" suspected, trying legacy 802.11 security
    MSMSEC_TRANSITION_NETWORK = (MSMSEC_BASE + 28),
    // Key contains characters which do not map to ASCII
    MSMSEC_PROFILE_KEY_UNMAPPED_CHAR = (MSMSEC_BASE + 29),
    // Capability matching failed at profile (auth not found)
    MSMSEC_CAPABILITY_PROFILE_AUTH = (MSMSEC_BASE + 30),
    // Capability matching failed at profile (cipher not found)
    MSMSEC_CAPABILITY_PROFILE_CIPHER = (MSMSEC_BASE + 31),
    // Failed to queue UI request
    MSMSEC_UI_REQUEST_FAILURE = (MSMSEC_CONNECT_BASE + 1),
    // 802.1x authentication did not start within configured time
    MSMSEC_AUTH_START_TIMEOUT = (MSMSEC_CONNECT_BASE + 2),
    // 802.1x authentication did not complete within configured time
    MSMSEC_AUTH_SUCCESS_TIMEOUT = (MSMSEC_CONNECT_BASE + 3),
    // Dynamic key exchange did not start within configured time
    MSMSEC_KEY_START_TIMEOUT = (MSMSEC_CONNECT_BASE + 4),
    // Dynamic key exchange did not succeed within configured time
    MSMSEC_KEY_SUCCESS_TIMEOUT = (MSMSEC_CONNECT_BASE + 5),
    // Message 3 of 4 way handshake has no key data (RSN/WPA)
    MSMSEC_M3_MISSING_KEY_DATA = (MSMSEC_CONNECT_BASE + 6),
    // Message 3 of 4 way handshake has no IE (RSN/WPA)
    MSMSEC_M3_MISSING_IE = (MSMSEC_CONNECT_BASE + 7),
    // Message 3 of 4 way handshake has no Group Key (RSN)
    MSMSEC_M3_MISSING_GRP_KEY = (MSMSEC_CONNECT_BASE + 8),
    // Matching security capabilities of IE in M3 failed (RSN/WPA)
    MSMSEC_PR_IE_MATCHING = (MSMSEC_CONNECT_BASE + 9),
    // Matching security capabilities of Secondary IE in M3 failed (RSN)
    MSMSEC_SEC_IE_MATCHING = (MSMSEC_CONNECT_BASE + 10),
    // Required a pairwise key but AP configured only group keys
    MSMSEC_NO_PAIRWISE_KEY = (MSMSEC_CONNECT_BASE + 11),
    // Message 1 of group key handshake has no key data (RSN/WPA)
    MSMSEC_G1_MISSING_KEY_DATA = (MSMSEC_CONNECT_BASE + 12),
    // Message 1 of group key handshake has no group key
    MSMSEC_G1_MISSING_GRP_KEY = (MSMSEC_CONNECT_BASE + 13),
    // AP reset secure bit after connection was secured
    MSMSEC_PEER_INDICATED_INSECURE = (MSMSEC_CONNECT_BASE + 14),
    // 802.1x indicated there is no authenticator but profile requires 802.1x
    MSMSEC_NO_AUTHENTICATOR = (MSMSEC_CONNECT_BASE + 15),
    // Plumbing settings to NIC failed
    MSMSEC_NIC_FAILURE = (MSMSEC_CONNECT_BASE + 16),
    // Operation was cancelled by caller
    MSMSEC_CANCELLED = (MSMSEC_CONNECT_BASE + 17),
    // Key was in incorrect format
    MSMSEC_KEY_FORMAT = (MSMSEC_CONNECT_BASE + 18),
    // Security downgrade detected
    MSMSEC_DOWNGRADE_DETECTED = (MSMSEC_CONNECT_BASE + 19),
    // PSK mismatch suspected
    MSMSEC_PSK_MISMATCH_SUSPECTED = (MSMSEC_CONNECT_BASE + 20),
    // Forced failure because connection method was not secure
    MSMSEC_FORCED_FAILURE = (MSMSEC_CONNECT_BASE + 21),
    // ui request couldn't be queued or user pressed cancel
    MSMSEC_SECURITY_UI_FAILURE = (MSMSEC_CONNECT_BASE + 22),
    MSMSEC_MAX = MSMSEC_END
    /// <summary>
    /// Contains information about connection related notifications.
    /// </summary>
    /// <remarks>
    /// Corresponds to the native <c>WLAN_CONNECTION_NOTIFICATION_DATA</c> type.
    /// </remarks>
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    public struct WlanConnectionNotificationData
    /// <remarks>
    /// On Windows XP SP 2, only <see cref="WlanConnectionMode.Profile"/> is supported.
    /// </remarks>
    public WlanConnectionMode wlanConnectionMode;
    /// <summary>
    /// The name of the profile used for the connection. Profile names are case-sensitive.
    /// </summary>
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
    public string profileName;
    /// <summary>
    /// The SSID of the association.
    /// </summary>
    public Dot11Ssid dot11Ssid;
    /// <summary>
    /// The BSS network type.
    /// </summary>
    public Dot11BssType dot11BssType;
    /// <summary>
    /// Indicates whether security is enabled for this connection.
    /// </summary>
    public bool securityEnabled;
    /// <summary>
    /// Indicates the reason for an operation failure.
    /// This field has a value of <see cref="WlanReasonCode.Success"/> for all connection-related notifications except <see cref="WlanNotificationCodeAcm.ConnectionComplete"/>.
    /// If the connection fails, this field indicates the reason for the failure.
    /// </summary>
    public WlanReasonCode wlanReasonCode;
    /// <summary>
    /// This field contains the XML presentation of the profile used for discovery, if the connection succeeds.
    /// </summary>
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
    public string profileXml;
    /// <summary>
    /// Indicates the state of an interface.
    /// </summary>
    /// <remarks>
    /// Corresponds to the native <c>WLAN_INTERFACE_STATE</c> type.
    /// </remarks>
    public enum WlanInterfaceState
    /// <summary>
    /// The interface is not ready to operate.
    /// </summary>
    NotReady = 0,
    /// <summary>
    /// The interface is connected to a network.
    /// </summary>
    Connected = 1,
    /// <summary>
    /// The interface is the first node in an ad hoc network. No peer has connected.
    /// </summary>
    AdHocNetworkFormed = 2,
    /// <summary>
    /// The interface is disconnecting from the current network.
    /// </summary>
    Disconnecting = 3,
    /// <summary>
    /// The interface is not connected to any network.
    /// </summary>
    Disconnected = 4,
    /// <summary>
    /// The interface is attempting to associate with a network.
    /// </summary>
    Associating = 5,
    /// <summary>
    /// Auto configuration is discovering the settings for the network.
    /// </summary>
    Discovering = 6,
    /// <summary>
    /// The interface is in the process of authenticating.
    /// </summary>
    Authenticating = 7
    /// <summary>
    /// Contains the SSID of an interface.
    /// </summary>
    public struct Dot11Ssid
    /// <summary>
    /// The length, in bytes, of the <see cref="SSID"/> array.
    /// </summary>
    public uint SSIDLength;
    /// <summary>
    /// The SSID.
    /// </summary>
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
    public byte[] SSID;
    /// <summary>
    /// Defines an 802.11 PHY and media type.
    /// </summary>
    /// <remarks>
    /// Corresponds to the native <c>DOT11_PHY_TYPE</c> type.
    /// </remarks>
    public enum Dot11PhyType : uint
    /// <summary>
    /// Specifies an unknown or uninitialized PHY type.
    /// </summary>
    Unknown = 0,
    /// <summary>
    /// Specifies any PHY type.
    /// </summary>
    Any = Unknown,
    /// <summary>
    /// Specifies a frequency-hopping spread-spectrum (FHSS) PHY. Bluetooth devices can use FHSS or an adaptation of FHSS.
    /// </summary>
    FHSS = 1,
    /// <summary>
    /// Specifies a direct sequence spread spectrum (DSSS) PHY.
    /// </summary>
    DSSS = 2,
    /// <summary>
    /// Specifies an infrared (IR) baseband PHY.
    /// </summary>
    IrBaseband = 3,
    /// <summary>
    /// Specifies an orthogonal frequency division multiplexing (OFDM) PHY. 802.11a devices can use OFDM.
    /// </summary>
    OFDM = 4,
    /// <summary>
    /// Specifies a high-rate DSSS (HRDSSS) PHY.
    /// </summary>
    HRDSSS = 5,
    /// <summary>
    /// Specifies an extended rate PHY (ERP). 802.11g devices can use ERP.
    /// </summary>
    ERP = 6,
    /// <summary>
    /// Specifies the start of the range that is used to define PHY types that are developed by an independent hardware vendor (IHV).
    /// </summary>
    IHV_Start = 0x80000000,
    /// <summary>
    /// Specifies the end of the range that is used to define PHY types that are developed by an independent hardware vendor (IHV).
    /// </summary>
    IHV_End = 0xffffffff

  • How to setup grow/shrink behavior on a moving group?

    SD project. Group consists of 18 evenly spaced SD video clips each individually sized to 40%. The group is positioned near the top of the screen at 100% size.
    The group then marches smoothly across the screen by transforming position X over 36 seconds using linear interpolation.
    I am trying to cause the group (10 seconds into the timeline) to smoothly increase in size by applying a grow/shrink behavior over 3 seconds while continuing the X transform.
    Position Y is changed to keep the location of the top of the group the same while the group grows.
    Starts OK and ends OK. Works fine all the way to the end once the behavior finishes. Using the same X transform.
    The problem is that during the grow behavior the apparent X and Y axis motion behaves incorrectly. The motion appears to change speed and even briefly reverses direction.
    I understand why this is happening but I don't know how to fix it.
    I have tried every combination of interpolation for the transforms along with every variation of the grow behavior parameters I can think of.
    Everything I have tried makes things worse and/or introduces unwanted side effects.
    Any thoughts?

    I tried to implement what you were talking about. Just to make it easier on myself, I did use a 18 piece replicator instead of 18 individual files...so hopefully that doesn't change things. I did not get any reverse or weird X,Y behaviors acting incorrectly. It started at timeline 10:00 and ended at timeline 13:00, grew 120%, and the group had an anchor point set to the top of the group so it would only grow bottom and to the sides. Stuck with the same interpolation and everything. The only thing that looked weird was that the boxes pop back in place after the grow/shrink is done. Which is just because the behavior ends. Now! something that was odd was that I couldn't keyframe any parameters in the behavior?

  • [SOLVED] urxvt colors and moc theme

    Hello!
    I am a KDE user and usually i am using Konsole. For some applications (like htop and moc) i use urxvt (patched version from AUR). The problem is in colors. When i launch moc in Konsole the theme colours are right but not in urxvt too. That happens with htop also. URxvt doesn't follow theme backrground color (uses its own) and foreground colors too.
    Here is my .Xresource file:
    ! urxvt
    ! URxvt*termName: string
    !URxvt*geometry: 80x40
    ! URxvt*chdir: string
    ! URxvt*reverseVideo: boolean
    ! URxvt*loginShell: boolean
    ! URxvt*jumpScroll: boolean
    ! URxvt*skipScroll: boolean
    ! URxvt*pastableTabs: boolean
    ! URxvt*scrollstyle: mode
    URxvt*scrollBar: false
    ! URxvt*scrollBar_right: boolean
    ! URxvt*scrollBar_floating: boolean
    ! URxvt*scrollBar_align: mode
    !URxvt*thickness: 20
    ! URxvt*scrollTtyOutput: boolean
    ! URxvt*scrollTtyKeypress: boolean
    ! URxvt*scrollWithBuffer: boolean
    ! URxvt*inheritPixmap: boolean
    ! URxvt*transparent: boolean
    ! URxvt*tintColor: color
    ! URxvt*shading: number
    ! URxvt*blurRadius: HxV
    ! URxvt*fading: number
    ! URxvt*fadeColor: color
    ! URxvt*utmpInhibit: boolean
    ! URxvt*urgentOnBell: boolean
    ! URxvt*visualBell: boolean
    ! URxvt*mapAlert: boolean
    ! URxvt*meta8: boolean
    ! URxvt*mouseWheelScrollPage: boolean
    ! URxvt*tripleclickwords: boolean
    ! URxvt*insecure: boolean
    ! URxvt*cursorUnderline: boolean
    ! URxvt*cursorBlink: true
    ! URxvt*pointerBlank: boolean
    URxvt*background: #171717
    URxvt*foreground: #B2B2B2
    URxvt*color0: #171717
    URxvt*color1: #3D3D3D
    URxvt*color2: #ffffff
    ! URxvt*color3: color
    ! URxvt*color4: color
    ! URxvt*color5: color
    ! URxvt*color6: color
    ! URxvt*color7: color
    ! URxvt*color8: color
    ! URxvt*color9: color
    ! URxvt*color10: color
    ! URxvt*color11: color
    ! URxvt*color12: color
    ! URxvt*color13: color
    ! URxvt*color14: color
    ! URxvt*color15: color
    ! URxvt*colorBD: color
    ! URxvt*colorIT: color
    ! URxvt*colorUL: color
    ! URxvt*colorRV: color
    ! URxvt*underlineColor: color
    ! URxvt*scrollColor: color
    ! URxvt*troughColor: color
    ! URxvt*highlightColor: color
    ! URxvt*highlightTextColor: color
    ! URxvt*cursorColor: color
    ! URxvt*cursorColor2: color
    ! URxvt*pointerColor: color
    ! URxvt*pointerColor2: color
    URxvt*borderColor: #171717
    URxvt.font: xft:Ubuntu Mono:size=11
    !URxvt*iconFile: /usr/share/icons/oxygen/128x128/apps/utilities-terminal.png
    ! URxvt*boldFont: fontname
    ! URxvt*italicFont: fontname
    ! URxvt*boldItalicFont: fontname
    ! URxvt*intensityStyles: boolean
    ! URxvt*inputMethod: name
    ! URxvt*preeditType: style
    ! URxvt*imLocale: string
    ! URxvt*imFont: fontname
    ! URxvt*title: string
    ! URxvt*iconName: string
    ! URxvt*saveLines: number
    ! URxvt*buffered: boolean
    URxvt*depth: 32
    ! URxvt*visual: number
    ! URxvt*transient-for: windowid
    ! URxvt*override-redirect: boolean
    ! URxvt*hold: boolean
    ! URxvt*externalBorder: 20
    ! URxvt*internalBorder: 7
    ! URxvt*borderLess: true
    ! URxvt*lineSpace: number
    ! URxvt*letterSpace: number
    ! URxvt*skipBuiltinGlyphs: true
    ! URxvt*pointerBlankDelay: number
    ! URxvt*backspacekey: string
    ! URxvt*deletekey: string
    ! URxvt*print-pipe: string
    ! URxvt*modifier: modifier
    ! URxvt*cutchars: string
    ! URxvt*answerbackString: string
    ! URxvt*secondaryScreen: boolean
    !URxvt*secondaryScroll: boolean
    ! URxvt*perl-lib: string
    ! URxvt*perl-eval: perl-eval
    ! URxvt*perl-ext-common: tabbed
    ! URxvt*perl-ext: string
    ! URxvt*iso14755: boolean
    ! URxvt*iso14755_52: boolean
    ! URxvt*xrm: string
    ! URxvt*keysym.sym: keysym
    ! URxvt*background.border: true
    ! URxvt*background.expr: string
    ! URxvt*background.interval: seconds
    ! URxvt*bell-command: string
    ! URxvt*matcher.button: string
    ! URxvt*matcher.launcher: string
    ! URxvt*matcher.launcher.*: string
    ! URxvt*matcher.pattern.*: string
    ! URxvt*matcher.rend.*: string
    ! URxvt*remote-clipboard.fetch: string
    ! URxvt*remote-clipboard.store: string
    ! URxvt*searchable-scrollback: string
    ! URxvt*selection-autotransform.*: string
    ! URxvt*selection-pastebin.cmd: string
    ! URxvt*selection-pastebin.url: string
    ! URxvt*selection.pattern-0: string
    ! URxvt*tab-bg: 1
    ! URxvt*tab-fg: 2
    ! URxvt*tabbar-bg: 0
    ! URxvt*tabbar-fg: colour
    ! URxvt*url-launcher: string
    Moc config file:
    # This is a configuration file for the MOC player. It should be named
    # 'config' and placed in the ~/.moc directory. As this file can specify
    # commands which invoke other applications, MOC will refuse to start if it
    # is not owned by either root or the current user, or if it is writable by
    # anyone other than its owner. All options are given with their default
    # values, and therefore commented.
    # Comments begin with '#'.
    # You can use quotes and escape ('\') in parameters.
    # You can have variable values substituted by enclosing the variable name
    # as "${...}". (This only applies to the portion of the option following
    # the ' ='.) Variables are substituted first from the environment then,
    # if not found, from the configuration options. (Note that the value of
    # a configuration option substituted is that which it has at the time the
    # substitution variable is encountered.) If there is a naming conflict
    # between an environment and configuration variable, you may be able to
    # resolve it by using lowercase as the environment variable matches are
    # case-sensitive whereas the configuration variables are not.
    # You can also use the form "${...:-...}" where the value in the second
    # position will be substituted if the variable name given in the first
    # position is unset or null.
    # So, for example:
    # MusicDir = /music/${USER:-public}
    # Fastdir1 = ${MusicDir}/mp3/rock
    # Fastdir2 = ${MusicDir}/mp3/electronic
    # Fastdir3 = ${MusicDir}/mp3/rap
    # Fastdir4 = ${MusicDir}/mp3/etc
    # Variable names are limited to those accepted by the BASH shell; that
    # is, those comprising the upper- and lowercase ASCII characters, digits
    # and the underscore.
    # If you need to use the "${" sequence for any other purpose, write "$${"
    # and it will be replaced by "${" and not treated as a substitution.
    # Some options take lists of strings as their values. The strings are
    # separated by colons. Additional strings can be appended to the list
    # using "+ =" in place of a plain "=" to assign the value. For an example,
    # see the XTerms option.
    # You can override any configuration option when you run MOC using the
    # '-O' command line option:
    # mocp -O AutoNext =no -O messagelingertime=1 -O XTerms+=xxt:xwt
    # This command line option can be repeated as many times as needed and
    # the configuration option name is not case sensitive. (Note that MOC
    # does not perform variable substitution on the value of such overridden
    # configuration options.) Most option values are set before the
    # configuration file is processed (which allows the new values to be
    # picked up by substitutions), however list-valued options are overridden
    # afterwards (which gives the choice of whether the configured values are
    # replaced or added to).
    # Remember that the client and server are separate processes and the
    # server will retain the configuration values formed from the environment
    # within which it was originally started.
    # Show file titles (title, author, album) instead of file names?
    #ReadTags = yes
    # In which directory do you store your music files? If you specify it
    # you will be able to jump straight to this directory with the '-m'
    # parameter or the 'm' command. This can also point to a playlist.
    # Example: MusicDir = "/home/joe/music"
    #MusicDir = "My folder"
    # Start in the music directory by default? If set to 'no', start
    # in the current directory by default. A single directory on
    # the command line takes precedence.
    #StartInMusicDir = no
    # How to sort? FileName is the option's only value for now.
    #Sort = FileName
    # Show errors in the streams (for example, broken frames in MP3 files)?
    #ShowStreamErrors = no
    # Ignore CRC errors in MP3 files? Most players do that, so the default
    # value is 'yes'.
    #MP3IgnoreCRCErrors = yes
    # Set playback toggles.
    #Repeat = no
    #Shuffle = no
    #AutoNext = yes
    # Default FormatString:
    # %n - Track number
    # %a - Artist
    # %A - Album
    # %t - Title
    # %(X:TRUE:FALSE) - Ternary expression: if X exists, do TRUE,
    # otherwise FALSE. The escape character must
    # be doubled (i.e., '\\'). (See zshmisc
    # documentation for more information.)
    #FormatString = "%(n:%n :)%(a:%a - :)%(t:%t:)%(A: \(%A\):)"
    # Input and output buffer sizes (in kilobytes).
    #InputBuffer = 512 # Minimum value is 32KB
    #OutputBuffer = 512 # Minimum value is 128KB
    # How much to fill the input buffer before playing (in kilobytes)?
    # This can't be greater than the value of InputBuffer. While this has
    # a positive effect for network streams, it also causes the broadcast
    # audio to be delayed.
    #Prebuffering = 64
    # Use this HTTP proxy server for internet streams. If not set, the
    # environment variables http_proxy and ALL_PROXY will be used if present.
    # Format: HTTPProxy = PROXY_NAME:PORT
    #HTTPProxy =
    # Sound driver - OSS, ALSA, JACK, SNDIO (on OpenBSD) or null (only for
    # debugging). You can enter more than one driver as a colon-separated
    # list. The first working driver will be used.
    #SoundDriver = JACK:ALSA:OSS
    # Jack output settings.
    #JackClientName = "moc"
    #JackStartServer = no
    #JackOutLeft = "system:playback_1"
    #JackOutRight = "system:playback_2"
    # OSS output settings.
    #OSSDevice = /dev/dsp
    #OSSMixerDevice = /dev/mixer
    #OSSMixerChannel1 = pcm # 'pcm', 'master' or 'speaker'
    #OSSMixerChannel2 = master # 'pcm', 'master' or 'speaker'
    # ALSA output settings.
    #ALSADevice = default
    #ALSAMixer1 = PCM
    #ALSAMixer2 = Master
    # Save software mixer state?
    # If enabled, a file 'softmixer' will be created in '~/.moc/' storing the
    # mixersetting set when the server is shut down.
    # Note that there is a "hidden" 'Amplification' setting in that file.
    # Amplification (0-200) is used to scale the mixer setting (0-100). This
    # results in a higher signal amplitude but may also produce clipping.
    #Softmixer_SaveState = yes
    # Save equalizer state?
    # If enabled, a file 'equalizer' will be created in '~/.moc/' storing the
    # equalizer settings when the server is shut down.
    # Note that there is a "hidden" 'Mixin' setting in that file.
    # Mixin (0.0-1.0) is used to determine how much of the original signal is
    # used after equalizing. 0 means to only use the equalized sound, while 1
    # effectively disabled the mixer. The default is 0.25.
    #Equalizer_SaveState = yes
    # Show files with dot at the beginning?
    #ShowHiddenFiles = no
    # Hide file name extensions?
    #HideFileExtension = no
    # Show file format in menu?
    #ShowFormat = yes
    # Show file time in menu? Possible values: 'yes', 'no' and 'IfAvailable'
    # (meaning show the time only when it is already known, which often works
    # faster).
    #ShowTime = IfAvailable
    # Show time played as a percentage in the time progress bar.
    #ShowTimePercent = no
    # Values of the TERM environment variable which are deemed to be xterms.
    #XTerms = xterm
    #XTerms + = xterm-colour:xterm-color
    #XTerms + = xterm-256colour:xterm-256color
    #XTerms + = rxvt:rxvt-unicode
    #XTerms + = rxvt-unicode-256colour:rxvt-unicode-256color
    #XTerms + = eterm
    # Theme file to use. This can be absolute path or relative to
    # /usr/share/moc/themes/ (depends on installation prefix) or
    # ~/.moc/themes/ .
    # Example: Theme = laras_theme
    Theme = yellow_red_theme
    # The theme used when running on an xterm.
    # Example: XTermTheme = transparent-background
    #XTermTheme = yellow_red_theme
    # Should MOC try to autoload the default lyrics file for an audio? (The
    # default lyrics file is a text file with the same file name as the audio
    # file name with any trailing "extension" removed.)
    #AutoLoadLyrics = yes
    # MOC directory (where pid file, socket and state files are stored).
    # You can use ~ at the beginning.
    #MOCDir = ~/.moc
    # Use mmap() to read files. mmap() is much slower on NFS.
    #UseMMap = no
    # Use MIME to identify audio files. This can make for slower loading
    # of playlists but is more accurate than using "extensions".
    #UseMimeMagic = no
    # Assume this encoding for ID3 version 1/1.1 tags (MP3 files). Unlike
    # ID3v2, UTF-8 is not used here and MOC can't guess how tags are encoded.
    # Another solution is using librcc (see the next option). This option is
    # ignored if UseRCC is set to 'yes'.
    #ID3v1TagsEncoding = WINDOWS-1250
    # Use librcc to fix ID3 version 1/1.1 tags encoding.
    #UseRCC = yes
    # Use librcc to filenames and directory names encoding.
    #UseRCCForFilesystem = yes
    # When this option is set the player assumes that if the encoding of
    # ID3v2 is set to ISO-8859-1 then the ID3v1TagsEncoding is actually
    # that and applies appropriate conversion.
    #EnforceTagsEncoding = no
    # Enable the conversion of filenames from the local encoding to UTF-8.
    #FileNamesIconv = no
    # Enable the conversion of the xterm title from UTF-8 to the local encoding.
    #NonUTFXterm = no
    # Remember the playlist after exit?
    SavePlaylist = yes
    # When using more than one client (interface) at a time, do they share
    # the playlist?
    #SyncPlaylist = yes
    # Choose a keymap file (relative to '~/.moc/' or using an absolute path).
    # An annotated example keymap file is included ('keymap.example').
    # Example: Keymap = my_keymap
    #Keymap =
    # Use ASCII rather than graphic characters for drawing lines. This
    # helps on some terminals.
    #ASCIILines = no
    # FastDirs, these allow you to jump directly to a directory, the key
    # bindings are in the keymap file.
    # Examples: Fastdir1 = /mp3/rock
    # Fastdir2 = /mp3/electronic
    # Fastdir3 = /mp3/rap
    # Fastdir4 = /mp3/etc
    #Fastdir1 =
    #Fastdir2 =
    #Fastdir3 =
    #Fastdir4 =
    #Fastdir5 =
    #Fastdir6 =
    #Fastdir7 =
    #Fastdir8 =
    #Fastdir9 =
    #Fastdir10 =
    # How fast to seek (in number of seconds per keystroke). The first
    # option is for normal seek and the second for silent seek.
    #SeekTime = 1
    #SilentSeekTime = 5
    # PreferredDecoders allows you to specify which decoder should be used
    # for any given audio format. It is a colon-separated list in which
    # each entry is of the general form 'code(decoders)', where 'code'
    # identifies the audio format and 'decoders' is a comma-separated list
    # of decoders in order of preference.
    # The audio format identifier may be either a filename extension or a
    # MIME media type. If the latter, the format is 'type/subtype' (e.g.,
    # 'audio/flac'). Because different systems may give different MIME
    # media types, any 'x-' prefix of the subtype is ignored both here and
    # in the actual file MIME type (so all combinations of 'audio/flac' and
    # 'audio/x-flac' match each other).
    # For Internet streams the matching is done on MIME media type and on
    # actual content. For files the matches are made on MIME media type
    # (if the 'UseMimeMagic' option is set) and on filename extension. The
    # MIME media type of a file is not determined until the first entry for
    # MIME is encountered in the list.
    # The matching is done in the order of appearance in the list with any
    # entries added from the command line being matched before those listed
    # here. Therefore, if you place all filename extension entries before
    # all MIME entries you will speed up MOC's processing of directories
    # (which could be significant for remote file systems).
    # The decoder list may be empty, in which case no decoders will be used
    # for files (and files with that audio format ignored) while Internet
    # streams will be assessed on the actual content. Any decoder position
    # may contain an asterisk, in which case any decoder not otherwise listed
    # which can handle the audio format will be used. It is not an error to
    # list the same decoder twice, but neither does it make sense to do so.
    # If you have a mix of audio and non-audio files in your directories, you
    # may wish to include entries at top of the list which ignore non-audio
    # files by extension.
    # In summary, the PreferredDecoders option provides fine control over the
    # type of matching which is performed (filename extension, MIME media
    # type and streamed media content) and which decoder(s) (if any) are used
    # based on the option's list entries and their ordering.
    # Examples: aac(aac,ffmpeg) first try FAAD2 for AACs then FFmpeg
    # mp3() ignore MP3 files
    # wav(*,sndfile) use sndfile for WAV as a last resort
    # ogg(vorbis,*):flac(flac,*) try Xiph decoders first
    # ogg():audio/ogg() ignore OGG files, and
    # force Internet selection by content
    # gz():html() ignore some non-audio files
    # Any unspecified audio formats default to trying all decoders.
    # Any unknown (or misspelt) drivers are ignored.
    # All names are case insensitive.
    # The default setting reflects the historical situation modified by
    # the experience of users.
    #PreferredDecoders = aac(aac,ffmpeg):m4a(ffmpeg)
    #PreferredDecoders += mpc(musepack,*,ffmpeg):mpc8(musepack,*,ffmpeg)
    #PreferredDecoders += sid(sidplay2):mus(sidplay2)
    #PreferredDecoders += wav(sndfile,*,ffmpeg)
    #PreferredDecoders += wv(wavpack,*,ffmpeg)
    #PreferredDecoders += audio/aac(aac):audio/aacp(aac):audio/m4a(ffmpeg)
    #PreferredDecoders += audio/wav(sndfile,*)
    # The following PreferredDecoders attempt to handle the ambiguity surrounding
    # container types such as OGG for files. The first two entries will force
    # a local file to the correct decoder (assuming the .ogg file contains Vorbis
    # audio), while the MIME media types will cause Internet audio streams to
    # be assessed on content (which may be either Vorbis or Speex).
    #PreferredDecoders += ogg(vorbis,ffmpeg):oga(vorbis,ffmpeg):ogv(ffmpeg)
    #PreferredDecoders += opus(opus,ffmpeg)
    #PreferredDecoders += spx(speex)
    #PreferredDecoders += application/ogg(vorbis):audio/ogg(vorbis)
    # Which resampling method to use. There are a few methods of resampling
    # sound supported by libresamplerate. The default is 'Linear') which is
    # also the fastest. A better description can be found at:
    # http://www.mega-nerd.com/libsamplerate/api_misc.html#Converters
    # but briefly, the following methods are based on bandlimited interpolation
    # and are higher quality, but also slower:
    # SincBestQuality - really slow (I know you probably have an xx GHz
    # processor, but it's still not enough to not see
    # this in the top output :) The worst case
    # Signal-to-Noise Ratio is 97dB.
    # SincMediumQuality - much faster.
    # SincFastest - the fastest bandlimited interpolation.
    # And these are lower quality, but much faster methods:
    # ZeroOrderHold - really poor quality, but it's really fast.
    # Linear - a bit better and a bit slower.
    #ResampleMethod = Linear
    # Always use this sample rate (in Hz) when opening the audio device (and
    # resample the sound if necessary). When set to 0 the device is opened
    # with the file's rate.
    #ForceSampleRate = 0
    # By default, even if the sound card reports that it can output 24bit samples
    # MOC converts 24bit PCM to 16bit. Setting this option to 'yes' allows MOC
    # to use 24bit output. (The MP3 decoder, for example, uses this format.)
    # This is disabled by default because there were reports that it prevents
    # MP3 files from playing on some soundcards.
    #Allow24bitOutput = no
    # Use realtime priority for output buffer thread. This will prevent gaps
    # while playing even with heavy load. The user who runs MOC must have
    # permissions to set such a priority. This could be dangerous, because it
    # is possible that a bug in MOC will freeze your computer.
    #UseRealtimePriority = no
    # The number of audio files for which MOC will cache tags. When this limit
    # is reached, file tags are discarded on a least recently used basis (with
    # one second resolution). You can disable the cache by giving it a size of
    # zero. Note that if you decrease the cache size below the number of items
    # currently in the cache, the number will not decrease immediately (if at
    # all).
    #TagsCacheSize = 256
    # Number items in the playlist.
    #PlaylistNumbering = yes
    # Main window layouts can be configured. You can change the position and
    # size of the menus (directory and playlist). You have three layouts and
    # can switch between then using the 'l' key (standard mapping). By default,
    # only two layouts are configured.
    # The format is as follows:
    # - Each layout is described as a list of menu entries.
    # - Each menu entry is of the form:
    # menu(position_x, position_y, width, height)
    # where 'menu' is either 'directory' or 'playlist'.
    # - The parameters define position and size of the menu. They can
    # be absolute numbers (like 10) or a percentage of the screen size
    # (like 45%).
    # - 'width' and 'height' can have also value of 'FILL' which means
    # fill the screen from the menu's position to the border.
    # - Menus may overlap.
    # You must describe at least one menu (default is to fill the whole window).
    # There must be at least one layout (Layout1) defined; others can be empty.
    # Example: Layout1 = playlist(50%,50%,50%,50%)
    # Layout2 = ""
    # Layout3 = ""
    # Just one layout, the directory will occupy the whole
    # screen, the playlist will have 1/4 of the screen size
    # and be positioned at lower right corner. (Note that
    # because the playlist will be hidden by the directory
    # you will have to use the TAB key to make the playlist
    # visible.)
    # Example: Layout1 = playlist(0,0,100%,10):directory(0,10,100%,FILL)
    # The screen is split into two parts: playlist at the top
    # and the directory menu at the bottom. Playlist will
    # occupy 10 lines and the directory menu the rest.
    #Layout1 = directory(0,0,50%,100%):playlist(50%,0,FILL,100%)
    #Layout2 = directory(0,0,100%,100%):playlist(0,0,100%,100%)
    #Layout3 = ""
    # When the song changes, should the menu be scrolled so that the currently
    # played file is visible?
    #FollowPlayedFile = yes
    # What to do if the interface was started and the server is already playing
    # something from the playlist? If CanStartInPlaylist is set to 'yes', the
    # interface will switch to the playlist. When set to 'no' it will start
    # from the last directory.
    #CanStartInPlaylist = yes
    # Executing external commands (1 - 10) invoked with key commands (F1 - F10
    # by default).
    # Some arguments are substituted before executing:
    # %f - file path
    # %i - title made from tags
    # %S - start block mark (in seconds)
    # %E - end block mark (in seconds)
    # Data from tags can also be substituted:
    # %t - title
    # %a - album
    # %r - artist
    # %n - track
    # %m - time of the file (in seconds)
    # The parameters above apply to the currently selected file. If you change
    # them to capital letters, they are taken from the file currently playing.
    # Programs are run using execv(), not a shell, so you can't do things like
    # redirecting the output to a file. The command string is split using blank
    # characters as separators; the first element is the command to be executed
    # and the rest are its parameters, so if you use "echo Playing: %I" we run
    # program 'echo' (from $PATH) with 2 parameters: the string 'Playing:' and
    # the title of the file currently playing. Even if the title contains
    # spaces, it's still one parameter and it's safe if it contains `rm -rf /`.
    # Examples: ExecCommand1 = "cp %f /mnt/usb_drive"
    # ExecCommand2 = "/home/joe/now_playing %I"
    #ExecCommand1 =
    #ExecCommand2 =
    #ExecCommand3 =
    #ExecCommand4 =
    #ExecCommand5 =
    #ExecCommand6 =
    #ExecCommand7 =
    #ExecCommand8 =
    #ExecCommand9 =
    #ExecCommand10 =
    # Display the cursor in the line with the selected file. Some braille
    # readers (the Handy Tech modular series ZMU 737, for example) use the
    # cursor to focus and can make use of it to present the file line even
    # when other fields are changing.
    #UseCursorSelection = no
    # Set the terminal title when running under xterm.
    #SetXtermTitle = yes
    # Set the terminal title when running under screen.
    #SetScreenTitle = yes
    # Display full paths instead of just file names in the playlist.
    #PlaylistFullPaths = yes
    # The following setting describes how block markers are displayed in
    # the play time progress bar. Its value is a string of exactly three
    # characters. The first character is displayed in a position which
    # corresponds to the time marked as the start of a block and the last
    # character to the time marked as the end of the block. The middle
    # character is displayed instead if both the start and the end of the block
    # would fall in the same position (within the resolution of the interface).
    # You can turn off the displaying of these block marker positions by using
    # three space characters.
    #BlockDecorators = "`\"'"
    # How long (in seconds) to leave a message displayed on the screen.
    # Setting this to a high value allows you to scroll through the messages
    # using the 'hide_message' key. Setting it to zero means you'll have to
    # be quick to see any message at all. Any new messages will be queued up
    # and displayed after the current message's linger time expires.
    #MessageLingerTime = 3
    # Does MOC display a prefix on delayed messages indicating
    # the number of queued messages still to be displayed?
    #PrefixQueuedMessages = yes
    # String to append to the queued message count if any
    # error messages are still waiting to be displayed.
    #ErrorMessagesQueued = "!"
    # Self-describing ModPlug options (with 'yes' or 'no' values).
    #ModPlug_Oversampling = yes
    #ModPlug_NoiseReduction = yes
    #ModPlug_Reverb = no
    #ModPlug_MegaBass = no
    #ModPlug_Surround = no
    # ModPlug resampling mode.
    # Valid values are:
    # FIR - 8 tap fir filter (extremely high quality)
    # SPLINE - Cubic spline interpolation (high quality)
    # LINEAR - Linear interpolation (fast, good quality)
    # NEAREST - No interpolation (very fast, extremely bad sound quality)
    #ModPlug_ResamplingMode = FIR
    # Other self-describing ModPlug audio characteristic options.
    # (Note that the 32 bit sample size seems to be buggy.)
    #ModPlug_Channels = 2 # 1 or 2 channels
    #ModPlug_Bits = 16 # 8, 16 or 32 bits
    #ModPlug_Frequency = 44100 # 11025, 22050, 44100 or 48000 Hz
    #ModPlug_ReverbDepth = 0 # 0 (quiet) to 100 (loud)
    #ModPlug_ReverbDelay = 0 # Delay in ms (usually 40-200ms)
    #ModPlug_BassAmount = 0 # 0 (quiet) to 100 (loud).
    #ModPlug_BassRange = 10 # Cutoff in Hz (10-100).
    #ModPlug_SurroundDepth = 0 # Surround level 0(quiet)-100(heavy).
    #ModPlug_SurroundDelay = 0 # Surround delay in ms, usually 5-40ms.
    #ModPlug_LoopCount = 0 # 0 (never), n (times) or -1 (forever)
    # Self-describing TiMidity audio characteristic options.
    #TiMidity_Rate = 44100 # Between 8000 and 48000
    #TiMidity_Bits = 16 # 8 or 16
    #TiMidity_Channels = 2 # 1 or 2
    #TiMidity_Volume = 100 # 0 to 800
    # You can setup a TiMidity-Config-File here.
    # Leave it unset to use library defaults (/etc/timidity.cfg mostly).
    # Setting it to 'yes' also uses the library defaults.
    # Set it to 'no' if you don't have any configuration file.
    # Otherwise set it to the name of a specific file.
    #TiMidity_Config =
    # Self-describing SidPlay2 audio characteristic options.
    #SidPlay2_DefaultSongLength = 180 # If not in database (in seconds)
    #SidPlay2_MinimumSongLength = 0 # Play at least n (in seconds)
    #SidPlay2_Frequency = 44100 # 4000 to 48000
    #SidPlay2_Bits = 16 # 8 or 16
    #SidPlay2_Optimisation = 0 # 0 (worst quality) to 2 (best quality)
    # Set path to a HVSC-compatible database (if not set, database is disabled).
    #SidPlay2_Database =
    # SidPlay2 playback Mode:
    # "M": Mono (best for many SIDs)
    # "S": Stereo
    # "L"/"R": Left / Right
    #SidPlay2_PlayMode = "M"
    # Use start-song information from SID ('yes') or start at first song
    # ('no'). Songs before the start-song won't be played. (Note that this
    # option previously took the values 1 and 0; these are now deprecated
    # in favour of 'yes' and 'no'.)
    #SidPlay2_StartAtStart = yes
    # Play sub-tunes. (Note that this option previously took the values 1
    # and 0; these are now deprecated in favour of 'yes' and 'no'.)
    #SidPlay2_PlaySubTunes = yes
    # Run the OnSongChange command when a new song starts playing.
    # Specify the full path (i.e. no leading '~') of an executable to run.
    # Arguments will be passed, and you can use the following escapes:
    # %a artist
    # %r album
    # %f filename
    # %t title
    # %n track
    # %d file duration in XX:YY form
    # %D file duration, number of seconds
    # No pipes/redirects can be used directly, but writing a shell script
    # can do the job.
    # Example: OnSongChange = "/home/jack/.moc/myscript %a %r"
    #OnSongChange =
    # If RepeatSongChange is 'yes' then MOC will execute the command every time
    # a song starts playing regardless of whether or not it is just repeating.
    # Otherwise the command will only be executed when a different song is
    # started.
    #RepeatSongChange = no
    # Run the OnStop command (full path, no arguments) when MOC changes state
    # to stopped (i.e., when user stopped playing or changes a song).
    #OnStop = "/home/jack/.moc/myscript_on_stop"
    # This option determines which song to play after finishing all the songs
    # in the queue. Setting this to 'yes' causes MOC to play the song which
    # follows the song being played before queue playing started. If set to
    # 'no', MOC will play the song following the last song in the queue if it
    # is in the playlist. The default is 'yes' because this is the way other
    # players usually behave. (Note that this option previously took the
    # values 1 and 0; these are now deprecated in favour of 'yes' and 'no'.)
    #QueueNextSongReturn = yes
    I read wiki but didn't find anything useful. Thanks for any info.
    Last edited by Shark (2014-12-17 12:31:30)

    bleach wrote:
    i see these
    URxvt*background: #171717
    URxvt*foreground: #B2B2B2
    URxvt*color0: #171717
    URxvt*color1: #3D3D3D
    URxvt*color2: #ffffff
    are not commented out
    3d3d3d is for red but you have a blackish and color2 is for green but you have it white the rest should be the default colors. it uses the same colors only it changes the vairiant of the color you choice there or normally moc uses colors such as green blue and such which will call your console colors for those respective fields I know moc has /user/share/moc/themes/ that you can edit or make your own for instance copy one and edit it. I think htop uses the same color count which is 8 but with so green will be white when you use urxvt. 8 for normal colors 16 for bright dark and urxvt is 256 which is 16 but can use any of the 256 colors for 16.
    just to clarify you have commented out your colors 4-15 and your green and red is weird, and htop aswell as moc is 8 bit. moc theme_yellow_red is default for background so it will use urxvts background
    Haahaha, that is simple. And it works!!!
    I didn't bother with commenting that because i thought they are not applied. Anyway, thanks man. My urxvt terminal si grateful to you and your thorough explanation. SOLVED!

  • When are Apple going to sort out the Final Cut Pro X Key Frame problem

    Hello,
    I’m trying to move three custom text clips to different locations on the screen & change the text size. The text clips drift around between two key frames with the same values. (“linear” is set on the red wire frame movement indicator) I know you can stop the drift by going to the first key frame, move forward one frame, add a key frame, wait for the rendering to complete then delete the key frame, then move to the next key frame, go back one frame, add a key frame, wait for the rendering to complete then delete the key frame. All this takes a considerable time. Does anyone know when Apple plan to fix this Key Frame bug? Or an easier way to stop the drift between key frames?
    Thanks
    JohnH

    Yep, I hope KFs get a little bit of love in the next update too.
    To make my KFs linear, I always do the move, then drop a dummy keyframe inbetween them and add/delete that KF until the Motion path stops showing a change. Linear interpolation will follow!
    Pain but quite quick!!

  • How do I code a 2-D look-up table in a DIadem script?

    Based on two existing Diadem variables, what is the syntax for doing a
    linear interpolation inside a 6 x 5 table to calculate a third value
    that is a function of both of the first two variables?  This would
    be similar to doing a horizontal and a vertical lookup in Excel.

    Hi Brad,
    Sorry I wasn't more specific.  I've copied the entire table
    below; I can reference in any manner that would make sense; its entries
    are constants.  First I'd like to check the value of a Diadem
    variable, 'efficiency', to see if it's between 0.2 and 0.7 (the first
    row of the table).  If it is outside that range, then the new
    variable 'bypass' should be set to zero.  Then I'd like to check
    the Diadem variable "utility" to be within 5 and 50 inclusive (the
    first column of the table).  If it is outside the range, then
    again bypass should equal zero.  If efficiency and utility are
    both within range, then I'd like to linearly interpolate between the
    values of the table (based on efficiency and utility) to calculate
    bypass.
    0.2
    0.3
    0.4
    0.5
    0.6
    0.7
    5
    1.5
    2
    3
    3.5
    4.5
    6
    8
    1.8
    2.9
    4.2
    5
    10.9
    15.3
    10
    2
    3.5
    5
    7
    14
    21.5
    30
    4
    8
    17
    31
    40
    80
    50
    5.5
    16
    17
    31
    40
    80
    Thank you for your help - aviatrix.

Maybe you are looking for

  • Unable to create repository owner

    Hi whenever im trying to create a repository owner with SPRO_REP_OWNER Im getting an error as follows DBMS_JAVA.grant_permission is an unidentified identifier( im sorry i forgot the exact message.) I checked in the Database i found a synonym but i di

  • Error in processing CON2

    when trying to do CON2 - Revaluation at Actual Prices :Production/Process Orders a error message  - Revaluation at Actual Prices not possible in version 0 physical year 2012. Can someone, please assist me , what do i need to do to correct this? thank

  • Oracle Reports Builder - RDF vs XML

    Hi I was wondering if there are any major differences between RDF and XML versions of reports and any issues with deploying xml to the report server? XML would certainly be easier to version control.

  • Code 19 error on DV4

    Optiarc DVD RW drive shows "Code 19" in device manager and won't read disks. tried external usb sony drive and get same results. any suggestions? I tried recovery via h/w driver install with no success.  System is Vista 64. This question was solved.

  • What are the risks when doing a Delete / Re-load of Data in InfoCube?

    Hi, What are the risks/issues when doing a complete Delete / Re-load of Data in InfoCube? Rgds, Mark.