Daily Archives

Articles indexed Friday October 25 2013

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

  • How to change name attribut value from twig

    - by taieb baccouch
    I am using Symfony version 2.3 and twig version 1.0. and I'm trying to change the name attribut value. Here is my code : <div class="control-group"> {{ form_label(form.menuTitle, null, {'label_attr': {'class': 'control-label'}}) }} {{ form_errors(form.menuTitle)}} <div class="controls"> <div class="span12"> {{ form_widget(form.menuTitle, {'attr': {'class': 'span6'}}) }} </div> </div> </div> The rendering code : <div class="control-group"> <label class="control-label required" for="smart_contactbundle_contact_menuTitle">Menu title</label> <div class="controls"> <div class="span12"> <input type="text" id="smart_contactbundle_contact_menuTitle" name="smart_contactbundle_contact[menuTitle]" required="required" maxlength="255" class="span6"> </div> </div> </div> I want to change name="smart_contactbundle_contact[menuTitle]" to name="menuTitle"

    Read the article

  • Create a Color Picker, similar to Photoshop's, using Javascript and HTML Canvas

    - by André Alçada Padez
    I am not at all versed in Computer Graphics and am in need of creating a color picker as a javascript tool to embed in an HTML page. First, and looking at Photoshop's one, i thought of the RGB palette as a three-dimensional matrix. My first attempt envolved: <script type="text/javascript"> var rgCanvas = document.createElement('canvas'); rgCanvas.width = 256; rgCanvas.height = 256; rgCanvas.style.border = '3px solid black'; for (g = 0; g < 256; g++){ for (r = 0; r < 256; r++){ var context = rgCanvas.getContext('2d'); context.beginPath(); context.moveTo(r,g); context.strokeStyle = 'rgb(' + r + ', ' + g + ', 0)'; context.lineTo(r+1,g+1); context.stroke(); context.closePath(); } } var bCanvas = document.createElement('canvas'); bCanvas.width = 20; bCanvas.height = 256; bCanvas.style.border = '3px solid black'; for (b = 0; b < 256; b++){ var context = bCanvas.getContext('2d'); context.beginPath(); context.moveTo(0,b); context.strokeStyle = 'rgb(' + 0 + ', ' + 0 + ', ' + b + ')'; context.lineTo(20, b); context.stroke(); context.closePath(); } document.body.appendChild(rgCanvas); document.body.appendChild(bCanvas); </script> this results in something like My thought is this is too linear, comparing to the ones i see in Photoshop and on the web. I would like to know the logic behind the color mapping in a picker like this: I don't really need the algorythms itself, i'm mainly trying to understand the logic. Thanks

    Read the article

  • How to use ccache selectively?

    - by Anonymous
    I have to compile multiple versions of an app written in C++ and I think to use ccache for speeding up the process. ccache howtos have examples which suggest to create symlinks named gcc, g++ etc and make sure they appear in PATH before the original gcc binaries, so ccache is used instead. So far so good, but I'd like to use ccache only when compiling this particular app, not always. Of course, I can write a shell script that will try to create these symlinks every time I want to compile the app and will delete them when the app is compiled. But this looks like filesystem abuse to me. Are there better ways to use ccache selectively, not always? For compilation of a single source code file, I could just manually call ccache instead of gcc and be done, but I have to deal with a complex app that uses an automated build system for multiple source code files.

    Read the article

  • High level overview of Visual Studio Extensibility APIs

    - by Daniel Cazzulino
    If your head is dizzy with the myriad VS services and APIs, from EnvDTE to Shell.Interop, this should clarify a couple things. First a bit of background: APIs on EnvDTE (DTE for short, since that’s the entry point service you request from the environment) was originally an API intended to be used by macros. It’s also called the automation API. Most of the time, this is a simplified API that is easier to work with, but which doesn’t expose 100% of what VS is capable of doing. It’s also kind of the “rookie” way of doing VS extensibility (VSX for short), since most hardcore VSX devs sooner or later realize that they need to make the leap to the “serious” APIs. The “real” VSX APIs virtually always start with IVs, make heavy use of uint, ref/out parameters and HResults. These are the APIs that have been evolving for years and years, and there is a lot of COM baggage. ...Read full article

    Read the article

  • If not now, then when?

    - by Chris Gardner
    Originally posted on: http://geekswithblogs.net/freestylecoding/archive/2013/10/25/if-not-now-then-when.aspx The time has been flying by this year. It seems like only yesterday that I mentioned the gorillagator, a simple construct of confusion to try to draw attention to my message. In reality, that message was sent over a month ago. During that time, the hours slipped to days and days to weeks. Many exciting things have happened to myself; I'm sure many exciting things have happened to you. I'm also sure that many terrifying things have happened to children and their families. 62 children enter treatment at a Children's Miracle Network Hospital every minute. That's nearly 60,000 children since I sent the last email. To put that number in perspective, that is more than the population of Greenland. If we expand that to the past year, they have been nearly 550,000 children treated. That is almost the population of Huntsville, Decatur, and all their suburbs combined. Over the past 4 years, I have raised a little more than $3,000 for Children's Hospital of Alabama. As a result, I received a call from the organizers of Extra Life thanking me for my dedicated work and informing me that I was the top supporters for Children's Hospital of Alabama ... with my measly three grand. We can do much better than that. It may sound like I'm trying to have fun by playing games for 24 hours. It is more than that. It is me using my time and body as a catalyst. It is me putting my passion to work for a cause. It is me turning my love into something tangible. I have been campaigning and fighting to give these children a chance for years. I have been asking you to help me support these children and families. I've been putting in countless hours of talking to people, impassioned emails, and carefully constructed tweets. I have been fighting with cutting edge, and sometimes expensive, technology to try to provide live streams of my marathons. I yearly put my body through 24 (and, this year, 25) hours of no sleep. I do this to represent the countless hours these families sit awake at their children's side. All I ask is a few minutes on a website and a few dollars. These few minutes and few dollars go a long way help people that are experiencing circumstances that only occur in our nightmares. I also ask that you take one extra step. Forward this plea to those that you know. I can only reach a small fraction of a percentage of the people that may be able to help. Together, we can reach the world. I raise money for Children's Hospital of Alabama. As this message branches out, people may wish to support a hospital closer to their area. I have included a link to the list of people that have dedicated their time and have received no donations. Find someone on the list supporting your local hospital and give them a donation. Let them know that their time and effort are appreciated. Together, we can do something great. Together, we can make a difference. Together, we all stand tall. Thank you. You can get more information at http://www.extra-life.org and http://childrensmiraclenetworkhospitals.org/" My donation page is http://www.extra-life.org/participant/cgardner The list of participants without donations is http://www.extra-life.org/index.cfm?fuseaction=donorDrive.eventParticipantList&page=629&eventID=512

    Read the article

  • AppFabric named cache, what happens if you lose a cache host?

    - by Liam
    I'm getting my head around how app fabric clustering works and there's something I'm not sure about. Given a structure where we have one named cache, with two lead hosts and (say) three cache hosts and high availability turned off and the lead host(s) performing the management role. When one cache host goes down do you loose the data that was on that cache host? In this MSDN article it states: Data on the non-lead hosts would be lost (assuming high availability was not enabled), but the rest of the cluster could continue serving and storing data But I was unsure if redundancy is built into the system. Would you loose x amount of data or would one of the other cache hosts store this data also and pick up the slack?

    Read the article

  • How can I use `SetEnvIf` to clear an Apache2 environment variable?

    - by Jamie
    In my apache2 configuration I've got these lines: SetEnv log_everything # Create the environment variables based on access requests SetEnvIf Request_URI "^/orders/.*$" download_access !log_everything SetEnvIf Request_URI "^/download/.*$" download_access !log_everything SetEnvIf Request_URI "^/wg/.*$" wg_1x1_access !log_everything # Log the accesses using the generated environment variable as conditionals. CustomLog ${APACHE_LOG_DIR}/download.log combined env=download_access CustomLog ${APACHE_LOG_DIR}/wg.log combined env=wg_1x1_access RewriteEngine on RewriteRule "^/wg/.+$" "/wg/1x1.gif" ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined env=log_everything Which currently logs all the "download" and "orders" requests to "download.log" and "wg" requests to "wg.log", but everything is also going to access.log. How can I configure this so that "wg" and "download/orders" requests won't be duplicated in access.log?

    Read the article

  • My NGINX server doesn't use my *.less file

    - by Nicolas
    On my NGINX server, I use a LESS file instead of a CSS file. But my web page is displayed without any style. I tried on Apache and it works great. So I tried to add the less mime-type to nginx in the file /etc/nginx/mime.types : types { text/css css less; And types { text/less less; None of these two try work. Does anyone knows how to use LESS files with NGINX ?

    Read the article

  • upload process times out for different time zones

    - by shilezi
    I have an inhouse(NY) app that cients can upload files to. Usually uploads go pretty quickly for most clients but this particularly cient in the UK always have problems with uploads. not sure if they get any errors but since we log all exceptions, we see this...Error: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Net.WebException: The operation has timed out at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at ... This shouldn't even be an issue because since we noticed they have had this issue before so we bumped up these to maxRequestLength="2097151" executionTimeout="14400". Further investigating this error, i read that it could be a thread timeout since the default is 20minute. A worker process with process id of serving application pool was shutdown due to inactivity. Application Pool timeout configuration was set to 20 minutes. A new worker process will be started when needed. Problem is I am not entirely sure if that really is the case as all other cients mostly North American, have no issues but then their uploads don't seem to go beyond 80mb and the UK client have done a 700mb upload before that i know of. We have tested 750mb before and the whole process took about 15min for upload and processing. Any help on what the real issue here might be? Thanks.

    Read the article

  • Unable to browse to apache service, Service is running

    - by Jeff
    Summary I have a very peculiar problem. I am not able to open the "It Works!" page after installing a fresh server with apache. I am able to ssh to the box (from outside the network). Apache seems to be running on my Centos6.4x86_64 box just fine. Nothing useful in /var/logs/httpd/*. What am I missing? The setup I am outside the network right now. The "server" is a VM on my home computer running bridged mode. public ip: A.B.C.D Host: 192.168.1.5 VM: 192.168.1.8 I have a verizon fios router that is forwarding ports 22, 80, and 8888 to the VM. I am able to ssh over port 22, but I am not able to browse to the public URL over port 80. so A.B.C.D:22 is working, but http://A.B.C.D:80 is not. What I've tried nmap to see if it is listening: nmap -sT -O localhost Starting Nmap 5.51 ( http://nmap.org ) at 2013-10-25 11:10 EDT Nmap scan report for localhost (127.0.0.1) Host is up (0.000040s latency). Other addresses for localhost (not scanned): 127.0.0.1 Not shown: 996 closed ports PORT STATE SERVICE 22/tcp open ssh 25/tcp open smtp 80/tcp open http 3306/tcp open mysql I tried going to it locally (lynx) and it does work. So, is the problem in my ports?

    Read the article

  • php extension COM_DOTNET.dll

    - by aXul
    I'm trying to add a PHP extension (PHP_COM_DOTNET)to my server, by writing the following in my php.ini [COM_DOT_NET] extension=php_com_dotnet.dll I downloaded the dll file and put it in my ext folder, but when restarting the server, I got the following errors cant find entry point zend_new_interned_string in php5ts.dll php startup: unable to load dynamic library php_com_dotnet.dll couldn't find especified process I'm using php 5.3.18 on a xampp-like package (vertrigoserv)

    Read the article

  • Roll standalone JBoss app under Tomcat

    - by Seva Alekseyev
    I've got a Linux box where there’s Tomcat running, with some JSP applications in it. Now, I’ve received a third party app from a developer shop to be eventually deployed. It came as an archive called "jboss7.tar" which, it seems, contained a whole standalone Web server. Once I’ve followed their instructions and run the designated shell script, it would start a server that would listen on port 8081, and app pages are being served up. Still, this strikes me as an inelegant setup. Why run two Web servers side by side, both of them Java-enabled? Also, the manual startup of the standalone app, I don't like that either. The real question is – can I take the user-provided portions from the said archive and somehow plug it under the existing Tomcat instance? It looks like the user code is packaged into files with .war extension, I can see them under /var/jboss7/standalone/deployments.

    Read the article

  • Logging violations of rules in limits.conf

    - by PaulDaviesC
    I am trying to log the details of the programs that where failed due to the limit cap defined in the limits.conf. My initial plan was to do it using the audit system. The idea was to track the system calls related to limits in the limits.conf that where failed. However the problem with this approach is that , it is not possible to track the violations of cpu time, since that violation do not involve failure of system calls. In the case of CPU time , one thing happens is that the program which violated the cpu time will be delivered a SIGXCPU. So my question is how should I go about logging the programs that violated CPU time? Also is there any limits.conf specific logs available?

    Read the article

  • Exchange 2010 - Get a list of emails received and sent by domain

    - by Jonathan Rioux
    I have an Exchange 2010 server listening on a couple of different domains. So it receives and sends emails destinated and originating from several domains. Now we want to get rid of a specific domain gradually and what I would like to do now is get a list of all the emails received or sent using that specific domain that we wants to get rid of. So we can figure how this domain is still getting used before getting rid of it. Thanks.

    Read the article

  • Test Environment for Microsoft SQL Cluster

    - by user195643
    I have a the following test environment: 1 - Windows 2008 (DC Edition) Role - Active Directory 2 - Windows 2008 (Enterprise Servers) I would like to create a MSSQL Cluster in this test environment. I am using a desktop PC and I would like to know how I can configure second network card in order to configure the MSSQL Cluster? and how I can use a shared storage without using any external drives?

    Read the article

  • Rails application keeps timing out when attempting to connect to Postgresql DB

    - by Corillian
    I'm hosting a postgresql database on a small windows azure Ubuntu 13.04 VM with a default postgresql.conf. I have a Rails application running on a medium windows azure Ubuntu 13.04 VM. When accessing the postgresql database the rails application is constantly timing out. In its database.yml I have the connection pool size set to 120 and the timeout set to 15 seconds. Despite this my rails logs are full of the following error message: ActiveRecord::ConnectionTimeoutError: could not obtain a database connection within 5 seconds (waited 5.0023203 seconds). The max pool size is currently 120; consider increasing it. My postgresql.conf has a max connection limit of 120, making it any larger prevents the server from being able to successfully restart. I've also made sure that ssl was off in the postgresql.conf per this article but beyond that I have no idea what's going on. My postgresql logs don't contain any info indicating something is going wrong. My website is getting ~1k hits per day so perhaps a small VM instance just isn't powerful enough? I appreciate any assistance! [Edit1] The postgresql database is in a separate cloud service within the same affinity group. For example: db small VM: mydatabase.cloudapp.net (Affinity Group US East) forums medium VM: myforums.cloudapp.net (Affinity Group US East) On the database server I have opened port 5432. The connection to the database server from the forums server is using its hostname. Is it possible that the DNS resolution is what's taking so long?

    Read the article

  • Vagrant sahara plugin - multiple snapshots

    - by BazZy
    How I can make more than one snapshot when in sahara sandbox mode? Or, can I see list of all commits I've ever made and rollback to any? Why do I need all this? I just want to setup initial VM. After that I want to compile number of packages from sources, and this takes pretty long time. So right now I thinking of this order: Setup initial ubuntu 12.04 vagrant box Snapshot this state Compile sources, install system wide rbenv (it make compilation also) Snapshot second state Start all my infrastructure experiments Rollback to any of my previous states or commit third state

    Read the article

  • Create new vsftpd user and lock to (specify) home / login directory

    - by Geoff Jackson
    I need to periodically give temporary and limited access to various directories on a CentOS linux server that has vsftp installed. I've created a user using useradd [user_name] and given them a password using passwd [password]. I've created a directory in /var/ftp and then I bind this to the directory that I wish to limit access to. What else do I need to specifically do to ensure that when this user logs into FTP, they only have access to this directory please?

    Read the article

  • Import virtualBox appliance to KVM

    - by Hugo Bulnes
    Im new using KVM as a virtualization solution. Currently I'm using VirtualBox to manage my virtual machines in my personal computer, but I'm moving my virtualization to a Server, so I set up a Linux server with KVM. And now I'm trying to import a virtualBox vm to KVM. So far I couldn't make it work. I already convert the ova file from VirtualBox to a format more familiar to KVM (qcow2), and I try to create a new virtual machine using virt-install command and setting the new virtual machine hard drive with the .qcow2 file. There is anyone could help me? thank you!

    Read the article

  • Install Python setuptools on CentOS 6

    - by Ivan
    I'm trying to install setuptools with no success so far. When I do python3.3 ez_setup.py I get the following error: Extracting in /tmp/tmp6nn4cz Traceback (most recent call last): File "ez_setup.py", line 370, in <module> sys.exit(main()) File "ez_setup.py", line 367, in main return _install(tarball, _build_install_args(options)) File "ez_setup.py", line 55, in _install tar = tarfile.open(tarball) File "/usr/local/lib/python3.3/tarfile.py", line 1571, in open raise ReadError("file could not be opened successfully") tarfile.ReadError: file could not be opened successfully I've been reading and it seems that zlib-devel was not installed when the python installation was done. However, I did uncomment line 358 on Modules/Setup to enable zlib before compiling and if I try to import zlib on python3.3 console it works. Also, in case it helps, here is the ldd python3.3: # ldd `which python3.3` linux-vdso.so.1 => (0x00007fff79fda000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b96092da000) libdl.so.2 => /lib64/libdl.so.2 (0x00002b96094f6000) libutil.so.1 => /lib64/libutil.so.1 (0x00002b96096fa000) libz.so.1 => /lib64/libz.so.1 (0x00002b96098fe000) libm.so.6 => /lib64/libm.so.6 (0x00002b9609b12000) libc.so.6 => /lib64/libc.so.6 (0x00002b9609d95000) /lib64/ld-linux-x86-64.so.2 (0x00002b96090bc000) What can I do?

    Read the article

  • How to removeTrojan PB [duplicate]

    - by user266901
    This question already has an answer here: How do I get rid of malicious spyware, malware, viruses or rootkits from my PC? 15 answers How to remove trojan PB from windows 7 system? previously i had installed Norton 360 antivirus. the subscription was expired two months back. Recently i have purchased quick heal total security. while installing quick heal antivirus i get the message 'system infected by Trojan PB' Their is an option to remove Trojan PB by restarting computer. However the infection does not get removed. Please advice for removal of Trojan PB

    Read the article

  • how to connect with ssh when it's hanging

    - by Eduardo Bezerra
    I'm trying to ssh into a remote machine, but it hangs when looking for an identity file: [username@local .ssh]$ ssh -v remote uname OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010 debug1: Reading configuration data /home/username/.ssh/config debug1: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to remote [192.168.3.36] port 22. debug1: Connection established. debug1: identity file /home/username/.ssh/identity type -1 debug1: identity file /home/username/.ssh/id_rsa type -1 debug1: identity file /home/username/.ssh/id_dsa type -1 I can ping the machine normally, and it's obviously working with the sshd service running... I just don't know how to log into it. In fact, I'd just like to reboot it. That'd be fine. Thing is: it's across the ocean (I'm in the US, and the machine is in Europe). I'd run some hundreds of java threads at the same time and apparently that was too much for the host. How can I get back in?

    Read the article

  • Detect an IP address of a Wireless Access Point device

    - by dempap
    I have a Wireless Access Point device (http://www.szedup.com/show.aspx?id=1706), which I am planning to put into BeagleBoard-xM, in order to achieve wireless communication (LAN). However, I can't find it's IP address. I mean, I have to know it's IP address in order to connect with BeagleBoard-xM via a terminal emulator. For the moment, I have this device connected via Ethernet on my router. My router's setting page shows I have this device connected, but no further information. Is there any way to find the IP address of the Wireless Access Point? I hope of being understood. Any help would be really appreciated.

    Read the article

  • System hangs after IncreaseUserVa change on Windows 7 64-bit

    - by imriss
    By mistake, I applied the IncreaseUserVa 3072 on a Windows 7 64-bit: BCDEDIT /set IncreaseUserva 3072 After that, the system is getting hanged when I start an intensive Matlab code. I tried to revert the change using both: BCDEDIT /set increaseUserva 2048 or BCDEDIT /deletevalue increaseUserva But, I get to the same problem when I run the Matlab code. When I check bcdedit/enum all, it does not contain increaseUserva, after /deletevalue command. Any idea?

    Read the article

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