Search Results

Search found 270 results on 11 pages for 'joao pedro portelinha'.

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

  • How to effectively have less php-cgi processes running?

    - by João Pinto Jerónimo
    My server is a Linode 512, and on it I run a Wordpress MU with 3 websites (they don't get a lot of visitors) and a couple of NodeJS apps. I need to switch to Lighttpd because Apache 2 was using about 59% of the server's RAM, and now I have the php-cgi processes taking up about 43.6% of the server's RAM: most often 2 processes use 16.5% of the RAM each, 4 processes use 1.8% of the RAM each, and 4 more processes use 0,8% of the RAM, each How can I have less of these processes ? I'm almost sure they're not all needed for the trafic this server gets... I tried only allowing 2 children, but I still have those 10... This is my fastcgi.server section in lighttpd.conf. fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/var/run/lighttpd/php-fastcgi.socket", "bin-path" => "/usr/bin/php-cgi", "bin-environment" => ( "PHP_FCGI_CHILDREN" => "2", "PHP_FCGI_MAX_REQUESTS" => "4000" ) ) ) ) What else can I do to tune lighttpd to use less RAM ?

    Read the article

  • How do I set my router up to authenticate with my service provider?

    - by João Lourenço
    Currently I have this setup: D-Link DSL2640U connected to the phone line: VPI/VCI 0/40, Service Category UBR Without PCR Service pppoe_0_40_3 Interface nas_0_40 Protocol Bridging (LLC/SNAP-Bridging) 802.11q not enabled Bridge Service Enabled Computers have individual PPPoE connections (in Network and Sharing Centre - Set up a new connection or network - Connect to the Internet - Broadband (PPPoE) - Username and Password) How would I move these settings on each individual PC to the router so that all I need to do is connect to the wireless? I have been unsuccessful setting up anything other than Windows PCs on the network (I have tried Macs, iOS and Nokia SmartPhones too). Thanks for the responses in advance!

    Read the article

  • multi-screen switcher

    - by João Melo
    I have a windows 7 machine with vmware and 2 monitors. The first one, with vmware on fullscreen, and the second one as the main screen with windows 7 with the browser and some applications, is there any way to toggle the screens configuration with a hotkey so it switches the main screen to the left and all applications accordingly (Vmware on full screen on the right monitor, and all applications on the left)

    Read the article

  • Exclude regular expression from virtual host

    - by Joao Trindade
    I have a virtual host in apache which is redirecting requests to another web server. <VirtualHost *:80> DocumentRoot /var/www ServerName another.host ProxyPass / http://another.host2:8081/ ProxyPassReverse / http://another.host2:8081/ </VirtualHost> I need to exclude an URL pattern from being catch by this virtual host. Basically I don't want requests with the url: http://another.host:8081/~username to be forwarded to the other server. Can this be done?

    Read the article

  • Running two Magentos installations, one of which has 3 stores set up as multi-store. Which server?

    - by Pedro Peixoto
    I want to run 4 Magento stores in 2 different installations. 1 is a standalonne installation with 3 languages. The other is a multi-store with 3 different online stores in different domains. At the moment we have a VPS with 1GB memory, would that be enough? I ask because I've finished the standalone store and already put it online, and the server is already running on 62% memory. The ideal would be that this is enough as my company wouldn't like to move to a Dedicated Server (as it involves costs). I'm sure I can try to optimize Magento to run on lower memory (I'm expecting visits averaging 2000/day on all sites), if I could have some tips on the best way to do that Id appreciate it too.

    Read the article

  • Symfony2 - PdfBundle not working

    - by ElPiter
    Using Symfony2 and PdfBundle to generate dynamically PDF files, I don't get to generate the files indeed. Following documentation instructions, I have set up all the bundle thing: autoload.php: 'Ps' => __DIR__.'/../vendor/bundles', 'PHPPdf' => __DIR__.'/../vendor/PHPPdf/lib', 'Imagine' => array(__DIR__.'/../vendor/PHPPdf/lib', __DIR__.'/../vendor/PHPPdf/lib/vendor/Imagine/lib'), 'Zend' => __DIR__.'/../vendor/PHPPdf/lib/vendor/Zend/library', 'ZendPdf' => __DIR__.'/../vendor/PHPPdf/lib/vendor/ZendPdf/library', AppKernel.php: ... new Ps\PdfBundle\PsPdfBundle(), ... I guess all the setting up is correctly configured, as I am not getting any "library not found" nor anything on that way... So, after all that, I am doing this in the controller: ... use Ps\PdfBundle\Annotation\Pdf; ... /** * @Pdf() * @Route ("/pdf", name="_pdf") * @Template() */ public function generateInvoicePDFAction($name = 'Pedro') { return $this->render('AcmeStoreBundle:Shop:generateInvoice.pdf.twig', array( 'name' => $name, )); } And having this twig file: <pdf> <dynamic-page> Hello {{ name }}! </dynamic-page> </pdf> Well. Somehow, what I just get in my page is just the normal html generated as if it was a normal Response rendering. The Pdf() annotation is supposed to give the "special" behavior of creating the PDF file instead of rendering normal HTML. So, having the above code, when I request the route http://www.mysite.com/*...*/pdf, all what I get is the following HTML rendered: <pdf> <dynamic-page> Hello Pedro! </dynamic-page> </pdf> (so a blank HTML page with just the words Hello Pedro! on it. Any clue? Am I doing anything wrong? Is it mandatory to have the alternative *.html.twig apart from the *.pdf.twig version? I don't think so... :(

    Read the article

  • Create a unique ID by fuzzy matching of names (via agrep using R)

    - by tbrambor
    Using R, I am trying match on people's names in a dataset structured by year and city. Due to some spelling mistakes, exact matching is not possible, so I am trying to use agrep() to fuzzy match names. A sample chunk of the dataset is structured as follows: df <- data.frame(matrix( c("1200013","1200013","1200013","1200013","1200013","1200013","1200013","1200013", "1996","1996","1996","1996","2000","2000","2004","2004","AGUSTINHO FORTUNATO FILHO","ANTONIO PEREIRA NETO","FERNANDO JOSE DA COSTA","PAULO CEZAR FERREIRA DE ARAUJO","PAULO CESAR FERREIRA DE ARAUJO","SEBASTIAO BOCALOM RODRIGUES","JOAO DE ALMEIDA","PAULO CESAR FERREIRA DE ARAUJO"), ncol=3,dimnames=list(seq(1:8),c("citycode","year","candidate")) )) The neat version: citycode year candidate 1 1200013 1996 AGUSTINHO FORTUNATO FILHO 2 1200013 1996 ANTONIO PEREIRA NETO 3 1200013 1996 FERNANDO JOSE DA COSTA 4 1200013 1996 PAULO CEZAR FERREIRA DE ARAUJO 5 1200013 2000 PAULO CESAR FERREIRA DE ARAUJO 6 1200013 2000 SEBASTIAO BOCALOM RODRIGUES 7 1200013 2004 JOAO DE ALMEIDA 8 1200013 2004 PAULO CESAR FERREIRA DE ARAUJO I'd like to check in each city separately, whether there are candidates appearing in several years. E.g. in the example, PAULO CEZAR FERREIRA DE ARAUJO PAULO CESAR FERREIRA DE ARAUJO appears twice (with a spelling mistake). Each candidate across the entire data set should be assigned a unique numeric candidate ID. The dataset is fairly large (5500 cities, approx. 100K entries) so a somewhat efficient coding would be helpful. Any suggestions as to how to implement this?

    Read the article

  • Dynamic IP on NGINX geo module without restart

    - by joaorvmaia
    I want create a task on my Capistrano deploy to put my public IP on geo module configuration of my NGINX server without restart NGINX, is it possible? Example, my /etc/nginx/nginx.conf: geo $geo { default no; include /home/deploy_user/appname/shared/ip_list; } The file /home/deploy_user/appname/shared/ip_list I will provide during deploy. I need this because my public IP can change many times. Regards, João

    Read the article

  • cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number

    - by Joao Figueiredo
    I've a cron scheduled query which is failing with, File "./run_ora_query.py", line 69, in db_lookup cursor.execute(query, dict(time_key=time_key) ) cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number where >>> dict(time_key=time_key) {'time_key': '12/10/2012 19:12:00'} I'm using a .yaml file to update the last time_key after each query runs, where the relevant parameters are, {query: 'select session_mode, inst_id, user_name, schema_name, os_user, process_id, process_mb_use, process_name, to_char(datet,''dd-mm-yyyy hh24:mi'') as DATETIME from os_admin.mem_usage where data > TO_DATE(:time_key,''dd-mm-yyyy hh24:mi:ss'') order by datet, inst_id, os_user', time_key: '12/10/2012 19:12:00'} Where is the culprit for this error?

    Read the article

  • Commit in sharpSVN

    - by Pedro
    Hello! I have a problem doing commit with sharpsvn. Now i´m adding all the files of my working copy (if the file is added throws an exception), and after it i do commit. It works but it trows exceptions. There is some way to get the status of the repository before do add() and only add the new files or the files who are changed? And if i delete one file or folder on my working copy , How can i delete these files or folder on the repository? Code: String[] folders; folders = Directory.GetDirectories(direccionLocal,"*.*", SearchOption.AllDirectories); foreach (String folder in folders) { String[] files; files = Directory.GetFiles(folder); foreach (String file in files) { if (file.IndexOf("\\.svn") == -1) { Add(file, workingcopy); } } } Commit(workingcopy, "change"); Add: public bool Add(string path, string direccionlocal) { using (SvnClient client = new SvnClient()) { SvnAddArgs args = new SvnAddArgs(); args.Depth = SvnDepth.Empty; Console.Out.WriteLine(path); args.AddParents = true; try { return client.Add(path, args); } catch (Exception ex) { return false; } } } Commit: public bool Commit(string path, string message) { using (SvnClient client = new SvnClient()) { SvnCommitArgs args = new SvnCommitArgs(); args.LogMessage = message; args.ThrowOnError = true; args.ThrowOnCancel = true; try { return client.Commit(path, args); } catch (Exception e) { if (e.InnerException != null) { throw new Exception(e.InnerException.Message, e); } throw e; } } }

    Read the article

  • Using oauth2_access_token to get connections in linkedIn

    - by Pedro
    I'm trying to get the connections in linkedIn using their API, but when I try to retrieve the connections I get a 401 unauthorized error. in the official documentation says You must use an access token to make an authenticated call on behalf of a user Make the API calls You can now use this access_token to make API calls on behalf of this user by appending "oauth2_access_token=access_token" at the end of the API call that you wish to make. The API call that I'm trying to do is the following Error -- http://api.linkedin.com/v1/people/~/connections:(id,headline,first-name,last-name)?format=json&oauth2_access_token=access_token I have tried to do it with the following endpoint without any problems. OK -- https://api.linkedin.com/v1/people/~:(id,first-name,last-name,formatted-name,date-of-birth,industry,email-address,location,headline,picture-urls::(original))?format=json&oauth2_access_token=access_token this list of endpoints for the connections API are described here http://developer.linkedin.com/documents/connections-api I just copied and pasted one endpoint from there, so the question is what's the problem with the endpoint for getting the connections? what am I missing? EDIT: for the preAuth Url I'm using https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=ConsumerKey&scope=r_fullprofile%20r_emailaddress%20r_network&state&state=NewGuid&redirect_uri=Encoded_Url https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code&code=QueryString_Code&redirect_uri=EncodedCallback&client_id=ConsummerKey&client_secret=ConsumerSecret please find attached the login screen requesting the permissions EDIT2: Switched to https and worked like a charm!

    Read the article

  • Using client.status in c# with sharpsvn

    - by Pedro
    I want to use the status method but i dont understand how it works. Could someone show me an example of use please? EventHandler < SvnStatusEventArgs > statusHandler = new EventHandler<SvnStatusEventArgs>(void(object, SvnStatusEventArgs) target); client.Status(path, statusHandler);

    Read the article

  • Logback DBAppender url

    - by pedro mendes
    I'm trying to use Logback's DBAppender. My logback.xml has the following appender: </appender> <appender name="DatabaseAppender" class="ch.qos.logback.classic.db.DBAppender"> <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource"> <driverClass>oracle.jdbc.OracleDriver</driverClass> <url>jdbc:oracle:thin:@URL:PORT:SERVICEID</url> <user>USER</user> <password>PASS</password> </connectionSource> </appender> the url given works with other java classes in the same project but it fails with logback giving the following error ORA-00904: "ARG3": invalid identifier at java.sql.SQLException: ORA-00904: "ARG3": invalid identifier where ARG3 is the <url>jdbc:oracle:thin:@URL:PORT:SERVICEID</url>

    Read the article

  • How to Choose Fields While Using ExportToExcel in jqGrid ?

    - by João Guilherme
    Hi ! I have this jqGrid <trirand:JQGrid runat="server" ID="JQGrid1" OnRowEditing="JQGrid1_RowEditing" RenderingMode="Optimized" oncellbinding="JQGrid1_CellBinding" Height="350" EditUrl="/Ferramenta/Transacoes/TransacoesT.aspx"> <AppearanceSettings HighlightRowsOnHover="true"/> <Columns> <trirand:JQGridColumn DataField="IdLancamento" PrimaryKey="True" Visible="false" /> <trirand:JQGridColumn DataField="IdCategoria" Visible="false" /> <trirand:JQGridColumn DataField="DataLancamento" Editable="true" DataFormatString="{0:dd/MM/yy}" HeaderText="Data" Width="65" TextAlign="Center" CssClass="font_data" /> <trirand:JQGridColumn DataField="Descricao" Editable="true" HeaderText="Descrição" Width="330" /> <trirand:JQGridColumn DataField="NomeCategoria" Editable="true" EditType="DropDown" EditorControlID="ddlCategorias" HeaderText="Categoria"> <Formatter> <trirand:CustomFormatter FormatFunction="DefineUrl" /> </Formatter> </trirand:JQGridColumn> <trirand:JQGridColumn DataField="Valor" Editable="false" DataFormatString="{0:C}" HeaderText="Valor" Width="80" TextAlign="Center" /> </Columns> <ClientSideEvents RowSelect="editRow" /> <PagerSettings PageSize="20" /> <ToolBarSettings ShowEditButton="false" ShowRefreshButton="True" ShowAddButton="false" ShowDeleteButton="false" ShowSearchButton="false" /> <SortSettings InitialSortColumn=""></SortSettings> </trirand:JQGrid> <asp:LinkButton ID="lbExportar" runat="server" onclick="lbExportar_Click">Exportar todas as transações</asp:LinkButton> When I use the method ExportToExcel JQGrid1.ExportToExcel("export.xls"); it includes the first column IdLancamento that is not visible and also includes another column that is used on the query. Is it possible to choose the columns that are going to be exported ?

    Read the article

  • Print the first line of a file

    - by Pedro
    void cabclh(){ FILE *fp; char *val, aux; int i=0; char *result, cabeca[60]; fp=fopen("trabalho.txt","r"); if(fp==NULL){ printf("Erro ao abrir o ficheiro\n"); return ; } val=(char*)calloc(aux, sizeof(char)); while(fgetc(fp)=='\n'){ fgets(cabeca,60,fp); printf("%s\n",cabeca); } fclose(fp); free(fp); } void infos(){ FILE *fp; char info[100]; fp=fopen("trabalho.txt","r"); if(fp==NULL){ printf("Erro ao abrir o ficheiro\n"); } while(fgetc(fp)=='-'){ fgets(info,100,fp); printf("%s\n",info); } fclose(fp); } At cabclh i want that the program recognize that the first line is header..but this code doesn't print nothing At infos i want that he recognize that every lines that begin with '-' are info...

    Read the article

  • Uploadify not working with ASP.NET WebForms

    - by João Guilherme
    Hi ! I'm trying to use Uploadify in a ASP.NET webforms project. The problem is that my script is not calling the generic handler. Here is the script. <input id="fileInput" name="fileInput" type="file" /> <script type="text/javascript"> $(document).ready(function() { $('#fileInput').uploadify({ 'uploader': '/Ferramenta/Comum/Uploadify/uploadify.swf', 'script': 'UploadTest.ashx', 'cancelImg': '/Ferramenta/Comum/Uploadify/cancel.png', 'folder': "/Ferramenta/Geral/", 'auto': true, 'onError': function(event, queueID, fileObj, errorObj) { alert('error'); }, 'onComplete': function(event, queueID, fileObj, response, data) { alert('complete'); }, 'buttonText' : 'Buscar Arquivos' }); }); </script> This is the code of the generic handler (just to test) using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.IO; namespace Tree.Ferramenta.Geral { public class UploadTest : IHttpHandler { public void ProcessRequest(HttpContext context) { context.Response.Write("1"); } public bool IsReusable { get { return false; } } } } Any ideas ? Thanks !

    Read the article

  • How to detect running on WebSphere

    - by Pedro Guedes
    Hi, I'm building a webapp that should run on both Tomcat and WebSphere and I've managed to make almost all the differences into properties with default values that I can override for deployment on the Tomcat server. I need to do yet another override for the authentication provider bean... public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { if(isWebSphere()){ LOG.warn("Running on WebSphere... not overriding default authentication mechanism."); return; } LOG.info("Running on Tomcat... overriding authentication provider bean ("+AUTHENTICATION_PROVIDER_BEAN+")"); if (beanFactory.containsBean(AUTHENTICATOR_BEAN) && beanFactory.containsBean(POPULATOR_BEAN) && beanFactory.containsBean(USERDETAIL_PROVIDER_BEAN)){ LdapAuthenticator authenticator = (LdapAuthenticator) beanFactory.getBean(AUTHENTICATOR_BEAN); LdapAuthoritiesPopulator populator = (LdapAuthoritiesPopulator) beanFactory.getBean(POPULATOR_BEAN); UserDetailProvider userDetailProvider = (UserDetailProvider) beanFactory.getBean(USERDETAIL_PROVIDER_BEAN); ExtendedLdapAuthenticationProvider override = new ExtendedLdapAuthenticationProvider(authenticator, populator); override.setUserDetailProvider(userDetailProvider); beanFactory.registerSingleton(AUTHENTICATION_PROVIDER_BEAN, override); } else { throw new BeanCreationException("Could not find required beans to assemble overriding object for authentication..."); } } Now my problem is how to implement the isWebSphere() method. I was thinking Class.forName("someWebSphereSpecific"), but is there a better way?

    Read the article

  • MVC LOB application

    - by João Passos
    Hi, I'm new to web development and i'm starting with a MVC project. I have a view to create a new Service. In this view, i need to have a button to show a dialog with client names (i also would like to implement filters and paging in this dialog). Once the user selects a client from the dialog, i need to populate some combo boxes in the Service View with info relative to that particular client. How can i accomplish this? If there any demo code or tutorial i can get my hands on to learn this? Thanks in advance for any tip.

    Read the article

  • Denormalization database

    - by Pedro Magalhaes
    I was taking a look at SSB (Star Schema Benchmark -http://www.percona.com/docs/wiki/_media/benchmark:ssb:starschemab.pdf) and then i was thinking if is possible to denormalize all tables from the SSB? So database size will increase a lot but potencially the performance will grow up. Is that right? Is It possible? Thanks and sorry for my poor english

    Read the article

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