Search Results

Search found 434 results on 18 pages for 'marco russo (sqlbi)'.

Page 11/18 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • undefined symbol: PyUnicodeUCS2_Decode whilst trying to install psycopg2

    - by Marco Fucci
    I'm getting an error whilst trying to install psycopg2 on ubuntu 9.10 64 bit. The error is: >>> import psycopg2 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "psycopg2/__init__.py", line 69, in <module> from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: psycopg2/_psycopg.so: undefined symbol: PyUnicodeUCS2_Decode I've tried downloading the package from http://initd.org/pub/software/psycopg/ and installing it. I've tried by using easy_install too. No error during the installation. It's quite weird as my python (2.6.2) has been compiled with UCS4 and so the installation should just work without problems. Any help would be appreciated. Cheers

    Read the article

  • javascript using 'this' in global object

    - by Marco Demaio
    What does 'this' keyword refer to when used in gloabl object? Let's say for instance we have: var SomeGlobalObject = { rendered: true, show: function() { /* I should use 'SomeGlobalObject.rendered' below, otherwise it won't work when called from event scope. But it works when called from timer scope!! How can this be? */ if(this.rendered) alert("hello"); } } Now if we call in an inline script in the HTML page: SomeGlobalObject.show(); window.setTimeout("Msg.show()", 1000); everything work ok. But if we do something like AppendEvent(window, 'load', Msg.show); we get an error because this.rendered is undefined when called from the event scope. Do you know why this happens? Could you explain then if there is another smarter way to do this without having to rewrite every time "SomeGlobalObject.someProperty" into the the SomeGlobalObject code? Thanks! AppendEvent is just a simple cross-browser function to append an event, code below, but it does not matter in order to answer the above questions. function AppendEvent(html_element, event_name, event_function) { if(html_element.attachEvent) //IE return html_element.attachEvent("on" + event_name, event_function); else if(html_element.addEventListener) //FF html_element.addEventListener(event_name, event_function, false); }

    Read the article

  • TFS: How to dectet changed files when loading a solution?

    - by marco.ragogna
    I am new to TFS integration with Visual Studio 2010, and I have a problem I would like to solve. Practically, when I open a solution, how can I detect, looking only at the Solution Explorer which file has been changed since my last login? I am able to discover the changed files if I look at the Latest column of Source Control Explorer but it is not so intuitive. I attach you an image for better understanding. I would like to have a different icon, not the lock, for frmAbout.vb (in this case), associated to the item in Solution Explorer. Do you have any idea how can I achieve this behavior? Or some alternatives?

    Read the article

  • Get Lat, Long from CLLocation

    - by Marco
    Hello i have an CLLocation which is my userLocation, now in another class i have to open the maps app and make a route from the userLocation to another point. But how can i get in the another class the Coordinates of userLocation? please help me i have no idea

    Read the article

  • SVN project folder tree structure vs production folder tree structure

    - by Marco Demaio
    While developing a PHP+JS web application we always try to separate big blocks of code into small modules/components, in order to make these last ones as much reusable as possible in other applications. Let's say we now have: the EcommerceApp (an ecommerce main application) a Server-file-mgr component (a component to view/manage file on server) a Mylib (a library of useful functions) a MailistApp (another main application to handle mail lists) ... EcommerceApp needs both Server-file-mgr component and Mylib to work Server-file-mgr needs Mylib to work MaillistApp needs both Server-file-mgr component and Mylib to work too. My idea is to simply structure the SVN project folder tree putting everything at the same level: trunk/EcommerceApp trunk/Server-file-mgr trunk/Mylib trunk/MaillistApp But in real life to make these apps to work the folder tree structure must be the following: EcommerceApp |_ Mylib |_ Server-file-mgr MaillistApp |_ Mylib |_ Server-file-mgr I mean Mylib and Server-file-mgr needs to be inside the EcommerceApp/MaillistApp folder. How would you then structure the SVN folder, as I did or in a different/better/smarter way???

    Read the article

  • Hibernate GenericDAO for parent/child relationships and DAO/DTO patterns

    - by Marco
    Hi, I'm looking for a Generic DAO implementation in Hibernate that includes parent/child relationship management (adding, removing, getting childs, setting parents, etc). Actually the most used generic DAO on the web is the one i found on http://community.jboss.org/wiki/GenericDataAccessObjects. And also, i was looking for some DAO/DTO sample implementations and design patterns. Do you know some good resources out there?

    Read the article

  • Loading GMaps via ajax

    - by Marco
    Hi to all, I'm loading a page containing a GMaps using the ajax() method of jQuery. The HTML page i'm loading is: <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=MY_API_KEY" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); var geocoder = new GClientGeocoder(); geocoder.getLatLng("San Francisco, California",function(point) { if (point) { map.setCenter(point, 7); } }); map.setUIToDefault(); } }); </script> <div id="map_canvas"></div> After retrieving this page, I'm setting its contents to a div using the html() method. The map is not showed, while other pages containing scripts, loaded in the same way, are correctly shown. Is this a specific issue about GMaps, that doesn't allow to be loaded via an ajax request? Thanks

    Read the article

  • Alternatives to HtmlTextWriter in a System.Web.UI.Control?

    - by Marco Bettiolo
    Hi, Can you use FluentHTML or other alternatives in an web application user control? Can you put a markup file in a System.Web.UI.Control like the System.Web.UI.UserControl but without the burden of the Page object? I would like to reduce the number of lines of the following code: writer.Write(SacrificalMarkupPage.GenerateControlMarkup(new DialogConfirm())); writer.AddAttribute("class", string.Format("ajaxResponse {0}", action)); writer.RenderBeginTag("div"); writer.RenderBeginTag("h4"); writer.WriteEncodedText("Delete selected item?"); writer.RenderEndTag(); //h4 var queryString = new HttpQueryString { {"confirmed", "true"}, {"src", urlReferer.PathAndQuery} }; writer.AddAttribute("href", queryString.MakeQueryString(url).PathAndQuery); writer.AddAttribute("class", "delete"); writer.RenderBeginTag("a"); writer.WriteEncodedText("Yes"); writer.RenderEndTag(); //a.delete writer.WriteEncodedText(" | "); writer.AddAttribute("href", urlReferer.PathAndQuery); writer.AddAttribute("class", "back"); writer.RenderBeginTag("a"); writer.WriteEncodedText("No"); writer.RenderEndTag(); //a.back writer.RenderEndTag(); //div.ajaxResponse.ACTION Thanks

    Read the article

  • Cost of Design vs Development

    - by Marco
    I usually develop content management solutions in php, I work with designers that create the front end (html & css) and I usually develop the backend (php & mysql) of said cms. I know that the cost of the website may vary depending of the complexity of the html or the backend, but taking as reference a very basic website, what percentage of the cost should go to design and what percentage should go to development. I want to make clear that I as the developer i'm in charge of all the effects and animations of the websites using some of the javascript frameworks, not the designer. I just want to know what´s the fair share for me and for the designer.

    Read the article

  • NSURL doesn't work any time

    - by Marco
    Hello community, i have the following problem sometimes my openURL-Dialog works perfectly, then i looked at the variable from the url and that is the variable: www.brehm-gmbh.de but some other times there are some crazy elements at the end of the variable like this: www.adamczyk-fenster.de%E2%80%8E i get this pages from an .asc file and both are in this file normal without this elements, what can i do to solve this problem? thank you all for helping beforehand

    Read the article

  • ASP.Net Count Download Clicks

    - by Marco
    Hello, I thought that this was easier… I have a asp:hyperlink control, with target=”_blank”, pointing to the file I want the user to download. My plan is to track the number of times, the users click on this link. I thought in placing it in ajax update panel, to catch the postback and avoid full page refresh. However, hyperlink doesn’t have a onClick method. On the other hand I could use a linkbutton, which has a onClick built in. But It’s harder to make the file open in a new window… and I would also have to do something like: Response.AppendHeader("Content-Disposition","attachment; filename=myImage.jpg"); But I heard that the above approach has some problems with PPT, PPTX, PPS, PPSX… What is you'r opinion on this? How and why, would you do it?

    Read the article

  • RVM can't switch to Ruby 1.9.1

    - by Marco
    I installed Ruby 1.8.7 through apt-get. I then installed 1.9.1 through RVM. The RVM 1.9.1 installation was successful: root: rvm install 1.9.1 <i>Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.1-p378 </i> <i>/usr/local/rvm/src/ruby-1.9.1-p378 has already been extracted. </i> <i>Configuring ruby-1.9.1-p378, this may take a while depending on your cpu(s)... </i> <i>Compiling ruby-1.9.1-p378, this may take a while, depending on your cpu(s)... </i> <i>Installing ruby-1.9.1-p378 </i> <i>Installation of ruby-1.9.1-p378 is complete. </i> <i>Updating rubygems for /usr/local/rvm/gems/ruby-1.9.1-p378@global </i> <i>Updating rubygems for /usr/local/rvm/gems/ruby-1.9.1-p378 </i> <i>adjusting shebangs for ruby-1.9.1-p378 (gem irb erb ri rdoc testrb rake). </i> <i>Installing gems for ruby-1.9.1-p378 (rdoc rake). </i> <i>Installing rdoc to /usr/local/rvm/gems/ruby-1.9.1-p378@global </i> <i>Installing rdoc to /usr/local/rvm/gems/ruby-1.9.1-p378 </i> <i>Installing rake to /usr/local/rvm/gems/ruby-1.9.1-p378@global </i> <i>Installing rake to /usr/local/rvm/gems/ruby-1.9.1-p378 </i> <i>Installation of gems for ruby-1.9.1-p378 is complete. </i> However, I cannot get RVM to switch to the new version: root: ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux] root: rvm 1.9.1 root: ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux] Despite that, it seems to have installed fine: root: /usr/local/rvm/bin/ruby-1.9.1-p378 -v ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux] I also tried setting the rvm --default to 1.9.1 but that did not help. Why can't RVM switch to the new version? Should I just set an alias for ruby=1.9.1? *running Debian

    Read the article

  • ASP.NET MVC ViewModelBuilder Suggestions

    - by Marco
    For anything but trival view models, I use a view model builder that handles the responsibility of generating the view model object. Right now, I use constructor injection of the builders into my controllers but this smells a little since the builder is really dependent upon which action method is being executed. I have two ideas in mind. The first one would involve a custom ActioFilter allowing me to decorate each action method with the appropriate builder to use. The second would be to add an override of the View method that is open to accepting a generic. This is what my code currently looks like. Note, the builder get injected via the ctor. [HttpGet, ImportModelStateFromTempData, Compress] public ActionResult MyAccount() { return View(accountBuilder.Build()); } Here is what option one would look like: [HttpGet, ImportModelStateFromTempData, Compress, ViewModelBuilder(typeof(IMyAccountViewModelBuilder)] public ActionResult MyAccount() { return View(accountBuilder.Build()); } Or option two: [HttpGet, ImportModelStateFromTempData, Compress] public ActionResult MyAccount() { return View<IMyAccountViewModelBuilder>(); } Any thoughts or suggestions would be great!

    Read the article

  • Simple javascript to mimic jQuery behaviour of using this in events handlers

    - by Marco Demaio
    This is not a question about jQuery, but about how jQuery implements such a behaviour. In jQuery you can do this: $('#some_link_id').click(function() { alert(this.tagName); //displays 'A' }) could someone explain in general terms (no need you to write code) how do they obtain to pass the event's caller html elments (a link in this specific example) into the this keyword? I obviously tried to look 1st in jQuery code, but I could not understand one line. Thanks!

    Read the article

  • iPhone: NSAlert Delegate Method Never Called

    - by Marco
    Hello, I have implemented an NSAlert but the delegate method didDissmissWithButton is never called. This code evokes the NSAlert: NSString *title = [NSString stringWithFormat:@"Keine Internetverbindung"]; NSString *alertMessage = [NSString stringWithFormat:@"Es konnte keine Verbindung zu www.sip.de aufgebaut werden!"]; NSString *ok = [NSString stringWithFormat:@"Ok"]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:alertMessage delegate:self cancelButtonTitle:ok otherButtonTitles:nil]; [alert show]; [alert release]; and this is the NSAlert delegate method: - (void)alertView:(UIAlertView *)alertView didDisMissWithButtonIndex:(NSInteger)buttonIndex{ exit(3); } The method is never called, what is my mistake?

    Read the article

  • Make Apache to show different index.html also in browser's address bar

    - by Marco Demaio
    I have the following foloder tree on my shared hosting server: www.somesite.com | |_ public_html (document folder) |_ .htaccess (Apache file) |_ inde.html (page shown by server now when someone looks for www.somesite.com) | |_ site_editor (folder) | |_login.html (site editor control panel) | |_file1.php | |_file2.php | |_ ... | |_ website (folder) |_ index.html (website HOME PAGE) |_ page1.html |_ page2.html |_ etc. Now when someone looks for www.somesite.com the webserver look for index.html in public_html folder. I would like the web server to show website/index.html when someone looks for www.somesite.com and I would like his browser bar to show only www.somesite.com/index.html and not www.somesite.com/website/index.html I would also like the web server to show site_editor/login.html when someone looks for www.somesite.com/site_editor/ Is it possible to accomplish both task by setting .htaccess files in some ways??? Thanks!

    Read the article

  • JS: using 'var me = this' to reference an object instead of using a global array

    - by Marco Demaio
    The example below, is just an example, I know that I don't need an object to show an alert box when user clicks on div blocks, but it's just a simple example to explain a situation that frequently happens when writing JS code. In the example below I use a globally visible array of objects to keep a reference to each new created HelloObject, in this way events called when clicking on a div block can use the reference in the arry to call the HelloObject's public function hello(). 1st have a look at the code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Test </title> <script type="text/javascript"> /***************************************************** Just a cross browser append event function, don't need to understand this one to answer my question *****************************************************/ function AppendEvent(html_element, event_name, event_function) {if(html_element) {if(html_element.attachEvent) html_element.attachEvent("on" + event_name, event_function); else if(html_element.addEventListener) html_element.addEventListener(event_name, event_function, false); }} /****************************************************** Just a test object ******************************************************/ var helloobjs = []; var HelloObject = function HelloObject(div_container) { //Adding this object in helloobjs array var id = helloobjs.length; helloobjs[id] = this; //Appending click event to show the hello window AppendEvent(div_container, 'click', function() { helloobjs[id].hello(); //THIS WORKS! }); /***************************************************/ this.hello = function() { alert('hello'); } } </script> </head><body> <div id="one">click me</div> <div id="two">click me</div> <script type="text/javascript"> var t = new HelloObject(document.getElementById('one')); var t = new HelloObject(document.getElementById('two')); </script> </body></html> In order to achive the same result I could simply replace the code //Appending click event to show the hello window AppendEvent(div_container, 'click', function() { helloobjs[id].hello(); //THIS WORKS! }); with this code: //Appending click event to show the hello window var me = this; AppendEvent(div_container, 'click', function() { me.hello(); //THIS WORKS TOO AND THE GLOBAL helloobjs ARRAY BECOMES SUPEFLOUS! }); thus would make the helloobjs array superflous. My question is: does this 2nd option in your opinion create memoy leaks on IE or strange cicular references that might lead to browsers going slow or to break??? I don't know how to explain, but coming from a background as a C/C++ coder, doing in this 2nd way sounds like a some sort of circular reference that might break memory at some point. I also read on internet about the IE closures memory leak issue http://jibbering.com/faq/faq_notes/closures.html (I don't know if it was fixed in IE7 and if yes, I hope it does not come out again in IE8). Thanks

    Read the article

  • PHP - static DB class vs DB singleton object

    - by Marco Demaio
    I don't want to create a discussion about singleton better than static or better than global, etc. I read dozens of questions about it on SO, but I couldn't come up with an answer to this SPECIFIC question, so I hope someone could now illuminate me buy answering this question with one (or more) real simple EXAMPLES, and not theoretical discussions. In my app I have the typical DB class needed to perform tasks on DB without having to write everywhere in code mysql_connect/mysql_select_db/mysql... (moreover in future I might decide to use another type of DB engine in place of mySQL so obviously I need a class of abstration). I could write the class either as a static class: class DB { private static $connection = FALSE; //connection to be opened //DB connection values private static $server = NULL; private static $usr = NULL; private static $psw = NULL; private static $name = NULL; public static function init($db_server, $db_usr, $db_psw, $db_name) { //simply stores connections values, withour opening connection } public static function query($query_string) { //performs query over alerady opened connection, if not open, it opens connection 1st } ... } or as a Singletonm class: class DBSingleton { private $inst = NULL; private $connection = FALSE; //connection to be opened //DB connection values private $server = NULL; private $usr = NULL; private $psw = NULL; private $name = NULL; public static function getInstance($db_server, $db_usr, $db_psw, $db_name) { //simply stores connections values, withour opening connection if($inst === NULL) $this->inst = new DBSingleton(); return $this->inst; } private __construct()... public function query($query_string) { //performs query over already opened connection, if connection is not open, it opens connection 1st } ... } Then after in my app if I wanto to query the DB i could do //Performing query using static DB object DB:init(HOST, USR, PSW, DB_NAME); DB::query("SELECT..."); //Performing query using DB singleton $temp = DBSingleton::getInstance(HOST, USR, PSW, DB_NAME); $temp->query("SELECT..."); My simple brain sees Singleton has got the only advantage to avoid declaring as 'static' each method of the class. I'm sure some of you could give me an EXAMPLE of real advantage of singleton in this specific case. Thanks in advance.

    Read the article

  • How to get scrollTop of page afer browser scrolled such page?

    - by Marco Demaio
    I know how to get the scrollTop of a page, I use this simple JS function (code copied around): function GetScrolledTop() { //I never work in IE quirkmode, I always use DOCTYPE as 1st line, so I don't need to test for document.body.scrollTop return self['pageYOffset'] || document.documentElement.scrollTop; } This works and my problem is the following: I tried to add it in the page onload event <body onload="alert(GetScrolledTop());"> On page load I get ZERO (which make sense), but the problem is that I get ZERO even if I scroll the page and then reload it without touching the scrollbar. It seems like the browser does: loads page calls my GetScrolledTop() (so obviously shows ZERO) then scrolls the page to where it was before. Do you know how to get the scolledTop after the step 3? I mean how to get the scrolledTop AFTER the browser scrolled the page? (maybe without using a timer) Thanks!

    Read the article

  • Silverlight 4 seems like starving of memory

    - by Marco
    I have been playing a bit with Silverlight and try to port my Silverlight 3.0 application to Silverlight 4.0. My application loads different XAP files and upon a user request create an instance of a Xaml user control and adds it to the main container, in a sort of MEF approach in order I can have an extensible and pluggable application. The application is pretty huge and to keep acceptable the performances and the initial loading I have built up some helper classes to load in the background all pages and user controls that might be used later on. On Silverlight 3.0 everything was running smoothly without any problem so far. Switching to SL 4.0 I have noticed that when the process approaches to create the instances of the user controls the layout freezes unexpectedly for a minute and sometimes for more. Looking at the task manager the memory usage of IE jumps from 50MB to 400MB and sometimes up to 1.5 GB. If the process won't take that much the layout is rendered properly even though the memory usage is still extremely high. Otherwise everything crashes due to out of memory exception. Running the same application compiled in SL3, the memory used is about 200MB when all the usercontrols are loaded. Time spent to load the application in SL3 is about 10 seconds, while it takes up to 3 mins in SL4 There are no transparencies, no opacities set, no effects and animations in the layout. User controls are instantied on the fly and added or removed in the visual tree on purpose when the user switches from one screen to another. The resources are all cleaned properly when a usercontrol is removed from the visual tree to allow the GC to operate in the background. I may do something wrong but I could not figure out where exactly nail out the source of this problem. As far as I know there is no memory profiler in SL4 that can help me out to find where to look at. But again I could not be updated on new debugging tools available.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >