Search Results

Search found 433 results on 18 pages for 'derek mitchell'.

Page 8/18 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Write to PDF using PHP from android device

    - by Brent Mitchell
    I am trying to write to a pdf file on php server. I have sent variables to the server, create the pdf document, then have my phone download the document to view on device. The variables seem not to write on the php file. I have my code below public void postData() { try { Calculate calc = new Calculate(); HttpClient mClient = new DefaultHttpClient(); StringBuilder sb=new StringBuilder("myurl.com/pdf.php"); HttpPost mpost = new HttpPost(sb.toString()); String value = "1234"; List nameValuepairs = new ArrayList(1); nameValuepairs.add(new BasicNameValuePair("id",value)); mpost.setEntity(new UrlEncodedFormEntity(nameValuepairs)); } catch (UnsupportedEncodingException e) { Log.w(" error ", e.toString()); } catch (Exception e) { Log.w(" error ", e.toString()); } } And my php code to write the variable "value" onto the pdf document: //code to reverse the string if($_POST[] != null) { $reversed = strrev($_POST["value"]); $this->SetFont('Arial','u',50); $this->Text(52,68,$reversed); } I am just trying to write the variable in a random spot, but the variable the if statement is always null and I do not know why. Thanks. Sorry if it is a little sloppy.

    Read the article

  • IIS7 URL Rewriting: How not to drop HTTPS protocol from rewritten URL?

    - by Scott Mitchell
    I'm working on a website that's using IIS 7's URL rewriting feature to do a permanent redirect from example.com to www.example.com, as well as rewrites from similar domain names to the "main" one, such as from www.examples.com to www.example.com. This rewrite rule - shown below - has worked well for sometime now. However, we recently added HTTPS support and noticed that if users visit one of the URLs to be rewritten to www.example.com then HTTPS is dropped. For instance, if a user visits https://example.com they get redirected to http://www.example.com, whereas we would like them to be sent to https://www.example.com. Here is the rewrite rule of interest (in Web.config): <rule name="Canonical Host Name" stopProcessing="true"> <match url="(.*)" /> <conditions logicalGrouping="MatchAny"> <add input="{HTTP_HOST}" pattern="^example\.com$" /> <add input="{HTTP_HOST}" pattern="^(www\.)?example\.net$" /> <add input="{HTTP_HOST}" pattern="^(www\.)?example\.info$" /> <add input="{HTTP_HOST}" pattern="^(www\.)?examples\.com$" /> </conditions> <action type="Redirect" url="http://www.example.com/{R:1}" redirectType="Permanent" /> </rule> As you can see, the action element's url attribute points directly to http://, so I get why https://example.com is redirected to http://www.example.com. My question is, how do I fix this? I tried (naively) to just drop the http:// part from the url attribute, but that didn't work. Thanks!

    Read the article

  • fgets equilvilant in C++

    - by mitchell
    what is the C++ equivilant to the c function fgets? I have looked at getline from ifstream, but when it comes to a end of line character, '\n', it terminates at and discards it, I am looking for a function that just terminates at the end line character but adds the end of line character to the char array. thanks in advance

    Read the article

  • Why does the compiler give an ambiguous invocation error when passing inherited types?

    - by Matt Mitchell
    What is happening in the C# compiler to cause the following ambiguous invocation compilation error? The same issue applies to extension methods, or when TestClass is generic and using instance rather than static methods. class Type1 { } class Type2 : Type1 {} class TestClass { public static void Do<T>(T something, object o) where T : Type1 {} public static void Do(Type1 something, string o) {} } void Main() { var firstInstance = new Type1(); TestClass.Do(firstInstance, new object()); // Calls Do(Type1, obj) TestClass.Do(firstInstance, "Test"); // Calls Do<T>(T, string) var secondInstance = new Type2(); TestClass.Do(secondInstance, new object()); // Calls Do(Type1, obj) TestClass.Do(secondInstance, "Test"); // "The call is ambiguous" compile error }

    Read the article

  • URL Rewrite is adding HTTPS to my canonical redirects in IIS7

    - by Derek Hunziker
    Hello, I have the following rule defined in my Web.config: <rule name="Enforce canonical hostname" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" negate="true" pattern="^www\.mydomain\.org$" /> </conditions> <action type="Redirect" url="http://www.mydomain.com/" redirectType="Permanent" /> </rule> What I am experiencing is strange... It appears that I am being redirected to https://www.mydomain.com/ which causes my browser to hang. I do not have SSL encryption turned on, nor do I have any special authorization rules. The web server in question is behind an F5 load balancer. Any ideas?

    Read the article

  • Benchmarking hosting providers IO with Bonnie

    - by Derek Organ
    Ok, because of a bunch of projects I'm working on I've access to dedicated Servers on a 3 hosting providers. As an experiment and for educational purposes I decided to see if I could benchmark how good the IO is with each. Bit of research lead me to Bonnie++ So I installed it on the server and ran this simple command /usr/sbin/bonnie -d /tmp/foo The 3 machines in different hosting providers are all dedicated machines, one is a VPS, other two are on some cloud platform e.g. VMWare / Xen using some kind of clustered SAN for storage This might be a naive thing to do but here are the results I found. HOST A Version 1.03c ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP xxxxxxxxxxxxxxxx 1G 45081 88 56244 14 19167 4 20965 40 67110 6 67.2 0 ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 15264 28 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ xxxxxxxx,1G,45081,88,56244,14,19167,4,20965,40,67110,6,67.2,0,16,15264,28,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++ HOST B Version 1.03d ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP xxxxxxxxxxxx 4G 43070 91 64510 15 19092 0 29276 47 39169 0 448.2 0 ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 24799 52 +++++ +++ +++++ +++ 25443 54 +++++ +++ +++++ +++ xxxxxxx,4G,43070,91,64510,15,19092,0,29276,47,39169,0,448.2,0,16,24799,52,+++++,+++,+++++,+++,25443,54,+++++,+++,+++++,+++ HOST C Version 1.03c ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP xxxxxxxxxxxxx 1536M 15598 22 85698 13 258969 20 16194 22 723655 21 +++++ +++ ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 14142 22 +++++ +++ 18621 22 13544 22 +++++ +++ 17363 21 xxxxxxxx,1536M,15598,22,85698,13,258969,20,16194,22,723655,21,+++++,+++,16,14142,22,+++++,+++,18621,22,13544,22,+++++,+++,17363,21 Ok, so first off what is the best way to read the figures and are there any issues with really comparing these numbers? Is this in any way a true representation of IO Speed? If not is there any way for me to test that? Note: these 3 machines are using either Ubuntu or Debian (I presume that doesn't really matter)

    Read the article

  • convert mp4 to flv. Adobe Medio Encoder Failing.

    - by Derek Adair
    Hi, I am trying to encode a .mp4 to a .flv I've tried using the Adobe Media Encoder but the video is lost in the conversion process, leaving me a black screen and some audio. I have yet to find something that can do this successfully for free. I found ffmpeg, which looks promising... but I can't figure out how to get it to work. Any direction would be greatly appreciated. -Thanks.

    Read the article

  • How do I increase my home's bandwidth?

    - by Derek
    I just mistakingly posted this on Stack Exchange but don't know how to delete it... Anyway, I was thinking of building a home server to use instead of renting a VPS, because in the long run it would be cheaper. What I'm concerned with is the bandwidth limit of my house. I know when I'm downloading something off the internet, if I download at high speeds the rest of the computers connected to my router will become slower. Is there any way to avoid this? There are other cable outlets in my house, will connecting a modem and router there avoid this problem?

    Read the article

  • On dual boot system, Is it possible to use VirtualBox to boot other installed OS?

    - by Derek Ziemba
    I currently run Windows 7 from a 256GB SSD as my Operating System. Lately, for school, I've been using openSUSE linux inside a VirtualBox PC and I'm really liking it. I'm starting to hate even working in Windows. But I can't just abandon Windows. I've been considering dual booting openSUSE and will likely purchase another SSD for openSUSE. Once I have the dual boot set-up, there is going to be times I need to do something quick in the operating system that I'm not currently in. It would be a pain to have to reboot the computer each time I need to switch the OS for a simple task, especially from Windows since it doesn't let you save it's state. From openSUSE, I want to be able to start a VirtualBox Machine using my Windows Drive. And in Windows, I want to be able to start a VirtualBox Machine of my openSUSE Drive. Would this be possible? The issue I'm worried about is drivers. For instance, the OS will be installed on native hardware and have the native hardware's drivers configured. When I try to boot the OS in a VirtualMachine, I feel like the OS is not going to know what to do, and have to reconfigure itself or just not work.

    Read the article

  • Setting Up Multiple Domains (plus wildcard subdomains) to Point to the Same Site/VirtualHost

    - by Derek Reynolds
    I have my primary domain with wildcard subdomains setup already. username.maindomain.com and maindomain.com I want to provide my users with additional domains that they can select. additional1.com, additional2.com, additional3.com... These additional domains would also need to support wildcard subdomains (as the subdomains route to a username). Anyone know how to properly configure this in DNS and VirtualHost config? Currently I have the additional domains as A records pointing to the same IP as my main domain (with a wildcard subdomain A record for each as well). In my VirtualHost config I am placing the additional domain names in the ServerAlias directive. Let me know if any more detail is needed.

    Read the article

  • Mac compatible Web-Development Tools

    - by Derek Adair
    Hi, I'm looking for any Mac compatibile development tools that are tried and tested. I'm quite sick of my MySQL query browser crashing... And i'm sure there is probably better software out there anyways... At the moment my focus is dedicated to application development using PHP/MySQL/Ajax. (although, I will be learning ActionScript/Flex shortly). Here are the apps I regularly use and a general idea of the environment I work in: Hosting - localhost: Mamp Production: Amazon EC2 IDE - Coda: PHP/Mysql/Javascript Mysql - PHPMyAdmin MySQL query browser FTP - Coda FileZilla X11 is used for connecting to my production environment I am mainly looking for... -tools that will help me better manage (create, edit... whatever) databases. -Version control. This is huge as I'm working with a team of three other developers (we reeeeeeaaally need to standardize our environments..) Although any cool little tools to make my job easier are always a plus! I am unable to insert more than one link as I'm not rated on this forum.

    Read the article

  • Substitute drivers for a 32 bit printer on a 64 bit OS

    - by Derek G
    I'm trying to use an old GCC Elite 12N B&W laser printer for printing schoolwork and other miscellany on 64 bit Windows 7. The only drivers available are 32 bit. As far as I know, it's not possible to use 32 bit drivers on a 64 bit OS, but is there some sort of generic Postscript driver I could substitute? If the drivers are, in fact, compatible, could someone suggest a way to modify the INF file so that Windows will recognize it? Thanks for your help!

    Read the article

  • How to legitimately work around ISP rate limits

    - by Derek Ting
    A lot of ISP rate limit the amount of e-mails that is sent from a particular IP address. What is the proper way to get around that rate limit? Our company has an iPhone application that sends many e-mails because of our large user base and many e-mails go to different ISPs that rate limit the number of messages coming from a specific IP. We do not send spam and we are a legitimate business. However, is there a better way to resolve this limitation rather than just getting a ton of IP addresses? Ideally, I wouldn't want to rely on a third party service to send mail. However, if its the only possible solution, we would consider.

    Read the article

  • Concerns with compressing sensitive data in OSX

    - by Derek Adair
    Hi, I have some really sensitive data that I am trying to compress and back up so I can reformat. It's absolutely imperative that nothing happens to these files. I'm a developer so I have very little room for error... plus I'd really hate it if any of my .mp3's got corrupted! File Formats Include... .mp3 .php .js .ai - .psd - .flv (and many more) Is the mac OSX file compression safe enough? Or should I look elsewhere? Is there a more efficient/secure file-format other than .zip (i'm assuming so...)

    Read the article

  • Where are variables sourced from in bash/redhat?

    - by Derek
    I am getitng something weird in my environment. I have a .bash_profile that only checks for .bashrc and then sources it. I have a JAVA_HOME in that file that is correctly setting the variable and exporting it. However, if I comment out the JAVA_HOME line in .bashrc, another JAVA_HOME is still showing up in my environment, different from the one i was setting in bashrc. Where is this other JAVA_HOME coming from? Thanks As it turns out - it seems like any shell I run is pulling in a JAVA_HOME from somewhere. I dont know what could be making this pull into csh, sh, bash, etc

    Read the article

  • 64bit server running in 32bit mode using incorrect locale

    - by Derek Ekins
    I have a 64bit server that we are running an application on in 32bit mode. For whatever reason the locale of the 32bit process is coming through as en-US when the server is set to en-GB. I am guessing that the reason for this is there is that the 64bit and WOW64 are not sharring the locale settings. So my question is how do you set the locale for a 32bit process? This is Windows 2003. The application is an asp.net app running under IIS in 32bit mode. This setup is definitely not my choice.

    Read the article

  • Scientific Linux - mysql and apache fail to start on reboot

    - by Derek Deed
    Both mysqld and httpd fail to restart following a reboot of the server, although chkconfig --list shows both daemons set to on for run levels 2,3,4 & 5 All control is being exectuted via Webmin Reboot server – MySQl and Apache not running MySQL Database Server MySQL version 5.1.69 MySQL is not running on your system - database list could not be retrieved. ________________________________________ Click this button to start the MySQL database server on your system with the command /etc/rc.d/init.d/mysqld start. This Webmin module cannot administer the database until it is started. Apache Webserver Apache version 2.2.15 Start Apache Search Docs.. Global configuration Existing virtual hosts Create virtual host Select all. | Invert selection. Default Server Defines the default settings for all other virtual servers, and processes any unhandled requests. Address Any Port Any Server Name Automatic Document Root /var/www/drupal Virtual Server Processes all requests on port 443 not handled by other virtual servers. Address Any Port 443 Server Name Automatic Document Root /var/www/drupal Select all. | Invert selection. chkconfig --list mysqld mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off chkconfig --list httpd httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off Manually Restart Apache chkconfig --list httpd httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off Manually Restart MySQL chkconfig --list mysqld mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off Everything now running okay; but no difference in the chkconfig outputs above. I tried: chkconfig --levels 235 httpd on /etc/init.d/httpd start and the same for mysqld but no change in operation. Log files show that the shutdown has been completed successfully; but there is no indication of the service restarting until it is executed manually: 131112 13:59:15 InnoDB: Starting shutdown... 131112 13:59:16 InnoDB: Shutdown completed; log sequence number 0 881747021 131112 13:59:16 [Note] /usr/libexec/mysqld: Shutdown complete 131112 13:59:16 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 131112 14:09:52 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 131112 14:09:52 InnoDB: Initializing buffer pool, size = 8.0M 131112 14:09:52 InnoDB: Completed initialization of buffer pool And the Apache logs: [Tue Nov 12 13:59:13 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Tue Nov 12 13:59:13 2013] [notice] Digest: generating secret for digest authentication ... [Tue Nov 12 13:59:13 2013] [notice] Digest: done [Tue Nov 12 13:59:14 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations [Tue Nov 12 13:59:14 2013] [notice] caught SIGTERM, shutting down [Tue Nov 12 14:27:13 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Tue Nov 12 14:27:13 2013] [notice] Digest: generating secret for digest authentication ... [Tue Nov 12 14:27:13 2013] [notice] Digest: done [Tue Nov 12 14:27:13 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations Is anyone able to shed any light on this problem?

    Read the article

  • Copy files from sub directories into one directory.

    - by Derek Organ
    Ok I have a bunch of files in this file structure format. /backup/daily/database1/database1-2011-01-01.sql /backup/daily/database1/database1-2011-01-02.sql /backup/daily/database1/database1-2011-01-03.sql /backup/daily/database1/database1-2011-01-04.sql /backup/daily/database1/database1-2011-01-05.sql /backup/daily/database1/database1-2011-01-06.sql /backup/daily/database1/database1-2011-01-07.sql /backup/daily/anotherdb/anotherdb-2011-01-01.sql /backup/daily/anotherdb/anotherdb-2011-01-02.sql /backup/daily/anotherdb/anotherdb-2011-01-03.sql /backup/daily/anotherdb/anotherdb-2011-01-04.sql /backup/daily/anotherdb/anotherdb-2011-01-05.sql /backup/daily/anotherdb/anotherdb-2011-01-06.sql /backup/daily/anotherdb/anotherdb-2011-01-07.sql /backup/daily/stuff/stuff-2011-01-01.sql /backup/daily/stuff/stuff-2011-01-02.sql /backup/daily/stuff/stuff-2011-01-03.sql /backup/daily/stuff/stuff-2011-01-04.sql /backup/daily/stuff/stuff-2011-01-05.sql /backup/daily/stuff/stuff-2011-01-06.sql /backup/daily/stuff/stuff-2011-01-07.sql And there are lots lots more. ultimately I want to import all the 2011-01-07.sql files into my mysql database. This works for one mysql -u root -ppassword < /backup/daily/database1/database1-2011-01-07.sql That will nicely restore that database from this backupfile. I want to run a process where it does this for all databases. So my plan is to first cp all 2011-01-07 sql files into a tmp dir e.g. cp /backup/daily/*/*2011-01-07*.sql /tmp/all The command above unfortunately isn't working I get an error: cp: cannot stat ..... No such file or directory So can you guys help me out with this. For bonus points if you can tell me how to do the next step which is import all databases in one command doing one at a time that would be great too. I really want to do these in two separate steps because I need to delete a few sql files manually from the tmp dir before I run the restore command. So I need: 1) command to copy all 2011-01-07 sql files to a tmp dir 2) command to import all those files in that dir into mysql I know its possible to do in one but for lots of reasons I really would prefer to do it in two steps.

    Read the article

  • Managing persistent data on an Amazon EC2 web server

    - by Derek
    I've just started trying out Amazon's EC2 service for running an asp.net web app which uses a SQL Server 2005 Express database. I have some questions about how to configure and operate it best for reliability, and I'm hoping to tap into some collective wisdom here as this is my first foray into EC2. Here's how I have it configured currently: OS: Windows 2003 SQL Server Express 2005 Web content stored on an EBS Volume (E Drive) Database Data stored on an EBS Volume (E Drive) Database backups to "C Drive" and then copied off to S3. Elastic IP Address attached to the production instance. Now when I make a change to the OS configuration, I make a new AMI using the bundle feature. Unfortunately, I found that this results in significant downtime. While the bundle is created and the new instance is started. It seems that when I'm ready to make a new AMI, I should: Start up a new temporary instance. Detach the EBS volume from the production instance. Detach the IP Address from the production instance. Attach the IP Address to the temporary instance. Attach the EBS volume to the temporary instance. Create an AMI from the production instance. After the production instance restarts, reverse the attach/detach steps to put it back in production. Is this the right order of events to prevent any chance to corrupt the EBS volume? Will the EBS volume become corrupt if I detach it while a database Write is taking place? Should I snapshot the EBS volume of the production instance and attach it to the temporary instance instead? Or could taking a snapshot of the EBS volume while it's in use cause corruption? Any suggestions to improve the reliability and operations?

    Read the article

  • On a local network, are you able to password protect certain folders and how (in windows xp)?

    - by Derek
    I have a local network set up for my small office which consists of me, the manager, my wife, the secretary, and a few sales people/others. I would like to share passwords over the network and other such things privately to my wife, the secretary, but would not like the sales people and others to have access to it, yet I need the others to have access to other folders/documents that I'd like to share. How would I go about doing this if not by password? Thanks in advance

    Read the article

  • Multiple Rails apps on same subdomain?

    - by Derek
    I recently decided to try out Rails. When working with PHP, I simply had all of my PHP projects in the same directory. For example, I may have http://ubuntu/app1, http://ubuntu/app2, etc. I created a subdomain for Rails (http://ruby.ubuntu), installed Rails and Passenger and everything is working. However, I may be wrong, but it looks like I can only have one Rails app per subdomain? My VirtualHost is as follows: <VirtualHost *:80> ServerName ruby.ubuntu ServerAdmin webmaster@localhost DocumentRoot /var/www/ruby/blog/public <Directory /var/www/ruby/blog/public> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all RailsEnv development </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> All of my PHP and misc. files are stored in /var/www/main. I want to be able to store all of my Rails apps in /var/www/ruby. I tried changing DocumentRoot to /var/www/ruby, but I don't think it's as simple as that. When I browse to a Rails app's Welcome Aboard page and click on "About my application's environment," I get a 404 page, but when the DocumentRoot is set to the public directory, I get the expected result. I don't want to have to create a new subdomain every time I create a new project. Is there any way I can make it so I can store all of my apps in /var/www/ruby, and browsing to http://ruby.ubuntu will let me access all of my Rails apps there? That way if I want to create a new app, all I have to do is rails new app, no Apache .htaccess or VirtualHost configuration required.

    Read the article

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