Daily Archives

Articles indexed Wednesday April 28 2010

Page 19/119 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Send data from Service to Widget on Android.

    - by Jose Vega
    I am writing a widget on Android 1.6 that shows the minutes that a person has used on the current month. The way I have it setup is by having a service that listens to the state of the phone and when the phone is picked up, it starts the timer and when the person hangs up, ends a timer. I would like to send this variable(long duration) over to my appWidgetProvider so I could update the edit text on it.

    Read the article

  • How do I make these layers not overlap?

    - by Doug
    http://dougymak.com/jquery/test.html# I have three problems that I need help with. 1 ) When you click "More" on top right, it open a div #search and the background is being overlapped by the brown element below. I tried using z-index, but it didn't work. 2 ) I'm trying to make the div #search align directly beneath the "More", but upon setting the width of #search, it aligns to the left side. 3 ) When I hover over the navigation on the left, the popup is being overlapped by the text in the middle. I want the popup to be on top of the text.

    Read the article

  • White (Light) vs. Black (Dark) Backgrounds: Health Effects

    - by Hosam Aly
    I am adding a bounty to this question, hoping for some scientific research results. Thank you everybody! I have recently tried working on dark backgrounds, and it seemed (to me) to be easier on the eye. However, today I read Gerrie Schenck's comment on this answer, in which he said that mainframe developers were advised to use white backgrounds instead of black, as it is said that white is easier on the eye. So which one is actually better for the eyes in the long run? I would be thankful for any (scientific) references about the subject, as my eyes really need some relaxation. I wanted to make this question a community wiki, but I think that the least I can do to thank people is to reward their answers, so I'm leaving it as a normal question. Many, many thanks for your help. P.S. I don't know which tags would be appropriate for this question, so I'd be grateful if you could tag it in a better way than I did.

    Read the article

  • Problem with checkboxes, sql select statements & php

    - by smokey20
    I am trying to display some rows from a database table based on choices submitted by the user. Here is my form code <form action="choice.php" method="POST" > <input type="checkbox" name="variable[]" value="Apple">Apple <input type="checkbox" name="variable[]" value="Banana">Banana <input type="checkbox" name="variable[]" value="Orange">Orange <input type="checkbox" name="variable[]" value="Melon">Melon <input type="checkbox" name="variable[]" value="Blackberry">Blackberry From what I understand I am placing the values of these into an array called variable. Two of my columns are called receipe name and ingredients(each field under ingredients can store a number of fruits). What I would like to do is, if a number of checkboxes are selected then the receipe name/s is displayed. Here is my php code. <?php // Make a MySQL Connection mysql_connect("localhost", "*****", "*****") or die(mysql_error()); mysql_select_db("****") or die(mysql_error()); $variable=$_POST['variable']; foreach ($variable as $variablename) { echo "$variablename is checked"; } $query = "SELECT receipename FROM fruit WHERE $variable like ingredients"; $row = mysql_fetch_assoc($result); foreach ($_POST['variabble'] as $ingredients) echo $row[$ingredients] . '<br/>'; ?> I am very new to php and just wish to display the data, I do not need to perform any actions on it. I have tried many select statements but I cannot get any results to display. My db connection is fine and it does print out what variables are checked. Many thanks in advance.

    Read the article

  • wrap from last screen to first screen in android Launcher2

    - by poboy975
    hi, I'm learning java and android. and I've been looking at trying to wrap the last screen to the first screen in the android Launcher2. I've tried googleing, and searching here, but there really isnt much information about the launcher2 source...I've been modifying the workspace.java file, but there has been minimal effect. no wrap around so far...I have not been able to find a .xml file that also might control the hard stop when you reach the end of the screens. I'll give a small example of the code that i have been modifying. original code: public void scrollRight() { clearVacantCache(); if (mNextScreen == INVALID_SCREEN && mCurrentScreen < getChildCount() -1 && mScroller.isFinished()) { snapToScreen(mCurrentScreen + 1); } modified code: public void scrollRight() { clearVacantCache(); if (mNextScreen == INVALID_SCREEN && mCurrentScreen < getChildCount() -1 && mScroller.isFinished()) { snapToScreen(mCurrentScreen + 1); }if (mCurrentScreen == getChildCount() -1 && mScroller.isFinished()) { snapToScreen(0); I would appreciate any tips or pointers if anyone has an idea where i'm going wrong, or someplace i can search to get the answers. the code looks to me like it should work, but I'm probably missing something obvious.

    Read the article

  • Facebook Dom Placeholder on Password

    - by Anraiki
    Facebook has a "Dom Placeholder" on their Password field when logging on. When I click on the input for the password, the placeholder disappears and allows me to type my password "masked". Is this Javascript related and how would I go on replicating this script?

    Read the article

  • Poll: What kind of computer should a corporate provide to their developers.

      I have been collecting a poll to almost any developer I find on my way as well as business owners. I have been looking to see what a small development shop, medium size company and a big corporate considers when providing development computers to their software developers. This has being very intriguing to me. In my career I found different software developers, the ones that work always with one product and one framework, as well as the one that keeps a few frameworks and projects. Of course...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Windows Registry creating users

    - by Xaver
    can i create local users just using windows registry? i write the programm wich help me to migrate my from one computer to another. When i work with domain user i can save it settings with windows registry and saving ProfileImagePath folder. now i want to save local users by this way.

    Read the article

  • How to insert all records into a table only one time

    - by Lu Lu
    Hello, I want to get all records from a table1 & insert them into table2. Table1 & table2 are in different databases, table1 and table2 are same structure. Normally, I will get all records from table1, and for each record (foreach), I will insert it into table2 by using "INSERT ...". I want to know a effect way to insert all records into table only one time without foreach. I use C#, .NET 2.0 & WinForm. Thanks.

    Read the article

  • Side-by-side plots with ggplot2 in R

    - by chris_dubois
    I would like to place two plots side by side using the ggplot2 package (ie. do the equivalent of par(mfrow=c(1,2))). For example, I would like to have the following two plots show side-by-side with the same scale. x <- rnorm(100) eps <- rnorm(100,0,.2) qplot(x,3*x+eps) qplot(x,2*x+eps) Do I need to put them in the same data.frame like in this example? qplot(displ, hwy, data=mpg, facets = . ~ year) + geom_smooth() Thanks!

    Read the article

  • selectedSegmentIndex not updating UISegmentControl

    - by munchine
    In my viewDidLoad, I'm retrieving user preferences and updating the settings tab. It is working for editSelection (see code) but the other NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; BOOL editSelection = [userDefaults boolForKey:@"editToggleSwitch"]; editingToggle.selectedSegmentIndex = editSelection; // this is working! bToggle.selectedSegmentIndex = [[userDefaults objectForKey:@"bSegment"] intValue]; In the view, the editingToggle segment is displaying correctly but bToggle is always at 0? NSLog shows that the data was saved and retrieved correctly. I've even set bToggle.selectedSegmentIndex = 1; but it still does not reflect correctly in the view? Any ideas?

    Read the article

  • InApp Purchase supported content types

    - by Chandan Shetty SP
    In InApp purchase guide i saw these are the supported content types - Digital Books,Virtual poker chips current games, In-game tool or accessory, etc... And non-supported - Physical books, Virtual poker chips for other games, In-game credits for virtual goods, etc... I didn't understand "In-game credits for virtual goods" what is this? In my game i am using some credits to skip certain levels, if credits are not available user can buy credits through inApp purchase then he can skip level... Is it valid supported content type for In-App purchase?

    Read the article

  • Coolest C# LINQ/Lambdas trick you've ever pulled?

    - by chakrit
    Saw a post about hidden features in C# but not a lot of people have written linq/lambdas example so... I wonder... What's the coolest (as in the most elegant) use of the C# LINQ and/or Lambdas/anonymous delegates you have ever saw/written? Bonus if it has went into production too!

    Read the article

  • Using Rails 3 and Haml 3, how do I configure Haml?

    - by dpogg1
    I'm using Rails 3.0.0.beta3 and Haml 3.0.0.rc.2, and I can't find where I need to place the configuration lines for Haml (nor what they are in the new version, for that matter). Using Rails 2.3.5 and Haml 2, I would do Haml::Template.options[:format] = :html5 in environment.rb. Or, in Sinatra, set :haml, {:format => :html5} in my main file. But in Rails 3 everything's been changed around, and no matter where I put that configuration line, I get an undefined method or undefined object error.

    Read the article

  • Elegant solution for line-breaks (PHP)

    - by Nimbuz
    $var = "Hi there"."<br/>"."Welcome to my website"."<br/>;" echo $var; Is there an elegant way to handle line-breaks in PHP? I'm not sure about other languages, but C++ has eol so something thats more readable and elegant to use? Thanks

    Read the article

  • Which linear programming package should I use for high numbers of constraints and "warm starts"

    - by davidsd
    I have a "continuous" linear programming problem that involves maximizing a linear function over a curved convex space. In typical LP problems, the convex space is a polytope, but in this case the convex space is piecewise curved -- that is, it has faces, edges, and vertices, but the edges aren't straight and the faces aren't flat. Instead of being specified by a finite number of linear inequalities, I have a continuously infinite number. I'm currently dealing with this by approximating the surface by a polytope, which means discretizing the continuously infinite constraints into a very large finite number of constraints. I'm also in the situation where I'd like to know how the answer changes under small perturbations to the underlying problem. Thus, I'd like to be able to supply an initial condition to the solver based on a nearby solution. I believe this capability is called a "warm start." Can someone help me distinguish between the various LP packages out there? I'm not so concerned with user-friendliness as speed (for large numbers of constraints), high-precision arithmetic, and warm starts. Thanks!

    Read the article

  • Is SecureRandom thread safe?

    - by Yishai
    Is SecureRandom thread safe? That is, after initializing it, can access to the next random number be relied on to be thread safe? Examining the source code seems to show that it is, and this bug report seems to indicate that its lack of documentation as thread safe is a javadoc issue. Has anyone confirmed that it is in fact thread safe?

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >