Search Results

Search found 508 results on 21 pages for 'brad parks'.

Page 9/21 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • jruby rubygems update breaks jgem

    - by brad
    Has anyone seen this: ?? No jgem command works at all?? Though jruby -S gem list does work. I'm using jruby 1.3.1 and Sun Java6 jre root@test:/usr/local: jgem --version 1.3.3 root@test:/usr/local: jgem update --system JRuby limited openssl loaded. gem install jruby-openssl for full support. http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL Updating RubyGems Updating rubygems-update Successfully installed rubygems-update-1.3.6 /usr/local/jruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:103:Warning: Gem::SourceIndex#search support for String patterns is deprecated Updating RubyGems to 1.3.6 Installing RubyGems 1.3.6 RubyGems 1.3.6 installed root@test:/usr/local: jgem list /usr/local/jruby/bin/jgem: line 8: require: command not found /usr/local/jruby/bin/jgem: line 9: require: command not found /usr/local/jruby/bin/jgem: line 10: require: command not found /usr/local/jruby/bin/jgem: line 12: required_version: command not found /usr/local/jruby/bin/jgem: line 14: unless: command not found /usr/local/jruby/bin/jgem: line 15: abort: command not found /usr/local/jruby/bin/jgem: line 16: end: command not found /usr/local/jruby/bin/jgem: line 18: args: command not found /usr/local/jruby/bin/jgem: line 20: begin: command not found /usr/local/jruby/bin/jgem: line 21: Gem::GemRunner.new.run: command not found /usr/local/jruby/bin/jgem: line 22: rescue: command not found /usr/local/jruby/bin/jgem: line 23: exit: e.exit_code: numeric argument required

    Read the article

  • Why does jruby complain about valid java_opts

    - by brad
    I have set my java min/max heap size to be the same as outlined in the Sun Docs for precise heap sizing using the following: -Xms768m -Xmx768m This works fine when I start tomcat, but if I run jruby from the command line it complains saying: Error occurred during initialization of VM Incompatible minimum and maximum heap sizes specified I read in the jruby docs about some -J-X params but it seems silly that I would need to explicitly override my normal jvm settings. The problem arises when I do a deploy. I try running jruby -S rake db:migrate on my server and it complains. Is it true that I need to explicitly override my JVM settings when running jruby? It seems as though ANY Xms/Xmx values cause jruby to complain. Update So it seems that some settings do in fact work. For instance all of these work: Xmx256m Xms256m Xmx512m Xms256m Xmx512m Xms500m But these don't: Xmx512m Xms512m Xmx512m Xms501m Xmx768m Xms512m

    Read the article

  • Generated Word 2007 prints scrunched up

    - by Brad
    Our website generates Word 2007 documents from database data by creating the xml, zipping it and sending it as a MIME attachment. Usually, this works fine. On occasion, the document will look fine on the screen, but not when printed. The letters end up scrunched together. Here is an example. This is a 1 page document, the first page is a scan of the document printed correctly, the 2nd page is a scan of the same document printed with the problem. Here is the original document. Has anyone ever seen anything similar? I cannot figure out if this is a bug in the code that generates our XML, a bug in the printer driver or a bug in Word. Any ideas would be greatly appreciated. Please note that this document does not contain any real data other than public information, but disregard the contents - this is not an official document, and only meant to illustrate our problem.

    Read the article

  • PHP fopen returning null on files that work fine with include and get_file_contents

    - by brad allred
    Hi, I have XAMPP installed on a windows 2000 server. everything is working great except the PHP fopen function. I can neither create nor open files with it. the strange thing is that i can include/require/file_get_contents/other file related functions; also fopen does not generate any errors or notices it just returns NULL. I have gone as far as to grant full control of the file and all enclosing folders to everybody but i still get NULL instead of a file pointer. I have tried this on php 5.2.9, 5.2.13, and 5.3.1 with the same effect. i have gone through the php.ini file looking for something that is breaking it; i have even tried deleting and using the basic ini file from a linux box where fopen is working and still nothing. I know i have to restart apache after changing my ini and all that and have been (I have even restarted the server) so thats not it. I am at this poing assuming it is an apache configuration issue somehow, tomorrow im going to run a test through php-cli to make sure. I really don't want to bruise my head anymore over this can some apache/php wizard come to my aid? Hi guys, thanks for the responses. you are right is is not any config problem. the problem has to be with one of my dlls or one of my included files. I just tried the same code that isn't working in a new file without any include and i disabled my custom libraries and it worked. for the record here is what I was doing that wasn't working: $test_file = 'c:\\test.csv';//everybody has full control. is very large. if(file_exists($test_file) && is_readable($test_file)){ $fp = fopen($test_file, 'r'); echo var_export($fp, true);//outputs NULL. on my linux box this is a number. if($fp !== false){ //do the work fread($fp, 10);//throws the error that $fp is not a valid file handle } } something that i am including must be breaking fopen somehow. works as expected in new file with no includes.

    Read the article

  • Why does keyboard-slide crash my app?

    - by Brad Hein
    If I physically slide out the keyboard on my Moto Droid A855, it crashes my test app with the stack trace pasted below. I don't understand why? Also, if I start my app with the keyboard out, my app crashes immediately on startup. The app consists of an activity, which contains a viewflipper as the main view layout. The viewflipper contains two linearlayouts... Stack trace: 06-10 21:10:17.652 E/AndroidRuntime( 3785): Uncaught handler: thread main exiting due to uncaught exception 06-10 21:10:17.668 E/AndroidRuntime( 3785): java.lang.IllegalArgumentException: Receiver not registered: android.widget.ViewFlipper$1@447af0b8 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ActivityThread$PackageInfo.forgetReceiverDispatcher(ActivityThread.java:667) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ApplicationContext.unregisterReceiver(ApplicationContext.java:747) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:321) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.widget.ViewFlipper.onDetachedFromWindow(ViewFlipper.java:104) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.View.dispatchDetachedFromWindow(View.java:5835) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1076) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1074) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1074) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1074) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewRoot.dispatchDetachedFromWindow(ViewRoot.java:1570) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewRoot.doDie(ViewRoot.java:2556) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewRoot.die(ViewRoot.java:2526) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:218) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.Window$LocalWindowManager.removeViewImmediate(Window.java:436) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3498) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3599) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ActivityThread.access$2300(ActivityThread.java:119) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1867) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.os.Handler.dispatchMessage(Handler.java:99) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.os.Looper.loop(Looper.java:123) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ActivityThread.main(ActivityThread.java:4363) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at java.lang.reflect.Method.invokeNative(Native Method) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at java.lang.reflect.Method.invoke(Method.java:521) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 06-10 21:10:17.668 E/AndroidRuntime( 3785): at dalvik.system.NativeStart.main(Native Method) 06-10 21:10:17.684 I/Process ( 1017): Sending signal. PID: 3785 SIG: 3

    Read the article

  • WPF: How do I get a reference to a styled window control in code behind?

    - by Brad
    I have a window defined with a style: <Window x:Class="winBorderless" x:Name="winBorderless" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Local="clr-namespace:WindowStyle" Style="{StaticResource Window_Cartesia}" WindowStartupLocation="CenterScreen" BorderThickness="1" BorderBrush="#FF9CAAC1" Margin="5" Title="[Document Title]"> and the style defined in an application level dictionary: <Style x:Key="Window_Cartesia" TargetType="{x:Type Window}"> <Setter Property="WindowStyle" Value="None"/> <Setter Property="AllowsTransparency" Value="True"/> <Setter Property="Background" Value="Transparent"/> <EventSetter Event="Loaded" Handler="Loaded"/> <EventSetter Event="PreviewKeyDown" Handler="Preview_KeyDown"/> <EventSetter Event="MouseMove" Handler="FullScreen_MouseMove"/> <Setter Property="Template"> In code behind I have a reference to the Window instance set: Win = DirectCast(sender, winBorderless) This allows access to the window properties as the EventSetters pass references to the various controls. However, it doesn't provide for access to the controls defined in the style through the window reference as they don't exist there. So, what is the best way to reference a control through code behind that is defined in the style. I'd prefer not to iterate the trees to find them but ya gotta do....

    Read the article

  • CSS Parser - Insert mtimes

    - by brad
    What command line tool can I use to automatically insert mtimes into urls in my css files for the purposes of breaking the cache? /* before */ .example { background: url(example.jpg); } /* after */ .example { background: url(example.jpg?1271298451); } Also, I would like this tool to spit out the latest mtime as the css files mtime. (If the css file is still cached then the new urls will not get to the client.) In searching the web, I have found very few tools that can do this. I am even considering rolling my own, but have found very little in the way of css parsers that are actively maintained. A candidate should be: fast (I don't want to wait 30 seconds on deployment) command line accessible (something like "cat foo.css bar.css | cssmtime out.css") What I've found so Far yui compressor - initially I thought I would extend the yui compressor to do this, but found that it is implemented as a bunch of regex's and not a parser. csstidy - last release was in 2007 and development has been suspended, but does have an option for inserting mtimes (also written in php, something I have no experience in) cssutils - python sac implementation - seems to be actively maintained, but also seems like overkill for my needs. Also, written in python which I have experience with csspool - ruby sac implementation - I don't know much ruby, but would like to learn other sac implementations - There are several java implementations, and a c implementation neither of which I know much about What's your experience? Have you used any of these libraries? Was the experience positive? Would you recommend I go with them for my purposes?

    Read the article

  • Lazy loading of ESB in a jruby rails app

    - by brad
    I have a jruby/rails app using: jruby 1.4.0 Rails 2.3.5 ActiveMQ 5.3.0 Mule ESB 2.2.1 Currently in our environment.rb file we start up Mule in the initializer. This becomes a big pain when we go to do normal rake tasks that don't require JMS/Mule such as db:migrate as it takes a long time to startup/shutdown Mule everytime. The code is similar to this: APP_CONTEXT = Java::our.company.package.service_clients.Initializer.getAppContext(MULE_CONFIG_PATH) And we use APP_CONTEXT to fetch the bean to connect to the appropriate service. I'm trying to figure out some mechanism by which APP_CONTEXT could be lazily instantiated (not in initialize) to avoid all of the pains of having to startup Mule on initialize. Currently we have a few ruby client classes that are instantiated as a before_filter in application_controller such as @data_service = DataService.new(APP_CONTEXT) that initialize the proper java client for each request for use in our controllers. I'm open to all suggestions. I'm having a hard time trying to find the right place to put this lazy instantiation.

    Read the article

  • NoSuchMethodError in Java using XStream

    - by Brad Germain
    I'm trying to save a database into a file using XStream and then open it again later using XStream and deserialize it back into the objects it was in previously. The database consists of an arraylist of tables, which consists of an arraylist of a data class where the data class contains an arraylist of objects. I'm basically trying to create an sql compiler. I'm currently getting a java.lang.NoSuchMethodError because of the last line in the load method. Here's what I have: Save Method public void save(Database DB){ File file = new File(DB.getName().toUpperCase() + ".xml"); //Test sample DB.createTable("TBL1(character(a));"); DB.tables.getTable("TBL1").rows.add(new DataList()); DB.tables.getTable("TBL1").rows.getRow(0).add(10); XStream xstream = new XStream(); //Database xstream.alias("Database", Database.class); //Tables xstream.alias("Table", Table.class); //Rows xstream.alias("Row", DataList.class); //Data //xstream.alias("Data", Object.class); //String xml = xstream.toXML(DB); Writer writer = null; try { writer = new FileWriter(file); writer.write(xstream.toXML(DB)); writer.close(); } catch (IOException e) { e.printStackTrace(); } } Load Method public void Load(String dbName){ XStream xstream = new XStream(); BufferedReader br; StringBuffer buff = null; try { br = new BufferedReader(new FileReader(dbName + ".xml")); buff = new StringBuffer(); String line; while((line = br.readLine()) != null){ buff.append(line); } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } database = (Database)xstream.fromXML(buff.toString()); }

    Read the article

  • rails override default getter for a relationship (belongs_to)

    - by brad
    So I know how to override the default getters for attributes of an ActiveRecord object using def custom_getter return self[:custom_getter] || some_default_value end I'm trying to achieve the same thing however for a belongs to association. For instance. class Foo < AR belongs_to :bar def bar return self[:bar] || Bar.last end end class Bar < AR has_one :foo end When I say: f = Foo.last I'd like to have the method f.bar return the last Bar, rather than nil if that association doesn't exist yet. This doesn't work however. The reason is that self[:bar] is always undefined. It's actually self[:bar_id]. I can do something naive like: def bar if self[:bar_id] return Bar.find(self[:bar_id]) else return Bar.last end end However this will always make a db call, even if Bar has already been fetched, which is certainly not ideal. Does anyone have an insight as to how I might have a relationship such that the belongs_to attribute is only loaded once and has a default value if not set.

    Read the article

  • How to set default date in date_select helper in Rails

    - by brad
    I'm trying to set up a date of birth helper in my Rails app (2.3.5). At present it is like so. <%= f.date_select :date_of_birth, :start_year => Time.now.year - 110, :end_year => Time.now.year %> This generates a perfectly functional set of date fields that work just fine but.... They default to today's date which is not ideal for a date of birth field (I'm not sure what is but unless you're running a neonatal unit today's date seems less than ideal). I want it to read Jan 1 2010 instead (or 2011 or whatever year it happens to be). Using the :default option has proven unsuccessful. I've tried many possibilities including; <%= f.date_select :date_of_birth, :default => {:year => Time.now.year, :month => 'Jan', :day => 1}, :start_year => Time.now.year - 110, :end_year => Time.now.year %> and <%= f.date_select :date_of_birth, :default => Time.local(2010,'Jan',1), :start_year => Time.now.year - 110, :end_year => Time.now.year %> None of this changes the behaviour of the first example. Does the default option actually work as described? It seems that this should be a fairly straightforward thing to do. Ta.

    Read the article

  • Optimize existing code and need to list alphabetically.

    - by Brad
    I need help optimizing the code to run faster, unless it is optimized the best. I also want to alphabetize the list and I am unsure how to do that. It should be alphabetized by $userinfo[0]["sn"][0] I am using the adLDAP class: http://adldap.sourceforge.net/ <?php require_once('adLDAP.php'); //header('Content-type: text/json'); $adldap = new adLDAP(); $groupMembers = $adldap->group_members('STAFF'); //print_r($groupMembers); $userinfo = $adldap->user_info($username, array("givenname","sn","telephonenumber")); $displayname = $userinfo[0]["givenname"][0]." ".$userinfo[0]["sn"][0]; print "<ul>"; foreach ($groupMembers as $i => $username) { $userinfo = $adldap->user_info($username, array("*")); $displayname = "<strong>".$userinfo[0]["givenname"][0]." ".$userinfo[0]["sn"][0]."</strong> - ".$userinfo[0]["telephonenumber"][0]; if($userinfo[0]["sn"][0] != "" && $userinfo[0]["givenname"][0] != "" && $userinfo[0]["telephonenumber"][0] != "") { print "<li>".$displayname."</li>"; } } print "</ul>"; ?>

    Read the article

  • How To Save Spring Security Logged In User In Session

    - by Brad Rhoads
    This code get's the currently logged in user, using the Spring Security Plugin (acegi): def principalInfo = authenticateService.principal() def person = null if (principalInfo != "anonymousUser" && principalInfo.username) { person = Person.findByUsername(principalInfo.username) } I would like then do: session.user = person This needs to be done after the user logs in. I can't figure out where to put my code to do this. It seem like it should be some place in the Login Controller, but I can't see where.

    Read the article

  • Invalid argument supplied for foreach() using adldap

    - by Brad
    I am using adldap http://adldap.sourceforge.net/ And I am passing the session from page to page, and checking to make sure the username within the session is a member of a certain member group, for this example, it is the STAFF group. <?php ini_set('display_errors',1); error_reporting(E_ALL); require_once('/web/ee_web/include/adLDAP.php'); $adldap = new adLDAP(); session_start(); $group = "STAFF"; //$authUser = $adldap->authenticate($username, $password); $result=$adldap->user_groups($_SESSION['user_session']); foreach($result as $key=>$value) { switch($value) { case $group: print '<h3>'.$group.'</h3>'; break; default: print '<h3>Did not find specific value: '.$value.'</h3>'; } if($value == $group) { print 'for loop broke'; break; } } ?> It gives me the error: Warning: Invalid argument supplied for foreach() on line 15, which is this line of code: foreach($result as $key=$value) { When I uncomment the code $authUser = $adldap-authenticate($username, $password); and enter in the appropriate username and password, it works fine, but I shouldn't have to, since the session is valid, I just want to see if the username stored within the valid_session is apart of the STAFF group. Why would it be giving me that problem?

    Read the article

  • Detect Alpha Channel with ImageMagick

    - by brad
    Scenario I would like to save images with alpha transparency as .png and images without alpha transparency as .jpg (even if their original format is .png or .gif). How can I detect whether or not an image has alpha transparency using ImageMagick?

    Read the article

  • How to do case-insensitive order in Rails with postgresql

    - by brad
    I am in the process of switching my development environment from sqlite3 to postgresql 8.4 and have one last hurdle. In my original I had the following line in a helper method; result = Users.find(:all, :order => "name collate NOCASE") which provided a very nice case-insensitive search. I can't replicate this for postgresql. Should be easy - any ideas? Thanks.

    Read the article

  • Rails equivalent of respond_to |format| with a straight render

    - by brad
    I'm working with ActiveResource a lot so my service models are only using XML. Thus, I have no need for a respond_to block, I literally just render :xml => @model I can't however figure out how to render a 404 header using this. I've had to resort to respond_to, which I think adds a few unnecessary method calls. Here's what I'm using: respond_to do |format| if (record_found) render :xml => @some_record else format.xml{ head :not_found } end end but I just want something like render :xml => head :not_found which doesn't work. Can anyone tell me the proper syntax?

    Read the article

  • MVC 2 AntiForgeryToken - Why symmetric encryption + IPrinciple?

    - by Brad R
    We recently updated our solution to MVC 2, and this has updated the way that the AntiForgeryToken works. Unfortunately this does not fit with our AJAX framework any more. The problem is that MVC 2 now uses symmetric encryption to encode some properties about the user, including the user's Name property (from IPrincipal). We are able to securely register a new user using AJAX, after which subsequent AJAX calls will be invalid as the anti forgery token will change when the user has been granted a new principal. There are also other cases when this may happen, such as a user updating their name etc. My main question is why does MVC 2 even bother using symmetric encryption? Any then why does it care about the user name property on the principal? If my understanding is correct then any random shared secret will do. The basic principle is that the user will be sent a cookie with some specific data (HttpOnly!). This cookie is then required to match a form variable sent back with each request that may have side effects (POST's usually). Since this is only meant to protect from cross site attacks it is easy to craft up a response that would easily pass the test, but only if you had full access to the cookie. Since a cross site attacker is not going to have access to your user cookies you are protected. By using symmetric encryption, what is the advantage in checking the contents of the cookie? That is, if I already have sent an HttpOnly cookie the attacker cannot override it (unless a browser has a major security issue), so why do I then need to check it again? After having a think about it it appears to be one of those 'added layer of security' cases - but if your first line of defence has fallen (HttpOnly) then the attacker is going to get past the second layer anyway as they have full access to the users cookie collection, and could just impersonate them directly, instead of using an indirect XSS/CSRF attack. Of course I could be missing a major issue, but I haven't found it yet. If there are some obvious or subtle issues at play here then I would like to be aware of them.

    Read the article

  • String Question. How to count the number of A,a, numeric and special char

    - by Brad
    I have randomly created strings such as H*P2[-%-3:5RW0j*;k52vedsSQ5{)ROkb]P/*DZTr*-UX4sp What I want to do is get a count of all Caps, lower case, numeric and special characters in each string as they are generated. I am looking for an output similar to Caps = 5 Lower = 3 numneric = 6 Special = 4 Fictitious values of course. I have gone through the php string pages using count_char, substr_count etc but cant find what I am looking for. Thank you

    Read the article

  • UI Terminology: Logon vs Login

    - by Brad Leach
    I am crafting an application and cannot decide whether to use the terms Login/out or Logon/off. Is there a more correct option between these two? Should I use something else entirely (like "Sign on/off"). In terms of usability, as long as I am consistent it probably doesn't matter which terms I choose, but I did wonder about the origins of the terms - and whether one or another makes more grammatical sense. I also care deeply about the application I am creating, and want to take the time to investigate all aspects of its user experience.

    Read the article

  • Best practice for viewflipper containing 10 linearlayouts?

    - by Brad Hein
    I'm embarking on a GUI Activity composed of a viewflipper, which I would like to contain 10 linearlayout layouts. Is it advisable to put all of my layouts into the same XML resource/layout file? If not, is there a more organized approach to coding a viewflipper with many layouts? Will having everything in the same file come at a significant performance cost?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >