Search Results

Search found 151 results on 7 pages for 'axel costas pena'.

Page 2/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Filter a model's attributes before outputting as json

    - by Jorge Israel Peña
    Hey guys, I need to output my model as json and everything is going fine. However, some of the attributes need to be 'beautified' by filtering them through some helper methods, such as number_to_human_size. How would I go about doing this? In other words, say that I have an attribute named bytes and I want to pass it through number_to_human_size and have that result be output to json. I would also like to 'trim' what gets output as json if that's possible, since I only need some of the attributes. Is this possible? Can someone please give me an example? I would really appreciate it.

    Read the article

  • What do the FireBug DOM colors mean?

    - by André Pena
    I'm confused with these colors. I noticed there are 4 colors showing in the left hand column of FireBug DOM tree: Bold black Black Bold green Green In the right hand column: Blue Red Bold green Green Multiple color elements representing object structures. What do this colors represent? And why, e.g, I can access window.document.URL and I can't access window.document.body in Console even though they are both in the "not-bold black" category in the DOM tree? Thanks a lot

    Read the article

  • Can I retrieve data from server to client during an asynchronous post-back using ASP.NET Ajax Librar

    - by André Pena
    ASP.NET Ajax Library provides some client-side events. For instance: Sys.Application.add_load( function(args) { // handle the end of any asynchronous post-back. Every-time there's // a server round-trip, this method will be called. } ); During the asynchronous post-back I want to retrieve information to the client. This information must be available in some event like the discribed above. Does the UpdatePanel or the ScriptManager have any server-side way to retrieve data back to client during an asynchronous post-back?

    Read the article

  • Best pratice: How do I implement a list that can be rendered both server-side and client-side?

    - by André Pena
    Technologies involved: ASP.NET Web-forms Javascript (jQuery for instance) Case To make it clearer let's give the Stackoverflow authors list as an example. This list can be manipulated at client-side. I can search, page and so forth. So obviously we would need to call jQuery.ajax to retrieve the HTML of each page given a search. Alright. Now this leaves me with the first question: What is the best way to render the response for the jQuery.ajax at server-side? I can't use templates I suppose, so the most obvious solution I think is to create the HTML tags as server-controls and render them as the result of an ASHX request? Is this is best approach? Nice. That solved we have yet another problem: When the user first enters the Authors List the first list page should already come from the server completely rendered alright? Of course we could render the first page as well as an ajax call but I don't think it's better. This time I CAN use templates to render the list but this template couldn't be reused in case 1. What do I do? Now the final question: Now we have 2 rendering strategies: 1) Client and 2) Server. How do I reuse code for the 2 renderings? What are the best pratices for solving these problems?

    Read the article

  • Best pratice: How do I implement a list similar to Stackoverflow's Users List?

    - by André Pena
    Technologies involved: ASP.NET Web-forms Javascript (jQuery for instance) Case To make it clearer let's give the Stackoverflow Users list as an example. This list can be manipulated at client-side. I can search, page and so forth. So obviously we would need to call jQuery.ajax to retrieve the HTML of each page given a search. Alright. Now this leaves me with the first question: What is the best way to render the response for the jQuery.ajax at server-side? I can't use templates I suppose, so the most obvious solution I think is to create the HTML tags as server-controls and render them as the result of an ASHX request? Is this is best approach? Nice. That solved we have yet another problem: When the user first enters the Authors List the first list page should already come from the server completely rendered alright? Of course we could render the first page as well as an ajax call but I don't think it's better. This time I CAN use templates to render the list but this template couldn't be reused in case 1. What do I do? Now the final question: Now we have 2 rendering strategies: 1) Client and 2) Server. How do I reuse code for the 2 renderings? What are the best pratices for solving these problems?

    Read the article

  • MS SQL and .NET Typed Dataset AllowDBNull Metadata

    - by Christian Pena
    Good afternoon, I am generating a typed dataset from a stored procedure. The stored procedure may contain something like: select t1.colA, t2.colA AS t2colA from t1 inner join t2 on t1.key = t2.key When I generate the typed dataset, the dataset knows whether t1.colA allows NULLs, but it always puts FALSE in AllowDBNull for t2.colA even if t2.colA allows NULL. Is this because the column is aliased? Is there any way, from SQL, to hint to VS that the column allows NULL? We currently have to go in and update the column's AllowDBNull if we regenerate the table. Thanks in advance. Christian

    Read the article

  • What's the best way to calculate similarity between rows in a table based on association?

    - by André Pena
    Suppose each Person has a collection of favorite Books. So I have a table for: Person Book The association between Person and Book (joint table for MxN) I want to fetch the Persons that are similar to a Person1 based on the favorite Books overlaping. That is: The more books they have in common, the more they are similar. I don't have to use only SQL to solve this problem. I could use programming also. I'm using SQL Server 2008 and C#. What solution would you experts use?

    Read the article

  • SQL Server 2008 spatial index and CPU utilization with MapGuide Open Source 2.1

    - by Antonio de la Peña
    I have a SQL Server table with hundreds of thousands of geometry type parcels. I have made indexes on them trying different combinations of density and objects per cell settings. So far I'm settiling for LOW, LOW, MEDIUM, MEDIUM and 16 objects per cell and I made a SP that sets the bounding box according to the extents of the entities in the table. There is an incredible performance boost from queries taking almost minutes without index to less than seconds, it gets faster when the zoom is closer thus less objects are displayed. Yet the CPU utilization gets to 100% when querying for features, even when the queries themselves are fast. I'm worrying this will not fly in a production environment. I am using MapGuide Open Source 2.1 for this project, but I am positive the CPU load is caused by SQL Server. I wonder if my indexes are set properly. I haven't found any clear documentation on how to properly set them up. Every article I've read basically says "it depends..." but nothing specific. Do you have any recommendations for me, including books, articles? Thank you.

    Read the article

  • How to get the height of a DIV considering inner element's margins?

    - by André Pena
    Consider de following markup: <div id="outerElement"> <div id="innerElement" style="border: 1px solid blue; background-color: #f0f3f5; margin-top: 100px"> TESTE </div> </div> I want to get the actual final height of outerElement using javascript. I noticed that if I remove the vertical margins from innerElement I am able to get what I want but I cannot alter styles from within the outerElement. How do I do this? Obs: I already tried height, scrollheight and offsetHeight in all browsers. Chrome gives me the expected value (including inner element's margins) for scrollHeight. All other browsers fail.

    Read the article

  • Are NHibernate lists loaded on demand?

    - by André Pena
    This is a pretty simple question. When I do this: session.CreateCriteria(typeof(Product)).List(); The resulting list will load as I access it? Let's say, from 100 to 100 elements for example? Or will it load all once? In the case it's not "virtual" how can I make it so? What's the best pratice about it? Thanks;

    Read the article

  • Does Entity Framework currently support custom functions in the Where clause?

    - by André Pena
    Entity Framework currently supports table valued functions and custom functions defined in the SSDL, but I can't find any example of it being used as a criteria, in the where clause. Example: var query = this.db.People; query = query.Where(p = FullText.ContainsInName(p.Id, "George")); In this example, ContainsInName is my custom function that I want to be executed in the where clause of the query. Is it supported?

    Read the article

  • Unable to install SQL 2008 on Windows 7

    - by Axel
    SQL 2008 install hangs on Windows 7 The story: Trying to install SQL2008 on Windows 7 hangs on SqlEngineDBStartconfigAction_install_configrc_Cpu32. What I Tried: Uninstall hangs on validation Manual uninstall using msiinv.exe and msiexec /x works Added SQL service accounts to local admins no help Turn of UAC no help Last lines in setup log: 2010-04-01 16:18:05 SQLEngine: : Checking Engine checkpoint 'GetSqlServerProcessHandle' 2010-04-01 16:18:05 SQLEngine: --SqlServerServiceSCM: Waiting for nt event 'Global\sqlserverRecComplete' to be created 2010-04-01 16:18:07 SQLEngine: --SqlServerServiceSCM: Waiting for nt event 'Global\sqlserverRecComplete' or sql process handle to be signaled 2010-04-01 16:18:07 SQLEngine: : Checking Engine checkpoint 'WaitSqlServerStartEvents' 2010-04-01 16:18:53 Slp: Sco: Attempting to initialize script 2010-04-01 16:18:53 Slp: Sco: Attempting to initialize default connection string 2010-04-01 16:18:53 Slp: Sco: Attempting to set script connection protocol to NotSpecified 2010-04-01 16:18:53 Slp: Sco: Attempting to set script connection protocol to NamedPipes 2010-04-01 16:18:53 SQLEngine: --SqlDatabaseServiceConfig: Connection String: Data Source=\\.\pipe\SQLLocal\MSSQLSERVER;Initial Catalog=master;Integrated Security=True;Pooling=False;Network Library=dbnmpntw;Application Name=SqlSetup 2010-04-01 16:18:53 SQLEngine: : Checking Engine checkpoint 'ServiceConfigConnect' 2010-04-01 16:18:53 SQLEngine: --SqlDatabaseServiceConfig: Connecting to SQL.... 2010-04-01 16:18:53 Slp: Sco: Attempting to connect script 2010-04-01 16:18:53 Slp: Connection string: Data Source=\\.\pipe\SQLLocal\MSSQLSERVER;Initial Catalog=master;Integrated Security=True;Pooling=False;Network Library=dbnmpntw;Application Name=SqlSetup And now comes the fun part: When I open conf mgr I can see the service running, I enabled named pipes and TCP/IP, restarted the service I'm able to connect to the server using an OLE DB connection but not with the Native Client. And what I find suspicious is the following error in my app log: .NET Runtime Optimization Service (clr_optimization_v2.0.50727_32) - Failed to compile: C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\Tools\VDT\DataProjects.dll . Error code = 0x8007000b In MS connect this is reported as a bug but MS is unable to reproduce the problem altough when you search the fora I'm not the only one with this problem. So any help is appreciated.

    Read the article

  • Occasional disk I/O errors in SQLite

    - by Alix Axel
    I have a very simple website running PHP and SQLite 3.7.9 (with PDO). After establishing the SQLite connection I immediately execute the following queries: PRAGMA busy_timeout=0; PRAGMA cache_size=8192; PRAGMA foreign_keys=ON; PRAGMA journal_size_limit=67110000; PRAGMA legacy_file_format=OFF; PRAGMA page_size=4096; PRAGMA recursive_triggers=ON; PRAGMA secure_delete=ON; PRAGMA synchronous=NORMAL; PRAGMA temp_store=MEMORY; PRAGMA journal_mode=WAL; PRAGMA wal_autocheckpoint=4096; This website only has one writer and a few occasional readers, so I don't expect any concurrency problems (and I'm even using WAL). Every couple of days, I've seen this error being reported by PHP: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 10 disk I/O error' in ... Stack trace: #0 ...: PDO-exec('PRAGMA cache_si...') There are several things that make this error very weird to me: it's not a transient problem - no matter how many times I refresh the page, it won't go away the database file is not corrupted - the sqlite3 executable can open the database without problems If the following pragmas are commented out, PHP stops throwing the disk I/O exception: PRAGMA cache_size=8192; PRAGMA synchronous=NORMAL; PRAGMA journal_mode=WAL; Then, after successfully reconnecting to the database, I'm able to reintroduce these pragmas and the code with run smoothly for days - until eventually, the same error will occur without any apparent reason. I wasn't able to reproduce this error so far, so I'm clueless about the origin of it. I'm really curious what may be causing this problem... Any ideas? Environment: Ubuntu Server 12.04 LTS PHP 5.4.15 SQLite 3.7.9 Database size: ? 10MiB Transaction (write) size: ? 1KiB EDIT: Might these symptoms have something to do with busy_timeout?

    Read the article

  • Networking with Windows 7

    - by Alix Axel
    I got several computers connected to my home wireless network and I want to make use of some of the features of Windows 7 for home networks but I can't seem to get them working: How do I keep files and folders in sync between specific computers? I'm not talking about Live Sync. How can I stream to Windows Media Player from another computer? I would appreciate if someone could provide me some links / solutions that address my needs. Thanks! To anyone who thinks this question is a duplicate and wants to close it please bare in mind the following: I'm not looking for additional software, I know I can use Live Sync, Dropbox and so on but I'm asking this: how do I configure Windows 7 to sync files between my home network - no Internet required! This has something to do with shared folders and offline files in Windows 7, but I can't get it to work. PS: Please merge with this question: http://superuser.com/questions/139763/networking-with-windows-7

    Read the article

  • Networking with Windows 7

    - by Alix Axel
    I got several computers connected to my home wireless network and I want to make use of some of the features of Windows 7 for home networks but I can't seem to get them working: How do I keep files and folders in sync between specific computers? I'm not talking about Live Sync. How can I stream to Windows Media Player from another computer? I would appreciate if someone could provide me some links / solutions that address my needs. Thanks!

    Read the article

  • PHP IDE for Ubuntu Netbook Remix 9.10

    - by Alix Axel
    I've installed Ubuntu Netbook Remix on my netbook and I'm wondering what would be a good IDE to use for mainly PHP development. I've used Komodo Edit in past Linux distributions but it doesn't seem to play well with Ubuntu Network Remix (it doesn't shows up in the remix "desktop", and I don't feel like opening the terminal and typing komodo every time I need to code). I'm considering Eclipse with a PHP plugin, but I've two big problems with Eclipse: I don't like the way it forces me to create a new project when I just want to edit a file. I'm not sure which PHP plugin I should install: Eclipse PDT, PHP Eclipse or Aptana - I don't really understand the differences between Eclipse PDT and PHP Eclipse. Which IDE would you recommend (doesn't need to be Eclipse)? Thanks in advance!

    Read the article

  • pread() read only xxxx of yyyy

    - by Alix Axel
    Occasionally, nginx doesn't send any data back to the browser (ERR_EMPTY_RESPONSE in Chrome). Upon checking the server error.log, I find these weird messages: 2013/10/20 23:57:40 [alert] 29146#0: *35 pread() read only 4653 of 4656 from "~/htdocs/index.html" while sending response to client, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost" 2013/10/20 23:57:45 [alert] 29146#0: *36 pread() read only 4653 of 4656 from "~/htdocs/index.html" while sending response to client, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost" 2013/10/20 23:58:18 [alert] 29146#0: *38 pread() read only 4650 of 4653 from "~/htdocs/index.html" while sending response to client, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost" 2013/10/20 23:58:18 [alert] 29146#0: *39 pread() read only 4650 of 4653 from "~/htdocs/index.html" while sending response to client, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost" 2013/10/20 23:58:19 [alert] 29146#0: *40 pread() read only 4650 of 4653 from "~/htdocs/index.html" while sending response to client, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost" 2013/10/21 00:02:21 [alert] 29146#0: *41 pread() read only 4629 of 4641 from "~/htdocs/index.html" while sending response to client, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost" 2013/10/21 00:02:21 [alert] 29146#0: *42 pread() read only 4629 of 4641 from "~/htdocs/index.html" while sending response to client, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost" 2013/10/21 00:02:23 [alert] 29146#0: *43 pread() read only 4629 of 4641 from "~/htdocs/index.html" while sending response to client, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost" 2013/10/21 00:02:31 [alert] 29146#0: *44 pread() read only 4629 of 4641 from "~/htdocs/index.html" while sending response to client, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost" 2013/10/21 00:02:46 [alert] 29146#0: *45 pread() read only 4629 of 4641 from "~/htdocs/index.html" while sending response to client, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost" Does anyone have any idea why this happens? After a while everything is served correctly again.

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >