Daily Archives

Articles indexed Saturday May 1 2010

Page 29/76 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • variable row size list field in blackberry

    - by SWATI
    i have created an application that contains a list field(custom) i want if a certain condition is satisfied then rowheight should be 100 else it should be 50 how can i do that i tried setRowHeight(index,size); but it dnt worked.Moreover its undocumented toooooooooo.. any help will be appreciated

    Read the article

  • Unexpected { expected ( ?

    - by Luke
    Parse error: syntax error, unexpected '{', expecting '(' in /home/a7237281/public_html/include/session.php on line 313 this is the error i get, relating to this code //check the emails $field = "email"; //Use field name for email $field2 = "email2"; if(!$subemail || strlen($subemail = trim($subemail)) == 0) { $form->setError($field, "* Email not entered"); } else if { /* Check if valid email address */ $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" ."@[a-z0-9-]+(\.[a-z0-9-]{1,})*" ."\.([a-z]{2,}){1}$"; if(!eregi($regex,$subemail)) { $form->setError($field, "* Email invalid"); } else if ($subemail !== $subemail2) { $form->setError($field2, "* Emails does not match"); } $subemail = stripslashes($subemail); } /* Check if email is already in use */ else($database->emailTaken($subemail)) { $form->setError($field, "* Email address already in use"); } And its referring to the { after the first else if. I have edited with the entire piece of code, what could i do now?

    Read the article

  • Cocoa NSString explode

    - by dododedodonl
    Hi all, I have a NSString: @"1a,1b,1c,1d,5c". I want this NSString separated into a NSMutableArray, but I don't know how. I think it is fairly simple but I can't find it (maybe because my English isn't good enough to find a good description for it to search on). Regards, Dodo

    Read the article

  • Deploying multiple Grails instances with shared cache and sessions ?

    - by Kedare
    Hello, I am looking for a solution that allows me to deploy multiple load balanced Grails instances that have shared cache (EhCache Server ?) and sessions, is this possible ? I can't find any documentation on this (connecting to a common EhCache server or using Distributed EhCache, and sharing sessions (using EhCache too ?))... I'm looking for something that will work like multiple Rails instances with a common memcached and sessions/caches stored in the memcached... Can you help me ? Thank you !

    Read the article

  • PHP utf encoding problem

    - by shyam
    How can I encode strings on UTF-16BE format in PHP? For "Demo Message!!!" the encoded string should be '00440065006D006F0020004D00650073007300610067006'. Also, I need to encode Arabic characters to this format.

    Read the article

  • jQueryUI Tabs: how too keep them on a single line?

    - by Andi
    Hi all, Maybe my question is wired: is there a way to prevent jQueryUI tabs from floating if browser window is too small? Explanation: I have a simple horizontal tab using CSS only. The content is floating but not the tabs. Important: there is no width set manually, the current width is taken automatically. Here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style type="text/css"> #tabs ul { white-space: nowrap; } #tabs ul li { display: inline; white-space: nowrap; } </style> <title>Tabs-CSS</title> </head> <body> <div class="demo"> <div id="tabs"> <ul> <li><a href="#tabs-1">Preloaded</a></li> <li><a href="ajax/content1.html">Tab 1</a></li> <li><a href="ajax/content2.html">Tab 2</a></li> <li><a href="ajax/content3-slow.php">Tab 3 (slow)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> </ul> <div id="tabs-1"> <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p> </div> </div> </div> </body> </html> This is exactly what I want. Next step: add jQueryUI Tab as unobtrusive Javascript. For example like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> <link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css" rel="stylesheet"/> <style type="text/css"> #tabs ul { white-space: nowrap; } #tabs ul li { display: inline; white-space: nowrap; } </style> <title>Tabs-CSS</title> </head> <body> <div class="demo"> <div id="tabs"> <ul> <li><a href="#tabs-1">Preloaded</a></li> <li><a href="ajax/content1.html">Tab 1</a></li> <li><a href="ajax/content2.html">Tab 2</a></li> <li><a href="ajax/content3-slow.php">Tab 3 (slow)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> <li><a href="ajax/content4-broken.php">Tab 4 (broken)</a></li> </ul> <div id="tabs-1"> <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p> </div> </div> </div> <script type="text/javascript"> //<![CDATA[ $(function() { $("#tabs").tabs({ ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. If this wouldn't be a demo."); }, } }); }); $(function() { $("#innertabs").tabs({ ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible. If this wouldn't be a demo."); } } }); }); //]]> </script> </body> </html> Now I can see that the tabbar floats on minimizing the browser window. And there are some ugly effect with the tabs jumping around. My main questions is: can I avoid floating the tabbar and keep all tabs on one single line? Kind regards, Andi

    Read the article

  • ViewController has wrong orientation after Landscape-only has been popped

    - by noroom
    In a navigation-based app, LandscapeViewController only supports landscape mode (all others support both modes). I also have a "loading screen" that advises the user to rotate the phone before continuing. This way I can make sure that when my landscape view loads, that it's in landscape mode. The problem comes when i rotate the phone to portrait mode while still showing LandscapeVC. I press the Back nagivation button to navigate up one level (to a VC that supports both landscape and portrait modes), but the upper level shows in landscape mode even though the phone is in portrait mode. I guess this is because when I left this view I was in portrait mode, I then rotated the phone while in another view, so this view has not received the notification. If I then proceed to rotate the phone to the other landscape mode (say the LandscapeVC was loaded on its right side, so I'd rotate the upper VC from portrait to the left landscape mode), it will update. My question is: how can I notify this upper view that the phone was rotated, so when the user goes up after putting the phone in portrait mode, the upper view shows correctly?

    Read the article

  • php include not working on IE?

    - by janoChen
    This include is not working in IE: <?php include_once 'localization.php'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Global Colleague</title> <link href="css/style.css" rel="stylesheet" type="text/css"/><!--Start Kampyle Exit-Popup Code--> <script type="text/javascript"> Calling an array inside localization.php <?php echo l('content_p3'); ?>

    Read the article

  • Is the Finch audio library for iPhone capable of doing this?

    - by mystify
    I need to: - start / stop sounds with lengths between 0.1 and 10 seconds - change the playback volume I want to / would like to / would be nice to have to: - change the playback speed - change the playback pitch / frequency - pause an sound and resume playing it later - play a sound backwards Is Finch my best friend here?

    Read the article

  • Code Coverage Analysis for Embedded C++ projects

    - by Steve Hawkins
    I have recently started working on a very large C++ project that, after completing 90% of the implementation, has determined that they need to demonstrate 100% branch coverage during testing. The project is hosted on an embedded platform (Green Hills Integrity). I'm looking for suggestions and experiences from others on StackOverflow that have used code coverage products in similar environments. I'm interested in both positive and negative comments regarding these types of tools.

    Read the article

  • jQuery - making sure content is loaded before it's faded in?

    - by Kenny Bones
    Hi, Nick Craver really helped me out alot with this code in this thread http://stackoverflow.com/questions/2743443/jquery-can-someone-help-stitching-jquery-code-with-ajaxcomplete/2743791#2743791 And it is working. But I notice that there's a small delay after I've clicked a link and before the content is actually loaded. It's not very intense content that's loaded either so I think it's got something to do with the order which things happen in the script. The original code looks like this: $('.dynload').live('click', function(){ var toLoad = $(this).attr('href')+' #content'; $('#content').fadeOut('fast',loadContent); $('#ajaxloader').fadeIn('normal'); function loadContent() { $('#content').load(toLoad,'',showNewContent()) } function showNewContent() { $('#content').fadeIn('fast',hideLoader()); //Cufon.replace('h1, h2, h3, h4, .menuwrapper', { fontFamily: 'advent'}); } function hideLoader() { $('#ajaxloader').fadeOut('normal'); } return false; }); The new code looks like this: $(function() { $('.dynload').live('click', function(){ $('#ajaxloader').fadeIn('fast'); $('#ajaxloaderfridge').fadeIn('fast'); var href = this.href + ' #content'; $('#content').fadeOut('fast',function() { $(this).load(href,'', function(data) { createMenus(); $('#ajaxloader').fadeOut('fast'); $('#ajaxloaderfridge').fadeOut('fast'); $('#content').fadeIn('fast'); Cufon.replace('h1, h2, h3, h4, .menuwrapper', { fontFamily: 'advent'}); }); }); return false; }); }); $(createMenus); function createMenus() { $('#kontrollpanel .slidepanels').kwicks({ min : 42, spacing : 3, isVertical : true, sticky : true, event : 'click' }); } In the original code, #content is faded out, then the function "loadContent" is started. Which is basically what is happening in the new script as well isn't it? And when I was using the old code, the content just faded out and faded in really fast and smooth and with no small pause delay before the content arrived.

    Read the article

  • Outputting an HTML entity character from a helper function

    - by morpheous
    I am using Symfony 1.3.2 on Ubuntu. I have written a little helper function (statsfoo) that prints out summary statistics about an item. I am using the helper function in my template like this: // In StatsHelper.php <?php function statsfoo($some_param) { return "<div class=\"sfoo\">&9830; the stats number for item is 42</div>" } //In showStatsSuccess.php <?php use_helper(Stats); <?php echo statsfoo($foobar, ESC_ENTITIES); I tried both ESC_ENTITIES and ESC_RAW. In both instances, the raw number (&9830) was displayed in the page. I want to display the diamond instead. What am I doing wrong and how can I fix this?

    Read the article

  • Update Datatable and DatagridView with database Changes by Timer

    - by aleroot
    Scenario : i have a database table that is being updated frequently by some services. I have a c# Winforms Application that load this table in a datagridview by binding a datatable as Datasource, then i whant to add a Timer that every 10 seconds update a the content of a datatable with the last changes in the database table ... I don't need to update a database with the datatable changes, but i need to update datatable with the last changes in the database table, that is the inverse of the usually.... Is there a way to do that ? What is the best way ? i've tried with this code : private void ServiceTimer_Tick(object state) { OdbcConnection oCon = new OdbcConnection(); oCon.ConnectionString = ConnectionStrings; OdbcDataAdapter dp = new OdbcDataAdapter("SELECT * FROM table", oCon); dsProva.Tables.Clear(); dp.Fill(dsProva,"table"); dataGridViewMessaggi.DataSource = dsProva.Tables["table"]; dataGridViewMessaggi.Refresh(); } But every Timer Tick i lost the selection in DatagridView and Current Row .... Is There a better solution ?

    Read the article

  • PHP vs Phpmyadmin

    - by user330306
    Hi there, I've got this code which i execute on phpmyadmin which works 100% Create Temporary Table Searches ( id int, dt datetime); Create Temporary Table Searches1 ( id int, dt datetime, count int); insert into Searches(id, dt) select a.id, now() from tblSavedSearches a; insert into Searches1(id, dt, count) select b.savedSearchesId, (select c.dt from tblSavedSearchesDetails c where b.savedSearchesId = c.savedSearchesId order by c.dt desc limit 1) as 'dt', count(b.savedSearchesId) as 'cnt' from tblSavedSearchesDetails b group by b.savedSearchesId; insert into tblSavedSearchResults(savedSearchId,DtSearched,isEnabled) select id,now(),0 from Searches where not id in (select savedSearchId from tblSavedSearchResults); update tblSavedSearchResults inner join Searches1 on tblSavedSearchResults.savedSearchId = Searches1.id Set tblSavedSearchResults.DtSearched = Searches1.dt, tblSavedSearchResults.isEnabled = 1; However when i put the same code in php as below it generates an error $dba = DbConnect::CreateDbaInstance(); $query = ""; $query.="Create Temporary Table Searches ( id int, dt datetime); "; $query.="Create Temporary Table Searches1 ( id int, dt datetime, count int); "; $query.="insert into Searches(id, dt) select a.id, now() from tblSavedSearches a; "; $query.="insert into Searches1(id, dt, count) "; $query.="select "; $query.=" b.savedSearchesId, "; $query.=" (select c.dt from tblSavedSearchesDetails c where b.savedSearchesId = c.savedSearchesId order by c.dt desc limit 1) as 'dt', "; $query.=" count(b.savedSearchesId) as 'cnt' "; $query.="from tblSavedSearchesDetails b "; $query.="group by b.savedSearchesId; "; $query.="insert into tblSavedSearchResults(savedSearchId,DtSearched,isEnabled) "; $query.="select id,now(),0 from Searches where not id in (select savedSearchId from tblSavedSearchResults); "; $query.="update tblSavedSearchResults "; $query.="inner join Searches1 on tblSavedSearchResults.savedSearchId = Searches1.id "; $query.="Set tblSavedSearchResults.DtSearched = Searches1.dt, tblSavedSearchResults.isEnabled = 1; "; $dba->DbQuery($query) or die(mysql_error()); I get the following error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Create Temporary Table Searches1 ( id int, dt datetime, count int) insert into S' at line 1 Please if someone could assist me with this ... Thanks

    Read the article

  • very weird problem concerning date and time in silverlight + ria services

    - by Patrick LHM
    Hello Friends i'm facing a very weird problem in sliverlight 4 + RIA Services, or maybe it's not weird and i'm just a newbie anyway i hope someone here can help, the problem is the following i've created a function on the server side inside the domain service this function is very simple and has a line in it that adds the server current date and time to the database (it's an HR application and employees should sign in and out thrue it each from it's own pc ) Emp.TimeOut = system.DateTime.now (C# syntax) the weird part is that for some users it always adds 3 hours to the current time(exp if he signes out at 5 it shows 8) and for others it works perfectly. the server and all the stations in the company have exactly the same time settings and the same time zone, and anyway my fucntion is on the server side so it should no be realted to the users time. any ideas why this is happening ? i've bin trying to find out why for days now but with no luck

    Read the article

  • What is root reference ?

    - by DotNetGuy
    class GCTest { static Object r1; static void Main() { r1 = new Object(); Object r2 = new Object(); Object r3 = new Object(); System.GC.Collect(); // what can be reclaimed here ? r1 = null; r3.ToString(); System.GC.Collect(); // what can be reclaimed here ? } } // code from - DonBox's Essential .Net

    Read the article

  • Intent resolution in Android

    - by Saksham
    Hello community, If I want to create custom address book (which overrides my phone's default address book), and if I want it to be used by all applications, what should be my intent filter? Does Android allow me to do such a thing considering the fact that such a third-party app could potentially be malicious?! And, if I want to have yet another address book application, I suppose the second app also has same intent-filter, isn't it? How does the framework decide which app to pick if I click on Contacts button when making a call? In other words, how does the framework resolve intents in case there is a conflict between multiple intent-filters? I'm new to android, so please excuse me if this question is stupid. I would like to get some feedback in any case! Thanks in advance, Saksham

    Read the article

  • SVN 409 conflict on commits and updates

    - by bhefny
    We have been using SVN for the past year now and when we migrated to an online server we started getting this error: Commit: Commit failed (details follow): File or directory 'x.php' is out of date; try updating resource out of date; try updating CHECKOUT of '/!svn/ver/491/x.php': 409 Conflict (http://svn.example.com) We are currently using SmartSVN 6.5 and we have also tested with RapidSVN & Syncro (but we can't use tortoise as we have a lot of Ubunutu users) at the begining I though this How do you fix an SVN 409 Conflict Error would help, but it didn't we are still facing the same error and it's even more absurd now. the main problem is that after you get the error, you can't shake it of. Updating doesn't solve, reverting doesn't solve. You are just stuck with the error. The only thing that could work is removing the file from SVN and adding your version but that would be against why we are using SVN in the first place This is our apache config (and yes autoversioning is ON) <Location /> DAV svn SVNPath /home/example/svn SVNAutoversioning on AuthType Basic AuthName "Access Restricted" AuthUserFile /home/example/svn-auth-file Require valid-user </Location> <Directory /> <Files ~ "^\.ht"> Order allow,deny Allow from all Satisfy All </Files> <Files ~ "^error_log"> Order allow,deny Allow from all Satisfy All </Files> </Directory> And here are some observation: We don't receive conflicts anymore, we just get this 409 conflict you can somehow avoid the error if you always update before committing When committing a modified file + a newly added file, you get the error. As if the added file incremented the version by one and then you are committing another file with a older version. Please advise, we are about to go insane

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >