Search Results

Search found 1904 results on 77 pages for 'andrew sky'.

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

  • NHibernate's automatic (dirty checking) update behaviour - turning it off

    - by Andrew Bullock
    I've just discovered that if I get an object from an NHibernate session and change a property on object, NHibernate will automatically update the object on commit without me calling Session.Update(myObj)! I can see how this could be helpful, but as default behaviour it seems crazy! How can I stop this happening? Is this default NHib behaviour or something coming from Fluent NHibs AutoPersistenceModel? If there's no way to stop this, what do I do? Unless I'm missing the point this behaviour seems to create a right mess, violating my UoW. Im using NHibernate 2.0.1.4 and a Fluent NHib build from 18/3/2009 Edit, is this guy right with his answer? Edit: I've also read that overriding an Event Listener could be a solution to this. However, IDirtyCheckEventListener.OnDirtyCheck isn't called in this situation. Does anyone know which listener I need to override? Thanks Andrew

    Read the article

  • wheel of fortune collision detection

    - by Andrew
    Hey, I have a wheel segmented into 8 pie pieces, and a picker that is pointing at the currently selected segment (think wheel of fortune). I want to highlight the currently selected segment, and so have started to use Chipmunk to construct the 8 segments, attached to a rotating body, and then the picker that is put in a position to collide with each of the segments. The trick is, how do you allow the picker to pass over top of the segments, while still getting the collision, but not actually colliding and slowing down the wheel? I haven't started down this path yet, but thought this may solve the problem: removing the colliding segment and then putting it back after the picker has started colliding with another segment a bit away (like two segments away). There may be a much simpler solution not even involving Chipmunk that I haven't thought of. Thanks, Andrew

    Read the article

  • Tips on debugging copy and paste into powerpoint 2010

    - by Andrew S.
    I have a custom application in C++ that has been used to successfully copy-and-paste an object from the application into MS Office 2003 and 2007 (Word, Excel and PowerPoint). The object opens in our own custom activeX control. Now with windows XP and PowerPoint 2010, nothing happens on the cut-and-paste. I have tried turning off the smart copy/paste to no avail. Copy/paste works with Word and Excel 2010. Do you have tips on how to debug this? Thanks Andrew

    Read the article

  • Best architecture for a social media app

    - by Sky
    Hey guys, Im working on promising project that develops a new social media app for web and mobile. We are at begin defining functionalities. Nevertheless, I'm thinking ahead on architecture. So I'm asking: 1 - Whats the best plataform to develop the core of this aplication that will have a Rest API interface. 2 - Whats the best database that will scale and grow with my application. As far as I researched, these were the answers I found most interesting: For database: Cassandra NoSQL DB, amazing scalabilty, amazing write performance, good read performance (will be improved on 0.6). I think i will choose that one. Zookeer for transactions on Cassandra. I think that 2 technologies rly good for that propose. What do you think guys? On the front end that will serve the REST API, i dont have a final candidate. For this one i have questions based on Perfomance X Scalabilty X Fast Development/Maintenance. Java or .Net As far as I researched, brings the best balance of this requisits. Python, pearl and Rail, has the best (Fast Development/Maintenance), but sux on all other. C or C++ I dont even consider, because its (Fast Development/Maintenance) sux... So what do you guy think about it?

    Read the article

  • filtering for multiple values on one column. All values must exist, else - return zero

    - by Andrew
    Hello All, I would like to filter one column in a table for couple values and show results only if all those values are there. If one or more is missing, then return zero results. example table +----+--------+----------+ | id | Fruit | Color | +----+--------+----------+ | 1 | apple | red | | 2 | mango | yellow | | 3 | banana | yellow | +----+--------+----------+ example "wrong" code: (this must return 3 rows) select Fruit FROM table WHERE Color = red AND Color = yellow but select Fruit FROM table WHERE Color = red AND Color = green must return 0 rows. (If i use select Fruit FROM table WHERE Color = red OR Color = green i get 1 row which is not what i need) I am using PHP with form where user checks different checkboxes that represent different values of the same column. So when he selects multiple checkboxes, all those values should be in the result set, otherwise no result should be given. Thank you, Andrew

    Read the article

  • Google Translate API for iPhone - UTF8 problem in Chinese Translation

    - by Sky Chen
    I've tested a workable translation API url by: http://translate.google.com/translate_a/t?client=t&text=%E5%BB%A3%E5%A0%B4&langpair=zh|zh-CN And it returns the correct result as the following which is in JSON format: {"sentences":[{"trans":"??","orig":"??","translit":"Guangchang"}],"src":"zh-CN"} However, when I try to use this function in XCode, I experienced this problem ... Here is my code: NSData *data; NSString *urlPath = [NSString stringWithFormat:@"/translate_a/t?client=t&text=%@&langpair=zh|zh-CN",qText]; NSURL *url = [[NSURL alloc] initWithScheme:@"http" host:@"translate.google.com" path:urlPath]; NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:url]; [request setHTTPMethod:@"GET"]; NSURLResponse *response; NSError *error; data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; //Problem's here. It returns nil. NSLog(result); Initially I guessed it's encoding problem so I tried other encoding as well (NSISOLatin1StringEncoding) , but I got wrong answer: {"sentences":[{"trans":"ã ","orig":"ã ","translit":"Tu¨¯ "}],"src":"zh-CN"} Does anyone know how to solve this problem? Thank you very much!

    Read the article

  • Preg_match differences?

    - by sky
    Hi, i want to ask, what is the meaning or difference between these two line? if( preg_match_all('/\#([?-?À-ÿ?-??-?a-z0-9\-_]{1,50})/iu', $message, $matches, PREG_PATTERN_ORDER) ) { if( preg_match_all('/\#([?-?a-z0-9\-_\x{4e00}-\x{9fa5}]{1,50})/iu', $message, $matches, PREG_PATTERN_ORDER) ) { and what does the number 3 mean in this line? (Arrow pointing) if( preg_match_all('/\@([a-zA-Z0-9\-_\x{4e00}-\x{9fa5}]{->3,30})/u', $message, $matches, PREG_PATTERN_ORDER) ) { Thanks!

    Read the article

  • NHibernate Linq queries not returning data saved in the same transaction

    - by Andrew
    Hi, I have a situation where I am using NHibernate in a WCF service and using a TransactionScope for the transaction management. NHibernate enlists in the ambient transaction fine, but, any changes I make and save inside the transaction, are not visible to any queries I make while still in that transaction. So if I add an entity and session.save() it, then further on in the code, there is a linq query against that entities table, the entity I just added is not returned. Strangely this seems to work fine if I use explicit NHibernate transactions in my tests. Anyone have any ideas as to why and what I can do about it? Many thanks Andrew

    Read the article

  • Examples of mobile frameworks that support AdSense for mobile content ads?

    - by David Sky
    I’ve tried, I really have, to find examples of serving up AdSense for mobile content ads in any of the popular mobile frameworks, but can’t find running webpages with ads, nor tutorials, etc.... I’ve done some iUI work, but would consider jQueryMobile, iWebKit, even sencha-touch if I could find an example that actually displays ads within the framework on an iPhone, iPod touch,etc... I realize there are issues with the HTML adSense generates, but hasn’t anyone found a work-around? Surely some mobile HTML sites must be serving up ads? Links to tutorials would be much appreciated!

    Read the article

  • c# create an arbitrary length generic parameter string e.g. ?,?,?

    - by Sky Sanders
    I know I am forgetting to remember how to do this and it is late. I want to, in an elegant manner, build a placeholder list for a munged sql command. Have a command with an arbitrary number of parameters, need to build ?,?,? Did I mention that it was a wet brain fart? this is what came out: Regex.Replace(new string('?', _command.Parameters.Count), @"\?\?", @"\?,\?"); You are welcome to make me feel like more of an idiot if you just remember me what I am forgetting. ;-)

    Read the article

  • How to change the JSON output format and how to support chinese character?

    - by sky
    Currently I using the following code to get my JSON output from MySQL. <?php $session = mysql_connect('localhost','name','pass'); mysql_select_db('dbname', $session); $result= mysql_query('SELECT message FROM posts', $session); $somethings = array(); while ($row = mysql_fetch_assoc($result)) { $somethings[] = $row; } ?> <script type="text/javascript"> var somethings= <?php echo json_encode($somethings); ?>; </script> And the output is: <script type="text/javascript"> var somethings= [{"message":"Welcome to Yo~ :)"},{"message":"Try iPhone post!"},{"message":"????"}]; </script> Here is the question, how can I change my output into format like : <script type="text/javascript"> userAge = new Array('21','36','20'), userMid = new Array('liuple','anhu','jacksen'); </script> Which I'll be using later with following code : var html = ' <table class="map-overlay"> <tr> <td class="user">' + '<a class="username" href="/' + **userMid[index]** + '" target="_blank"><img alt="" src="' + getAvatar(signImgList[index], '72x72') + '"></a><br> <a class="username" href="/' + **userMid[index]** + '" target="_blank">' + userNameList[index] + '</a><br> <span class="info">' + **userSex[index]** + ' ' + **userAge[index]** + '?<br> ' + cityList[index] + '</span>' + '</td> <td class="content">' + picString + somethings[index] + '<br> <span class="time">' + timeList[index] + picTips + '</span></td> </tr> </table> '; Thanks for helping and reading!

    Read the article

  • Cannot output json from MySQL - getting null value

    - by sky
    I'm using following code but cannot return data from MySQL. This is the output: <script type="text/javascript"> var somethings= [null,null,null]; </script> It does have three post, but I couldn't get the title(message) output. EDIT: this is the code I'm using: <?php $session = mysql_connect('localhost','name','pass'); mysql_select_db('dbname', $session); $result= mysql_query('SELECT * FROM posts', $session); $somethings= array(); while ($row= mysql_fetch_assoc($result)) { $somethings[]= $row['something']; } ?> <script type="text/javascript"> var somethings= <?php echo json_encode($somethings); ?>; </script>

    Read the article

  • How to convert my mysql data into this?

    - by sky
    <script type="text/javascript"> var cityList = new Array(....etc), signImgList = new Array('http:\/\/pic.sitename.com:80\/file\/11\/34\/01\/22\/default\/SIGN11340122_48x48.jpg?t=1257391453468'....etc), titleList = new Array(....etc), userSex = new Array(....etc), userAge = new Array('19','26'....etc), userMid = new Array('lwowl','kylin0621'....etc); </script>

    Read the article

  • How can I output my MySQL data into following structures?

    - by sky
    Here is the question, how can I output MySQL data into format like : userAge, userMid are the column name, table name Users. <script type="text/javascript"> userAge = new Array('21','36','20'), userMid = new Array('liuple','anhu','jacksen'); </script> Which I'll be using later with following code : var html = ' <table class="map-overlay"> <tr> <td class="user">' + '<a class="username" href="/' + **userMid[index]** + '" target="_blank"><img alt="" src="' + getAvatar(signImgList[index], '72x72') + '"></a><br> <a class="username" href="/' + **userMid[index]** + '" target="_blank">' + userNameList[index] + '</a><br> <span class="info">' + **userSex[index]** + ' ' + **userAge[index]** + '?<br> ' + cityList[index] + '</span>' + '</td> <td class="content">' + picString + somethings[index] + '<br> <span class="time">' + timeList[index] + picTips + '</span></td> </tr> </table> '; PS: I Just been told that i coulnt use JSON to output that format, so i have no idea now .< Thanks!

    Read the article

  • New user register, script auto create problems!

    - by SKY
    Hi, im currently trying to create a php script that when a new user register, a script (eg:wordpress,blog etc..) will install for them. I'm currently got the code below for just single setup, but how can i setup a form for multi user? which only allowing them to input the username (subdomain) and password. <?php class scriptname_Config { public static $title = 'new_script_title'; // Domain name and path where new script will installed in public static $domain = 'username.domain.com'; public static $absolutePath = '/new_register_username/'; // Settings for general mysql database public static $db = array( 'host' => 'localhost', 'database' => 'scriptname', 'user' => 'root', 'password' => '', 'prefix' => 'scriptname_' ); } define( 'scriptname_BASE_URL', 'http://'.scriptname_Config::$domain.scriptname_Config::$absolutePath ); ?> Or any tutorial that will help is appreciate! Thanks!

    Read the article

  • What is corret way to connect to MySQL?

    - by sky
    what is the correct way to connect to MySQL database without the mysql_fetch_assoc() error? Getting [Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource] with mysql_connect('localhost', 'name', 'pass'); mysql_select_db('dbname'); getting mysql_fetch_assoc() error without mysql_select_db any suggest? CODE are: $result= mysql_query('SELECT DISTINCT username FROM users'); $somethings= array(); while ($row= mysql_fetch_assoc($results)) { $somethings[]= $row['something']; } ? var somethings= ;

    Read the article

  • How to reslove mysql_fetch_assoc(): problems!

    - by sky
    When i use the code below, im getting this error: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource when returning the data, anyone can fix it? Thanks! <?php $mysql_server_name="localhost"; $mysql_username=""; $mysql_password=""; $mysql_database=""; $conn=mysql_connect($mysql_server_name, $mysql_username, $mysql_password); ?> <?php $result = mysql_query("SELECT * FROM users"); $arrays = array(); while ($row = mysql_fetch_assoc($result)) { foreach ($row as $key => $val) { if (!array_contains_key($key)) { $arrays[$key] = array(); } $arrays[$key][] = $val; } } ?> <script type="text/javascript"> <?php foreach ($arrays as $key => $val) { print 'var ' . $key . ' = ' . json_encode($val) . ";\r\n"; } ?> </script>

    Read the article

  • Getting Null value with JSON from MySQL, how to retrive data from MySQL to JSON correctly?

    - by sky
    I'm using following code but cannot return data from MySQL. This is the output: <script type="text/javascript"> var somethings= [null,null,null]; </script> It does have three post, but I couldn't get the title(message) output. EDIT: this is the code I'm using: <?php $session = mysql_connect('localhost','name','pass'); mysql_select_db('dbname', $session); $result= mysql_query('SELECT * FROM posts', $session); $somethings= array(); while ($row= mysql_fetch_assoc($result)) { $somethings[]= $row['something']; } ?> <script type="text/javascript"> var somethings= <?php echo json_encode($somethings); ?>; </script> This is the table: message Try iPhone post! Welcome to Yo~ :) ??!

    Read the article

  • function.array-diff problems!

    - by SKY
    Hi, im currently getting these error on my site: Warning: array_keys() [function.array-keys]: The first argument should be an array on line 43 Warning: Invalid argument supplied for foreach() on line 44 Warning: array_diff() [function.array-diff]: Argument #1 is not an array on line 47 Warning: array_diff() [function.array-diff]: Argument #1 is not an array on line 48 And the source are: 42. $tmp = $this->network->get_user_follows($this->user->id); 43. $tmp = array_keys($tmp->followers); 44. foreach($tmp as &$v) { $v = intval($v); } 45. $tmp2 = array_keys($this->network->get_group_members($g->id)); 46. foreach($tmp2 as &$v) { $v = intval($v); } 47. $tmp = array_diff($tmp, $tmp2); 48. $tmp = array_diff($tmp, array(intval($this->user->id))); I want to know what is the problem and how i fix it. Thanks!

    Read the article

  • Is Microsoft&rsquo;s Cloud Bet Placed on the Ground?

    - by andrewbrust
    Today at the Unversity of Washington, Steve Ballmer gave a speech on Microsoft’s cloud strategy.  Significantly, Azure was only briefly mentioned and was not shown.  Instead, Ballmer spoke about what he called the five “dimensions” of the cloud, and used that as the basis for an almost philosophical discussion.  Ballmer opined on how the cloud should be distinguished from the Internet.as well as what the cloud will and should enable.  Ballmer worked hard to portray the cloud not as a challenger to Windows and PCs (as Google would certainly suggest it is) but  really as just the latest peripheral that adds value to PCs and devices. At one point during his speech, Ballmer said “We start with Windows at Microsoft.  It’s the most popular smart device on the planet.  And our design center for the future of Windows is to make it one of those smarter devices that the cloud really wants.”  I’m not sure I agree with Ballmer’s ambition here, but I must admit he’s taken the “software + services” concept and expanded on it in more consumer-friendly fashion. There were demos too.  For example, Blaise Aguera y Arcas reprised his Bing Maps demo from the TED conference held last month.  And Simon Atwell showed how Microsoft has teamed with Sky TV in the UK to turn Xbox into something that looks uncannily like Windows Media Center.  Specifically, an Xbox console app called Sky Player provides full access to Sky’s on-demand programming but also live TV access to an array of networks carried on its home TV service, complete with an on-screen programming guide.  Windows Phone 7 Series was shown quickly and Ballmer told us that while Windows Mobile/Phone 6.5 and earlier were designed for voice and legacy functionality, Windows Phone 7 Series is designed for the cloud. Over and over during Ballmer’s talk (and those of his guest demo presenters), the message was clear: Microsoft believes that client (“smart”) devices, and not mere HTML terminals, are the technologies to best deliver on the promise of the cloud.  The message was that PCs running Windows, game consoles and smart phones  whose native interfaces are Internet-connected offer the most effective way to utilize cloud capabilities.  Even the Bing Maps demo conveyed this message, because the advanced technology shown in the demo uses Silverlight (and thus the PCs computing power), and not AJAX (which relies only upon the browser’s native scripting and rendering capabilities) to produce the impressive interface shown to the audience. Microsoft’s new slogan, with respect to the cloud, is “we’re all in.”  Just as a Texas Hold ‘em player bets his entire stash of chips when he goes all in, so too is Microsoft “betting the company” on the cloud.  But it would seem that Microsoft’s bet isn’t on the cloud in a pure sense, and is instead on the power of the cloud to fuel new growth in PCs and other client devices, Microsoft’s traditional comfort zone.  Is that a bet or a hedge?  If the latter, is Microsoft truly all in?  I don’t really know.  I think many people would say this is a sucker’s bet.  But others would say it’s suckers who bet against Microsoft.  No matter what, the burden is on Microsoft to prove this contrarian view of the cloud is a sensible one.  To do that, they’ll need to deliver on cloud-connected device innovation.  And to do that, the whole company will need to feel that victory is crucial.  Time will tell.  And I expect to present progress reports in future posts.

    Read the article

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