Search Results

Search found 599 results on 24 pages for 'aaron fischer'.

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

  • Groovy 1.7 changes "final"?

    - by Aaron L. Carlow
    Just started learning Groovy, got the PragProg book "Programming Groovy" and had a problem compiling one of the sample scripts: class GCar2 { final miles = 0 def getMiles() { println "getMiles called" miles } def drive(dist) { if (dist > 0) { miles += dist } } } def car = new GCar2() println "Miles: $car.miles" println 'Driving' car.drive(10) println "Miles: $car.miles" try { print 'Can I see the miles? ' car.miles = 12 } catch (groovy.lang.ReadOnlyPropertyException ex) { println ex.message GroovyCar2.groovy: 20: cannnot access final field or property outside of constructor. @ line 20, column 35. def drive(dist) { if (dist > 0) miles += dist } ^ Groovy versions prior to 1.7 do not give an error. I looked through whatever documentation I could find and did not see the issue discussed. What is going on here? Aaron

    Read the article

  • ldapsearch and vcard creation

    - by Aaron Hoffman
    I'm using openldap on Mac OS X Server 10.6 and need to generate a vcard for all the users in a given group. By using the ldapsearch I can list all the memberUid's for all users in that group. I found a perl script (Advanced LDAP Search or ALS) that was written by someone that will generate the vcard easily. ALS can be found here http://www.ldapman.org/tools/als.gz So what I need to do is create a wrapper script (in python or perl) that will effectively loop through the memberUid's and run the ALS command to create the vcard and append it to the file. This command provides the memberUid's: ldapsearch -x -b 'dc=ldap,dc=server,dc=com' '(cn=testgroup)' Then running ALS gives the vcard: als -b dc=ldap,dc=server,dc=com -V uid=aaronh > vcardlist.vcf If it's easier to do this using Perl since ALS is already using it that would be fine. I've done more work in python but I'm open to suggestions. Thanks in advance, Aaron

    Read the article

  • Issue with mysql backup in cron

    - by Aaron
    I'm just trying to perform a mysqldump and have it scheduled. I'm using RHEL 5 and have added it to the crontab as shown below: 22 13 * * * root mysqldump --user=root --password=12345 mysqldb /var/backups/mysqldbdate +%d%m.sql The .sql file never ended up in the backups folder. I even attempted to run this command line and it worked fine which tells me its something to do with the cron. Furthermore, I added a simple comand like "ls" and the output to the same directory and it worked fine. Any ideas? Thanks, Aaron

    Read the article

  • Find&Replace using Python - Binary file

    - by Aaron Hoffman
    Hello, I'm attempting to do a "find and replace" in a file on a Mac OS X computer. Although it appears to work correctly. It seems that the file is somehow altered. The text editor that I use (Text Wrangler) is unable to even open the file once this is completed. Here is the code as I have it: import fileinput for line in fileinput.FileInput("testfile.txt",inplace=1): line = line.replace("newhost",host) print line, When I view the file from the terminal, it does say "testfile" may be a binary file. See it anyway? Is there a chance that this replace is corrupting the file? Do I have another option for this to work? I really appreciate the help. Thank you, Aaron UPDATE: the actual file is NOT a .txt file it is a .plist file which is preference file in Mac OS X if that makes any difference

    Read the article

  • After .load() Reset Textbox with User Entered Value using JavaScript and jQuery

    - by Aaron Salazar
    My function below calls a partial view after a user enters a filter-by string into the text box '#DocId'. When the user is done typing, the partial view is displayed with filtered data. Since my textbox needs to be in the partial view, when user is done entering a filter-by string and is shown the filtered data, the textbox is reset and the user entered data is lost. How can I set the value of the textbox back to the user entered string after the partial view is displayed? I'm pretty sure I need to use .val() but I can't seem to get this to work. $(function() { $('#DocId').live('keyup', function() { clearTimeout($.data(this, 'timer')); var val = $(this).val(); var wait = setTimeout(function() { $('#tableContent').load('/CurReport/TableResults', { filter: val }, 500) }, 500); $(this).data('timer', wait); }); }); Thank you, Aaron

    Read the article

  • Sending Client Certificate in HttpWebRequest

    - by Aaron Fischer
    I am trying to pass a client certificate to a server using the code below however I still revive the HTTP Error 403.7 - Forbidden: SSL client certificate is required. What are the possible reasons the HttpWebRequest would not send the client certificate? var clientCertificate = new X509Certificate2( @"C:\Development\TestClient.pfx", "bob" ); HttpWebRequest tRequest = ( HttpWebRequest )WebRequest.Create( "https://ofxtest.com/ofxr.dll" ); tRequest.ClientCertificates.Add( clientCertificate ); tRequest.PreAuthenticate = true; tRequest.KeepAlive = true; tRequest.Credentials = CredentialCache.DefaultCredentials; tRequest.Method = "POST"; var encoder = new ASCIIEncoding(); var requestData = encoder.GetBytes( "<OFX></OFX>" ); tRequest.GetRequestStream().Write( requestData, 0, requestData.Length ); tRequest.GetRequestStream().Close(); ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback( CertPolicy.ValidateServerCertificate ); WriteResponse( tRequest.GetResponse() );

    Read the article

  • WMIprvse process leaks memory on 2008 server R2

    - by Dani Fischer
    I have a Windows 2008 R2 server running on a VM machine. My .NET service is running on this server periodically querying WMI, for example: SELECT ProcessId FROM Win32_Service WHERE ... After a day or two WMIprvse takes up to 500M memory and WMI queries start getting out of memory exceptions. This article seems to be talking about this issue: "http://support.microsoft.com/kb/958124" I've seen other articles saying that Microsoft is aware of the problem and not going to issue a fix until the next major release. http://social.msdn.microsoft.com/Forums/en/netfxbcl/thread/256eb40c-d050-4278-a3d8-863e30db02a0 I'd appreciate any suggestions and insights on this.

    Read the article

  • asp.net CustomValidator never fires OnServerValidate

    - by Bryce Fischer
    I have the following ASP page: <asp:Content ID="Content2" ContentPlaceHolderID="ShellContent" runat="server"> <form runat="server" id="AddNewNoteForm" method="post""> <fieldset id="NoteContainer"> <legend>Add New Note</legend> <asp:ValidationSummary ID="ValidationSummary1" runat="server" /> <div class="ctrlHolder"> <asp:Label ID="LabelNoteDate" runat="server" Text="Note Date" AssociatedControlID="NoteDateTextBox"></asp:Label> <asp:TextBox ID="NoteDateTextBox" runat="server" class="textInput" CausesValidation="True" ></asp:TextBox> <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="CustomValidator" ControlToValidate="NoteDateTextBox" OnServerValidate="CustomValidator1_ServerValidate" Display="Dynamic" >*</asp:CustomValidator> </div> <div class="ctrlHolder"> <asp:Label ID="LabelNoteText" AssociatedControlID="NoteTextTextBox" runat="server" Text="Note"></asp:Label> <asp:TextBox ID="NoteTextTextBox" runat="server" Height="102px" TextMode="MultiLine" class="textInput" ></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Note Text is Required" ControlToValidate="NoteTextTextBox">*</asp:RequiredFieldValidator> </div> <div class="buttonHolder"> <asp:Button ID="OkButton" runat="server" Text="Add New Note" CssClass="primaryAction" onclick="OkButton_Click"/> <asp:HyperLink ID="HyperLink1" runat="server">Cancel</asp:HyperLink> </div> </fieldset> </form> </asp:Content> and the following code behind for the CustomValidator1_ServerValidate() method: protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args) { if (string.IsNullOrEmpty(args.Value.Trim())) { args.IsValid = false; CustomValidator1.ErrorMessage = "Note Date is Required!"; return; } DateTime testDate; if (DateTime.TryParse(args.Value, out testDate)) { args.IsValid = true; CustomValidator1.ErrorMessage = "Invalid Date!"; } } It never seems to fail validation no matter what I put in the text box... Should mention this is ASP.NET 2.0

    Read the article

  • Resharper and Custom Live Template Not Working

    - by Bryce Fischer
    Working with Unity, I thought it would be a good idea to create some LiveTemplates to help out with creating configuration entries. For example, I want to create some typeAlias elements in a file called "unity.config": <typeAlias alias="QueryService" type="type,QueryAssembly"/> So, I created a live template: Shortcut: typeAlias Available "in all files" <typeAlias alias="$ALIAS$" type="$TYPE$,$ASSEMBLY$"/> the unity.config file is an XML file. I put the cursor in an empty spot and type "typeAlias" and then the tab key. Nothing happens. Any ideas?

    Read the article

  • USB Barcode Scanner and WM_KEYDOWN

    - by Bryce Fischer
    I am trying to write a program that can will read a barcode scanner. In addition, I need it to read the input even when the application is not the window in focus (i.e., running in system tray, etc). I found this article, titled Distinguishing Barcode Scanners from the Keyboard in WinForms, that seems to solve the exact problem. It is working pretty good, it detects my device and handles the WM_INPUT message. However, it is checking to see if the RAWINPUT.keyboard.Message is WM_KEYDOWN (0x100). It never seems to receive this. The only line of code I've altered in the code provided in the article is adding a Console.Out.WriteLine to output the actual values of that message: Console.Out.WriteLine("message: {0}", raw.keyboard.Message.ToString("X")); if (raw.keyboard.Message == NativeMethods.WM_KEYDOWN) { .... Here is what it outputs: message: B message: 1000B message: 3 message: 10003 message: 8 message: 10008 message: 3 message: 10003 message: 5 message: 10005 message: 3 message: 10003 message: 8 message: 10008 message: 8 message: 10008 message: 4 message: 10004 message: 9 message: 10009 message: 9 message: 10009 message: 3 message: 10003 The value I'm expecting to receive when this completes correctly is: 257232709 Which I verified by scanning to notepad. I don't know if the Operation System is relevant here, but I figured I should mention that I'm running this in Windows 7 64 and Visual Studio 2010 and .NET Framework 3.5. Scanner is a USB Barcode Scanner, Symbol LS2208, setup as "HID KEYBOARD EMULATION"

    Read the article

  • Resolving a Generic with a Generic parameter in Castle Windsor

    - by Aaron Fischer
    I am trying to register a type like IRequestHandler1[GenericTestRequest1[T]] which will be implemented by GenericTestRequestHandler`1[T] but I am currently getting an error from Windsor "Castle.MicroKernel.ComponentNotFoundException : No component for supporting the service " Is this type of operation supported? Or is it to far removed from the suppored register( Component.For(typeof( IList<).ImplementedBy( typeof( List< ) ) ) below is an example of a breaking test. ////////////////////////////////////////////////////// public interface IRequestHandler{} public interface IRequestHandler<TRequest> : IRequestHandler where TRequest : Request{} public class GenericTestRequest<T> : Request{} public class GenericTestRequestHandler<T> : RequestHandler<GenericTestRequest<T>>{} [TestFixture] public class ComponentRegistrationTests{ [Test] public void DoNotAutoRegisterGenericRequestHandler(){ var IOC = new Castle.Windsor.WindsorContainer(); var type = typeof( IRequestHandler<> ).MakeGenericType( typeof( GenericTestRequest<> ) ); IOC.Register( Component.For( type ).ImplementedBy( typeof( GenericTestRequestHandler<> ) ) ); var requestHandler = IoC.Container.Resolve( typeof(IRequestHandler<GenericTestRequest<String>>)); Assert.IsInstanceOf <IRequestHandler<GenericTestRequest<String>>>( requestHandler ); Assert.IsNotNull( requestHandler ); } }

    Read the article

  • UIPickerview filling the screen

    - by Fischer
    I want an UIPickerView that fills all the screen. This is the code i have ... pickerView1 = [[UIPickerView alloc] init]; [pickerView1 setDelegate: self]; [pickerView1 setFrame: CGRectMake(0,0, 480, 320)]; [self.view addSubview: pickerView1]; This just fills the width, not the height, and I get this message in the output: " invalid height value 320.0 pinned to 216.0 " Why ? How can i adjust the height of the picker ???

    Read the article

  • Storyboard elements are not sized properly on the device

    - by Joel Fischer
    In the storyboard, I am placing a table view element into a subclassed UIView. The element is not appearing on the iPad device I am running it on the same as it appears in the storyboard however. This also happens for additional content that I place into the storyboard. Below is a screenshot as it appears in the storyboard, as well as UI width/height information. And here is the description of the UI file running on the iPad. https://gist.github.com/4323186 (embedding it directly into the post is giving me problems) You'll notice that the tableview is explicitly set at 178 width, and is showing up in the description as 276 width. My initial thought was that perhaps a cell was forcing the parent to be larger (I'm very new to iOS UI development), but drilling into that shows the prototype cell it appears that the width is defined by it's parent at 178. The image views and label also are appearing in the incorrect spot, as shown in the second image below.

    Read the article

  • Calling Status Bar notification from method from other class.

    - by Jez Fischer
    Firstly, I am new to both android and Java. I have two classes, my main.class and Note.class. I am calling the notification method from my Note.class in my main.class when i press a button. The issue is with this line from the Note.class : PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); When the method is called it force closes. I believe the problem to be with the "this" in PendingIntent.getActivity(this, 0, notificationIntent, 0);, but I am unsure what to change it to. The notification code works fine if it's in the main class. I would be very grateful for any guidance. Edit: Main class : http://pastebin.com/05Yx0a48 Note.class : package com.adamblanchard.remindme.com.adamblanchard; import com.adamblanchard.remindme.R; import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; public class Note extends Activity { public CharSequence note = "not changed"; int HELLO_ID = 1; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setTitle("Remind Me!"); } //Notification Method public void callNotification() { // TODO Auto-generated method stub String ns = Context.NOTIFICATION_SERVICE; final NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); int icon = R.drawable.launcher; CharSequence tickerText = "Remind Me!"; long when = System.currentTimeMillis(); final Notification notification = new Notification(icon, tickerText, when); notification.flags |= Notification.FLAG_AUTO_CANCEL; final Context context = getApplicationContext(); CharSequence contentTitle = "Remind Me!"; CharSequence contentText = note; Intent notificationIntent = new Intent(context, AndroidNotifications.class); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); mNotificationManager.notify(HELLO_ID, notification); HELLO_ID++; } } Debug Output : Thread [<1 main] (Suspended (exception IllegalStateException)) Note(Activity).getSystemService(String) line: 3536 Note.callNotification() line: 37 remindme$1$1.onClick(DialogInterface, int) line: 72 AlertDialog(AlertController$ButtonHandler).handleMessage(Message) line: 159 AlertController$ButtonHandler(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 123 ActivityThread.main(String[]) line: 3647 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 507 ZygoteInit$MethodAndArgsCaller.run() line: 839 ZygoteInit.main(String[]) line: 597 NativeStart.main(String[]) line: not available [native method] This is the debug output I get, plus a force close popup on the device. Edit2: Manifest xml: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.adamblanchard.remindme" android:versionCode="3" android:versionName="0.7"> <application android:label="@string/app_name" android:icon="@drawable/ic_launcher72"> <activity android:name=".com.adamblanchard.remindme" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".Note"> <intent-filter> <action android:name="Note" /> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion="1"></uses-sdk> </manifest> Stack traces (Are these what you mean?): Thread [<1> main] (Suspended (exception ActivityNotFoundException)) Instrumentation.checkStartActivityResult(int, Object) line: 1404 Instrumentation.execStartActivity(Context, IBinder, IBinder, Activity, Intent, int) line: 1378 remindme(Activity).startActivityForResult(Intent, int) line: 2827 remindme(Activity).startActivity(Intent) line: 2933 remindme$1$1.onClick(DialogInterface, int) line: 82 AlertDialog(AlertController$ButtonHandler).handleMessage(Message) line: 159 AlertController$ButtonHandler(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 123 ActivityThread.main(String[]) line: 3647 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 507 ZygoteInit$MethodAndArgsCaller.run() line: 839 ZygoteInit.main(String[]) line: 597 NativeStart.main(String[]) line: not available [native method]

    Read the article

  • Constructor with non-instance variable assistant?

    - by Robert Fischer
    I have a number of classes that look like this: class Foo(val:BasicData) extends Bar(val) { val helper = new Helper(val) val derived1 = helper.getDerived1Value() val derived2 = helper.getDerived2Value() } ...except that I don't want to hold onto an instance of "helper" beyond the end of the constructor. In Java, I'd do something like this: public class Foo { final Derived derived1, derived2; public Foo(BasicData val) { Helper helper = new Helper(val); derived1 = helper.getDerived1Value(); derived2 = helper.getDerived2Value(); } } So how do I do something like that in Scala? I'm aware of creating a helper object of the same name of the class with an apply method: I was hoping for something slightly more succinct.

    Read the article

  • RadGrid Custom Filter

    - by Aaron
    I'm trying to add a custom filter to my RadGrid. I have a column, vendNum, which I want to allow users to filter on multiple vendNums with a comma-separated list. Basically, I want the same functionality as an "in" statement in SQL (where vendNum in (X,Y,Z)). I followed the tutorial on this site and came up with the following code to place in my RadGrid1_ItemCommand event. protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) { if (e.CommandName == RadGrid.FilterCommandName) { Pair filterPair = (Pair)e.CommandArgument; switch (filterPair.Second.ToString()) { case "vendNum": TextBox tbPattern = (e.Item as GridFilteringItem)["vendNum"].Controls[0] as TextBox; if (tbPattern.Text.Contains(",")) { string[] values = tbPattern.Text.Split(','); if (values.Length >= 2) { e.Canceled = true; StringBuilder newFilter = new StringBuilder(); for (int i = 0; i < values.Length; i++) { if (i == values.Length - 1) newFilter.Append("[vendNum] = " + values[i]); else newFilter.Append("[vendNum] = " + values[i] + " OR "); } if (RadGrid1.MasterTableView.FilterExpression == "") RadGrid1.MasterTableView.FilterExpression = newFilter.ToString(); else RadGrid1.MasterTableView.FilterExpression = "((" + RadGrid1.MasterTableView.FilterExpression + ") AND (" + newFilter.ToString() + "))"; RadGrid1.Rebind(); } } break; default: break; } } } Doing this, though, keeps giving me an error "Expression Expected" when I try to filter with a comma separated list. I'm still able to filter a single vendNum. My FilterExpression does come out as expected. The code is failing on the RadGrid1.Rebind() statement. Has anyone dealt with this before? Any help is greatly appreciated. Thanks, Aaron

    Read the article

  • UIView Animation animates position but not width

    - by Aaron Vegh
    Hi there, I'm trying to transform a UISearchBar, like in Mobile Safari: touch in the search field and it grows while the location field shrinks. My current animation to alter the width and position of the search field only animates the position: just before it slides to the right place, it simply snaps out to the right width. Here's my code: [UIView beginAnimations:@"searchGrowUp" context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; [UIView setAnimationDuration:0.5f]; [UIView setAnimationDelegate:self]; CGFloat findFieldWidth = findField.frame.size.width; CGFloat urlFieldWidth = urlField.frame.size.width; CGRect findFieldFrame = findField.frame; CGRect urlFieldFrame = urlField.frame; findFieldFrame.origin.x = findFieldFrame.origin.x - 150.0f; findFieldFrame.size.width = findFieldWidth + 150.0f; urlFieldFrame.size.width = urlFieldWidth - 150.0f; urlField.frame = urlFieldFrame; findField.frame = findFieldFrame; [UIView commitAnimations]; I've modified this code slightly for the sake of presenting it here, but I hope this gives the gist. Any guesses as to why this is happening would be appreciated! Cheers, Aaron.

    Read the article

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