Search Results

Search found 632 results on 26 pages for 'imports'.

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

  • Difference of two series in MySQL

    - by Brian
    I have a table with the following fields in MySQL: date, Value, Type. Type can be either exports or imports. I want a query that returns the trade deficit (exports-imports) for each month. Is this possible with a single query?

    Read the article

  • How do I tie a cmbBox that selects all drives (local and network) into a treeNode VB

    - by jpavlov
    How do i tie in a selected item from a cmbBox with a treeView? I am looking to just obtain the value of the one selected drive Thanks. Imports System Imports System.IO Imports System.IO.File Imports System.Windows.Forms Public Class F_Treeview_Demo Private Sub F_Treeview_Demo_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ' Initialize the local directory treeview Dim nodeText As String = "" Dim sb As New C_StringBuilder With My.Computer.FileSystem 'Read in the number of drives For i As Integer = 0 To .Drives.Count - 1 '** Build the drive's node text sb.ClearText() sb.AppendText(.Drives(i).Name) cmbDrives.Items.Add(sb.FullText) Next End With ListRootNodes() End Sub Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click Application.Exit() End Sub Private Sub tvwLocalFolders_AfterSelect(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) _ Handles tvwLocalFolders.AfterSelect ' Display the path for the selected node Dim folder As String = tvwLocalFolders.SelectedNode.Tag lblLocalPath.Text = folder ListView1.Items.Clear() Dim childNode As TreeNode = e.Node.FirstNode Dim parentPath As String = AddChar(e.Node.Tag) End Sub Private Sub AddToList(ByVal nodes As TreeNodeCollection) For Each node As TreeNode In nodes If node.Checked Then ListView1.Items.Add(node.Text) ListView1.Items.Add(Chr(13)) AddToList(node.Nodes) End If Next End Sub Private Sub tvwLocalFolders_BeforeExpand(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeViewCancelEventArgs) _ Handles tvwLocalFolders.BeforeExpand ' Display the path for the selected node lblLocalPath.Text = e.Node.Tag ' Populate all child nodes below the selected node Dim parentPath As String = AddChar(e.Node.Tag) tvwLocalFolders.BeginUpdate() Dim childNode As TreeNode = e.Node.FirstNode 'this i added Dim smallNode As TreeNode = e.Node.FirstNode Do While childNode IsNot Nothing ListLocalSubFolders(childNode, parentPath & childNode.Text) childNode = childNode.NextNode ''this i added ListLocalFiles(smallNode, parentPath & smallNode.Text) Loop tvwLocalFolders.EndUpdate() tvwLocalFolders.Refresh() ' Select the node being expanded tvwLocalFolders.SelectedNode = e.Node ListView1.Items.Clear() AddToList(tvwLocalFolders.Nodes) ListView1.Items.Add(Environment.NewLine) End Sub Private Sub ListRootNodes() ' Add all local drives to the Local treeview Dim nodeText As String = "" Dim sb As New C_StringBuilder With My.Computer.FileSystem For i As Integer = 0 To .Drives.Count - 1 '** Build the drive's node text sb.ClearText() sb.AppendText(.Drives(i).Name) nodeText = sb.FullText nodeText = Me.cmbDrives.SelectedItem '** Add the drive to the treeview Dim driveNode As TreeNode driveNode = tvwLocalFolders.Nodes.Add(nodeText) 'driveNode.Tag = .Drives(i).Name '** Add the next level of subfolders 'ListLocalSubFolders(driveNode, .Drives(i).Name) ListLocalSubFolders(driveNode, nodeText) 'driveNode = Nothing Next End With End Sub Private Sub ListLocalFiles(ByVal ParentNode As TreeNode, ByVal PParentPath As String) Dim FileNode As String = "" Try For Each FileNode In Directory.GetFiles(PParentPath) Dim smallNode As TreeNode smallNode = ParentNode.Nodes.Add(FilenameFromPath(FileNode)) With smallNode .ImageIndex = 0 .SelectedImageIndex = 1 .Tag = FileNode End With smallNode = Nothing Next Catch ex As Exception End Try End Sub Private Sub ListLocalSubFolders(ByVal ParentNode As TreeNode, _ ByVal ParentPath As String) ' Add all local subfolders below the passed Local treeview node Dim FolderNode As String = "" Try For Each FolderNode In Directory.GetDirectories(ParentPath) Dim childNode As TreeNode childNode = ParentNode.Nodes.Add(FilenameFromPath(FolderNode)) With childNode .ImageIndex = 0 .SelectedImageIndex = 1 .Tag = FolderNode End With childNode = Nothing Next Catch ex As Exception End Try End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbDrives.SelectedIndexChanged End Sub Private Sub lblLocalPath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblLocalPath.Click End Sub Private Sub grpLocalFileSystem_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles grpLocalFileSystem.Enter End Sub Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click ' lbl1.Text = End Sub Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged End Sub End Class

    Read the article

  • Catch clearly defined exception from sub.submodule in python

    - by mynthon
    I have 3 files. xxx which imports xxx2 and xxx2 imports xxx3 which one raises OppsError exception. xxx3.py: class OppsError(Exception):pass def go(): raise OppsError() xxx2.py: import xxx3 xxx3.go() xxx.py: try: import xxx2 except xxx3.OppsError: print 'ops' When i run xxx.py i get error NameError: name 'xxx3' is not defined. Is importing xxx3 inside xxx only way to catch OppsError?

    Read the article

  • How do I properly register the Type Library of A VB.NET COM+ Component?

    - by k_Dank
    I am looking to upgrade legacy VB6 COM+ components to VB.NET components. I have seemingly upgraded one already, called EventPackage, which has one class, IEventListener. Another, TradeOrders, Implements EventPackage.IEventListener. When attempting to build TradeOrders, I get the following Errors/Warnings; Cannot load type library for reference "EventPackage". Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) The referenced component 'EventPackage' could not be found. Type 'EventPackage.IEventListener' is not defined. In the .vbproj, I notice this reference <COMReference Include="EventPackage"> <Guid>{0D76C094-21A6-4E04-802B-6E539F7102D7}</Guid> <Lcid>0</Lcid> <VersionMajor>2</VersionMajor> <VersionMinor>0</VersionMinor> <WrapperTool>tlbimp</WrapperTool> </COMReference> When I search the registry for this Guid, I find nothing. When using GUIDs for similar COM+ objects, I find them in HKEY_CLASSES_ROOT\CLSID\{...}\TypeLib ("..." being the GUID of the other component). When I go to the registry key name corresponding to EventPackage.IEventListener, I find that there is no \TypeLib subkey. As you might suspect, searching the reg for "0D76C094-21A6-4E04-802B-6E539F7102D7" yields no results. So I know this must be a registry problem, But I have tried seemingly every google result I have found. I have tried Regasm and regsvcs .exe's to no avail. Many pages just tell me that dragging the dll to the COM+ manager should automatically register the component. So how do I register the Type library? Details on how I made EventPackage COM+ component Ran the VB6-VB.NET wizard Then I added some lines to the assemblyinfo.vb file added Imports System.EnterpriseServices added Imports System.EnterpriseServices Imports System.Data.SqlClient <Assembly: CLSCompliant(True)> <Assembly: AssemblyKeyFileAttribute("...")> for a strong name <Assembly: Guid("...")> (Where "..." is the COM+ CLSID of the old component) I added the following to the class file IEventListener.VB Imports System.EnterpriseServices <ComClass("...")> _ (Where ... is the proper COM+ CLSID, that is the only argument) Inherits ServicedComponent changed the ID made by the Conversion wizard to the proper value (from <System.Runtime.InteropServices.ProgId("IEventListener_NET.IEventListener)> to <System.Runtime.InteropServices.ProgId("EventPackage.IEventListener")> _ Then I dragged the DLL into the COM+ manager in the proper COM+ application (although, the "Path" is not specified and only says mscoree.dll)

    Read the article

  • Getting Build Errors in Program to Change Button Name When Clicked

    - by Rishabh
    Imports System Imports System.Windows.Forms Class MyButtonClass Inherits Form Private mrButton As Button Public Sub MyButtonClass() mrButton = New Button() mrButton.Text = "Click me " mrButton.Click += New System.EventHandler(MyButtonClickEventHandler) Me.Controls.Add(mrButton) End Sub Shared Sub Main() Application.Run(New MyButtonClass()) End Sub Private Sub MyButtonClickEventHandler(ByVal sender As Object, ByVal e As EventArgs) mrButton.Text = "You clicked me!" End Sub End Class

    Read the article

  • WPF Blurry Images - Bitmap Class

    - by Luke
    I am using the following sample at http://blogs.msdn.com/dwayneneed/archive/2007/10/05/blurry-bitmaps.aspx within VB.NET. The code is shown below. I am having a problem when my application loads the CPU is pegging 50-70%. I have determined that the problem is with the Bitmap class. The OnLayoutUpdated() method is calling the InvalidateVisual() continously. This is because some points are not returning as equal but rather, Point(0.0,-0.5) Can anyone see any bugs within this code or know a better implmentation for pixel snapping a Bitmap image so it is not blurry? p.s. The sample code was in C#, however I believe that it was converted correctly. Imports System Imports System.Collections.Generic Imports System.Windows Imports System.Windows.Media Imports System.Windows.Media.Imaging Class Bitmap Inherits FrameworkElement ' Use FrameworkElement instead of UIElement so Data Binding works as expected Private _sourceDownloaded As EventHandler Private _sourceFailed As EventHandler(Of ExceptionEventArgs) Private _pixelOffset As Windows.Point Public Sub New() _sourceDownloaded = New EventHandler(AddressOf OnSourceDownloaded) _sourceFailed = New EventHandler(Of ExceptionEventArgs)(AddressOf OnSourceFailed) AddHandler LayoutUpdated, AddressOf OnLayoutUpdated End Sub Public Shared ReadOnly SourceProperty As DependencyProperty = DependencyProperty.Register("Source", GetType(BitmapSource), GetType(Bitmap), New FrameworkPropertyMetadata(Nothing, FrameworkPropertyMetadataOptions.AffectsRender Or FrameworkPropertyMetadataOptions.AffectsMeasure, New PropertyChangedCallback(AddressOf Bitmap.OnSourceChanged))) Public Property Source() As BitmapSource Get Return DirectCast(GetValue(SourceProperty), BitmapSource) End Get Set(ByVal value As BitmapSource) SetValue(SourceProperty, value) End Set End Property Public Shared Function FindParentWindow(ByVal child As DependencyObject) As Window Dim parent As DependencyObject = VisualTreeHelper.GetParent(child) 'Check if this is the end of the tree If parent Is Nothing Then Return Nothing End If Dim parentWindow As Window = TryCast(parent, Window) If parentWindow IsNot Nothing Then Return parentWindow Else ' Use recursion until it reaches a Window Return FindParentWindow(parent) End If End Function Public Event BitmapFailed As EventHandler(Of ExceptionEventArgs) ' Return our measure size to be the size needed to display the bitmap pixels. ' ' Use MeasureOverride instead of MeasureCore so Data Binding works as expected. ' Protected Overloads Overrides Function MeasureCore(ByVal availableSize As Size) As Size Protected Overloads Overrides Function MeasureOverride(ByVal availableSize As Size) As Size Dim measureSize As New Size() Dim bitmapSource As BitmapSource = Source If bitmapSource IsNot Nothing Then Dim ps As PresentationSource = PresentationSource.FromVisual(Me) If Me.VisualParent IsNot Nothing Then Dim window As Window = window.GetWindow(Me.VisualParent) If window IsNot Nothing Then ps = PresentationSource.FromVisual(window.GetWindow(Me.VisualParent)) ElseIf FindParentWindow(Me) IsNot Nothing Then ps = PresentationSource.FromVisual(FindParentWindow(Me)) End If End If ' If ps IsNot Nothing Then Dim fromDevice As Matrix = ps.CompositionTarget.TransformFromDevice Dim pixelSize As New Vector(bitmapSource.PixelWidth, bitmapSource.PixelHeight) Dim measureSizeV As Vector = fromDevice.Transform(pixelSize) measureSize = New Size(measureSizeV.X, measureSizeV.Y) Else measureSize = New Size(bitmapSource.PixelWidth, bitmapSource.PixelHeight) End If End If Return measureSize End Function Protected Overloads Overrides Sub OnRender(ByVal dc As DrawingContext) Dim bitmapSource As BitmapSource = Me.Source If bitmapSource IsNot Nothing Then _pixelOffset = GetPixelOffset() ' Render the bitmap offset by the needed amount to align to pixels. dc.DrawImage(bitmapSource, New Rect(_pixelOffset, DesiredSize)) End If End Sub Private Shared Sub OnSourceChanged(ByVal d As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs) Dim bitmap As Bitmap = DirectCast(d, Bitmap) Dim oldValue As BitmapSource = DirectCast(e.OldValue, BitmapSource) Dim newValue As BitmapSource = DirectCast(e.NewValue, BitmapSource) If ((oldValue IsNot Nothing) AndAlso (bitmap._sourceDownloaded IsNot Nothing)) AndAlso (Not oldValue.IsFrozen AndAlso (TypeOf oldValue Is BitmapSource)) Then RemoveHandler DirectCast(oldValue, BitmapSource).DownloadCompleted, bitmap._sourceDownloaded RemoveHandler DirectCast(oldValue, BitmapSource).DownloadFailed, bitmap._sourceFailed ' ((BitmapSource)newValue).DecodeFailed -= bitmap._sourceFailed; // 3.5 End If If ((newValue IsNot Nothing) AndAlso (TypeOf newValue Is BitmapSource)) AndAlso Not newValue.IsFrozen Then AddHandler DirectCast(newValue, BitmapSource).DownloadCompleted, bitmap._sourceDownloaded AddHandler DirectCast(newValue, BitmapSource).DownloadFailed, bitmap._sourceFailed ' ((BitmapSource)newValue).DecodeFailed += bitmap._sourceFailed; // 3.5 End If End Sub Private Sub OnSourceDownloaded(ByVal sender As Object, ByVal e As EventArgs) InvalidateMeasure() InvalidateVisual() End Sub Private Sub OnSourceFailed(ByVal sender As Object, ByVal e As ExceptionEventArgs) Source = Nothing ' setting a local value seems scetchy... RaiseEvent BitmapFailed(Me, e) End Sub Private Sub OnLayoutUpdated(ByVal sender As Object, ByVal e As EventArgs) ' This event just means that layout happened somewhere. However, this is ' what we need since layout anywhere could affect our pixel positioning. Dim pixelOffset As Windows.Point = GetPixelOffset() If Not AreClose(pixelOffset, _pixelOffset) Then InvalidateVisual() End If End Sub ' Gets the matrix that will convert a Windows.Point from "above" the ' coordinate space of a visual into the the coordinate space ' "below" the visual. Private Function GetVisualTransform(ByVal v As Visual) As Matrix If v IsNot Nothing Then Dim m As Matrix = Matrix.Identity Dim transform As Transform = VisualTreeHelper.GetTransform(v) If transform IsNot Nothing Then Dim cm As Matrix = transform.Value m = Matrix.Multiply(m, cm) End If Dim offset As Vector = VisualTreeHelper.GetOffset(v) m.Translate(offset.X, offset.Y) Return m End If Return Matrix.Identity End Function Private Function TryApplyVisualTransform(ByVal Point As Windows.Point, ByVal v As Visual, ByVal inverse As Boolean, ByVal throwOnError As Boolean, ByRef success As Boolean) As Windows.Point success = True If v IsNot Nothing Then Dim visualTransform As Matrix = GetVisualTransform(v) If inverse Then If Not throwOnError AndAlso Not visualTransform.HasInverse Then success = False Return New Windows.Point(0, 0) End If visualTransform.Invert() End If Point = visualTransform.Transform(Point) End If Return Point End Function Private Function ApplyVisualTransform(ByVal Point As Windows.Point, ByVal v As Visual, ByVal inverse As Boolean) As Windows.Point Dim success As Boolean = True Return TryApplyVisualTransform(Point, v, inverse, True, success) End Function Private Function GetPixelOffset() As Windows.Point Dim pixelOffset As New Windows.Point() Dim ps As PresentationSource = PresentationSource.FromVisual(Me) If ps IsNot Nothing Then Dim rootVisual As Visual = ps.RootVisual ' Transform (0,0) from this element up to pixels. pixelOffset = Me.TransformToAncestor(rootVisual).Transform(pixelOffset) pixelOffset = ApplyVisualTransform(pixelOffset, rootVisual, False) pixelOffset = ps.CompositionTarget.TransformToDevice.Transform(pixelOffset) ' Round the origin to the nearest whole pixel. pixelOffset.X = Math.Round(pixelOffset.X) pixelOffset.Y = Math.Round(pixelOffset.Y) ' Transform the whole-pixel back to this element. pixelOffset = ps.CompositionTarget.TransformFromDevice.Transform(pixelOffset) pixelOffset = ApplyVisualTransform(pixelOffset, rootVisual, True) pixelOffset = rootVisual.TransformToDescendant(Me).Transform(pixelOffset) End If Return pixelOffset End Function Private Function AreClose(ByVal Point1 As Windows.Point, ByVal Point2 As Windows.Point) As Boolean Return AreClose(Point1.X, Point2.X) AndAlso AreClose(Point1.Y, Point2.Y) End Function Private Function AreClose(ByVal value1 As Double, ByVal value2 As Double) As Boolean If value1 = value2 Then Return True End If Dim delta As Double = value1 - value2 Return ((delta < 0.00000153) AndAlso (delta > -0.00000153)) End Function End Class

    Read the article

  • Problem when trying to configure enterprise library 5.0 (Data Access Application Block)

    - by Phil
    Hi There Stackoverflow, I am running into some problems while trying to get DAAB from Enterprise library 5.0 running. I have followed the steps as per the tutorial, but am getting errors... 1) Download / install enterprise library 2) Add references to the blocks I need (common / data) 3) Imports Imports Microsoft.Practices.EnterpriseLibrary.Common Imports Microsoft.Practices.EnterpriseLibrary.Data 4) Through the enterprise library config software. I open up the web.config from my site. I then click Blocks, then Add data settings... fill in my details and save / close 5) I then (thinking setup is complete) try to get an instance of the database via Dim db As Database = DatabaseFactory.CreateDatabase() 6) I compile and receive the following error: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (C:\site\web.config line 4) Line 4 off my web.config was generated by the config tool and is: <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" /> Am I missing a required step? Have I done the steps in the wrong order? Have I made a mistake? Thanks a lot for the assistance.

    Read the article

  • Help decoupling Crystal Report from CrystalReportViewer

    - by John at CashCommons
    I'm using Visual Studio 2005 with VB.NET. I have a number of Crystal Reports, each with their own associated dialog resource containing a CrystalReportViewer. The class definitions look like this: Imports System.Windows.Forms Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Public Class dlgForMyReport Private theReport As New myCrystalReport Public theItems As New List(Of MyItem) Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click Me.DialogResult = System.Windows.Forms.DialogResult.OK Me.Close() End Sub Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click Me.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.Close() End Sub Private Sub dlgForMyReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load theReport.SetDataSource(theItems) 'Do a bunch of stuff here to set data items in theReport Me.myCrystalReportViewer.ReportSource = theReport End Sub End Class I basically instantiate the dialog, set theItems to the list I want, and call ShowDialog. I now have a need to combine several of these reports into one report (possibly like this) but the code that loads up the fields in the report is in the dialog. How would I go about decoupling the report initialization from the dialog? Thanks!

    Read the article

  • .NET Graphics.ScaleTransform converts print job to bitmap. Any other way to scale text?

    - by Philip Dunaway
    I'm using Graphics.ScaleTransform to stretch lines of text so they fit the width of the page, and then printing that page. However, this converts the print job to a bitmap - for a print with many pages this causes the size of the print job to rise to obscene proportions, and slows down printing immensely. If I don't scale like this, the print job remains very small as it is just sending text print commands to the printer. My question is, is there any way other than using Graphics.ScaleTransform to stretch the width of the text? Sample code to demonstrate this is below (would be called with Print.Test(True) and Print.Test(False) to show the effects of scaling on print job): Imports System.Drawing Imports System.Drawing.Printing Imports System.Drawing.Imaging Public Class Print Dim FixedFont As Font Dim Area As RectangleF Dim CharHeight As Double Dim CharWidth As Double Dim Scale As Boolean Const CharsAcross = 80 Const CharsDown = 66 Const TestString = "!""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~" Private Sub PagePrinter(ByVal sender As Object, ByVal e As PrintPageEventArgs) Dim G As Graphics = e.Graphics If Scale Then Dim ws = Area.Width / G.MeasureString(Space(CharsAcross).Replace(" ", "X"), FixedFont).Width G.ScaleTransform(ws, 1) End If For CurrentLine = 1 To CharsDown G.DrawString(Mid(TestString & TestString & TestString, CurrentLine, CharsAcross), FixedFont, Brushes.Black, 0, Convert.ToSingle(CharHeight * (CurrentLine - 1))) Next e.HasMorePages = False End Sub Public Shared Sub Test(ByVal Scale As Boolean) Dim OutputDocument As New PrintDocument With OutputDocument Dim DP As New Print .PrintController = New StandardPrintController .DefaultPageSettings.Landscape = False DP.Area = .DefaultPageSettings.PrintableArea DP.CharHeight = DP.Area.Height / CharsDown DP.CharWidth = DP.Area.Width / CharsAcross DP.Scale = Scale DP.FixedFont = New Font("Courier New", DP.CharHeight / 100, FontStyle.Regular, GraphicsUnit.Inch) .DocumentName = "Test print (with" & IIf(Scale, "", "out") & " scaling)" AddHandler .PrintPage, AddressOf DP.PagePrinter .Print() End With End Sub End Class

    Read the article

  • How to ship numpy with web2py application under myapp/modules?

    - by Newbie07
    I am having the following error while importing numpy from application/myapp/modules: Traceback (most recent call last): File "/home/mdipierro/make_web2py/web2py/gluon/restricted.py", line 212, in restricted File "D:/web2py_win/web2py/applications/myapp/controllers/default.py", line 13, in File "/home/mdipierro/make_web2py/web2py/gluon/custom_import.py", line 100, in custom_importer File "applications\myapp\modules\numpy\ __init__.py", line 137, in File "/home/mdipierro/make_web2py/web2py/gluon/custom_import.py", line 81, in custom_importer ImportError: Cannot import module 'add_newdocs' I tried adding 'application.myapp.modules.' in the 'import add_newdocs' statement of numpy\ __init.py__ and the error propagates to other subsequent imports(i.e. add_docs imports some other stuff and I get the ImportError again for these imports). So I narrowed down the problem to the "working directory" of the import statement. However, I do not wish to add 'application.myapp.modules.' in every import statement inside the package since it would be impractical and hard to edit if someone decides to rename the app later on. How do I make the import work smoothly? NOTE: It is necessary for me to put the numpy package in the app to ensure ease of deployment.

    Read the article

  • multi-threaded proxy checker having problems

    - by Paul
    hello everyone, I am trying to create a proxy checker. This is my first attempt at multithreading and it's not going so well, the threads seem to be waiting for one to complete before initializing the next. Imports System.Net Imports System.IO Imports System.Threading Public Class Form1 Public sFileName As String Public srFileReader As System.IO.StreamReader Public sInputLine As String Public Class WebCall Public proxy As String Public htmlout As String Public Sub New(ByVal proxy As String) Me.proxy = proxy End Sub Public Event ThreadComplete(ByVal htmlout As String) Public Sub send() Dim myWebRequest As HttpWebRequest = CType(WebRequest.Create("http://www.myserver.com/ip.php"), HttpWebRequest) myWebRequest.Proxy = New WebProxy(proxy, False) Try Dim myWebResponse As HttpWebResponse = CType(myWebRequest.GetResponse(), HttpWebResponse) Dim loResponseStream As StreamReader = New StreamReader(myWebResponse.GetResponseStream()) htmlout = loResponseStream.ReadToEnd() Debug.WriteLine("Finished - " & htmlout) RaiseEvent ThreadComplete(htmlout) Catch ex As WebException If (ex.Status = WebExceptionStatus.ConnectFailure) Then End If Debug.WriteLine("Failed - " & proxy) End Try End Sub End Class Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim proxy As String Dim webArray As New ArrayList() Dim n As Integer For n = 0 To 2 proxy = srFileReader.ReadLine() webArray.Add(New WebCall(proxy)) Next Dim w As WebCall For Each w In webArray Threading.ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf w.send), w) Next w End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load srFileReader = System.IO.File.OpenText("proxies.txt") End Sub End Class

    Read the article

  • Are MEF's ComposableParts contracts instance-based?

    - by Dave
    I didn't really know how to phrase the title of my questions, so my apologies in advance. I read through parts of the MEF documentation to try to find the answer to my question, but couldn't find it. I'm using ImportMany to allow MEF to create multiple instances of a specific plugin. That plugin Imports several parts, and within calls to a specific instance, it wants these Imports to be singletons. However, what I don't want is for all instances of this plugin to use the same singleton. For example, let's say my application ImportManys Blender appliances. Every time I ask for one, I want a different Blender. However, each Blender Imports a ControlPanel. I want each Blender to have its own ControlPanel. To make things a little more interesting, each Blender can load BlendPrograms, which are also contained within their own assemblies, and MEF takes care of this loading. A BlendProgram might need to access the ControlPanel to get the speed, but I want to ensure that it is accessing the correct ControlPanel (i.e. the one that is associated with the Blender that is associated with the program!) This diagram might clear things up a little bit: As the note shows, I believe that the confusion could come from an inherently-poor design. The BlendProgram shouldn't touch the ControlPanel directly, and instead perhaps the BlendProgram should get the speed via the Blender, which will then delegate the request to its ControlPanel. If this is the case, then I assume the BlendProgram needs to have a reference to a specific Blender. In order to do this, is the right way to leverage MEF and use an ImportingConstructor for BlendProgram, i.e. [ImportingConstructor] public class BlendProgram : IBlendProgram { public BlendProgram( Blender blender) {} } And if this is the case, how do I know that MEF will use the intended Blender plugin?

    Read the article

  • Testing subpackage modules in Python 3

    - by Mitchell Model
    I have been experimenting with various uses of hierarchies like this and the differences between absolute and relative imports, and can't figure out how to do routine things with the package, subpackages, and modules without simply putting everything on sys.path. I have a two-level package hierarchy: MyApp __init__.py Application __init__.py Module1 Module2 ... Domain __init__.py Module1 Module2 ... UI __init__.py Module1 Module2 ... I want to be able to do the following: Run test code in a Module's "if main" when the module imports from other modules in the same directory. Have one or more test code modules in each subpackage that runs unit tests on the modules in the subpackage. Have a set of unit tests that reside in someplace reasonable, but outside the subpackages, either in a sibling package, at the top-level package, or outside the top-level package (though all these might end up doing is running the tests in each subpackage) "Enter" the structure from any of the three subpackage levels, e.g. run code that just uses Domain modules, run code that just uses Application modules, but Application uses code from both Application and Domain modules, and run code from GUI uses code from both GUI and Application; for instance, Application test code would import Application modules but not Domain modules. After developing the bulk of the code without subpackages, continue developing and testing after organizing the modules into this hierarchy. I know how to use relative imports so that external code that puts MyApp on its sys.path can import MyApp, import any subpackages it wants, and import things from their modules, while the modules in each subpackage can import other modules from the same subpackage or from sibling packages. However, the development needs listed above seem incompatible with subpackage structuring -- in other words, I can't have it both ways: a well-structured multi-level package hierarchy used from the outside and also used from within, in particular for testing but also because modules from one design level (in particular the UI) should not import modules from a design level below the next one down. Sorry for the long essay, but I think it fairly represents the struggles a lot of people have been having adopting to the new relative import mechanisms.

    Read the article

  • Cyclic Reference - protocols and subclasses

    - by blindJesse
    I'm getting some cyclic reference (I think) problems between a few classes that require imported headers due to either subclassing or protocol definitions. I can explain why things are set up this way but I'm not sure it's essential. Basically these classes are managing reciprocal to-many data relationships. The layout is this: Class A imports Class B because it's a delegate of Class B and needs its protocol definition. Class B imports Class C because it's a subclass of Class C. Class C imports Class A because it's a delegate of Class A and needs its protocol definition. Here's some sample code that illustrates the problem. The errors I'm getting are as follows: In Class A - "Can't find protocol definition for Class_B_Delegate". In Class B - "Can't find interface declaration for Class C - superclass of Class B." In Class C - "Can't find protocol definition for Class_A_Delegate". Class A header: #import <Foundation/Foundation.h> #import "Class_B.h" @protocol Class_A_Delegate @end @interface Class_A : NSObject <Class_B_Delegate> { } @end Class B header: #import <Foundation/Foundation.h> #import "Class_C.h" @protocol Class_B_Delegate <NSObject> @end @interface Class_B : Class_C { } @end Class C Header: #import <Foundation/Foundation.h> #import "Class_A.h" @interface Class_C : NSObject <Class_A_Delegate> { } @end

    Read the article

  • MEF Import Composition Issues

    - by Tim
    I've read all the questions I can find regarding the issues of composing imports without exporting the containing class but I can't find a solution to my problem. Does anybody know a way to achieve what I'm trying to do? My module assemblies have forms and classes which they use internally. These forms need access to some of the exported contracts but imports are not loaded as they are not in the MEF 'composition tree' Host assembly: public class Host { public Host() { /* Compose parts here... */ } [Export(typeof(Licence))] public Licence LoadedLicence { get; set; } [Export(typeof(IModule))] public List<IModule> LoadedModules { get; set; } } Module assembly: [Export(typeof(IModule))] public class Module : IModule { public Module() { } public void DoSomething() { SubForm sub = new SubForm(); sub.ShowDialog(); } [Import(typeof(Licence))] public Licence LoadedLicence { get; set; } // This works here } public class SubForm : Form { public SubForm () { } [Import(typeof(Licence))] public Licence LoadedLicence { get; set; } // This doesn't work in here } As far as I can see, my options are: Pass parameters to constructors (pain) Use a dummy export on the classes that need imports satisfying? Any others?

    Read the article

  • P/Invoke declarations should not be safe-critical

    - by Bobrovsky
    My code imports following native methods: DeleteObject, GetFontData and SelectObject from gdi32.dll GetDC and ReleaseDC from user32.dll I want to run the code in full trust and medium trust environments (I am fine with exceptions being thrown when these imported methods are indirectly used in medium trust environments). When I run Code Analysis on the code I get warnings like: CA5122 P/Invoke declarations should not be safe-critical. P/Invoke method 'GdiFont.DeleteObject(IntPtr)' is marked safe-critical. Since P/Invokes may only be called by critical code, this declaration should either be marked as security critical, or have its annotation removed entirely to avoid being misleading. Could someone explain me (in layman terms) what does this warning really mean? I tried putting these imports in static SafeNativeMethods class as internal static methods but this doesn't make the warnings go away. I didn't try to put them in NativeMethods because after reading this article I am unsure that it's the right way to go because I don't want my code to be completely unusable in medium trust environments (I think this will be the consequence of moving imports to NativeMethods). Honestly, I am pretty much confused about the real meaning of the warning and consequences of different options to suppressing it. Could someone shed some light on all this? EDIT: My code target .NET 2.0 framework. Assembly is marked with [assembly: AllowPartiallyTrustedCallers] Methods are declared like this: [DllImport("gdi32")] internal static extern int DeleteObject(HANDLE hObject);

    Read the article

  • getting page info from a webpage while sharing facebook style

    - by user556167
    Hi all. I am writing an app to share a page to friends when browsing. To this end, I can get the url of the page to my app and display it on the screen. Could anyone tell me, how to improve this, to show the headline of the page and the picture of a page as it appears when a page is being shared to friends on facebook. Here is the code to get and display the url of the page: Intent intent = getIntent(); String action = intent.getAction(); String type = intent.getType(); String mNewLinkUrl=""; if (action != null && type != null && Intent.ACTION_SEND.equals(action) && "text/plain".equals(type)){ mNewLinkUrl = intent.getStringExtra(Intent.EXTRA_TEXT); } TextView ptext = (TextView) findViewById(R.id.pagetext); ptext.append("\n"+mNewLinkUrl); Any insight will be appreciated. //update 1 found a method: use Jsoup to download the html as a Document. And use Elements and Element to get the data. For eg, the following is the code to get the links in imports in the html page: Elements imports = doc.select("link[href]"); for (Element link : imports) { Log.d(TAG,"link.tagName()"+link.tagName()+"link.attr(abs:href)"+link.attr("abs:href") +"link.attr(rel)"+link.attr("rel")); } But I am not able to figure out what attributes facebook exactly gets. Can anyone help me in this? Thank you.

    Read the article

  • Importing email from other accounts in Gmail

    - by reyjavikvi
    I have a Gmail account that imports (via POP) messages from an old Hotmail account that people still send mail to. I normally read my mail with Thunderbird, not the web interface. The thing is that Gmail imports the mails once per hour (approx), and sometimes I want to know if right now there are messages in my old account. I could just go and hit the "import now" button, but whatever. Is there someplace in the settings where I can change it so the importing happens once each, say, 15 minutes? Alternatively, is it possible to make a script that will tell Gmail to import the messages at that moment, just like it would if I went to the Settings and clicked "Check if I have mail now". I've heard about libgmail for Python, but it doesn't seem like it can do that.

    Read the article

  • A Look Inside JSR 360 - CLDC 8

    - by Roger Brinkley
    If you didn't notice during JavaOne the Java Micro Edition took a major step forward in its consolidation with Java Standard Edition when JSR 360 was proposed to the JCP community. Over the last couple of years there has been a focus to move Java ME back in line with it's big brother Java SE. We see evidence of this in JCP itself which just recently merged the ME and SE/EE Executive Committees into a single Java Executive Committee. But just before that occurred JSR 360 was proposed and approved for development on October 29. So let's take a look at what changes are now being proposed. In a way JSR 360 is returning back to the original roots of Java ME when it was first introduced. It was indeed a subset of the JDK 4 language, but as Java progressed many of the language changes were not implemented in the Java ME. Back then the tradeoff was still a functionality, footprint trade off but the major market was feature phones. Today the market has changed and CLDC, while it will still target feature phones, will have it primary emphasis on embedded devices like wireless modules, smart meters, health care monitoring and other M2M devices. The major changes will come in three areas: language feature changes, library changes, and consolidating the Generic Connection Framework.  There have been three Java SE versions that have been implemented since JavaME was first developed so the language feature changes can be divided into changes that came in JDK 5 and those in JDK 7, which mostly consist of the project Coin changes. There were no language changes in JDK 6 but the changes from JDK 5 are: Assertions - Assertions enable you to test your assumptions about your program. For example, if you write a method that calculates the speed of a particle, you might assert that the calculated speed is less than the speed of light. In the example code below if the interval isn't between 0 and and 1,00 the an error of "Invalid value?" would be thrown. private void setInterval(int interval) { assert interval > 0 && interval <= 1000 : "Invalid value?" } Generics - Generics add stability to your code by making more of your bugs detectable at compile time. Code that uses generics has many benefits over non-generic code with: Stronger type checks at compile time. Elimination of casts. Enabling programming to implement generic algorithms. Enhanced for Loop - the enhanced for loop allows you to iterate through a collection without having to create an Iterator or without having to calculate beginning and end conditions for a counter variable. The enhanced for loop is the easiest of the new features to immediately incorporate in your code. In this tip you will see how the enhanced for loop replaces more traditional ways of sequentially accessing elements in a collection. void processList(Vector<string> list) { for (String item : list) { ... Autoboxing/Unboxing - This facility eliminates the drudgery of manual conversion between primitive types, such as int and wrapper types, such as Integer.  Hashtable<Integer, string=""> data = new Hashtable<>(); void add(int id, String value) { data.put(id, value); } Enumeration - Prior to JDK 5 enumerations were not typesafe, had no namespace, were brittle because they were compile time constants, and provided no informative print values. JDK 5 added support for enumerated types as a full-fledged class (dubbed an enum type). In addition to solving all the problems mentioned above, it allows you to add arbitrary methods and fields to an enum type, to implement arbitrary interfaces, and more. Enum types provide high-quality implementations of all the Object methods. They are Comparable and Serializable, and the serial form is designed to withstand arbitrary changes in the enum type. enum Season {WINTER, SPRING, SUMMER, FALL}; } private Season season; void setSeason(Season newSeason) { season = newSeason; } Varargs - Varargs eliminates the need for manually boxing up argument lists into an array when invoking methods that accept variable-length argument lists. The three periods after the final parameter's type indicate that the final argument may be passed as an array or as a sequence of arguments. Varargs can be used only in the final argument position. void warning(String format, String... parameters) { .. for(String p : parameters) { ...process(p);... } ... } Static Imports -The static import construct allows unqualified access to static members without inheriting from the type containing the static members. Instead, the program imports the members either individually or en masse. Once the static members have been imported, they may be used without qualification. The static import declaration is analogous to the normal import declaration. Where the normal import declaration imports classes from packages, allowing them to be used without package qualification, the static import declaration imports static members from classes, allowing them to be used without class qualification. import static data.Constants.RATIO; ... double r = Math.cos(RATIO * theta); Annotations - Annotations provide data about a program that is not part of the program itself. They have no direct effect on the operation of the code they annotate. There are a number of uses for annotations including information for the compiler, compiler-time and deployment-time processing, and run-time processing. They can be applied to a program's declarations of classes, fields, methods, and other program elements. @Deprecated public void clear(); The language changes from JDK 7 are little more familiar as they are mostly the changes from Project Coin: String in switch - Hey it only took us 18 years but the String class can be used in the expression of a switch statement. Fortunately for us it won't take that long for JavaME to adopt it. switch (arg) { case "-data": ... case "-out": ... Binary integral literals and underscores in numeric literals - Largely for readability, the integral types (byte, short, int, and long) can also be expressed using the binary number system. and any number of underscore characters (_) can appear anywhere between digits in a numerical literal. byte flags = 0b01001111; long mask = 0xfff0_ff08_4fff_0fffl; Multi-catch and more precise rethrow - A single catch block can handle more than one type of exception. In addition, the compiler performs more precise analysis of rethrown exceptions than earlier releases of Java SE. This enables you to specify more specific exception types in the throws clause of a method declaration. catch (IOException | InterruptedException ex) { logger.log(ex); throw ex; } Type Inference for Generic Instance Creation - Otherwise known as the diamond operator, the type arguments required to invoke the constructor of a generic class can be replaced with an empty set of type parameters (<>) as long as the compiler can infer the type arguments from the context.  map = new Hashtable<>(); Try-with-resource statement - The try-with-resources statement is a try statement that declares one or more resources. A resource is an object that must be closed after the program is finished with it. The try-with-resources statement ensures that each resource is closed at the end of the statement.  try (DataInputStream is = new DataInputStream(...)) { return is.readDouble(); } Simplified varargs method invocation - The Java compiler generates a warning at the declaration site of a varargs method or constructor with a non-reifiable varargs formal parameter. Java SE 7 introduced a compiler option -Xlint:varargs and the annotations @SafeVarargs and @SuppressWarnings({"unchecked", "varargs"}) to supress these warnings. On the library side there are new features that will be added to satisfy the language requirements above and some to improve the currently available set of APIs.  The library changes include: Collections update - New Collection, List, Set and Map, Iterable and Iteratator as well as implementations including Hashtable and Vector. Most of the work is too support generics String - New StringBuilder and CharSequence as well as a Stirng formatter. The javac compiler  now uses the the StringBuilder instead of String Buffer. Since StringBuilder is synchronized there is a performance increase which has necessitated the wahat String constructor works. Comparable interface - The comparable interface works with Collections, making it easier to reuse. Try with resources - Closeable and AutoCloseable Annotations - While support for Annotations is provided it will only be a compile time support. SuppressWarnings, Deprecated, Override NIO - There is a subset of NIO Buffer that have been in use on the of the graphics packages and needs to be pulled in and also support for NIO File IO subset. Platform extensibility via Service Providers (ServiceLoader) - ServiceLoader interface dos late bindings of interface to existing implementations. It helpe to package an interface and behavior of the implementation at a later point in time.Provider classes must have a zero-argument constructor so that they can be instantiated during loading. They are located and instantiated on demand and are identified via a provider-configuration file in the METAINF/services resource directory. This is a mechansim from Java SE. import com.XYZ.ServiceA; ServiceLoader<ServiceA> sl1= new ServiceLoader(ServiceA.class); Resources: META-INF/services/com.XYZ.ServiceA: ServiceAProvider1 ServiceAProvider2 ServiceAProvider3 META-INF/services/ServiceB: ServiceBProvider1 ServiceBProvider2 From JSR - I would rather use this list I think The Generic Connection Framework (GCF) was previously specified in a number of different JSRs including CLDC, MIDP, CDC 1.2, and JSR 197. JSR 360 represents a rare opportunity to consolidated and reintegrate parts that were duplicated in other specifications into a single specification, upgrade the APIs as well provide new functionality. The proposal is to specify a combined GCF specification that can be used with Java ME or Java SE and be backwards compatible with previous implementations. Because of size limitations as well as the complexity of the some features like InvokeDynamic and Unicode 6 will not be included. Additionally, any language or library changes in JDK 8 will be not be included. On the upside, with all the changes being made, backwards compatibility will still be maintained. JSR 360 is a major step forward for Java ME in terms of platform modernization, language alignment, and embedded support. If you're interested in following the progress of this JSR see the JSR's java.net project for details of the email lists, discussions groups.

    Read the article

  • Importing tab delimited file into array in Visual Basic 2013 [migrated]

    - by JaceG
    I am needing to import a tab delimited text file that has 11 columns and an unknown number of rows (always minimum 3 rows). I would like to import this text file as an array and be able to call data from it as needed, throughout my project. And then, to make things more difficult, I need to replace items in the array, and even add more rows to it as the project goes on (all at runtime). Hopefully someone can suggest code corrections or useful methods. I'm hoping to use something like the array style sMyStrings(3,2), which I believe would be the easiest way to control my data. Any help is gladly appreciated, and worthy of a slab of beer. Here's the coding I have so far: Imports System.IO Imports Microsoft.VisualBasic.FileIO Public Class Main Dim strReadLine As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim sReader As IO.StreamReader = Nothing Dim sRawString As String = Nothing Dim sMyStrings() As String = Nothing Dim intCount As Integer = -1 Dim intFullLoop As Integer = 0 If IO.File.Exists("C:\MyProject\Hardware.txt") Then ' Make sure the file exists sReader = New IO.StreamReader("C:\MyProject\Hardware.txt") Else MsgBox("File doesn't exist.", MsgBoxStyle.Critical, "Error") End End If Do While sReader.Peek >= 0 ' Make sure you can read beyond the current position sRawString = sReader.ReadLine() ' Read the current line sMyStrings = sRawString.Split(New Char() {Chr(9)}) ' Separate values and store in a string array For Each s As String In sMyStrings ' Loop through the string array intCount = intCount + 1 ' Increment If TextBox1.Text <> "" Then TextBox1.Text = TextBox1.Text & vbCrLf ' Add line feed TextBox1.Text = TextBox1.Text & s ' Add line to debug textbox If intFullLoop > 14 And intCount > -1 And CBool((intCount - 0) / 11 Mod 0) Then cmbSelectHinge.Items.Add(sMyStrings(intCount)) End If Next intCount = -1 intFullLoop = intFullLoop + 1 Loop End Sub

    Read the article

  • Limiting Audit Exposure and Managing Risk – Q&A and Follow-Up Conversation

    - by Tanu Sood
    Thanks to all who attended the live ISACA webcast on Limiting Audit Exposure and Managing Risk with Metrics-Driven Identity Analytics. We were really fortunate to have Don Sparks from ISACA moderate the webcast featuring Stuart Lincoln, Vice President, IT P&L Client Services, BNP Paribas, North America and Neil Gandhi, Principal Product Manager, Oracle Identity Analytics. Stuart’s insights given the team’s role in providing IT for P&L Client Services and his tremendous experience in identity management and establishing sustainable compliance programs were true value-add at yesterday’s webcast. And if you are a healthcare organization looking to solve your compliance and security challenges, we recommend you join us for a live webcast on Tuesday, November 29 at 10 am PT. The webcast will feature experts from Kaiser Permanente, PricewaterhouseCoopers and Oracle and the focus of the discussion will be around the compliance challenges a healthcare organization faces and best practices for tackling those. Here are the details: Healthcare IT News Webcast: Managing Risk and Enforcing Compliance in Healthcare with Identity Analytics Tuesday, November 29, 201110:00 a.m. PT / 1:00 p.m. ET Register Today The ISACA webcast replay is now available on-demand and the slides are also available for download. Since we didn’t have time to address all the questions we received during the live Q&A portion of the webcast, we have captured responses to the remaining questions here. Please continue to provide us your feedback and insights from your experience in deploying identity compliance solutions. Q. Can you please clarify the mechanism utilized to populate the Identity Warehouse from each individual application's access management function / files? A. Oracle Identity Analytics (OIA) supports direct imports from applications. Data collection is based on Extract, Transform and Load (ETL) that eliminates the need to write connectors to different applications. Oracle Identity Analytics’ import engine supports complex entitlement feeds saved as either text files or XML. The imports can be scheduled on a periodic basis or triggered as needed. If the applications are synchronized with a user provisioning solution like Oracle Identity Manager, Oracle Identity Analytics has a seamless integration to pull in data from Oracle Identity Manager. Q.  Can you provide a short summary of the new features in your latest release of Oracle Identity Analytics? A. Oracle recently announced availability of enhanced Oracle Identity Analytics. This release focused on easing the certification process by offering risk analytics driven certification, advanced certification screens, business centric views and significant improvement in performance including 3X faster data imports, 3X faster certification campaign generation and advanced auto-certification features, that  will allow organizations to improve user productivity by up to 80%. Closed-loop risk feedback and IT policy monitoring with Oracle Identity Manager, a leading user provisioning solution, allows for more accurate certification reviews. And, OIA's improved performance enables customers to scale compliance initiatives supporting millions of user entitlements across thousands of applications, whether on premise or in the cloud, without compromising speed or integrity. Q. Will ISACA grant a CPE credit for attending this ISACA-sponsored webinar today? A. From ISACA: Hello and thank you for your interest in the 2011 ISACA Webinar Program!  Unfortunately, there are no CPEs offered for this program, archived or live.  We will be looking into the feasibility of offering them in the future.  Q. Would you be able to use this to help manage licenses for software? That is to say - could it track software that is not used by a user, thus eliminating the software license? A. OIA’s integration with Oracle Identity Manager, a leading user provisioning solution, allows organizations to detect ghost accounts or unused accounts via account reconciliation. Based on company’s policies, this could trigger an automated workflow for account deletion or asking for further investigation. Closed-loop feedback between the two solutions would then allow visibility into the complete audit trail of when the account was detected, the action taken, by whom, when and the current status. Q. We have quarterly attestations and .xls mechanisms are not working. Once the identity data is correlated in Identity Analytics, do you then automate access certification? A. OIA’s identity warehouse analyzes and correlates identity data across various resources that allows OIA to determine a user’s risk profile, who the access review request should go to, along with all the relevant access details of the user. The access certification manager gets notification on what to review, when and the relevant data is presented in a business friendly screen. Based on the result of the access certification process, actions are triggered and results recorded and archived. Access review managers have visual risk indicators that also allow them to prioritize access certification tasks and efforts. Q. How does Oracle Identity Analytics work with Cloud Security? A. For enterprises looking to build their own cloud(s), Oracle offers a set of security services that cloud developers can leverage including Oracle Identity Analytics.  For enterprises looking to manage their compliance requirements but without hosting those in-house and instead having a hosting provider offer managed Identity Management services to the organizations, Oracle Identity Analytics can be leveraged much the same way as you’d in an on-premise (within the enterprise) environment. In fact, organizations today are leveraging Oracle Identity Analytics to manage identity compliance in both these ways. Q. Would you recommend this as a cost effective solution for a smaller organization with @ 2,500 users? A. The key return-on-investment (ROI) on Oracle Identity Analytics is derived from automating compliance processes thereby eliminating administrative overhead, minimizing errors, maintaining cost- and time-effective sustainable compliance processes and minimizing audit exposures and penalties.  Of course, there are other tangible benefits that are derived from an Oracle Identity Analytics implementation as outlined in the webcast. For a quantitative analysis of your requirements and potential ROI calculation, we recommend you refer to the Forrester Study on Total Economic Impact of Oracle Identity Analytics. For an in-person discussion, please email Richard Caldwell.

    Read the article

  • Application pool crashing regularly (8007006d) (Service Unavailable)

    - by Phil
    I have a basic web form site running. Nothing out of the ordinary. It is frequently crashing the application pool. The error code I got from the logs is '8007006d'. Googling this does not come up with the usual bevy of results.... I do get a few people with a similar problem. Any the advise seems to be that the error is related to registry permissions. Can anyone confirm / disconfirm this theory. That if I get error 8007006d it is definately a reg permissions problem? Here is the code from my page. I'm not seeing anything that would cause a memory leak or make this happen. It is basically just one big insert command with many parameters? Imports System.Web.Configuration Imports System.Data.SqlClient Imports System.Net.Mail Imports System.IO Imports System.Globalization Partial Class _Default Inherits System.Web.UI.Page Public Sub WriteError(ByVal errorMessage As String) Try Dim path As String = "~/Error/" & DateTime.Today.ToString("dd-mm-yy") & ".txt" If (Not File.Exists(System.Web.HttpContext.Current.Server.MapPath(path))) Then File.Create(System.Web.HttpContext.Current.Server.MapPath(path)).Close() End If Using w As StreamWriter = File.AppendText(System.Web.HttpContext.Current.Server.MapPath(path)) w.WriteLine(Constants.vbCrLf & "Log Entry : ") w.WriteLine("{0}", DateTime.Now.ToString(CultureInfo.InvariantCulture)) Dim err As String = "Error in: " & System.Web.HttpContext.Current.Request.Url.ToString() & ". Error Message:" & errorMessage w.WriteLine(err) w.WriteLine("__________________________") w.Flush() w.Close() End Using Catch ex As Exception WriteError(ex.Message) End Try End Sub Protected Sub Page_PreLoad(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreLoad otherlanguagespecify.Text = "Language: Speaking: Reading: Writing:" 'Show / hide 'other' panels ProvincePanel.Visible = False If Province.SelectedValue = "Other" Then ProvincePanel.Visible = True End If languagespanel.Visible = False If OtherLanguage.Checked Then languagespanel.Visible = True End If End Sub Protected Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click Dim areasexpertise As String = String.Empty Dim areasli As ListItem Dim english As String = String.Empty Dim connstring As String = WebConfigurationManager.ConnectionStrings("Str").ToString() Dim c As SqlConnection = New SqlConnection(connstring) Dim s As String = ("INSERT INTO [MBA_EOI]") & _ ("([subdate],[surname], [name], [dob], [nationality], [postaladdress],") & _ ("[province],[city], [postcode], [worktelephone],") & _ ("[hometelephone], [mobile], [email],[fax], [institution1],") & _ ("[institution2], [institution3], [institution4], [institutiondate1], [institutiondate2],") & _ ("[institutiondate3], [institutiondate4],[institutionquals1], [institutionquals2], [institutionquals3],") & _ ("[institutionquals4],[profdates1], [profdates2],") & _ ("[profdates3], [profdates4], [profdates5], [profdates6], [profdates7], ") & _ ("[profloc1], [profloc2], [profloc3], [profloc4], [profloc5],") & _ ("[profloc6], [profloc7], [profcomp1], [profcomp2], [profcomp3],") & _ ("[profcomp4], [profcomp5], [profcomp6], [profcomp7], [profpos1],") & _ ("[profpos2], [profpos3], [profpos4], [profpos5], [profpos6],") & _ ("[profpos7], [profdesc1], [profdesc2], [profdesc3], [profdesc4],") & _ ("[profdesc5],[profdesc6],[profdesc7], [company1], [company2],") & _ ("[company3], [company4], [company5], [nature1], [nature2],") & _ ("[nature3], [nature4], [nature5], [workdate1], [workdate2],") & _ ("[workdate3], [workdate4], [workdate5], [contactname1], [contactname2],") & _ ("[contactname3], [contactname4], [contactname5], [wtelephone1], [wtelephone2],") & _ ("[wtelephone3],[wtelephone4], [wtelephone5], [philosophy], [publications],") & _ ("[english], [otherlanguage], [areasofexpertise], [otherareasofexpertise],") & _ ("[assessortrue], [coordinatortrue], [facilitatortrue], [moderatortrue], [productdevelopertrue],") & _ ("[projectmanagertrue], [assessorexp], [coordinatorexp], [facilitatorexp], [moderatorexp],") & _ ("[productdeveloperexp], [projectmanagerexp], [assessorlvl], [coordinatorlvl], [facilitatorlvl],") & _ ("[moderatorlvl], [productdeveloperlvl], [projectmanagerlvl], [assessorpref], [coordinatorpref],") & _ ("[FacilitatorPref], [ModeratorPref], [ProductDeveloperPref], [ProjectManagerPref], [designation], [professortrue],") & _ ("[professorlvl], [professorexp], [professorpref], [lecturertrue], [lecturerpref], [lecturerlvl], [lecturerexp], [affiliations], [educationmore], ") & _ ("[wemail1], [wemail2], [wemail3], [wemail4], [wemail5])") & _ ("VALUES") & _ ("(@subdate, @surname, @name, @dob, @nationality, @postaladdress,") & _ ("@province,@city, @postcode, @worktelephone,") & _ ("@hometelephone, @mobile, @email, @fax, @inst1,") & _ ("@inst2, @inst3, @inst4, @instdate1, @instdate2,") & _ ("@instdate3, @instdate4, @instquals1, @instquals2, @instquals3,") & _ ("@instquals4, @profdates1, @profdates2,") & _ ("@profdates3, @profdates4, @profdates5, @profdates6, @profdates7,") & _ ("@profloc1, @profloc2, @profloc3, @profloc4, @profloc5,") & _ ("@profloc6, @profloc7, @profcomp1, @profcomp2, @profcomp3,") & _ ("@profcomp4, @profcomp5, @profcomp6, @profcomp7, @profpos1,") & _ ("@profpos1, @profpos1, @profpos4, @profpos5, @profpos6,") & _ ("@profpos7, @profdesc1, @profdesc2, @profdesc3, @profdesc4,") & _ ("@profdesc5, @profdesc6, @profdesc7, @company1, @company2,") & _ ("@company3, @company4, @company5,@nature1, @nature2,") & _ ("@nature3, @nature4, @nature5, @workdate1, @workdate2,") & _ ("@workdate3, @workdate4, @workdate5, @contactname1, @contactname2,") & _ ("@contactname3, @contactname4, @contactname5, @wtelephone1, @wtelephone2,") & _ ("@wtelephone3,@wtelephone4, @wtelephone5, @philosophy, @publications,") & _ ("@english, @otherlanguage, @areasofexpertise, @otherareasofexpertise,") & _ ("@assessor, @coordinator, @facilitator, @moderator, @productdeveloper,") & _ ("@projectmanager, @assessorexp, @coordinatorexp, @facilitatorexp, @moderatorexp,") & _ ("@productdeveloperexp, @projectmanagerexp, @assessorlvl, @coordinatorlvl, @facilitatorlvl,") & _ ("@moderatorlvl, @productdeveloperlvl, @projectmanagerlvl, @assessorpref, @coordinatorpref,") & _ ("@facilitatorpref, @moderatorpref, @productdeveloperpref, @projectmanagerpref, @designation, @professor, @professorlvl, @professorexp, @professorpref,") & _ ("@lecturer, @lecturerpref, @lecturerlvl, @lecturerexp, @affiliations, @educationmore, ") & _ ("@wemail1, @wemail2, @wemail3, @wemail4, @wemail5)") 'Setup birthday Dim birthdaystring As String = MonthBirth.SelectedValue.ToString & "/" & DayBirth.SelectedValue.ToString & "/" & YearBirth.SelectedValue.ToString Dim birthday As DateTime = Convert.ToDateTime(birthdaystring) Try Dim x As New SqlCommand(s, c) x.Parameters.AddWithValue("@subdate", DateTime.Now()) x.Parameters.AddWithValue("@surname", Surname.Text) x.Parameters.AddWithValue("@name", Name.Text) x.Parameters.AddWithValue("@dob", birthday) x.Parameters.AddWithValue("@nationality", Nationality.Text) x.Parameters.AddWithValue("@postaladdress", Postaladdress.Text) x.Parameters.AddWithValue("@designation", Designation.SelectedItem.ToString) 'to control whether or not 'other' province is selected If Province.SelectedValue = "Other" Then x.Parameters.AddWithValue("@province", Otherprovince.Text) Else x.Parameters.AddWithValue("@province", Province.SelectedValue.ToString) End If x.Parameters.AddWithValue("@city", City.Text) x.Parameters.AddWithValue("@postcode", Postcode.Text) x.Parameters.AddWithValue("@worktelephone", Worktelephone.Text) x.Parameters.AddWithValue("@hometelephone", Hometelephone.Text) x.Parameters.AddWithValue("@mobile", Mobile.Text) x.Parameters.AddWithValue("@email", Email.Text) x.Parameters.AddWithValue("@fax", Fax.Text) 'Add education params to x command x.Parameters.AddWithValue("@inst1", Institution1.Text) x.Parameters.AddWithValue("@inst2", Institution2.Text) x.Parameters.AddWithValue("@inst3", Institution3.Text) x.Parameters.AddWithValue("@inst4", Institution4.Text) x.Parameters.AddWithValue("@instdate1", Institutiondates1.Text) x.Parameters.AddWithValue("@instdate2", Institutiondates2.Text) x.Parameters.AddWithValue("@instdate3", Institutiondates3.Text) x.Parameters.AddWithValue("@instdate4", Institutiondates4.Text) x.Parameters.AddWithValue("@instquals1", Institution1quals.Text) x.Parameters.AddWithValue("@instquals2", Institution2quals.Text) x.Parameters.AddWithValue("@instquals3", Institution3quals.Text) x.Parameters.AddWithValue("@instquals4", Institution4quals.Text) 'Add checkbox params to x command Dim eli As ListItem For Each eli In EnglishSkills.Items If eli.Selected Then english += eli.Text + " | " End If Next x.Parameters.AddWithValue("@english", english) For Each areasli In Expertiselist.Items If areasli.Selected Then areasexpertise += " ; " & areasli.Text End If Next x.Parameters.AddWithValue("@areasofexpertise", areasexpertise) If OtherLanguage.Checked.ToString Then x.Parameters.AddWithValue("@otherlanguage", otherlanguagespecify.Text) Else x.Parameters.AddWithValue("@otherlanguage", DBNull.Value) End If 'Add competencies params to x command x.Parameters.AddWithValue("@assessor", AssessorTrue.Checked) x.Parameters.AddWithValue("@coordinator", CoordinatorTrue.Checked) x.Parameters.AddWithValue("@facilitator", FacilitatorTrue.Checked) x.Parameters.AddWithValue("@moderator", ModeratorTrue.Checked) x.Parameters.AddWithValue("@productdeveloper", ProductDeveloperTrue.Checked) x.Parameters.AddWithValue("@projectmanager", ProjectManagerTrue.Checked) x.Parameters.AddWithValue("@assessorexp", Assessorexp.Text) x.Parameters.AddWithValue("@coordinatorexp", coordinatorexp.Text) x.Parameters.AddWithValue("@facilitatorexp", facilitatorexp.Text) x.Parameters.AddWithValue("@moderatorexp", moderatorexp.Text) x.Parameters.AddWithValue("@productdeveloperexp", productdeveloperexp.Text) x.Parameters.AddWithValue("@projectmanagerexp", projectmanagerexp.Text) x.Parameters.AddWithValue("@assessorlvl", Assessorlevel.Text) x.Parameters.AddWithValue("@coordinatorlvl", Coordinatorlevel.Text) x.Parameters.AddWithValue("@facilitatorlvl", Facilitatorlevel.Text) x.Parameters.AddWithValue("@moderatorlvl", Moderatorlevel.Text) x.Parameters.AddWithValue("@productdeveloperlvl", Productdeveloperlevel.Text) x.Parameters.AddWithValue("@projectmanagerlvl", Projectmanagerlevel.Text) x.Parameters.AddWithValue("@assessorpref", AssessorPref.Text) x.Parameters.AddWithValue("@coordinatorpref", CoordinatorPref.Checked) x.Parameters.AddWithValue("@facilitatorpref", FacilitatorPref.Checked) x.Parameters.AddWithValue("@moderatorpref", ModeratorPref.Checked) x.Parameters.AddWithValue("@productdeveloperpref", ProductDeveloperPref.Checked) x.Parameters.AddWithValue("@projectmanagerpref", ProjectManagerPref.Checked) x.Parameters.AddWithValue("@professorpref", ProfessorPref.Checked) x.Parameters.AddWithValue("@professorlvl", Professorlevel.Text) x.Parameters.AddWithValue("@professor", ProfessorTrue.Checked) x.Parameters.AddWithValue("@professorexp", professorexp.Text) x.Parameters.AddWithValue("@lecturerpref", LecturerPref.Checked) x.Parameters.AddWithValue("@lecturerlvl", Lecturerlevel.Text) x.Parameters.AddWithValue("@lecturer", LecturerTrue.Checked) x.Parameters.AddWithValue("@lecturerexp", lecturerexp.Text) 'Add professional experience params to x command x.Parameters.AddWithValue("@profdates1", ProfDates1.Text) x.Parameters.AddWithValue("@profdates2", ProfDates2.Text) x.Parameters.AddWithValue("@profdates3", ProfDates3.Text) x.Parameters.AddWithValue("@profdates4", ProfDates4.Text) x.Parameters.AddWithValue("@profdates5", ProfDates5.Text) x.Parameters.AddWithValue("@profdates6", ProfDates6.Text) x.Parameters.AddWithValue("@profdates7", ProfDates7.Text) x.Parameters.AddWithValue("@profloc1", ProfDates1.Text) x.Parameters.AddWithValue("@profloc2", ProfDates2.Text) x.Parameters.AddWithValue("@profloc3", ProfDates3.Text) x.Parameters.AddWithValue("@profloc4", ProfDates4.Text) x.Parameters.AddWithValue("@profloc5", ProfDates5.Text) x.Parameters.AddWithValue("@profloc6", ProfDates6.Text) x.Parameters.AddWithValue("@profloc7", ProfDates7.Text) x.Parameters.AddWithValue("@profcomp1", ProfCompany1.Text) x.Parameters.AddWithValue("@profcomp2", ProfCompany2.Text) x.Parameters.AddWithValue("@profcomp3", ProfCompany3.Text) x.Parameters.AddWithValue("@profcomp4", ProfCompany4.Text) x.Parameters.AddWithValue("@profcomp5", ProfCompany5.Text) x.Parameters.AddWithValue("@profcomp6", ProfCompany6.Text) x.Parameters.AddWithValue("@profcomp7", ProfCompany7.Text) x.Parameters.AddWithValue("@profpos1", Profpos1.Text) x.Parameters.AddWithValue("@profpos2", Profpos2.Text) x.Parameters.AddWithValue("@profpos3", Profpos3.Text) x.Parameters.AddWithValue("@profpos4", Profpos4.Text) x.Parameters.AddWithValue("@profpos5", Profpos5.Text) x.Parameters.AddWithValue("@profpos6", Profpos6.Text) x.Parameters.AddWithValue("@profpos7", Profpos7.Text) x.Parameters.AddWithValue("@profdesc1", ProfDesc1.Text) x.Parameters.AddWithValue("@profdesc2", ProfDesc2.Text) x.Parameters.AddWithValue("@profdesc3", ProfDesc2.Text) x.Parameters.AddWithValue("@profdesc4", ProfDesc4.Text) x.Parameters.AddWithValue("@profdesc5", ProfDesc5.Text) x.Parameters.AddWithValue("@profdesc6", ProfDesc6.Text) x.Parameters.AddWithValue("@profdesc7", ProfDesc7.Text) 'Add references parameters to x command x.Parameters.AddWithValue("@company1", company1.Text) x.Parameters.AddWithValue("@company2", company2.Text) x.Parameters.AddWithValue("@company3", company3.Text) x.Parameters.AddWithValue("@company4", company4.Text) x.Parameters.AddWithValue("@company5", company5.Text) x.Parameters.AddWithValue("@nature1", natureofwork1.Text) x.Parameters.AddWithValue("@nature2", natureofwork2.Text) x.Parameters.AddWithValue("@nature3", natureofwork3.Text) x.Parameters.AddWithValue("@nature4", natureofwork4.Text) x.Parameters.AddWithValue("@nature5", natureofwork5.Text) x.Parameters.AddWithValue("@workdate1", workdate1.Text) x.Parameters.AddWithValue("@workdate2", workdate2.Text) x.Parameters.AddWithValue("@workdate3", workdate3.Text) x.Parameters.AddWithValue("@workdate4", workdate4.Text) x.Parameters.AddWithValue("@workdate5", workdate5.Text) x.Parameters.AddWithValue("@contactname1", ContactName1.Text) x.Parameters.AddWithValue("@contactname2", ContactName2.Text) x.Parameters.AddWithValue("@contactname3", ContactName3.Text) x.Parameters.AddWithValue("@contactname4", ContactName4.Text) x.Parameters.AddWithValue("@contactname5", ContactName5.Text) x.Parameters.AddWithValue("@wtelephone1", Telephone1.Text) x.Parameters.AddWithValue("@wtelephone2", Telephone2.Text) x.Parameters.AddWithValue("@wtelephone3", Telephone3.Text) x.Parameters.AddWithValue("@wtelephone4", Telephone4.Text) x.Parameters.AddWithValue("@wtelephone5", Telephone5.Text) x.Parameters.AddWithValue("@wemail1", Email1.Text) x.Parameters.AddWithValue("@wemail2", Email2.Text) x.Parameters.AddWithValue("@wemail3", Email3.Text) x.Parameters.AddWithValue("@wemail4", Email4.Text) x.Parameters.AddWithValue("@wemail5", Email5.Text) 'Add other areas of expertise parameter x.Parameters.AddWithValue("@otherareasofexpertise", Otherareasofexpertise.Text) 'Add philosophy / pubs / affils comands to x command x.Parameters.AddWithValue("@philosophy", learningphilosophy.Text) x.Parameters.AddWithValue("@publications", publicationdetails.Text) x.Parameters.AddWithValue("@affiliations", affiliations.Text) x.Parameters.AddWithValue("@educationmore", educationmore.Text) c.Open() x.ExecuteNonQuery() c.Close() Catch ex As Exception WriteError(ex.ToString) End Try 'If everyone is happy, redirect to thank you page If (Page.IsValid) Then Response.Redirect("Thanks.aspx") End If End Sub End Class

    Read the article

  • Error when importing com.google, com.android.internal.Telephony, etc.

    - by psyhclo
    Hey, I've downloaded the android source code for CallLog, Contacts, Dialing in this link http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;a=tree But now, when I try to import this package on Eclipse, imports like: com.google, com.android.internal.Telephony, com.android.internal.R, com.google.android.collect, android.provider.ContactsContract.Intents.UI, android.provider.ContactsContract.SearchSnippetColumns, android.provider.ContactsContract.ProviderStatus, android.provider.ContactsContract.ContactCounts, android.content.IContentService, android.provider.ContactsContract.Intents.UI And many other imports, show errors saying it cannot be resolved. So my question is, why it shows this errors? Why I cant implement it without this errors? I use the Google APIs, I've created the project from an existing source code, but I dont know why this happens. Thanks.

    Read the article

  • How can I setup a .NET Custom Action within WiX 3.0?

    - by Luke
    I need to setup a custom action within WiX 3.0. I have the following setup in my Windows application exe. I have viewed the question at StackOverflow: Removing files when uninstalling Wix however I can't get this working with WiX 3.0. This seems to deal with InstallUtilLib.dll, however I can't work out how I call the custom action within my main Windows app executable. Also, is there some method that I can use to manually invoke and test the OnBeforeUninstall function is working as expected? Imports System.Configuration.Install.Installer Imports System.IO Public Class CustomInstaller Inherits Configuration.Install.Installer Protected Overrides Sub OnBeforeUninstall(ByVal savedState As System.Collections.IDictionary) MyBase.OnBeforeUninstall(savedState) Try End Sub End Class

    Read the article

  • Enable PostBack for a ASP.NET User Control

    - by Steven
    When I click my "Query" the values for my user controls are reset. How do I enable PostBack for my user control? myDatePicker.ascx <%@ Control Language="vb" CodeBehind="myDatePicker.ascx.vb" Inherits="Website.myDate" AutoEventWireup="false" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %> <asp:TextBox ID="DateTxt" runat="server" ReadOnly="True" /> <asp:Image ID="DateImg" runat="server" ImageUrl="~/Calendar_scheduleHS.png" EnableViewState="True" EnableTheming="True" /> <asp:CalendarExtender ID="DateTxt_CalendarExtender" runat="server" Enabled="True" TargetControlID="DateTxt" PopupButtonID="DateImg" DefaultView="Days" Format="ddd MMM dd, yyyy" EnableViewState="True"/> myDatePicker.ascx Partial Public Class myDate Inherits System.Web.UI.UserControl Public Property SelectedDate() As Date? Get Dim o As Object = ViewState("SelectedDate") If o = Nothing Then Return Nothing End If Return Date.Parse(o) End Get Set(ByVal value As Date?) ViewState("SelectedDate") = value End Set End Property End Class Default.aspx <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="Website._Default" EnableEventValidation="false" EnableViewState="true" %> <%@ Register TagPrefix="my" TagName="DatePicker" Src="~/myDatePicker.ascx" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %> <%@ Register Assembly="..." Namespace="System.Web.UI.WebControls" TagPrefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ... <body> <form id="form1" runat="server"> <div class="mainbox"> <div class="query"> Start Date<br /> <my:DatePicker ID="StartDate" runat="server" EnableViewState="True" /> End Date <br /> <my:DatePicker ID="EndDate" runat="server" EnableViewState="True" /> ... <div class="query_buttons"> <asp:Button ID="Button1" runat="server" Text="Query" /> </div> </div> <asp:GridView ID="GridView1" ... > </form> </body> </html> Default.aspx.vb Imports System.Web.Services Imports System.Web.Script.Services Imports AjaxControlToolkit Protected Sub Page_Load(ByVal sender As Object, _ ByVal e As EventArgs) Handles Me.Load End Sub Partial Public Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, _ ByVal e As EventArgs) Handles Button1.Click GridView1.DataBind() End Sub End Class

    Read the article

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