Here is my code
<html>
<body>
<?php
echo "<b>Hello World</b> <br />";
?>
</body>
</html>
I have named the file as test.php but I dont get the desired output in my firefox 3.6 browser.
Output
Hello World
"; ?>
I i just moved my website (asp.net) to the live environment.
i realized they are running IIS 6 so all my nice and clean url rewriting doesn t work anymore.
i was trying to implemente url rewriting using the .htaccess file
i want to rewrite
www.amicobio.co.uk/Menu.aspx
as www.amicobio.co.uk/Food-Menu
so in the .htaccess i set
CaseInsensitive On
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^Food-Menu$ Menu.aspx
but it doesn t work it says
The requested URL /a/m/amicobio.co.uk/public/Menu.aspx was not found on this server.
obviously yhe path is wrong but what is /a/m/ ?
and how do i fix it?
all the files in amicobio.co.uk/public/
thanks
Here I have a variable 'response' which is obtained by parsing an XML file.
$url = 'http://xxxxx.xml';
$ch = curl_init($url);
$response = curl_exec($ch);
The url structure is as follows -
<user>
<id>734</id>
<name>Peter Parker</name>
-
<status>
<favorited>false</favorited>
</status>
</user>
How to access each bit of info like id,name,favorited from response?
I have a Ruby script that outputs a heap of text. As an example:
puts "line 1"
puts "line 2"
puts "line 3"
# etc... (obviously, this isn't how my script works..)
There's not a lot of data - perhaps about 8kb of character data in total.
When I run the script on the command line, it works as expected:
$ ./my-script.rb
line 1
line 2
line 3
But, when I push it into a file, the output is truncated at exactly 4096 bytes:
$ ./my-script.rb > output.txt
What would cause it to stop at 4kb?
I have a vector which contains a list co-ordinates ...x1,y1 ; x2,y2....xn,yn
I am trying to extract each individual element which is a co-ordinate and then save them to file as a nice delineated co-ord pair which can be easily read. Or what would be nice i to save them so I can plot something in excel e.t.c (as cols of x and y values).
My original vector size is 31, and was originally constructed as
vector<vector<Point> > myvector( previous vector.size() );
Thanks !
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="abc" targetNamespace="http://schemas.businessNameHere.com/SoftwareNameHere"
elementFormDefault="qualified"
xmlns="http://schemas.businessNameHere.com/SoftwareNameHere"
xmlns:mstns="http://schemas.businessNameHere.com/SoftwareNameHere"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="..." type="..." />
<xs:complexType name="...">
I am working on a project using XSD to generate .cs file. My question is concerning the string "http://schemas.businessNameHere.com/SoftwareNameHere" If I change it, it doesn't work. But the http:// is not a valid one... what is the logic behind and where can I can information about what to put there or how to change it?
I tried out Alex Kuhl's ajax script to upload images to Django 1.4.
My first question is why I'm getting an empty page with firebug telling me I have two errors:
fileuploader.js (line 4):
syntax error
<!DOCTYPE html>
In my template html:
qq is not defined
var uploader = new qq.FileUploader( {
Here is my entire html file for it:
http://pastebin.com/NjbV5gMn
This post suggests that either some script has 404'd or the src attribute is empty, which would cause the doctype error. But that doesn't seem to be the case here. As for why qq is not defined, I'm not sure what is wrong. Django can clearly find the fileuploader.js just fine from my static folder.
My second question is why the ajax code uses {{ csrf_token }} instead of {% csrf_token %}. But if I use {% csrf_token %}, I get the firebug error:
missing } after property list
'csrf_token': '<div style='display:none'<input type='hidden' name='csrfmiddlewaretoken' value='Cx0zFFak6OLgrHiAnFa3k4BPDmn4BgoT' /</div',
Placing a vb.net project under git control in windows (was previously under VSS - long sad story of repository corruption, etc). How should I set up the ignore file? The exclusions I'm thinking of using are:
*.exe
*.pdb
*.manifest
*.xml
*.log (is git case sensitive on windows? Should I exclude *.Log as well?)
*.scc (I gather these were left over from VSS - maybe I should delete them?)
Is this a sensible list? Should I be excluding directories?
Hi All,
I have written the SQL file with on excecuting it is throwing the error as
mysql @"C:\Documents and Settings\Hemant\Desktop\create_tables.sql";
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '@"C:\
Documents and Settings\Hemant\Desktop\create_tables.sql"' at line 1
on line 1 code is
CREATE DATABASE IF NOT EXISTS test;
DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE test;
please let me know is i am missing something
hello community,
understanding http and headers i played around with telnet to send requests. to not type everything again and again and again i thought i'd write a small textfile with all the commands i need.
my file is as simple as follows:
GET /somefile.php HTTP/1.1
Host: localhost
i then try to feed it to telnet with io-redirection:
$ telnet localhost 80 < telnet.txt
but all output i get is
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
what am i doing wrong?
Hello.
I'm learing LINQ-to-SQL right now and i have wrote a simple application that define SQL data:
[Table( Name = "items" )]
public class Item
{
[ Column( IsPrimaryKey = true, IsDbGenerated = true ) ]
public int Id;
[ Column ]
public string Name;
}
I have launched 2 copy of application connected to the same .sdf file and tested if all database modifications in one application affects another application. But strange thing arise. If i use InsertOnSubmit() and DeleteOnSubmit() in one application, added/removed items are instantly visible in other application via 'select' LINQ queue. But if i try to modify 'Name' field in one application, it is NOT visible in other applicaton until it reconnects the database :(. The test code i use:
var Items = from c in db.Items
where Id == c.Id
select c;
foreach( var Item in Items )
{
Item.Name = "new name";
break;
}
db.SubmitChanges();
Can anyone suggest what i'm doing wrong and why InsertOnSubmit()/DeleteOnSubmit works and SubmitChanges() don't?
Hello All:
I have one MVC view page in which I show different links and I am using ThickBox to show a different page when ever one of these links is clicked. In these pages, I am using jQuery functions to do some changes, but I am not able to resolve the jquery file path on the view pages. I need to give absolute path something like "http://test.com/js/jquery.js". But is there any way to make it relative?
I also tried getting the host url and using <%=% and <%# % but none is working.
Any help?
Thanks
Ashwani
hi,
i made a second uiview in mei .xib file. the first view is landscape and i get it by following code
ItemController *newItem;
newItem = [[ItemController alloc] init];
newItem.view.....
how can i "activate" the second view, so i can use it with
newItem.view2...
is that possible? the second view is portait mode, so it should be hidden and when turning the ipad the first view should be hidden and the second gets visible.
thanks
Hi all,
I want to generate a single dependency file which consists of all the dependencies of source files using gcc -M flags through Makefile. I googled for this solution but, all the solutions mentioned are for generating multiple deps files for multiple objects.
DEPS = make.dep
$(OBJS): $(SOURCES)
@$(CC) -MM $(SOURCEs) > $(DEPS)
@mv -f $(DEPS) $(DEPS).tmp
@sed -e 's|.$@:|$@:|' < $(DEPS).tmp > $(DEPS)
@sed -e 's/.*://' -e 's/\\$$//' < $(DEPS).tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> $(DEPS)
@rm -f $(DEPS).tmp
But it is not working properly. Please tell me where i'm making the mistake.
Hey guys,
I've got a little system dashboard web app that I've written, replete with alarm notifications. I've had it working for quite some time on mobile safari, but recently wanted to add audio to the alarm notifications to allow me to easily know when there are alarms and I'm not looking directly at the display.
The alarm notifications are populated through a (relatively) constantly polling ajax request that pulls in and displays an alarm banner if alarms are present. I wanted to add an auto-playing 'alarm' sound as well, but no dice for Safari Mobile.
I've tried using HTML5 and embedded objects with no avail. The Apple documentation does state that you can't auto-play an audio file and it must be activated through user action to conserve bandwidth.
Has anyone found a way around this in a WLAN setting?
Hi everybody,
I've a problem with Iphone programming... I've a NSMutableArray containing object of type "MyClass". MyClass has some parameters, like NSNumber and NSString.
I've followed the Apple Tutorial about coding and decoding object using NSCoding, but when I try to decode the file I've stored, the NSMutableArray contain object of type "MyClass", but with wrong parameters.
I think i've done all I've to do (including protocol, including methods like initwithencode etc), but it's still not working...
Any suggestions?
Thanks a lot! And sorry for my English XD
Hi all,
I have remade my original post as it was terribly formatted. Basically I would like some advice / tips on how to generate a line graph with 2 Y Axis (temperature and humidity) to display some information from my text file. It is contained in a textfile called temperaturedata.txt I have included a link to one of my posts from the JpGrapher forum only because it is able to display the code clearly.
I understand that since it is JpGraph problem I shouldn't post here however the community here is a lot more supportive and active. Many thanks for all your help guys in advance!
my code
I have a real problem with a classic ASP page.
The page allows the user to upload a document and save it to the database. The intial page posts to another asp page which saves down to the db. This works on IE and Firefox. However on Safari it fails.
I've debugged the problem and it boils down to the fact that of all the controls that the server page has access to, only 1 control is missing. This happens to be this:
<input type="file" size="40" id="myfile" name="myfile" />
So I'm wondering why safari would decide to not give me access to this control (using asp's Request("") ) and why it works in FF and IE. I have some debug code which writes out all controls and it doesn't see this control.
p.s. I hate Web development
Hi, im generating pdf files using a ruby library called "prawn". I have one particular file that seems to be considered "Corrupt" by adobe reader. It shows up fine in both preview and in adobe reader. It gives errors like:
Sometimes I get:
"Could not find the XObject named '%s'.
Othertimes I get:
"Could not find the XObject named "Im4".
Then always I get:
"An error exists on this page. Acrobat may not display the page
correctly. Please contact the person who created the PDF document to
correct the problem."
Is there a way to open a pdf with some tool and have it tell you what is technically wrong with the pdf? Im sure I could figure it out quickly with something like this...
thanks
Joel
Hi
Team I want to download an audio file from red5 server using rtmp server.
string strUri;
strUri = "rtmp://XXX/oflaDemo/" + Session["streamName"].ToString();
string strUploadto;
strUploadto = Server.MapPath("") + "\Audio\" + "myaudio.flv";
WebClient webClient = new WebClient();
//webClient.DownloadFile("rtmp://begoniaprojects.com/oflaDemo/" + Session["streamName"].ToString(), Page.MapPath("") + "\Audio\" +"myaudio.flv");
webClient.DownloadFile(strUri, strUploadto);
but i am getting uri prefix is not recognized message while downloading.
please suggest me.
Hello all,
I was able to load my csv file into a numpy array:
data = np.genfromtxt('csv_file', dtype=None, delimiter=',')
Now I would like to generate a heatmap.
I have 19 categories from 11 samples, along these lines:
cat,1,2,3...
a,0.0,0.2,0.3
b,1.0,0.4,0.2
.
.
.
I wanted to use matplotlib colormesh.
but I'm at loss.
all the examples I could find used random number arrays.
any help and insights would be greatly appreciated.
many thanks
like this code
fp1=fopen("Fruit.txt","r");
if(fp1==NULL)
{
printf("ERROR in opening file\n");
return 1;
}
else
{
for(i=0;i<lines;i++)//reads Fruits.txt database
{
fgets(product,sizeof(product),fp1);
id[i]=atoi(strtok(product,","));
strcpy(name[i],strtok(NULL,","));
price[i]=atof(strtok(NULL,","));
stock[i]=atoi(strtok(NULL,"\n"));
}
}
fclose(fp1);
These symbols sound too similar to differentiate their function,can anyone helps me by any method, or use names of shape according to this site http://www.breezetree.com/article-excel-flowchart-shapes.htm
i have created HTTP::Request which looks like this:
#!/usr/bin/perl
require HTTP::Request;
require LWP::UserAgent;
require HTTP::Cookies;
$request = HTTP::Request->new(GET => 'http://www.google.com/');
$ua = LWP::UserAgent->new;
$cookie_jar = HTTP::Cookies->new();
$ua->cookie_jar($cookie_jar);
$cookie_jar->set_cookie(0,'testCookie','cookieValue','/','http://www.google.com/',80,0,0,86400,0);
$response = $ua->request($request);
if($response->is_success){
print "sucess\n";
print $response->code;
print "\n";
}
else {
print "fail\n";
die $response->code;
print "\n";
}
now, When i send Request:
i want to log the http response codes in the file
please help
thank you
I am wondering whether watching a file/directory for changes using the FileSystemWatcher class is extremely memory intensive. I am developing a desktop application in C# that will be running behind the scenes continuously on low-performance computers, and I need some way of checking to see if various files have changed. I can think of a few solutions:
Watch the directories using FileSystemWatcher.
Run a timed thread on an interval that goes through and manually checks this.
Check manually every time the actionhandler thread runs (the program will occasionally do something, on an action).
Any suggestions?
Thanks!
badPanda
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="abc" targetNamespace="http://schemas.businessNameHere.com/SoftwareNameHere"
elementFormDefault="qualified"
xmlns="http://schemas.businessNameHere.com/SoftwareNameHere"
xmlns:mstns="http://schemas.businessNameHere.com/SoftwareNameHere"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="..." type="..." />
<xs:complexType name="...">
I am working on a project using XSD to generate .cs file. My question is concerning the string "http://schemas.businessNameHere.com/SoftwareNameHere" If I change it, it doesn't work. But the http:// is not a valid one... what is the logic behind and where can I can information about what to put there or how to change it?