Search Results

Search found 233 results on 10 pages for 'bart terrell'.

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

  • Easy road from DisplayObject to Molehill?

    - by Bart van Heukelom
    I have a finished Flash game which is rendered using the built-in display tree, i.e. Bitmaps contained in Sprites (and a text here and there, few vector graphics, and one bitmap-filled shape). For extra performance, I'd like it to use Molehill for rendering, but that's not possible out of the box. What's the easiest way to make this game use Molehill when available, but fall back to the current method if it's not available?

    Read the article

  • Rendering only a part of the screen in high detail

    - by Bart van Heukelom
    If graphics are rendered for a large viewing angle (e.g. a very large TV or a VR headset), the viewer can't actually focus on the entire image, just a part of it. (Actually, this is the case for regular sized screens as well.) Combined with a way to track the viewer's eyes, you could theoretically exploit this and render the graphics away from the viewer's focus with progressively less details and resolution, gaining performance, without losing perceived quality. Are there any techniques for this available or under development today?

    Read the article

  • Google Analytics: Custom variables issue difference in data

    - by Bart
    We’ve set up tracking through custom variables in Google Analytics to measure which offices are getting the most traffic. The custom var consists out of the key (=office) and value = (office name). In our Custom Var tab in audience we get no data (actually we got 1 hit, but we think the data is way off). When we setup advanced segments with the filters on key and value we get the correct data. Now we are wondering why we aren’t getting that data in the custom var tab.

    Read the article

  • Computer is running slow with Ubuntu

    - by Bart
    Why my computer runs too slow when I install Ubuntu or any other Linux (Debian works better than other distros), but with windows works fine...? My configuration is: Processor: Intel Celeron CPU 1.70GHz Graphics: Ati Radeon 9250 128 MB HD: Western Digital 120GB RAM: 2GB DDR1 Motherboard: MSI (MS-6566) Is there anything unsuported by Ubuntu, or any Linux. If so, is there any way to get it work fine (visual effects are not important to me). What do I need to do?

    Read the article

  • Good way to extract strings to resource

    - by Bart Friederichs
    I am using Visual Studio 2010 and we just decided to get started on localization of our code. We want to use the per-form resource file in combination with a separate resource file for static strings, called strings.resx. I was wondering if there is a good way to extra static strings (we already have quite some code we need to translate) to the strings.resx file? I have tried this plugin: Resource Refactoring 2010, but it doesn't work completely. It creates the correct new resource, but the strings aren't refactored in the code. Also, the tool seems to be abandoned by its developer. Is there a good plugin that can do this?

    Read the article

  • How to detect if a Surface Contact is over a ScatterView?

    - by Bart Roozendaal
    This is a (kind of) similar situation as in the SDK Sample Shopping Cart for MS Surface. I have an application with two ScatterViews. The first covers the complete Surface window ('surface'). The second resides in a TagVisualization object ('pod'). There might be more than one pod available (if more than one tag is down on the table). I would like to be able to drag a ScatterViewItem from the 'pod' to the 'surface' or another 'pod'. I have no problems in detecting if a ScatterViewItem is leaving its ScatterView parent. Also, no problems in reparenting the ScatterViewItem. However, I want to detect which ScatterView the item is being dragged on. In the SDK Sample they have used a visual element (an ellipse in this case) which is below the ScatterViews. VisualTreeHelper.HitTest is used to determine if the contact is over the ellipse. If so, the 'connected' ScatterView is found. I don't think this is a very elegant solution. I wouldn't want a visual element put in there, just to detect if a contact is over a ScatterView. Are there betterwways to accomplish this kind of 'hittesting'? Thanks, Bart

    Read the article

  • JBoss 5.1 binds to host address while run in vserver with -b <guest address>

    - by bart cane
    Hello, while starting JBoss 5.1.0.GA in virtual server machine on Debian (linux-VServer technology) I get the following error: ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss.remoting:protocol=rmi,service=JMXConnectorServer state=Create mode=Manual requiredState=Installed java.io.IOException: Cannot bind to URL [rmi://10.1.2.11:1090/jmxconnector]: javax.naming.NoPermissionException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.AccessException: Registry.Registry.bind disallowed; origin /AA.BB.CC.DD is non-local host] where AA.BB.CC.DD is host machine name, 10.1.2.11 is vserver guest with JBoss and JBoss is started with -b 10.1.2.11 (I also tried -Djboss.bind.address=10.1.2.11 - the same result). 10.1.2.11 is bound to dummy2 interface on host (serving 10.1.2.1 network). The root exception is strange - why JBoss wants to bind to host address AA.BB.CC.DD? There were no problems with 4.2.3.GA on the same machine, also started with -b 10.1.2.11. It starts correctly when no params present - binds to localhost and everything is ok, but it MUST be bound to 10.1.2.11 to be visible by Apache on another vserver guest, acting as proxy. I thought that it can be fixed by setting net.ipv4.conf.all.promote_secondaries=1 via sysctl (was 0) but it didn't help much. Has anyone had such problem? Regards, bart

    Read the article

  • [ASP.NET] Change CulturalInfo after button click

    - by Bart
    Hello, i have multilingual asp.net site. there is masterpage and default.aspx in masterpage i put two buttons one to click when i want to change the language to english, second for polish. I want to change the language after click on these buttons (and all changes should appear automatically on the page) here is a code for both: protected void EnglishButton_Click(object sender, ImageClickEventArgs e) { string selectedLanguage = "en-US"; //Sets the cookie that is to be used by InitializeCulture() in content page HttpCookie cookie = new HttpCookie("CultureInfo"); cookie.Value = selectedLanguage; Response.Cookies.Add(cookie); Server.Transfer(Request.Path); } protected void PolishButton_Click(object sender, ImageClickEventArgs e) { string selectedLanguage = "pl-PL"; //Sets the cookie that is to be used by InitializeCulture() in content page HttpCookie cookie = new HttpCookie("CultureInfo"); cookie.Value = selectedLanguage; Response.Cookies.Add(cookie); Server.Transfer(Request.Path); } in default.aspx.cs i have InitializeCulture(): protected override void InitializeCulture() { HttpCookie cookie = Request.Cookies["CultureInfo"]; // if there is some value in cookie if (cookie != null && cookie.Value != null) { Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(cookie.Value); Thread.CurrentThread.CurrentUICulture = new CultureInfo(cookie.Value); } else // if none value has been sent by cookie, set default language { Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("pl-PL"); Thread.CurrentThread.CurrentUICulture = new CultureInfo("pl-PL"); } base.InitializeCulture(); } i added resource files and in one label i show actual culture: Welcome.Text = "Culture: " + System.Globalization.CultureInfo.CurrentCulture.ToString(); the problem is that when i run this app and click e.g. english button (default language is polish), there is no effect. if i click it second time or press F5, the changes are applies and in the label is Culture: en-US. the same happens if i want to change language back to polish (it works after second click (or one click and refresh)). What am i doing wrong? Regards, Bart

    Read the article

  • Multiple instances of the same Async task (Windows Phone)

    - by Bart Teunissen
    After googeling for ages, and reading some stuff about async task in books. I made a my first program with an async task in it. Only to find out, that i can only start one task. I want to run the task more then once. This is where i found out that that doesn't seem to work. to be a little bit clearer, here are some parts of my code: InitFunction(var); This is the Task itself public async Task InitFunction(string var) { _VarHandle = await _AdsClient.GetSymhandleByNameAsync(var); _Data = await _AdsClient.ReadAsync<T>(_VarHandle); _AdsClient.AddNotificationAsync<T>(_VarHandle, AdsTransmissionMode.OnChange, 1000, this); } This works like a charm when i execute the task only once.. But is there a possibility to run it multiple times. Something like this? InitFunction(var1); InitFunction(var2); InitFunction(var3); Because if i do this now (multiple tasks at once), the task it wants to start is still running, and it throws an exeption. if someone could help me with this, that would be awesome! ~ Bart

    Read the article

  • Problem connecting to postgres with Kohana 3 database module on OS X Snow Leopard

    - by Bart Gottschalk
    Environment: Mac OS X 10.6 Snow Leopard PHP 5.3 Kohana 3.0.4 When I try to configure and use a connection to a postgresql database on localhost I get the following error: ErrorException [ Warning ]: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) Here is the configuration of the database in /modules/database/config/database.php (note the third instance named 'pgsqltest') return array ( 'default' => array ( 'type' => 'mysql', 'connection' => array( /** * The following options are available for MySQL: * * string hostname * string username * string password * boolean persistent * string database * * Ports and sockets may be appended to the hostname. */ 'hostname' => 'localhost', 'username' => FALSE, 'password' => FALSE, 'persistent' => FALSE, 'database' => 'kohana', ), 'table_prefix' => '', 'charset' => 'utf8', 'caching' => FALSE, 'profiling' => TRUE, ), 'alternate' => array( 'type' => 'pdo', 'connection' => array( /** * The following options are available for PDO: * * string dsn * string username * string password * boolean persistent * string identifier */ 'dsn' => 'mysql:host=localhost;dbname=kohana', 'username' => 'root', 'password' => 'r00tdb', 'persistent' => FALSE, ), 'table_prefix' => '', 'charset' => 'utf8', 'caching' => FALSE, 'profiling' => TRUE, ), 'pgsqltest' => array( 'type' => 'pdo', 'connection' => array( /** * The following options are available for PDO: * * string dsn * string username * string password * boolean persistent * string identifier */ 'dsn' => 'mysql:host=localhost;dbname=pgsqltest', 'username' => 'postgres', 'password' => 'dev1234', 'persistent' => FALSE, ), 'table_prefix' => '', 'charset' => 'utf8', 'caching' => FALSE, 'profiling' => TRUE, ), ); And here is the code to create the database instance, create a query and execute the query: $pgsqltest_db = Database::instance('pgsqltest'); $query = DB::query(Database::SELECT, 'SELECT * FROM test')->execute(); I'm continuing to research a solution for this error but thought I'd ask to see if someone else has already found a solution. Any ideas are welcome. One other note is that I know my build of PHP can access this postgresql db since I'm able to manage the db using phpPgAdmin. But I have yet to determine what phpPgAdmin is doing differently to connect to the db than what Kohana 3 is attempting. Bart

    Read the article

  • Clear/Remove JavaScript Event Handler

    - by Jordan Terrell
    Greetings all - Given the following HTML fragment: <form id="aspnetForm" onsubmit="alert('On Submit Run!'); return true;"> I need to remove/clear the handler for the onsubmit event and register my own using jQuery or any other flavor of JavaScript usage. Anyone know how to do this? Thanks - Jordan

    Read the article

  • Open source iPhone components? Reusable views, controllers, buttons, table cells, etc?

    - by Ian Terrell
    Are there any repositories around for open sourced iPhone components? For instance, I have found myself needing to create several new types of table cells to mimic some of Apple's existing functionality (for instance, all the different types of table cells present in the Settings application). I can't imagine I'm alone here. Where do you go to find open sourced reusable components, or do you just write and hoard your own? Update: I know there are open source full projects around (see this question), but rummaging through them and picking and choosing still leads to significant duplication of effort. Update 2: Here are some libraries that I've found (or have come into existence) since asking this question: Three20 -- Custom UI classes used in the Facebook application CocoaHelpers -- Extensions to common classes MBProgressHUD -- Replacement for the undocumented UIProgressHUD

    Read the article

  • Exception when ASP.NET attempts to delete network file.

    - by Jordan Terrell
    Greetings - I've got an ASP.NET application that is trying to delete a file on a network share. The ASP.NET application's worker process is running under a domain account (confirmed this by looking in TaskManager and by using ShowContexts2.aspx¹). I've been assured by the network admins that the process account is a member of a group that has Modify permissions to the directory that contains the file I'm trying to delete. However, it is unable to do so, and instead I get an exception (changed the file path to all x's): System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. --- System.UnauthorizedAccessException: Access to the path '\xxxxxxx\xxxxxxx\xxxxxxx\xxxxxx.xxx' is denied. Any ideas on how to diagnose/fix this issue? Thanks - Jordan ¹ http://www.leastprivilege.com/ShowContextsNET20Version.aspx

    Read the article

  • Different ways to query this search in SQL?

    - by Bart Terrell
    I am teaching myself MS-SQL and I am trying to find different ways to find the Count of Paid and Unpaid Claims for 2012 grouped by Region from these 3 tables. If there is a returned date, the claim is unpaid if the returned date is null then the claim is paid. I will attach the code I have ran, but I am not sure if there are better ways to do it. Thanks. Here is the code: SET dateformat ymd; CREATE TABLE Claims ( ClaimID INT, SubID INT, [Claim Date] DATETIME ); CREATE TABLE Phoneship ( ClaimID INT, [Shipping Number] INT, [Claim Date] DATETIME, [Ship Date] DATETIME, [Returned Date] DATETIME ); CREATE TABLE Enrollment ( SubID INT, Enrollment_Date DATETIME, Channel NVARCHAR(255), Region NVARCHAR(255), Status FLOAT, Drop_Date DATETIME ); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (102, 201, '2011-10-13 00:00:00', '2011-10-14 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (103, 202, '2011-11-02 00:00:00', '2011-11-03 00:00:00', '2011-11-20 00:00:00'); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (103, 203, '2011-11-02 00:00:00', '2011-11-22 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (105, 204, '2012-01-16 00:00:00', '2012-01-17 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (106, 205, '2012-02-15 00:00:00', '2012-02-16 00:00:00', '2012-02-26 00:00:00'); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (106, 206, '2012-02-15 00:00:00', '2012-02-27 00:00:00', '2012-03-06 00:00:00'); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (107, 207, '2012-03-12 00:00:00', '2012-03-13 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (108, 208, '2012-05-11 00:00:00', '2012-05-12 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (109, 209, '2012-05-13 00:00:00', '2012-05-14 00:00:00', '2012-05-28 00:00:00'); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (109, 210, '2012-05-13 00:00:00', '2012-05-30 00:00:00', NULL); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (101, 12345678, '2011-03-06 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (102, 12347190, '2011-10-13 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (103, 12348723, '2011-11-02 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (104, 12349745, '2011-11-09 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (105, 12347190, '2012-01-16 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (106, 12349234, '2012-02-15 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (107, 12350767, '2012-03-12 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (108, 12350256, '2012-05-11 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (109, 12347701, '2012-05-13 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (110, 12350256, '2012-05-15 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (111, 12350767, '2012-06-30 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12345678, '2011-01-05 00:00:00', 'Retail', 'Southeast', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12346178, '2011-03-13 00:00:00', 'Indirect Dealers', 'West', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12346679, '2011-05-19 00:00:00', 'Indirect Dealers', 'Southeast', 0, '2012-03-15 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12347190, '2011-07-25 00:00:00', 'Retail', 'Northeast', 0, '2012-05-21 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12347701, '2011-08-14 00:00:00', 'Indirect Dealers', 'West', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12348212, '2011-09-30 00:00:00', 'Retail', 'West', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12348723, '2011-10-20 00:00:00', 'Retail', 'Southeast', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12349234, '2012-01-06 00:00:00', 'Indirect Dealers', 'West', 0, '2012-02-14 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12349745, '2012-01-26 00:00:00', 'Retail', 'Northeast', 0, '2012-04-15 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12350256, '2012-02-11 00:00:00', 'Retail', 'Southeast', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12350767, '2012-03-02 00:00:00', 'Indirect Dealers', 'West', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12351278, '2012-04-18 00:00:00', 'Retail', 'Midwest', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12351789, '2012-05-08 00:00:00', 'Indirect Dealers', 'West', 0, '2012-07-04 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12352300, '2012-06-24 00:00:00', 'Retail', 'Midwest', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12352811, '2012-06-25 00:00:00', 'Retail', 'Southeast', 1, NULL); And Query1 SELECT Count(ClaimID) AS 'Paid Claim', (SELECT Count(ClaimID) FROM dbo.phoneship WHERE [returned date] IS NOT NULL) AS 'Unpaid Claim' FROM dbo.Phoneship WHERE [Returned Date] IS NULL GROUP BY claimid Query2 SELECT Count(*) AS 'Paid Claims', (SELECT Count(*) FROM dbo.Phoneship WHERE [Returned Date] IS NOT NULL) AS 'Unpaid Claims' FROM dbo.Phoneship WHERE [Returned Date] IS NULL; Query3 Select Distinct(C.[Shipping Number]), Count(C.ClaimID) AS 'COUNT ClaimID', A.Region, A.SubID From dbo.HSEnrollment A Inner Join dbo.Claims B On A.SubId = B.SubId Inner Join dbo.Phoneship C On B.ClaimID = C.ClaimID Where C.[Returned Date] IS NULL Group By A.Region, A.Subid, C.ClaimID, C.[Shipping Number] Order By A.Region

    Read the article

  • UITableView with dynamic cell heights -- what do I need to do to fix scrolling down?

    - by Ian Terrell
    I am building a teensy tiny little Twitter client on the iPhone. Naturally, I'm displaying the tweets in a UITableView, and they are of course of varying lengths. I'm dynamically changing the height of the cell based on the text quite fine: - (CGFloat)heightForTweetCellWithString:(NSString *)text { CGFloat height = Buffer + [text sizeWithFont:Font constrainedToSize:Size lineBreakMode:LineBreakMode].height; return MAX(height, MinHeight); } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *text = // get tweet text for this indexpath return [self heightForTweetCellWithString:text]; } } I'm displaying the actual tweet cell using the algorithm in the PragProg book: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"TweetCell"; TweetCell *cell = (TweetCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [self createNewTweetCellFromNib]; } cell.tweet.text = // tweet text // set other labels, etc return cell; } When I boot up, all the tweets visible display just fine. However, when I scroll down, the tweets below are quite mussed up -- it appears that once a cell has scrolled off the screen, the cell height for the one above it gets resized to be larger than it should be, and obscures part of the cell below it. When the cell reaches the top of the view, it resets itself and renders properly. Scrolling up presents no difficulties. Here is a video that shows this in action: http://screencast.com/t/rqwD9tpdltd I've tried quite a bit already: resizing the cell's frame on creation, using different identifiers for cells with different heights (i.e. [NSString stringWithFormat:@"Identifier%d", rowHeight]), changing properties in Interface Builder... If there are additional code snippets I can post, please let me know. Thanks in advance for your help!

    Read the article

  • How do you extend a Ruby module with macro-like metaprogramming methods?

    - by Ian Terrell
    Consider the following extension (the pattern popularized by several Rails plugins over the years): module Extension def self.included(recipient) recipient.extend ClassMethods recipient.class_eval { include InstanceMethods } end module ClassMethods def macro_method puts "Called macro_method within #{self.name}" end end module InstanceMethods def instance_method puts "Called instance_method within #{self.object_id}" end end end If you wished to expose this to every class, you can do the following: Object.send :include, Extension Now you can define any class and use the macro method: class FooClass macro_method end #=> Called macro_method within FooClass And instances can use the instance methods: FooClass.new.instance_method #=> Called instance_method within 2148182320 But even though Module.is_a?(Object), you cannot use the macro method in a module: module FooModule macro_method end #=> undefined local variable or method `macro_method' for FooModule:Module (NameError) This is true even if you explicitly include the original Extension into Module with Module.send(:include, Extension). How do you add macro like methods to Ruby modules?

    Read the article

  • In WPF, Selecting ItemContainerStyle based on data bound content

    - by Bart Roozendaal
    In #WPF you have ItemTemplateSelectors. But, can you also select an ItemContainerStyle based on the datatype of a bound object? I am databinding a scatterview. I want to set some properties of the generated ScatterViewItems based on the object in their DataContext. A mechanism similar to ItemTemplateSelector for styles would be great. Is that at all possible? I am now binding to properties in the objects that I am displaying to get the effect, but that feels like overhead and too complex (and most importantly, something that our XU designers can't do by themselves). This is the XAML that I am using now. Your help is greatly appreciated. <s:ScatterView x:Name="topicsViewer"> <s:ScatterView.ItemTemplateSelector> <local:TopicViewerDataTemplateSelector> <DataTemplate DataType="{x:Type mvc:S7VideoTopic}"> <Grid> <ContentPresenter Content="{Binding MediaElement}" /> <s:SurfaceButton Visibility="{Binding MailToVisible}" x:Name="mailto" Tag="{Binding Titel}" Click="mailto_Click" HorizontalAlignment="Right" VerticalAlignment="Top" Background="Transparent" Width="62" Height="36"> <Image Source="/Resources/MailTo.png" /> </s:SurfaceButton> <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Center" Height="32"> <s:SurfaceButton Tag="{Binding MediaElement}" x:Name="btnPlay" Click="btnPlay_Click"> <Image Source="/Resources/control_play.png" /> </s:SurfaceButton> <s:SurfaceButton Tag="{Binding MediaElement}" x:Name="btnPause" Click="btnPause_Click"> <Image Source="/Resources/control_pause.png" /> </s:SurfaceButton> <s:SurfaceButton Tag="{Binding MediaElement}" x:Name="btnStop" Click="btnStop_Click"> <Image Source="/Resources/control_stop.png" /> </s:SurfaceButton> </StackPanel> </Grid> </DataTemplate> <DataTemplate DataType="{x:Type mvc:S7ImageTopic}"> <Grid> <ContentPresenter Content="{Binding Resource}" /> <s:SurfaceButton Visibility="{Binding MailToVisible}" x:Name="mailto" Tag="{Binding Titel}" Click="mailto_Click" HorizontalAlignment="Right" VerticalAlignment="Top" Background="Transparent" Width="62" Height="36"> <Image Source="/Resources/MailTo.png" /> </s:SurfaceButton> </Grid> </DataTemplate> <DataTemplate DataType="{x:Type local:Kassa}"> <ContentPresenter Content="{Binding}" Width="300" Height="355" /> </DataTemplate> </local:TopicViewerDataTemplateSelector> </s:ScatterView.ItemTemplateSelector> <s:ScatterView.ItemContainerStyle> <Style TargetType="s:ScatterViewItem"> <Setter Property="MinWidth" Value="200" /> <Setter Property="MinHeight" Value="150" /> <Setter Property="MaxWidth" Value="800" /> <Setter Property="MaxHeight" Value="700" /> <Setter Property="Width" Value="{Binding DefaultWidth}" /> <Setter Property="Height" Value="{Binding DefaultHeight}" /> <Setter Property="s:ScatterViewItem.CanMove" Value="{Binding CanMove}" /> <Setter Property="s:ScatterViewItem.CanScale" Value="{Binding CanScale}" /> <Setter Property="s:ScatterViewItem.CanRotate" Value="{Binding CanRotate}" /> <Setter Property="Background" Value="Transparent" /> </Style> </s:ScatterView.ItemContainerStyle> </s:ScatterView> Bart Roozendaal, Sevensteps

    Read the article

  • How to resize image to fit UITableView cell?

    - by stefanB
    How to fit UIImage into the cell of UITableView, UITableViewCell (?). Do you addSubview to cell or is there a way to resize cell.image or the UIImage before it is assigned to cell.image ? I want to keep the cell size default (whatever it is when you init with zero rectangle) and would like to add icon like pictures to each entry. Images are slightly bigger than the cell size (table row size). I think the code looks like this (from top of my head): UIImage * image = [[UIImage alloc] imageWithName:@"bart.jpg"]; cell = ... dequeue cell in UITableView data source (UITableViewController ...) cell.text = @"bart"; cell.image = image; What do I need to do to resize the image to fit the cell size? I've seen something like: UIImageView * iview = [[UIImageView alloc] initWithImage:image]; iview.frame = CGRectMake(...); // or something similar [cell.contentView addSubview:iview] The above will add image to cell and I can calculate the size to fit it, however: I'm not sure if there is a better way, isn't it too much overhead to add UIImageView just to resize the cell.image ? Now my label (cell.text) needs to be moved as it is obscured by image, I've seen a solution where you just add the text as a label: Example: UILabel * text = [[UILable alloc] init]; text.text = @"bart"; [cell.contentView addSubview:iview]; [cell.contentView addSubview:label]; // not sure if this will position the text next to the label // edited original example had [cell addSubview:label], maybe that's the problem Could someone point me in correct direction? EDIT: Doh [cell.contentview addSubview:view] not [cell addSubview:view] maybe I'm supposed to look at this: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = ...; CGRect frame = cell.contentView.bounds; UILabel *myLabel = [[UILabel alloc] initWithFrame:frame]; myLabel.text = ...; [cell.contentView addSubview:myLabel]; [myLabel release]; }

    Read the article

  • Solaris Tech Day mit Engineering 3.12. Frankfurt

    - by Franz Haberhauer
    Am Dienstag, den 3. Dezember 2013 haben wir den Chef des Solaris Engineering Markus Flierl mit einigen seiner Engineers und Joost Pronk vom Produkt Management zu Gast in unserer Geschäftstelle in Dreieich (Frankfurt). Wir nutzen diese Gelegenheit, Ihnen bei einem Solaris Tech Day direkt von der Quelle tiefe Einblicke in Solaris-Technologien zu geben: Agenda Time Session Speaker 09:00 Registration and Breakfast 09:45 Oracle Solaris - Strategy, Engineering Insights, Roadmap, and a Glimpse on Solaris in Oracle's IT Markus Flierl 11:15 Coffee 11:35 Oracle Solaris 11.1: The Best Platform for Oracle - The Technologies Behind the Scenes Bart Smaalders 12:35 Lunch 13:25 Solaris Security: Reduce Risk , Deliver Secure Services, and Monitor Compliance Darren Moffat 14:10 Solaris 11 Provisioning and SMF - Insights from the Lead Engineers Bart Smaalders & Liane Praza 14:55 Solaris Data Management - ZFS, NFS, dNFS, ASM, and OISP Integration with the Oracle DB Darren Moffat 15:25 Coffee 15:45 Solaris 10 Patches and Solaris SRUs - News and Best Practices Gerry Haskins 16:30 Cloud Formation: Implementing IaaS in Practice with Oracle Solaris Joost Pronk 17:00 Q&A panel - All presenters and Solaris engineers Bitte registrieren Sie sich hier, um sich einen Platz bei dieser außergewöhnlichen Veranstaltung zu sichern. Es lohnt sich übrigens auch mal in die Blogs von  Markus Flierl mit einem interessanten Beitrag zu Eindrücken und Ausblicken von der Oracle Open World 2013 oder den von  Darren Moffat zu schauen. Gerry Haskins schreibt als Director Solaris Lifecycle Engineering gleich in zwei Blogs - der Patch Corner mit Schwerpunkt Solaris 10 und dem Solaris 11 Maintenance Lifecycle. Bereits in der kommenden Woche findet in Nürnberg die DOAG 2013 Konferenz und Ausstellung mit einem breiten Spektrum an Vorträgen rund um Solaris statt - insbesondere auch mit vielen Erfahrungsberichten aus der Praxis.

    Read the article

  • Microsoft Dev Days &ndash; Johannesburg 2010

    - by MarkPearl
    So I am half way through dev days in Johannesburg. It has been quite an interesting day… Maybe it is me, but this year it hasn’t been as OMG as at previous conferences. A few things that stood out though… 1) This is the first time I have had to queue in a line to use the gents toilets before – yes, a true sign that we are at a typically male dominated industry event in this country – the men’s toilets were jam packed – the ladies if there were any there didn’t have a problem. 2) Bart De Smet presentation still rocks – I am a fan of Bart’s and once again his presentation was great. Something that I am going to look into in more depth which I think is a new feature in .Net is called Code Contracts. 3) I have got to get into Silverlight more… I have known this for a long time and have dabbled in it for a while, but Silverlight in my opinion will become the main platform for “hosting” applications. So… 3 things so far, hopefully I get some OMG’s from the rest of the day…

    Read the article

  • Welcome to Jackstown

    - by fatherjack
    I live in a small town, the population count isn't that great but let me introduce you to some of the population. We'll start with Martin the Doc, he fixes up anything that gets poorly, so much so that he could be classed as the doctor, the vet and even the garage mechanic. He's got a reputation that he can fix anything and that hasn't been proved wrong yet. He's great friends with Brian (who gets called "Brains") the teacher who seems to have a sound understanding of any topic you care to pass his way. If he isn't sure he tells you and then goes to find out and comes back with a full answer real quick. Its good to have that sort of research capability close at hand. Brains is also great at encouraging anyone who needs a bit of support to get them up to speed and working on their jobs. Steve sees Brains regularly, that's because he is the librarian, he keeps all sorts of reading material and nowadays there's even video to watch about any topic you like. Steve keeps scouring all sorts of places to get the content that's needed and he keeps it in good order so that what ever is needed can be found quickly. He also has to make sure that old stuff gets marked as probably out of date so that anyone reading it wont get mislead. Over the road from him is Greg, he's the town crier. We don't have a newspaper here so Greg keeps us all informed of what's going on "out of town" - what new stuff we might make use of and what wont work in a small place like this. If we are interested he goes ahead and gets people in to demonstrate their products  and tell us about the details. Greg is pretty good at getting us discounts too. Now Greg's brother Ian works for the mayors office in the "waste management department" nowadays its all about the recycling but he still has to make sure that the stuff that cant be used any more gets disposed of properly. It depends on the type of waste he's dealing with that decides how it need to be treated and he has to know a lot about the different methods and when to use which ones. There are two people that keep the peace in town, Brent is the detective, investigating wrong doings and applying justice where necessary and Bart is the diplomat who smooths things over when any people have a dispute or disagreement. Brent is meticulous in his investigations and fair in the way he handles any situation he finds. Discretion is his byword. There's a rumour that Bart used to work for the United Nations but what ever his history there is no denying his ability to get apparently irreconcilable parties working together to their combined benefit. Someone who works closely with Bart is Brad, he is the translator in town. He has several languages that he can converse in but he can also explain things from someone's point of view or  and make it understandable to someone else. To keep things on the straight and narrow from a legal perspective is Ben the solicitor, making sure we all abide by the rules.Two people who make for an interesting evening's conversation if you get them together are Aaron and Grant, Aaron is the local planning inspector and Grant is an inventor of some reputation. Anything being constructed around here needs Aarons agreement. He's quite flexible in his rules though; if you can justify what you want to do with solid logic but he wont stand for any development going on without his inclusion. That gets a demolition notice and there's no argument. Grant as I mentioned is the inventor in town, if something can be improved or created then Grant is your man. He mainly works on his own but isnt averse to getting specific advice and assistance from specialist from out of town if they can help him finish his creations.There aren't too many people left for you to meet in the town, there's Rob, he's an ex professional sportsman. He played Hockey, Football, Cricket, you name it. He was in his element as goal keeper / wicket keeper and that shows in his personal life. He just goes about his business and people often don't even know that he's helped them. Really low profile, doesn't get any glory but saves people from lots of problems, even disasters on occasion. There goes Neil, he's a bit of an odd person, some people say he's gifted with special clairvoyant powers, personally I think he's got his ear to the ground and knows where to find out the important news as soon as its made public. Anyone getting a visit from Neil is best off to follow his advice though, he's usually spot on and you wont be caught by surprise if you follow his recommendations – wherever it comes from.Poor old Andrew is the last person to introduce you to. Andrew doesn't show himself too often but when he does it seems that people find a reason to blame him for their problems, whether he had anything to do with their predicament or not. In all honesty, without fail, and to his great credit, he takes it in good grace and never retaliates or gets annoyed when he's out and about.  It pays off too as its very often the case that those who were blaming him recently suddenly find they need his help and they readily forget the issues pretty rapidly.And then there's me, what do I do in town? Well, I'm just a DBA with a lot of hats. (Jackstown Pop. 1)

    Read the article

  • Some notes on Reflector 7

    - by CliveT
    Both Bart and I have blogged about some of the changes that we (and other members of the team) have made to .NET Reflector for version 7, including the new tabbed browsing model, the inclusion of Jason Haley's PowerCommands add-in and some improvements to decompilation such as handling iterator blocks. The intention of this blog post is to cover all of the main new features in one place, and to describe the three new editions of .NET Reflector 7. If you'd simply like to try out the latest version of the beta for yourself you can do so here. Three new editions .NET Reflector 7 will come in three new editions: .NET Reflector .NET Reflector VS .NET Reflector VSPro The first edition is just the standalone Windows application. The latter two editions include the Windows application, but also add the power of Reflector into Visual Studio so that you can save time switching tools and quickly get to the bottom of a debugging issue that involves third-party code. Let's take a look at some of the new features in each edition. Tabbed browsing .NET Reflector now has a tabbed browsing model, in which the individual tabs have independent histories. You can open a new tab to view the selected object by using CTRL+CLICK. I've found this really useful when I'm investigating a particular piece of code but then want to focus on some other methods that I find along the way. For version 7, we wanted to implement the basic idea of tabs to see whether it is something that users will find helpful. If it is something that enhances productivity, we will add more tab-based features in a future version. PowerCommands add-in We have also included Jason Haley's PowerCommands add-in as part of version 7. This add-in provides a number of useful commands, including support for opening .xap files and extracting the constituent assemblies, and a query editor that allows C# queries to be written and executed against the Reflector object model . All of the PowerCommands features can be turned on from the options menu. We will be really interested to see what people are finding useful for further integration into the main tool in the future. My personal favourite part of the PowerCommands add-in is the query editor. You can set up as many of your own queries as you like, but we provide 25 to get you started. These do useful things like listing all extension methods in a given assembly, and displaying other lower-level information, such as the number of times that a given method uses the box IL instruction. These queries can be extracted and then executed from the 'Run Query' context menu within the assembly explorer. Moreover, the queries can be loaded, modified, and saved using the built-in editor, allowing very specific user customization and sharing of queries. The PowerCommands add-in contains many other useful utilities. For example, you can open an item using an external application, work with enumeration bit flags, or generate assembly binding redirect files. You can see Bart's earlier post for a more complete list. .NET Reflector VS .NET Reflector VS adds a brand new Reflector object browser into Visual Studio to save you time opening .NET Reflector separately and browsing for an object. A 'Decompile and Explore' option is also added to the context menu of references in the Solution Explorer, so you don't need to leave Visual Studio to look through decompiled code. We've also added some simple navigation features to allow you to move through the decompiled code as quickly and easily as you can in .NET Reflector. When this is selected, the add-in decompiles the given assembly, Once the decompilation has finished, a clone of the Reflector assembly explorer can be used inside Visual Studio. When Reflector generates the source code, it records the location information. You can therefore navigate from the source file to other decompiled source using the 'Go To Definition' context menu item. This then takes you to the definition in another decompiled assembly. .NET Reflector VSPro .NET Reflector VSPro builds on the features in .NET Reflector VS to add the ability to debug any source code you decompile. When you decompile with .NET Reflector VSPro, a matching .pdb is generated, so you can use Visual Studio to debug the source code as if it were part of the project. You can now use all the standard debugging techniques that you are used to in the Visual Studio debugger, and step through decompiled code as if it were your own. Again, you can select assemblies for decompilation. They are then decompiled. And then you can debug as if they were one of your own source code files. The future of .NET Reflector As I have mentioned throughout this post, most of the new features in version 7 are exploratory steps and we will be watching feedback closely. Although we don't want to speculate now about any other new features or bugs that will or won't be fixed in the next few versions of .NET Reflector, Bart has mentioned in a previous post that there are lots of improvements we intend to make. We plan to do this with great care and without taking anything away from the simplicity of the core product. User experience is something that we pride ourselves on at Red Gate, and it is clear that Reflector is still a long way off our usual standards. We plan for the next few versions of Reflector to be worked on by some of our top usability specialists who have been involved with our other market-leading products such as the ANTS Profilers and SQL Compare. I re-iterate the need for the really great simple mode in .NET Reflector to remain intact regardless of any other improvements we are planning to make. I really hope that you enjoy using some of the new features in version 7 and that Reflector continues to be your favourite .NET development tool for a long time to come.

    Read the article

  • Strange permission errors in new PostgreSQL installation

    - by Bart van Heukelom
    A freshly installed PostgreSQL (with configuration overwritten) won't start: $ sudo service postgresql start * Starting PostgreSQL 9.1 database server * Error: could not read /etc/postgresql/9.1/main/postgresql.conf: Permission denied Looks like it should be able to read it though: $ ls -l postgresql.conf -rw------- 1 postgres postgres 19450 2012-06-14 10:07 postgresql.conf But fine, I'll add chmod +r it to test if that works. $ sudo chmod +r postgresql.conf $ sudo service postgresql start * Starting PostgreSQL 9.1 database server * The PostgreSQL server failed to start. Please check the log output: Error: Could not open log file /var/log/postgresql/postgresql-9.1-main.log Huh? $ ls -l /var/log/postgresql/ total 4 -rw-r----- 1 postgres adm 827 2012-06-14 10:07 postgresql-9.1-main.log I don't get it. What can be wrong here? This used to work before. Can I maybe monitor what process attempts to open the file? It's Ubuntu 11.10 on EC2, using Chef. For completeness, here's the recipe: # Install PostgreSQL package "postgresql-9.1" # Stop server service "postgresql" do action :stop end # Overwrite configuration (setting data dir) template "/etc/postgresql/9.1/main/postgresql.conf" do source "postgresql-conf.erb" owner "postgres" group "postgres" end # Start server service "postgresql" do action :start end

    Read the article

  • osx split external hard drive partition

    - by Bart
    Hi, I currently have a 640GB external HD that has 1 partition formatted as HSF+ Now I want to split some of the free space into a new FAT32 partition, without having to reformat the whole HD and losing all my data. I read that I'm supposed to be able to add new partitions in the Hard Disc Utility by clicking the "+" sign, without any loss of data. But in my case the "+" is not clickable and it says that this partition cannot be altered. Can anyone tell me how to proceed. Or is it impossible without reformatting the whole disc? Thanks ps: I'm running osx snow leopard 10.6.6

    Read the article

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