Search Results

Search found 1667 results on 67 pages for 'andrew redd'.

Page 35/67 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • possible to have a background color transition from color A to color B without repeating a pixel sti

    - by Andrew Heath
    For things like menubars and headers, a background color is nice. But a background color that gracefully transitions from say Blue to White is even nicer. I know this can be done by making a 1-pixel wide, X-pixel tall image file containing the desired fade and repeating it across the div, but does CSS have native support to just define colors and be done with it? Can any other language handle this?

    Read the article

  • .net Globalization and ResourceManager

    - by Andrew Bullock
    I've got a console app and i need to globalize some of the hardcoded message strings. I've got two assemblies: MyProgram.Console (Console app) MyProgram.Core (class lib) In MyProgram.Core I've made a Language.en-GB.resx and set it as an Embedded Resource. In the resource I've created a key/value pair: "SomeKey" : "SomeValue" When I build my application I get: bin/MyProgram.Console.exe bin/MyProgram.Core.dll bin/en-BG/MyProgram.Core.resources.dll How do I address these resource key/values? Currently I'm trying this from a class within MyProgram.Core: var mgr = new ResourceManager(GetType().Assembly.GetName().Name, Assembly.GetExecutingAssembly()); mgr.GetString("SomeKey", new Culture("en-GB")); But I keep getting: System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "MyProgram.Core.resources" was correctly embedded or linked into assembly "MyProgram.Core" at compile time, or that all the satellite assemblies required are loadable and fully signed. What am I doing wrong? I've tried every combination I can think of for the baseName argument to the ResourceManagers ctor. Thanks

    Read the article

  • Marshal a list of objects from VB6 to C#

    - by Andrew
    I have a development which requires the passing of objects between a VB6 application and a C# class library. The objects are defined in the C# class library and are used as parameters for methods exposed by other classes in the same library. The objects all contain simple string/numeric properties and so marshaling has been relatively painless. We now have a requirement to pass an object which contains a list of other objects. If I was coding this in VB6 I might have a class containing a collection as a member variable. In C# I might have a class with a List member variable. Is it possible to construct a C# class in such a way that the VB6 application could populate this inner list and marshal it successfully? I don't have a lot of experience here but I would guess Id have to use an array of Object types.

    Read the article

  • How to display an HTML email for preview on a webpage?

    - by Andrew
    I am trying to display a "preview" of an HTML email. I have the HTML in my database and now I need to render it in an iframe, or popup window or something. I am trying to inject the html into a div tag on the page, but it won't display anything. Here is the problem I am running into (I have nested HTML tags): <html> <body> <h1>My page</h1> <div id="email-body"> <html> <body> <p>email</p> </body> </html> </div> </body> </html>

    Read the article

  • Trouble with detecting gestures over ListView

    - by Andrew
    I have an Activity that contains a ViewFlipper. The ViewFlipper includes 2 layouts, both of which are essentially just ListViews. So the idea here is that I have two lists and to navigate from one to the other I would use a horizontal swipe. I have that working. However, what ever list item your finger is on when the swipe begins executing, that item will also be long-clicked. Here is the relevant code I have: public class MyActivity extends Activity implements OnItemClickListener, OnClickListener { private static final int SWIPE_MIN_DISTANCE = 120; private static final int SWIPE_MAX_OFF_PATH = 250; private static final int SWIPE_THRESHOLD_VELOCITY = 200; private GestureDetector mGestureDetector; View.OnTouchListener mGestureListener; class MyGestureDetector extends SimpleOnGestureListener { @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { try { if (Math.abs(e1.getY() - e2.getY()) > SWIPE_MAX_OFF_PATH) return false; // right to left swipe if(e1.getX() - e2.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { if (mCurrentScreen != SCREEN_SECONDLIST) { mCurrentScreen = SCREEN_SECONDLIST; mFlipper.setInAnimation(inFromRightAnimation()); mFlipper.setOutAnimation(outToLeftAnimation()); mFlipper.showNext(); updateNavigationBar(); } } else if (e2.getX() - e1.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) { if (mCurrentScreen != SCREEN_FIRSTLIST) { mCurrentScreen = SCREEN_FIRSTLIST; mFlipper.setInAnimation(inFromLeftAnimation()); mFlipper.setOutAnimation(outToRightAnimation()); mFlipper.showPrevious(); updateNavigationBar(); } } } catch (Exception e) { // nothing } return true; } } @Override public boolean onTouchEvent(MotionEvent event) { if (mGestureDetector.onTouchEvent(event)) return true; else return false; } ViewFlipper mFlipper; private int mCurrentScreen = SCREEN_FIRSTLIST; private ListView mList1; private ListView mList2; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.layout_flipper); mFlipper = (ViewFlipper) findViewById(R.id.flipper); mGestureDetector = new GestureDetector(new MyGestureDetector()); mGestureListener = new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { if (mGestureDetector.onTouchEvent(event)) { return true; } return false; } }; // set up List1 screen mList1List = (ListView)findViewById(R.id.list1); mList1List.setOnItemClickListener(this); mList1List.setOnTouchListener(mGestureListener); // set up List2 screen mList2List = (ListView)findViewById(R.id.list2); mList2List.setOnItemClickListener(this); mList2List.setOnTouchListener(mGestureListener); } … } If I change the "return true;" statement from the GestureDetector to "return false;", I do not get long-clicks. Unfortunately, I get regular clicks. Does anyone know how I can get around this?

    Read the article

  • How to detect Java agents, JVMTI, etc...

    - by Andrew Westberg
    How does one secure the Java environment when running on a machine you don't control? What is to stop someone from creating a java agent or native JVMTI agent and dumping bytecode or re-writing classes to bypass licensing and/or other security checks? Is there any way to detect if any agents are running from Java code? From JNI? From a JVMTI agent?

    Read the article

  • Dependency Injection for objects that require parameters

    - by Andrew
    All of our reports are created from object graphs that are translated from our domain objects. To enable this, we have a Translator class for each report, and have been using Dependency Injection for passing in dependencies. This worked great, and would yield nice classes structured like this: public class CheckTranslator : ICheckTranslator { public CheckTranslator (IEmployeeService empSvc , IPaycheckService paySvc) { _empSvc = empSvc; _paySvc = paySvc; } public Check CreateCheck() { //do the translation... } } However, in some cases the mapping has many different grouping options. As a result, the c-tor would turn into a mix of class dependencies and parameters. public class CheckTranslator : ICheckTranslator { public CheckTranslator (IEmployeeService empSvc , IPaycheckService paySvc , bool doTranslateStubData , bool doAttachLogo) { _empSvc = empSvc; _paySvc = paySvc; _doTranslateStubData = doTranslateStubData; _doAttachLogo = doAttachLogo; } public Check CreateCheck() { //do the translation... } } Now, we can still test it, but it no longer really works with an IoC container, at least in a clean fashion. Plus, we can no longer call the CreateCheck twice if the settings are different for each check. While I recognize it's a problem, I don't necessarily see the right solution. It seems kind of strange to create a Factory for each class ... or is this the best way?

    Read the article

  • Delaying emails in PHP to avoid exceeding server limit

    - by Andrew P.
    Okay, so here's my problem: I have a list of members on a website, and periodically one of the admins my site (who are not very web or tech savvy) will send a newsletter to the memberlist. My current memberlist is well over 800 individuals long. So, I wrote an email script that sends the email to the full memberlist, with the members listed in the Bcc header. However, I've discovered that my host server has a limit of 300 emails per hour, which I apparently exceed even though the members are listed in the Bcc field. (I wasn't previously aware that the behaviour of Bcc was to send separate emails for each name on the list...) After some thought, I've come to the conclusion that my only solution is to have my script send only the email to only the first 300 emails, wait an hour, and send a second email to the next three hundred, wait another hour, and so on until I've sent the email to the whole member list. Looking around on the internet, I've seen some other solutions people have come up with for delaying emails in PHP. Sleep() is obviously not an option, because I can't just leave the script open and running for 3 or four hours. I've seen some people suggest cron jobs, but I'm not sure how feasible it would be to create three new cron jobs every time I send an email, use them once, and then delete them afterward. The final (and what I think is the smartest) solution I've seen, is to have a table in my database to temporarily store the emails to be delayed and sent later, and then create a cron job that checks this sql table every hour or so, compares the timestamp of the row to the current timestamp, and then sends the email if an hour has passed. So I'm asking you all which method you would recommend. Is there an easier solution that I've completely looked over (aside from getting a different hosting plan. ha!), or is there a cleaner way to do it than the database / cron job approach? tl;dr: I have 800 emails to send in an hour on a server that limits me to 300/hr. Using PHP, find a way to get around this problem in a way that the person sending the email needs only to click "send."

    Read the article

  • Random Pairings that don't Repeat

    - by Andrew Robinson
    This little project / problem came out of left field for me. Hoping someone can help me here. I have some rough ideas but I am sure (or at least I hope) a simple, fairly efficient solution exists. Thanks in advance.... pseudo code is fine. I generally work in .NET / C# if that sheds any light on your solution. Given: A pool of n individuals that will be meeting on a regular basis. I need to form pairs that have not previously meet. The pool of individuals will slowly change over time. For the purposes of pairing, (A & B) and (B & A) constitute the same pair. The history of previous pairings is maintained. For the purpose of the problem, assume an even number of individuals. For each meeting (collection of pairs) and individual will only pair up once. Is there an algorithm that will allow us to form these pairs? Ideally something better than just ordering the pairs in a random order, generating pairings and then checking against the history of previous pairings. In general, randomness within the pairing is ok.

    Read the article

  • Display/hide menu items depending on logged on user

    - by Andrew
    In my web app, I would like to show an "Admin" menu link only to users who have been added to the database as an administrator. What would be the best way to do this in ASP.NET MVC 2? At the moment, I am doing it by checking whether the user exists in the Admin database table for every page. Obviously, there must be a better way to do this. If it helps, I am using Windows Auth.

    Read the article

  • How do you link to an action that takes an array as a parameter (RedirectToAction and/or ActionLink)

    - by Andrew
    I have an action defined like so: public ActionResult Foo(int[] bar) { ... } Url's like this will work as expected: .../Controller/Foo?bar=1&bar=3&bar=5 I have another action that does some work and then redirects to the Foo action above for some computed values of bar. Is there a simple way of specifying the route values with RedirectToAction or ActionLink so that the url's get generated like the above example? These don't seem to work: return RedirectToAction("Foo", new { bar = new[] { 1, 3, 5 } }); return RedirectToAction("Foo", new[] { 1, 3, 5 }); <%= Html.ActionLink("Foo", "Foo", new { bar = new[] { 1, 3, 5 } }) %> <%= Html.ActionLink("Foo", "Foo", new[] { 1, 3, 5 }) %> However, for a single item in the array, these do work: return RedirectToAction("Foo", new { bar = 1 }); <%= Html.ActionLink("Foo", "Foo", new { bar = 1 }) %> When setting bar to an array, it redirects to the following: .../Controller/Foo?a=System.Int32[] Finally, this is with ASP.NET MVC 2 RC. Thanks.

    Read the article

  • Converter problem with XmlDataProvider

    - by Andrew
    Sorry for this, I've just started programming with wpf. I can't seem to figure out why the following xaml displays "System.Xml.XmlElement" instead of the actual xml node content. This is displayed 5 times in the listbox whenever I run it. Not sure where I'm going wrong... <Window x:Class="TestBinding.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Window.Resources> <XmlDataProvider x:Key="myXmlSource" XPath="/root"> <x:XData> <root xmlns=""> <name>Steve</name> <name>Arthur</name> <name>Sidney</name> <name>Billy</name> <name>Steven</name> </root> </x:XData> </XmlDataProvider> <DataTemplate x:Key="shmooga"> <TextBlock Text="{Binding}"/> </DataTemplate> </Window.Resources> <Grid> <ListBox ItemTemplate="{StaticResource shmooga}" ItemsSource="{Binding Source={StaticResource myXmlSource}, XPath=name}"> </ListBox> </Grid> </Window> Any help would be very much appreciated. Thanks!

    Read the article

  • Why is this the output of this python program?

    - by Andrew Moffat
    Someone from #python suggested that it's searching for module "herpaderp" and finding all the ones listed as its searching. If this is the case, why doesn't it list every module on my system before raising ImportError? Can someone shed some light on what's happening here? import sys class TempLoader(object): def __init__(self, path_entry): if path_entry == 'test': return raise ImportError def find_module(self, fullname, path=None): print fullname, path return None sys.path.insert(0, 'test') sys.path_hooks.append(TempLoader) import herpaderp output: 16:00:55 $> python wtf.py herpaderp None apport None subprocess None traceback None pickle None struct None re None sre_compile None sre_parse None sre_constants None org None tempfile None random None __future__ None urllib None string None socket None _ssl None urlparse None collections None keyword None ssl None textwrap None base64 None fnmatch None glob None atexit None xml None _xmlplus None copy None org None pyexpat None problem_report None gzip None email None quopri None uu None unittest None ConfigParser None shutil None apt None apt_pkg None gettext None locale None functools None httplib None mimetools None rfc822 None urllib2 None hashlib None _hashlib None bisect None Traceback (most recent call last): File "wtf.py", line 14, in <module> import herpaderp ImportError: No module named herpaderp

    Read the article

  • ASP.NET custom routes for simple requirements management tool

    - by Andrew
    I am implementing a very simple requirements management tool. I want the URLs to look like this: Shows home page for "Project One": http://projectmanager/Project/Project%20One Shows a list of requirements being worked on for "Project One" http://projectmanager/Project/Project%20One/Requirements Shows requirement 1 for "Project One" http://projectmanager/Project/Project%20One/Requirement/1 How could I set up routes so that http://projectmanager/Project/Project%20One is handled by the project controller http://projectmanager/Project/Project%20One/Requirements and http://projectmanager/Project/Project%20One/Requirements/1 is handled by the requirements controller. Is it even possible?

    Read the article

  • Using memcpy/memset

    - by Andrew Coad
    When using memset or memcpy within an Obj-C program, will the compiler optimise the setting (memset) or copying (memcpy) of data into 32-bit writes or will it do it byte by byte?

    Read the article

  • app burns numbers into iPad screens, how can I prevent this?

    - by Andrew Johnson
    EDIT: My code for this is actually open source, if anyone would be able to look and comment. Things I can think of that might be an issue: using a custom font, using bright green, updating the label too fast? The repo is: https://github.com/andrewljohnson/StopWatch-of-Gaia The class for the time label: https://github.com/andrewljohnson/StopWatch-of-Gaia/blob/master/src/SWPTimeLabel.m The class that runs the timer to update the label: https://github.com/andrewljohnson/StopWatch-of-Gaia/blob/master/src/SWPViewController.m ============= My StopWatch app reportedly screen burns a number of iPads, for temporary periods. Does anyone have a suggestion about how I might prevent this screen persistence? Some known workaround to blank the pixels occasionally? I get emails all the time about it, and you can see numerous reviews here: http://itunes.apple.com/us/app/stopwatch+-timer-for-gym-kitchen/id518178439?mt=8 Apple can not advise me. I sent an email to appreview, and I was told to file a technical support request (DTS). When I filled the DTS, they told me it was not a code issue, and when I further asked for help from DTS, a "senior manager" told me that this was not an issue Apple knew about. He further advised me to file a bug with the Apple Radar bug tracker if I considered it to be a real issue. I filed the Radar bug a few weeks ago, but it has not been acknowledged. Updated radar link for Apple employees, per commenter's notes rdar://12173447

    Read the article

  • Getting started in Mac Development; No Mac.... What Do?!

    - by Andrew Bolster
    Hi folks, With all the RDF et al around King Jobs' newest glass beermat, I'm getting the feeling that its a good time to add the 'iphone/ipad developer' string to my bow. One problem (two if you count not being in a financial position to slap down $1000+ for a mac) ; I am a PC head, specifically a Linux-head, and have no regular access to a Mac platform to develop on. I cannot see any way of getting my hands on iSDK without being on a Mac, (but have been known to be wrong) How hopeless is my plight and where can I go from here?

    Read the article

  • jQuery Find element else do nothing ?

    - by Andrew
    Hi Guys, I am trying to use jQuery to basically wrap a bunch of CSS modifications via jQuery but on pages where the #IDs or Classes dont exist I get errors ? Like jQuery(".class").css(random_stuff) is not a function Any ideas what I can do to either "find" the elements and do nothing or ?

    Read the article

  • jQuery .queue() not working as expected

    - by Andrew
    The page in question is right here: http://s289116086.onlinehome.us/lawjournaltv/index.php I'm 90% of the way there, I'm just assuming there's an error with my syntax. Focus on the blue callout area with "Workers' Compensation" as the title: Basically, I've created a little slideshow there with the controls at the top and when you click on any of them both the callout and the background are to slide. As you can see it's working now, but the problem is that I want the new background to slide in over the old one. I've tried several things including the queue() method, delay(), and adding everything else to the animate() callback with no success (right now the background goes black and then the new image slides in). You guys have never let me down before, so I'm hoping this is an easy fix. Thanks in advance!

    Read the article

  • ASP.NET MVC IoC usability

    - by Andrew Florko
    Hello everybody, How often do you use IoC for controllers/DAL in real projects? IoC allows to abstract application from concrete implementation with additional layer of interfaces that should be implemented. But how often concrete implementation changes? Should we really have to do job twice adding method to interface then the implementation if implementation hardly will ever be changed? I took part in about 10 asp.net projects and DAL (ORM-like and not) was never rewritten completely. Watching lots of videos I clearly understand that IoC "is cool" and the really nice way to program, but does it really needed?

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >