Daily Archives

Articles indexed Sunday April 11 2010

Page 1/79 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • PreferenceActivity and theme not applying

    - by janfsd
    Hi all I have set the theme in the manifest file like this: android:theme="@android:style/Theme.Light" But I have a problem in the Preferences Activity, in the main preferences the theme shows ok, but if I get to a sub preference, the theme gets messy, it is not white as it should, it is all dark, and the font is black so you can't see much, and when I start clicking on any items they will get sometimes white as they should but revert to black soon after. This is only happens on 2.1, in both the real device and emulator. Tested on the emulator running 1.6 and it was working correctly. Here is part of the code of the preferences xml file: <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen android:title="@string/account"> <CheckBoxPreference android:key="enable_account" android:title="@string/account_use" android:summary="@string/account_summ" /> <EditTextPreference android:key="username" android:title="@string/login" android:dependency="enable_account" android:summary="@string/login_summ" /> <EditTextPreference android:key="password" android:title="@string/password" android:dependency="enable_account" android:summary="@string/password_summ" android:password="true" /> </PreferenceScreen> And here is a screenshot: Any workarounds?

    Read the article

  • Java conditional operator ?: result type

    - by Wangnick
    I'm a bit puzzled about the conditional operator. Consider the following two lines: Float f1 = false? 1.0f: null; Float f2 = false? 1.0f: false? 1.0f: null; Why does f1 become null and the second statement throws a NullPointerException? Langspec-3.0 para 15.25 sais: Otherwise, the second and third operands are of types S1 and S2 respectively. Let T1 be the type that results from applying boxing conversion to S1, and let T2 be the type that results from applying boxing conversion to S2. The type of the conditional expression is the result of applying capture conversion (§5.1.10) to lub(T1, T2) (§15.12.2.7). So for false?1.0f:null T1 is Float and T2 is the null type. But what is the result of lub(T1,T2)? This para 15.12.2.7 is just a bit too much ... BTW, I'm using 1.6.0_18 on Windows. PS: I know that Float f2 = false? (Float) 1.0f: false? (Float) 1.0f: null; doesn't throw NPE.

    Read the article

  • How to encrypt session id in cookie?

    - by terrani
    While I was reading about session hijacking articles, i learned that it would be nice to encrypt session id value that is stored in a cookie. As far as I know, when I start a session by calling session_start(), PHP does not encrypt session id value in a cookie. How do I encrypt session id value and then initialize session with it?

    Read the article

  • Append indexed input fields with attached datepicker widget

    - by Micor
    I am looking for the most efficient way to add a set of fields with datepicker widget attached on click event. So here I have a set of indexed events being generated on a page: <div id="events"> <div class="event"> <input type="text" id="event_0_startDate" name="event[0].startDate" class="date"/> <input type="hidden" id="event_0_startDate_day" name="event[0].startDate_day" /> <input type="hidden" id="event_0_startDate_month" name="event[0].startDate_month" /> <input type="hidden" id="event_0_startDate_year" name="event[0].startDate_year"/> </div> <div class="event"> <input type="text" id="event_1_startDate" name="event[1].startDate" class="date"/> <input type="hidden" id="event_1_startDate_day" name="event[1].startDate_day" /> <input type="hidden" id="event_1_startDate_month" name="event[1].startDate_month" /> <input type="hidden" id="event_1_startDate_year" name="event[1].startDate_year" /> </div> .... more event divs .... </div> <a href="#" id="add_event">Add event</a> .. with datepicker widget attached: $(".date").datepicker({ onClose: function(dateText,picker) { var prefix = $(this).attr('id'); $('#' + prefix + '_month').val( dateText.split(/\//)[0] ); $('#' + prefix + '_day').val( dateText.split(/\//)[1] ); $('#' + prefix + '_year').val( dateText.split(/\//)[2] ); } }); I need a function that will add inside div id="events" after the last div class="event" another div class="event" where N is the next index and attach datepicker widget above to the new input field with class="date" like: <div class="event"> <input type="text" id="event_N_startDate" name="event[N].startDate" class="date"/> <input type="hidden" id="event_N_startDate_day" name="event[N].startDate_day"/> <input type="hidden" id="event_N_startDate_month" name="event[N].startDate_month" /> <input type="hidden" id="event_N_startDate_year" name="event[N].startDate_year" /> </div> Thank you.

    Read the article

  • .net Listview control will only display largeIcon.

    - by Redshirt
    I'm using the RC of visual Studio 2010. Writing a .net 3.5 application. When I launch the app, the listview control only shows in LargeIcon view. This is not the view I want. I've set the View property in the designer with no success. I've even tried to explicitly set the view during runtime lvAvailableItems.View = View.Tile; Has anyone else had this issue, and if so what was your workaround.

    Read the article

  • Log4net RollingFileAppender Size rollingStyle file extension

    - by BrettRobi
    I am using the RollingFileAppender and the Size rollingStyle. By default it creates backup files with a numbered extension, this drives me nuts. Is it possible to change it so it always uses a defined extension (say .txt or .log) and inserts the number as part of the file name. For example: myapp.log myapp.1.log myapp.2.log myapp.3.log Here is my current configuration: <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> <file value="myapp.log"/> <appendToFile value="true"/> <rollingStyle value="Size"/> <maximumFileSize value="1MB"/> <maxSizeRollBackups value="10"/> <staticLogFileName value="true"/> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date{ISO8601} [%3thread] %-5level %logger{3}: %message%newline" /> </layout> </appender>

    Read the article

  • apache redirect based on referrer

    - by user40259
    I've just noticed that schoolmate.r09.railsrumble.com seems to be doing a rewrite to one of my domains, agilegrad.com. This is kind of annoying since that site is the top hit on google when searching for my domain and the address bar stays as schoolmate.r09.railsrumble.com when following the link. I'd like to redirect incoming requests with schoolmate.r09.railsrumble.com in the referrer variable to agilegrad.com, but the following in my vhost config for agilegrad.com isn't working for me: RewriteEngine on RewriteCond %{HTTP_REFERER} railsrumble RewriteRule ^/(.*) http://www.agilegrad.com/$1 [L,R=301] With this on, I see a bunch of redirects in my access log, but only for static files (cs, javascript). This is the first time I've tried using mod_rewrite, so I'm not even sure if I can accomplish what I want, which is to do a full redirect to my domain and have it appear to the user that they are at agilegrad.com.

    Read the article

  • django custom command and cron

    - by Hellnar
    Hello I want my customly made django command to be executed every minute, however it seems like python /path/to/project/myapp/manage.py mycommand doesn't seem to work while at the directory python manage.py mycommand works perfectly. How can I achieve this ? I use /etc/crontab with: ****** root python /path/to/project/myapp/manage.py mycommand

    Read the article

  • How to render a partial and and a javascript file in the same time in Rails ?

    - by master2004
    Hi. My main intention is to keep the functionality independent form the Javascript, to have it gracefully degradable. Maybe I am trying to go where I want the wrong way but the main idea is: there are some jQuery UI tabs and when the user presses a link, a new tab is added corresponding to that action $("#tabs").tabs('add', "/groups", "My Groups"); the controller identifies the AJAX request and renders only the partial for that tab if request.xhr? render :partial => "index_tab" end at this point I would like the Javascript file associated with the /groups/index action to be executed as well, meaning the index.js.erb file in the groups folder. because of the "only one render" rule I couldn't think of a nice way to do it and I am in need of a fast solution. Thank you for any suggestions you might have.

    Read the article

  • Free web app that can be used to keep track of loans made to people (like Mint)

    - by ShaChris23
    Is there a web app that is: Free Behaves like Mint But allows me to keep track of money I loan or owe other people? I should be able to setup an "account" for each person that I loan out to, and be able to "check off" when the person returns me the money, etc. I should also be able to add notes to each transaction to help me remember what it was for. Would be even nicer if I can add transactions via text messaging, email, etc.

    Read the article

  • Help calling def from class.

    - by wtzolt
    Hello, Noob question... class msgbox: def __init__(self, lbl_msg = '', dlg_title = ''): self.wTree = gtk.glade.XML('msgbox.glade') self.wTree.get_widget('dialog1').set_title(dlg_title) self.wTree.get_widget('label1').set_text(lbl_msg) self.wTree.signal_autoconnect( {'on_okbutton1_clicked':self.done} ) def done(self,w): self.wTree.get_widget('dialog1').destroy() class Fun(object): wTree = None def __init__(self): self.wTree = gtk.glade.XML( "main.glade" ) self.wTree.signal_autoconnect( {'on_buttonOne' : self.one,} ) gtk.main() @yieldsleep def one(self, widget, data=None): self.msg = msgbox('Please wait...','') yield 500 self.msg = msgbox().done() # <----------------??? self.msg = msgbox('Done!','') With this i get an error: messageBox().done() TypeError: done() takes exactly 2 arguments (1 given) How can i make the dialog box with "please wait" to close before the second dialog box with "done" appears?? Thank you.

    Read the article

  • Why can't I download a whole image file with urllib2.urlopen()

    - by John Gann
    When I run the following code, it only seems to be downloading the first little bit of the file and then exiting. Occassionally, I will get a 10054 error, but usually it just exits without getting the whole file. My internet connection is crappy wireless, and I often get broken downloads on larger files in firefox, but my browser has no problem getting a 200k image file. I'm new to python, and programming in general, so I'm wondering what nuance I'm missing. import urllib2 xkcdpic=urllib2.urlopen("http://imgs.xkcd.com/comics/literally.png") xkcdpicfile=open("C:\\Documents and Settings\\John Gann\\Desktop\\xkcd.png","w") while 1: chunk=xkcdpic.read(4028) if chunk: print chunk xkcdpicfile.write(chunk) else: break

    Read the article

  • jquery ui tabs load event does not fire

    - by illdev
    I have got the following very simple code: function init() { var articleTabs = $('#articleTabs'); articleTabs.tabs('add', admin.pageVars.siteRoot + '/articles/themes/' + admin.pageVars.params.id, 'Temas'); articleTabs.tabs({ load : function(event, ui) { $('.jsonForm').jsonForm(); } }); } This successfully adds a new tab panel to an existing tab control. However upon activation, the load function does never fire. What is my mistake? (There are no javascript exceptions)

    Read the article

  • two copies of jquery in code, how do i use newer version

    - by acidzombie24
    I am writing a greasemonkey script. The site is using jquery, i need a function in a newer version. In my GM script i have // @require http://ajax.microsoft.com/ajax/jQuery/jquery-1.3.2.min.js ... var $ = unsafeWindow.jQuery; However after using alert($().jquery); i see it is still the old version. How can i get the newer version in code?

    Read the article

  • gdb print won't print out something readable from my char array

    - by hatorade
    i have a char buffer[100] and i'm trying to use gdb to read the contents out of it at various stages of runtime. i use p buffer and i get "/*\000\000\000\000\000\000????X?o\000\025\202\004\b", '\0' <repeats 12 times>, ".N=?", '\0' <repeats 24 times>, "`\203\004\b\000\000\000\000L\227\004\bX????\202\004\b?\017\204\000\f?\203\000\210???i\205\004\b??r" how do i get p to convert it into a readable format???

    Read the article

  • Generating the query plan takes 5 minutes, the query itself runs in milliseconds. What's up?

    - by TheImirOfGroofunkistan
    I have a fairly complex (or ugly depending on how you look at it) stored procedure running on SQL Server 2008. It bases a lot of the logic on a view that has a pk table and a fk table. The fk table is left joined to the pk table slightly more than 30 times (the fk table has a poor design - it uses name value pairs that I need to flatten out. Unfortunately, it's 3rd party and I cannot change it). Anyway, it had been running fine for weeks until I periodically noticed a run that would take 3-5 minutes. It turns out that this is the time it takes to generate the query plan. Once the query plan exists and is cached, the stored procedure itself runs very efficiently. Things run smoothly until there is a reason to regenerate and cache the query plan again. Has anyone seen this? Why does it take so long to generate the plan? Are there ways to make it come up with a plan faster?

    Read the article

  • Groupted table view cells not loading.

    - by Tejaswi Yerukalapudi
    Hi, I'm working on creating a grouped table view. The data is being loaded alright, but in the grouped view there are a lot of white empty spaces. They get populated after I scroll up and down a few times. Help? Here's my getCellForRowIndexAtPath method: static NSString *Id= @"CustomDiagChargeID"; CustomCellDiagCharges *cell = (CustomCellDiagCharges *)[tableView dequeueReusableCellWithIdentifier:Id]; if(cell == nil) { NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustomCellDiagCharges" owner:self options:nil]; for (id oneObject in nib) { if([oneObject isKindOfClass:[CustomCellDiagCharges class]]) cell = (CustomCellDiagCharges *) oneObject; } } NSUInteger row = [indexPath row]; DiagDetails *rowData = [preferences getDiagElementAt:indexPath.section row:row]; cell.code.text = rowData.ICD9Code; cell.desc.text = rowData.ICD9Desc; return cell; Thanks, Teja.

    Read the article

  • PDF thumbnails in TeXShop (LaTeX)

    - by joec
    How can i create PDF thumbnails in TeXShop using LaTeX and thumbpdf? I have \usepackage{thumbpdf} in my preamble, ran LaTeX twice, ran $ thumbpdf report.pdf from a Terminal (I'm on a Mac), then ran LaTeX again, but the PDF has no thumbnails? Am I missing a step? The thumbpdf command created png files but then deleted them again, and wrote a file called report.tpt. Thanks.

    Read the article

  • how to get npapi plugin for NPP_StreamAsFile

    - by user307635
    How can i get a npapi plugin. do i have to write for my own. or i can get it from somewhere. and please tell me that how to create a npapi.dll from npapi.h file. thanx. or if anybody have any npapi.dll for NPP_StreamAsFile than please give me the link to download it and documentation for how to use it. thanx

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >