Search Results

Search found 41 results on 2 pages for 'lorenzo'.

Page 2/2 | < Previous Page | 1 2 

  • Jquery Fast image switching

    - by echedey lorenzo
    Hi, I have a php class that generates a map image depending on my db data. It is periodically updated thru a serInterval loop. I am trying to update it with no flickering but I just can't. I've tried different methods (preloader, imageswitcher) with no success. //first load function map() { $("#map").html("<img src=map.php?randval="+Math.random()+">"); } //update it from setInterval calls function updatemap() { $("#map").fadeOut(function() { $(this).load(function() { $(this).fadeIn(); }); $(this).attr("src", "map.php?randval="+Math.random()); }) } Is there any way to update the image with no flickering at all? I would prefer an inmediate swap insteado of a fade. The problem I'm having is that after calling updatemap() the image just dissapears. ¿Maybe it is a problem with the attribute src I am parsing? THanks for your help.

    Read the article

  • Android-iPhone single codebase cross development

    - by Lorenzo
    Is there a way, apart from using HTML and JavaScript on a web control, to have an (almost) single codebase for an application that should run on iOS and Android? The big issue is of course that they use a different language (Java for Android, Objective-C for iOS) for application development. It would be nice to have some sort of meta-language that will be translated in Java and in Objective-C. What about Flash? Adobe wasn't supposed to release a tool to create flash-based apps in iOS? Update: based on current answers, the best cross platform development tool for iOS and Android seems to be Titanium appcelerator. I suspect that this topic will evolve overtime, so feel free to contribute with new information and comments. Thank you!

    Read the article

  • EF + UnitOfWork + SharePoint RunWithElevatedPrivileges

    - by Lorenzo
    In our SharePoint application we have used the UnitOfWork + Repository patterns together with Entity Framework. To avoid the usage of the passthrough authentication we have developed a piece of code that impersonate a single user before creating the ObjectContext instance in a similar way that is described in "Impersonating user with Entity Framework" on this site. The only difference between our code and the referred question is that, to do the impersonation, we are using RunWithElevatedPrivileges to impersonate the Application Pool identity as in the following sample. SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite(url)) { _context = new MyDataContext(ConfigSingleton.GetInstance().ConnectionString); } }); We have done this way because we expected that creating the ObjectContext after impersonation and, due to the fact that Repositories are receiving the impersonated ObjectContext would solve our requirement. Unfortunately it's not so easy. In fact we experienced that, even if the ObjectContext is created before and under impersonation circumstances, the real connection is made just before executing the query, and so does not use impersonation, which break our requirement. I have checked the ObjectContext class to see if there was any event through which we can inject the impersonation but unfortunately found nothing. Any help?

    Read the article

  • C: Cannot declare pointer inside if statement

    - by echedey lorenzo
    Hi, I have a pointer which points to a function. I would like to: if (mode == 0) { const unsigned char *packet = read_serial_packet(src, &len); } else { const unsigned char *packet = read_network_packet(fd, &len); } But I cannot do it because my compiler complains when I first use the pointer later in the code. error: 'packet' undeclared (first use in this function) This is strange. It worked without the if statement, but now I need my program to be able to get data from different sources. Isn't it possible to do this? I think so. If it isn't, is there any other simple way to get what I am trying? Thanks a lot.

    Read the article

  • Is there something like PHP ob_start for C?

    - by echedey lorenzo
    Hi, I have a simple gateway listener which generates a log at the screen output via printf. I would like to record it so I can insert it in a mysql table. printf("\nPacket received!! Decoding..."); I wonder if there is any fast way to do this is C. In case there is, could I get both outputs at the same time? Thanks

    Read the article

  • What's a good unit test framework for Common Lisp projects?

    - by Lorenzo V.
    I need to write a unit test suite for a project I am developing in my spare time. Being a CL newbie I was overwhelmed by the amount of choices for a CL implementation, I spent quite some time to choose one. Now I am facing exactly the same thing with unit test frameworks. A quick glance at http://www.cliki.net/test%20framework shows 20 unit test frameworks! Choice is good but for a novice like me this can be a bit confusing and given the number of frameworks it would be painful to try them all. I would like to use a framework which: Is reasonably well maintained Easy to use but with some degree of flexibility Offers some sort of integration with Emacs (or it is possible to easily integrate it with Emacs) Integration with git post-commit hooks Integration with a continous integration system (such as buildbot) What are your experiences in this field?

    Read the article

  • Android-iPhone single codebase

    - by Lorenzo
    Is there a way, apart from using HTML and JavaScript on a web control, to have an (almost) single codebase for an application that should run on iOS and Android? The big issue is of course that they use a different language (Java for Android, Objective-C for iOS) for application development. It would be nice to have some sort of meta-language that will be translated in Java and in Objective-C. What about Flash? Adobe wasn't supposed to release a tool to create flash-based apps in iOS?

    Read the article

  • Create and display indoor map on Android

    - by Lorenzo Barbagli
    I'm developing an Android application and I would like to display an internal (indoor) map of some buildings, but I don't know where to begin: I want to create a custom kml file (how it's possible to create it? with which tool?) and display it in a fragment. I already have it working with external maps (simple GoogleMap in MapFragment), so it would be super to have the kml file placed 'over' the GoogleMap, like real indoor maps. Thanks

    Read the article

  • Xcode iphone sdk - Searching in UITableView, different pattern matching

    - by Lorenzo
    Hi everyone, I'm coding a UITableView with a UISearchBar to search between a list of cities (loaded in the uitableview) Here is my code for searhing: - (void) searchTableView { NSString *searchText = searchBar.text; NSMutableArray *searchArray = [[NSMutableArray alloc] init]; for (NSDictionary *dictionary in listOfItems) { NSArray *array = [dictionary objectForKey:@"Cities"]; [searchArray addObjectsFromArray:array]; } for (NSString *sTemp in searchArray) { NSRange titleResultsRange = [sTemp rangeOfString:searchText options:NSCaseInsensitiveSearch]; if (titleResultsRange.length > 0) [copyListOfItems addObject:sTemp]; } [searchArray release]; searchArray = nil;} And with this everything works fine, but i need to do something a bit different. I need to search only between items that match pattern Word* and not * Word *. For example if I search "roma", this need to match just with "Roma" or "Romania" and not with "Castelli di Roma". Is that possible with this searchbar? How can i modify this? Thanks

    Read the article

  • How to use StructureMap to inject repository classes to the controller?

    - by Lorenzo
    In the current application I am working on I have a custom ControllerFactory class that create a controller and automatically sets the Elmah ErrorHandler. public class BaseControllerFactory : DefaultControllerFactory { public override IController CreateController( RequestContext requestContext, string controllerName ) { var controller = base.CreateController( requestContext, controllerName ); var c = controller as Controller; if ( c != null ) { c.ActionInvoker = new ErrorHandlingActionInvoker( new HandleErrorWithElmahAttribute() ); } return controller; } protected override IController GetControllerInstance( RequestContext requestContext, Type controllerType ) { try { if ( ( requestContext == null ) || ( controllerType == null ) ) return base.GetControllerInstance( requestContext, controllerType ); return (Controller)ObjectFactory.GetInstance( controllerType ); } catch ( StructureMapException ) { System.Diagnostics.Debug.WriteLine( ObjectFactory.WhatDoIHave() ); throw new Exception( ObjectFactory.WhatDoIHave() ); } } } I would like to use StructureMap to inject some code in my controllers. For example I would like to automatically inject repository classes in them. I have already created my repository classes and also I have added a constructor to the controller that receive the repository class public FirmController( IContactRepository contactRepository ) { _contactRepository = contactRepository; } I have then registered the type within StructureMap ObjectFactory.Initialize( x => { x.For<IContactRepository>().Use<MyContactRepository>(); }); How should I change the code in the CreateController method to have the IContactRepository concrete class injected in the FirmController? EDIT: I have changed the BaseControllerFactory to use Structuremap. But I get an exception on the line return (Controller)ObjectFactory.GetInstance( controllerType ); Any hint?

    Read the article

  • Combining JavaScript for Google Analytics with yours. (Asynchronous tracking.)

    - by lorenzo 72
    I have a JavaScript file which is loaded up at the end of my HTML page. Rather than adding the script code for asynchronous tracking for Google in yet another script I would rather combine the two scripts together. So instead of this: <html> ... <script src="myScript.js"> <!-- google analytics --> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga); })(); </script> </html> I would have that bit of code in the second script tag at the end of my 'myScript.js'. I have not found one place in google documentation where it suggests to combine the script with yours.

    Read the article

  • console.log() and google chrome

    - by Lorenzo C
    I'm testing a library and I use console.log() function to visualyze values. There is a strange behaviour of Google Chrome (in other browser like Firefox it doesn't happend). If I try to store strings in Array object when I log them, sometimes values appears undefined. Code example (item.name is a string) var arrayItemsSearch = [item.name]; var itemRedrawName = [item.name]; console.log("arrayItemsSearch: ", arrayItemsSearch); console.log("itemRedrawName: ", itemRedrawName); Firefox output is correct arrayItemsSearch: ["elem[0]"] itemRedrawName: ["elem[0]"] Chrome output is not correct arrayItemsSearch: [undefined × 1] itemRedrawName: ["elem[0]"] Is this a Chrome bug? Or is this beacuse in Javascript strings are immutable objects and so something that I don't understand goes wrong?

    Read the article

  • How is executed a SendMessage from a different thread?

    - by Lorenzo
    When we send a message, "if the specified window was created by the calling thread, the window procedure is called immediately as a subroutine". But "if the specified window was created by a different thread, the system switches to that thread and calls the appropriate window procedure. Messages sent between threads are processed only when the receiving thread executes message retrieval code." (taken from MSDN documentation for SendMessage). Now, I don't understand how (or, more appropriately, when) the target windows procedure is called. Of course the target thread will not be preempted (the program counter is not changed). I presume that the call will happen during some wait function (like GetMessage or PeekMessage), it is true? That process is documented in detail somewhere?

    Read the article

  • La pianificazione finanziaria fra le opere di Peggy Guggenheim

    - by user812481
    Lo scorso 22 giugno nella fantastica cornice del Palazzo Venier dei Leoni a Venezia si è tenuto il CFO Executive meeting & event sul Cash flow planning &Optimization. L’evento iniziato con un networking lunch ha permesso agli ospiti di godere della fantastica vista della terrazza panoramica del palazzo che affaccia su Canal Grande. Durante i lavori, Oracle e Reply Consulting, partner dell’evento, hanno parlato della strategia di corporate finance e del valore della pianificazione economico-finanziaria- patrimoniale integrata. Grazie alla partecipazione di Banca IMI si sono potuti approfondire i temi del Business Plan, Sensitivity Analysis e Covenant Test nelle operazioni di Finanza Strutturata. AITI (Associazione Italiana Tesorieri d’Impresa) ha concluso i lavori dando una visione a 360° della pianificazione finanziaria, spiegando il percorso strategico necessario per i flussi di capitale a sostegno del business. Ecco l’elenco degli interventi: Il valore della pianificazione economico-finanziaria-patrimoniale integrata per il CFO nei processi di corporate governance - Lorenzo Mariani, Partner - Reply Consulting Business Plan, Sensitivity Analysis e Covenant Test nelle operazioni di Finanza Strutturata: applicazioni nelle fasi di concessione del credito e di monitoraggio dei rischi - Gianluca Vittucci, Responsabile Finanza Strutturata Banca dei Territori - Banca IMI Dalla strategia di corporate finance al planning operativo: una visione completa ed integrata del processo di pianificazione economico-finanziario-patrimoniale - Edilio Rossi, EPM Business Development Manager, Italy - Oracle EMEA Pianificazione Finanziaria: percorso strategico per ottimizzare i flussi di capitale allo sviluppo del business Aziendale; processo base nelle relazioni con il sistema bancario - Giovanni Ceci, Consigliere AITI e Temporary Finance Manager - Associazione Italiana Tesorieri d’Impresa Per visualizzare tutte le presentazioni seguici su slideshare.  Per visualizzare tutte le foto della giornata clicca qui.

    Read the article

  • Infinite loop when using fscanf

    - by user1409641
    I wrote this simple program in C, because I'm studying FILES right now at University. I take a txt file with a list of the results of the last race so my program will show the data formatted as I want. Here's my code: /* Esercizio file Motogp */ #include <stdio.h> #define SIZE 20 int main () { int pos, punt, num; float kmh; char nome[SIZE+1], cognome[SIZE+1], moto[SIZE+1]; char naz[SIZE+1], nome_file[SIZE+1]; FILE *fp; printf ("Inserisci il nome del file da aprire: "); gets (nome_file); fp = fopen (nome_file, "r"); if (fopen == NULL) printf ("Errore nell' apertura del file %s\n", nome_file); else { while (fscanf (fp, "%d %d %d %s %s %s %s %.2f", &pos, &punt, &num, nome, cognome, naz, moto, &kmh) != EOF ) { printf ("Posizione di arrivo: %d\n", pos); printf ("Punteggio: %d\n", punt); printf ("Numero pilota: %d\n", num); printf ("Nome pilota: %s\n", nome); printf ("Cognome pilota: %s\n", cognome); printf ("Nazione: %s\n", naz); printf ("Moto: %s\n", moto); printf ("Media Kmh: %d\n\n", kmh); } } fclose(fp); return 0; } and there's my txt file: 1 25 99 Jorge LORENZO SPA Yamaha 164.4 2 20 26 Dani PEDROSA SPA Honda 164.1 3 16 4 Andrea DOVIZIOSO ITA Yamaha 163.8 4 13 1 Casey STONER AUS Honda 163.8 5 11 35 Cal CRUTCHLOW GBR Yamaha 163.6 6 10 19 Alvaro BAUTISTA SPA Honda 163.5 7 9 46 Valentino ROSSI ITA Ducati 163.3 8 8 6 Stefan BRADL GER Honda 162.9 9 7 69 Nicky HAYDEN USA Ducati 162.5 10 6 11 Ben SPIES USA Yamaha 162.3 11 5 8 Hector BARBERA SPA Ducati 162.1 12 4 17 Karel ABRAHAM CZE Ducati 160.9 13 3 41 Aleix ESPARGARO SPA ART 160.2 14 2 51 Michele PIRRO ITA FTR 160.1 15 1 14 Randy DE PUNIET FRA ART 160.0 16 0 77 James ELLISON GBR ART 159.9 17 0 54 Mattia PASINI ITA ART 159.4 18 0 68 Yonny HERNANDEZ COL BQR 159.4 19 0 9 Danilo PETRUCCI ITA Ioda 158.2 20 0 22 Ivan SILVA SPA BQR 158.2 When I run my program, it return me an infinite loop of the first one. Why? Is there another function to read those data?

    Read the article

  • Where to find xmoov port to C#? (to make Http Pseudo Streaming from c# app)

    - by Ole Jak
    So I found this beautifull script for FLV video format Http Pseudo Streaming but in is in PHP ( found on http://stream.xmoov.com/ ) So does any one know opensource translations or can translate such PHP code into C#? <?php /* xmoov-php 1.0 Development version 0.9.3 beta by: Eric Lorenzo Benjamin jr. webmaster (AT) xmoov (DOT) com originally inspired by Stefan Richter at flashcomguru.com bandwidth limiting by Terry streamingflvcom (AT) dedicatedmanagers (DOT) com This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. For more information, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ For the full license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA. */ // SCRIPT CONFIGURATION //------------------------------------------------------------------------------------------ // MEDIA PATH // // you can configure these settings to point to video files outside the public html folder. //------------------------------------------------------------------------------------------ // points to server root define('XMOOV_PATH_ROOT', ''); // points to the folder containing the video files. define('XMOOV_PATH_FILES', 'video/'); //------------------------------------------------------------------------------------------ // SCRIPT BEHAVIOR //------------------------------------------------------------------------------------------ //set to TRUE to use bandwidth limiting. define('XMOOV_CONF_LIMIT_BANDWIDTH', TRUE); //set to FALSE to prohibit caching of video files. define('XMOOV_CONF_ALLOW_FILE_CACHE', FALSE); //------------------------------------------------------------------------------------------ // BANDWIDTH SETTINGS // // these settings are only needed when using bandwidth limiting. // // bandwidth is limited my sending a limited amount of video data(XMOOV_BW_PACKET_SIZE), // in specified time intervals(XMOOV_BW_PACKET_INTERVAL). // avoid time intervals over 1.5 seconds for best results. // // you can also control bandwidth limiting via http command using your video player. // the function getBandwidthLimit($part) holds three preconfigured presets(low, mid, high), // which can be changed to meet your needs //------------------------------------------------------------------------------------------ //set how many kilobytes will be sent per time interval define('XMOOV_BW_PACKET_SIZE', 90); //set the time interval in which data packets will be sent in seconds. define('XMOOV_BW_PACKET_INTERVAL', 0.3); //set to TRUE to control bandwidth externally via http. define('XMOOV_CONF_ALLOW_DYNAMIC_BANDWIDTH', TRUE); //------------------------------------------------------------------------------------------ // DYNAMIC BANDWIDTH CONTROL //------------------------------------------------------------------------------------------ function getBandwidthLimit($part) { switch($part) { case 'interval' : switch($_GET[XMOOV_GET_BANDWIDTH]) { case 'low' : return 1; break; case 'mid' : return 0.5; break; case 'high' : return 0.3; break; default : return XMOOV_BW_PACKET_INTERVAL; break; } break; case 'size' : switch($_GET[XMOOV_GET_BANDWIDTH]) { case 'low' : return 10; break; case 'mid' : return 40; break; case 'high' : return 90; break; default : return XMOOV_BW_PACKET_SIZE; break; } break; } } //------------------------------------------------------------------------------------------ // INCOMING GET VARIABLES CONFIGURATION // // use these settings to configure how video files, seek position and bandwidth settings are accessed by your player //------------------------------------------------------------------------------------------ define('XMOOV_GET_FILE', 'file'); define('XMOOV_GET_POSITION', 'position'); define('XMOOV_GET_AUTHENTICATION', 'key'); define('XMOOV_GET_BANDWIDTH', 'bw'); // END SCRIPT CONFIGURATION - do not change anything beyond this point if you do not know what you are doing //------------------------------------------------------------------------------------------ // PROCESS FILE REQUEST //------------------------------------------------------------------------------------------ if(isset($_GET[XMOOV_GET_FILE]) && isset($_GET[XMOOV_GET_POSITION])) { // PROCESS VARIABLES # get seek position $seekPos = intval($_GET[XMOOV_GET_POSITION]); # get file name $fileName = htmlspecialchars($_GET[XMOOV_GET_FILE]); # assemble file path $file = XMOOV_PATH_ROOT . XMOOV_PATH_FILES . $fileName; # assemble packet interval $packet_interval = (XMOOV_CONF_ALLOW_DYNAMIC_BANDWIDTH && isset($_GET[XMOOV_GET_BANDWIDTH])) ? getBandwidthLimit('interval') : XMOOV_BW_PACKET_INTERVAL; # assemble packet size $packet_size = ((XMOOV_CONF_ALLOW_DYNAMIC_BANDWIDTH && isset($_GET[XMOOV_GET_BANDWIDTH])) ? getBandwidthLimit('size') : XMOOV_BW_PACKET_SIZE) * 1042; # security improved by by TRUI www.trui.net if (!file_exists($file)) { print('<b>ERROR:</b> xmoov-php could not find (' . $fileName . ') please check your settings.'); exit(); } if(file_exists($file) && strrchr($fileName, '.') == '.flv' && strlen($fileName) > 2 && !eregi(basename($_SERVER['PHP_SELF']), $fileName) && ereg('^[^./][^/]*$', $fileName)) { # stay clean @ob_end_clean(); @set_time_limit(0); # keep binary data safe set_magic_quotes_runtime(0); $fh = fopen($file, 'rb') or die ('<b>ERROR:</b> xmoov-php could not open (' . $fileName . ')'); $fileSize = filesize($file) - (($seekPos > 0) ? $seekPos + 1 : 0); // SEND HEADERS if(!XMOOV_CONF_ALLOW_FILE_CACHE) { # prohibit caching (different methods for different clients) session_cache_limiter("nocache"); header("Expires: Thu, 19 Nov 1981 08:52:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); header("Pragma: no-cache"); } # content headers header("Content-Type: video/x-flv"); header("Content-Disposition: attachment; filename=\"" . $fileName . "\""); header("Content-Length: " . $fileSize); # FLV file format header if($seekPos != 0) { print('FLV'); print(pack('C', 1)); print(pack('C', 1)); print(pack('N', 9)); print(pack('N', 9)); } # seek to requested file position fseek($fh, $seekPos); # output file while(!feof($fh)) { # use bandwidth limiting - by Terry if(XMOOV_CONF_LIMIT_BANDWIDTH) { # get start time list($usec, $sec) = explode(' ', microtime()); $time_start = ((float)$usec + (float)$sec); # output packet print(fread($fh, $packet_size)); # get end time list($usec, $sec) = explode(' ', microtime()); $time_stop = ((float)$usec + (float)$sec); # wait if output is slower than $packet_interval $time_difference = $time_stop - $time_start; # clean up @flush(); @ob_flush(); if($time_difference < (float)$packet_interval) { usleep((float)$packet_interval * 1000000 - (float)$time_difference * 1000000); } } else { # output file without bandwidth limiting print(fread($fh, filesize($file))); } } } } ?>

    Read the article

< Previous Page | 1 2