Search Results

Search found 803 results on 33 pages for 'greg arcara'.

Page 27/33 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • How do you programmatically set a Style on a View?

    - by Greg
    I would like to do something like this: <Button android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_cotent" style="@style/SubmitButtonType" /> But in code The xml approach works fine provided that SubmitButtonType is defined. Now what I assume happens is that the appt parser runs through this xml, generates an AttributeSet. That AttributeSet when passed to context/theme#obtainStyledAttributes() will have the style ref mask anything that is not written inline in this tag. Great that's fine! Now how do we do this programmatically. Button, as well as other View types, has a constructor that has the form: <Widget>(Context context, AttributeSet set, int defStyle). So I thought this would work. Button button = new Button(context, null, R.style.SubmitButtonType); However, I am finding that defStyle is badly documented as it really should be written to be a resourceId to an attribute (from R.attrs) that will be passed to obtainStyledAttributes() as the attribute resource, and not the style resource. After looking at the code, all the view implementations seem to pass 0 as the styleRef. I don't see the harm in having it passed as both the attr and the style resource (more flexible and negligible overhead) However I might be approaching this all wrong. How do you do this in code then other than by setting each individual element of the style to the specific widget you want to style (only possible by looking a the code to see what param maps to which method or set of methods). The only way I have found to do this is: <declare-styleable> <attr name="totallyAdhoc_attribute_just_for_this_case" format="reference"> </declare-styleable> <style name="MyAlreadyExistantTheme" > ... ... <item name="totallyAdhoc_attribute_just_for_this_case">@style/SubmitButtonType</item> </style> And instead of passing R.style.SubmitButtonType as defStyle, I pass the new R.attr.totallyAdhoc_attribute_just_for_this_case. Button button = new Button(context, null, R.attr.totallyAdhoc_attribute_just_for_this_case); This works but sounds way too complicated.

    Read the article

  • How to build a SQL statement when any combination of user input to the table is possible?

    - by Greg McNulty
    Example: the user fills in everything but the product name. I need to search on what is supplied, so in this case everything but productName= This example could be for any combination of input. Is there a way to do this? Thanks. $name = $_POST['n']; $cat = $_POST['c']; $price = $_POST['p']; if( !($name) ) { $name = some character to select all? } $sql = "SELECT * FROM products WHERE productCategory='$cat' and productName='$name' and productPrice='$price' "; EDIT Solution does not have to protect from attacks. Specifically looking at the dynamic part of it.

    Read the article

  • Giving proper credit to a projects contributors

    - by Greg B
    I've recently been working with an opensource library for a commercial product. The opensource code is distributed from the website of the company who sells the proprietary product as a zip file. The library is a (direct) port to C# of the original library which is in Java. As such, it uses methods instead of getter/setter properties. The code contains copyright notices to the supplier of the product. The C# port was originally provided to the company by a 3rd party individual. I have modified the source to be more C# like and added a couple of small features. I want to put my version of the code out there (Google code or where ever) so that C# users of the software can benefit from a more native feeling library. How can I and/or how should I amend the copyright notice to give proper credit to The comercial owner of the original source The guy who provided the original C# port Myself and anyone else who contributes to the project in the future The source is provided under the LGPL V2.1,

    Read the article

  • Passing arguments to scope_procedure in searchlogic

    - by Greg
    I'd like to use searchlogic's scope_procedure feature like so class MyModelObject < ActiveRecord::Base scope_procedure :my_scope_proc, lambda { |p1, p2| { :conditions => "p1 >= #{p1} AND p2 < #{p2}" }} end Then, I am doing the search: scope = MyModelObject.search(:my_scope_proc => true) scope.all The above code obviously doesn't work because I didn't pass p1 and p2 parameters to my named scope. I can't figure out how to pass parameters to the named scope.

    Read the article

  • access EF classes from a Class Library - exactly how do configure/test the connection string in the

    - by Greg
    Hi, I'm getting very confused about how to call my EF classes in a Class Library from the Client Project I have? Things worked fine when they were in the same project. Now I'm getting errors such as "Unable to load the specified metadata resource ". I've see various ideas / suggestions re how to fix the connection string (e.g. create an App.config in your client project & copy the connection string config from your class library, something about change the connection settings to copy to output, etc) QUESTION - Can someone provide a solid way on how to get EF class access from a separate project working? (i.e. how to get the correct connection information to the client somehow) thanks

    Read the article

  • MySQL: How to pull information from multiple tables based on information in other tables?

    - by Greg
    Ok, I have 5 tables which I need to pull information from based on one variable. gameinfo id | name | platforminfoid gamerinfo id | name | contact | tag platforminfo id | name | abbreviation rosterinfo id | name | gameinfoid rosters id | gamerinfoid | rosterinfoid The 1 variable would be gamerinfo.id, which would then pull all relevant data from gamerinfo, which would pull all relevant data from rosters, which would pull all relevant data from rosterinfo, which would pull all relevant data from gameinfo, which would then pull all relevant data from platforminfo. Basically it breaks down like this: gamerinfo contains the gamers basic information. rosterinfo contains basic information about the rosters (ie name and the game the roster is aimed towards) rosters contains the actual link from the gamer to the different rosters (gamers can be on multiple rosters) gameinfo contains basic information about the games (ie name and platform) platform info contains information about the different platforms the games are played on (it is possible for a game to be played on multiple platforms) I am pretty new to SQL queries involving JOINs and UNIONs and such, usually I would just break it up into multiple queries but I thought there has to be a better way, so after looking around the net, I couldn't find (or maybe I just couldn't understand what I was looking at) what I was looking for. If anyone can point me in the right direction I would be most grateful.

    Read the article

  • Trim Cells using VBA in Excel

    - by Greg Reynolds
    I have what seems like a simple problem with some data in Excel. I have a lot of data with leading spaces pasted from a web table, and I would like to get rid of the initial space. I cribbed the following code (I am completely new to VBA), but it doesn't seem to work. When I step through it in the debugger it looks like an infinite loop. Any help would be appreciated! Sub DoTrim() For Each cell In Selection.Cells If cell.HasFormula = False Then cell = Trim(cell) End If Next End Sub

    Read the article

  • jQuery - How to Use slideDown (or show) function on a table row?

    - by Greg
    I'm trying to add a row to a table and have that row slide into view, however the slidedown function seems to be adding a display:block style to the table row which messes up the layout. Any ideas how to work around this? Here's the code: $.get('/some_url',{'val1':id}, function(data){ var row = $('#detailed_edit_row'); row.hide(); row.html(data); row.slideDown(1000); });

    Read the article

  • What do I need to develop an Iron Python web app in Visual Studio 2010

    - by Greg
    Hi, I've got Visual Studio 2010. To develop a web app in Iron Python (i.e. to use a Ruby like language not C#) what downloads to I need? e.g. is the DLR already in VS2010, Iron Python itself Once setup would I actually be still developing an ASP.net MVC web app but just using Ruby for the language, or is the model something different to this? thanks

    Read the article

  • Is ASP.net MVC a direct copy of Ruby on Rails concepts?

    - by Greg
    Hi, I'm been developing Ruby on Rails previously. I'm now looking at an ASP.net web app and I'm looking at WebForms and MVC. As I look at MVC it feels as if I'm looking at the result of something a Ruby on Rails developer implemented after being forced to work in MS land. So I'm wondering: Was MVC more or less taken directly from Ruby on Rails and it's concepts? (either intentionally or unintentionally)

    Read the article

  • Can I use Linq-to-xml to persist my object state without having to use/know Xpath & XSD Syntax?

    - by Greg
    Hi, Can I use Linq-to-xml to persist my object state without having to use/know Xpath & XSD Syntax? ie. really looking for simple but flexible way to persist a graph of object data (e.g. have say 2 or 3 classes with associations) - if Linq-to-xml were as simple as saying "persist this graph to XML", and then you could also query it via Linq, or load it into memory again/change/then re-save to the xml file.

    Read the article

  • Problems with i18n using django translation on App-Engine with Korean and Hindi

    - by Greg
    I've got a setup based on the post here, and it works perfectly. Adding more languages to the mix, it recognises them fine, except for Korean (ko) and Hindi (hi). Chinese/Japanese/Hebrew are all fine, so nothing to do with encodings/charsets I don't think. Taking a look into the django code inside the app-engine SDK, I notice that all the languages that I'm using except for ko and hi are ones that ship with django - in the default settings.py and inside the locale folder they are missing. If I copy one of the locale folders inside the /usr/local/google_appengine/lib/django[...]/conf/locale and rename it to be 'ko', then it starts working in my app, but I won't be able to replicate this modification when I deploy to app-engine, so need a bit of help understanding what I might be doing wrong. my settings.py is definitely being taken into account, as if I remove languages from there then they stop working (as they should). If I copied the django modules into my app, under 'lib' there say, could I use those instead of the ones app-engine tries to use, maybe? I'm brand new to python/django/app-engine, and developing on a Mac with Leopard, if that makes any difference. I have the latest app-engine SDK as of tuesday.

    Read the article

  • How can I link in both remote and local assets into a webview?

    - by Greg
    I'm loading HTML-formatted content into my app from a web service, then plugging that into a local HTML template that lives within the app. Now, I need to set the UIWebView's BaseURL to point at the remote server so that all relative image links will load. However, I'm also trying to link in some local assets (CSS, JavaScript). Thus far, I have not found any documentation on how to link in local assets without relying on the UIWebView's baseURL. I've tried injecting the absolute file path of my CSS and JS into my HTML template, but it hasn't worked... I don't know if that means that it doesn't work, or if I'm just doing it wrong. Has anyone ever run into this scenario, and if so, how did you address it? Thanks in advance, I really appreciate any tips!

    Read the article

  • c# - what approach can I use to extend a group of classes that include implemented methods? (see des

    - by Greg
    Hi, I want to create an extendible package I am writing that has Topology, Node & Relationship classes. The idea is these base classes would have the various methods in them necessary to base graph traversal methods etc. I would then like to be able to reuse this by extending the package. For example the base requirements might see Relationship with a parentNode & childNode. Topology would have a List of Nodes and List of Relationships. Topology would have methods like FindChildren(int depth). Then the usage would be to extend these such that additional attributes for Node and Relationships could be added etc. QUESTION - What would be the best approach to package & expose the base level classes/methods? (it's kind of like a custom collection but with multiple facets). Would the following concepts come into play: Interfaces - would this be a good idea to have ITopology, INode etc, or is this not required as the user would extend these classes anyway? Abstract Classes - would the base classes be abstract classes Custom Generic Collection - would some approach using this concept assist (but how would this work if there are the 3 different classes) thanks

    Read the article

  • iPhone - customizing WebKit

    - by Greg
    Hello, Apple has disabled the overflow CSS aspect in mobile Safari so it is not possible to scroll inside a fixed height div. This is quite annoying. While making an iPhone native app, is it possible to access WebKit settings to turn that feature on ?

    Read the article

  • iPhone: keep text looking good after scale transform applied?

    - by Greg Maletic
    I'm applying a scale transform to a UIView that draws a number. (The number is literally being drawn with drawInRect; no UILabel in sight.) The scale transform makes the view smaller by quite a bit...say, 80% smaller. The resulting number looks a little "chunky". Is there a way that I can keep my text looking nice and anti-aliased, the way it's supposed to look? Thanks.

    Read the article

  • Embedded CSS Media Queries Not Working

    - by Greg
    I am new to CSS media queries, and I was first trying to get pdf/mp3/mp4 buttons to get centered on this page whenever a mobile device is using it (http://www.mannachurch.org/portfolio-type/recycled-junk/). Keep in mind for that I am using a highly modified wordpress theme. So I tried experimenting to isolate this issue. However, I don't seem to have any control over using media queries and I can't even perform anything even on this simple HTML file: <!DOCTYPE html> <html> <head> <title>Title of the document</title> <style type="text/css"> body{background-color: blue;} @media only screen and (min-device-width : 599px) and (max-device-width : 600px) { body {background-color:black; } } </style> </head> <body> <p>This is an experiment<p/> </body> </html> What am I doing wrong?

    Read the article

  • How can I run some common code from both (a) scheduled via Windows Task & (b) manually from within W

    - by Greg
    Hi, QUESTION - How can I run some common code from both (a) scheduled via Windows Task & (b) manually from within WinForms app? BACKGROUND: This follows on from the http://stackoverflow.com/questions/2489999/how-can-i-schedule-tasks-in-a-winforms-app thread REQUIREMENTS C# .NETv3.5 project using VS2008 There is an existing function which I want to run both (a) manually from within the WinForms application, and (b) scheduled via Windows Task. APPROACHES So what I'm trying to understand is what options are there to make this work eg Is it possible for a windows task to trigger a function to run within a running/existing WinForms application? (doesn't sound solid I guess) Split code out into two projects and duplicate for both console application that the task manager would run AND code that the winforms app would run Create a common library and re-use this for both the above-mentioned projects in the bullet above Create a service with an interface that both the task manager can access plus the winforms app can manage Actually each of these approaches sounds quite messy/complex - would be really nice to drop back to have the code only once within the one project in VS2008, the only reason I ask about this is I need to have a scheduling function and the suggestion has been to use http://taskscheduler.codeplex.com/ as the means to do this, which takes the scheduling out of my VS2008 project... thanks

    Read the article

  • can I have an abstract base class with the key attribute being generic

    - by Greg
    Hi, I want to create a re-usable library. I was going to use extension methods however I run into some issues in some cases for the client to have to specify in the calling method the types. QUESTION - If I use an abstract base class as the basis, can I specify an attribute/property in the class to be generic (e.g. the key property might be an 'int' in one case, or a 'string' in another)?

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33  | Next Page >