If someone knew the link of one of my page or simply they made an assumption like http://ww.yourweb.com/index.php, this is a general assumption and if you put this link on DAP or other donwload manager, it will download file, with source code inside.
I want to stop other from stealing my code on this manner, is there a way for this?
When I load content with AJAX, is this content supposed to automatically use the preloaded main page css style ?
For example, if I load a <span class="smallText">hello</span> with AJAX.
Is this new HTML using the default.css file with
.smallText {
font-size:6px;
}
?
I don't have much experience working with resultsets, but as ResultSet is an interface, I guess I could implement it to work with a file as a backend. Is this nonsense? Is there any solution already given for my problem?
I've written an xml parser, and I've written a unit test to go with it.
Where should I store the actual xml file to be used by the test?
Should I just store it under test/unit/whatever package the test is in?
I have an assignment in which I need to declare a pipe in a header file. I really have no idea how to do this. It might be a really stupid question and I might be missing something obvious. If you could point me in the right direction I would greatly appreciate it.
Thanks for your time.
Hi,
what I want to do is PHP to look at the url and just grab the name of the file, without me needing to enter a path or anything (which would be dynamic anyway). E.G.
http://google.com/info/hello.php, I want to get the 'hello' bit.
Help?
Thanks.
I have a text file containing a number of records. Each record is stored on a single line that is 100 characters long.
Let's say I want to directly access the nth record. I could do it using a for loop, reading in n lines until I get to the record.
But how could I access it directly?
Background:
Let assume that I have two header files a.h and b.h.
a.h contains:
#define VAR 1
b.h contains:
#define VAR 2
Note: The name of both of the macro is same.
Let say I have some file myFile.c which includes both of the header files i.e. a.h and b.h.
When I try to access VAR, I get a redefinition error of VAR.
In order to resolve this problem, I inserted #ifndef VAR statement in both a.h and b.h files to prevent this error.
a.h file becomes
#ifndef VAR
#define VAR 1
#endif
b.h file becomes
#ifndef VAR
#define VAR 2
#endif
Note: The header file can contain multiple macros, not just one macro.
Problem:
Let's assume that a.h and b.h files are obtained from third party library. These files don't contain #ifndef VAR statement.
I am not allowed to change their header files.
Can I resolve macro 'VAR' redefinition error in myFile.c or myFile.cpp file which uses VAR macro?
I know I #undef VAR can be used to undefine a macro VAR. How can I selectively include VAR later in my program? i.e. on line 10 of myFile.c code I should be able to refer to VAR definition from a.h file, on line 15 of my code I should be able to refer to VAR from b.h file and on line 18 again I should be able to refer to VAR from a.h file.
In short, am I able to do macro polymorphism ?
Given a name of header file, it should refer to macro definition present in that file.
I thought of using namespace trick to resolve an issue. Define first header file in namespace first and second header file in namespace second.
I tried defining two namespaces. First namespace contains #include a.h and second namespace contains b.h. However, namespace trick does not work with macro. When I tried to access firstns::VAR, compiler reports an error message.
Can you please suggest some way?
I want to create a rule at the end of an .htaccess file that catches everything that failed to match up until then.
How can I do that?
P.S. I've already tried everything :) Actually, I haven't, but it sure seems like it!
Hi;
What would be an ideomatic way in Clojure to get a lazy sequence over a file containing float values serialized from Java? (I've toyed with a with-open approach based on line-reading examples but cannot seem to connect the dots to process the stream as floats.)
Thanks.
I found this open question online. How do you process a large data file with size such as 10G?
This should be an interview question. Is there a systematic way to answer this type of question?
I've been checking around online and there are limited resources for creating a .cur file and next to nothing that works on a Mac. If anyone has suggestions on how to do this I'd love some help. Thanks!
`public void SeparateData()
{
//read file
StreamReader sr = new StreamReader("myTextFile.txt");
//string to hold line
string myline;
myline = sr.ReadLine();
while ((myline = sr.ReadLine()) != null)
{
string[] lines = Regex.Split(myline, " ");
foreach (string s in lines)
{
using (StreamWriter sw = new StreamWriter("myTextFile.txt"))
sw.WriteLine(lines);
}
}
} `
I wonder if this possible with Zend_Db, but I am looking for something like SQL query logging similar to how Hibernate does it, where it shows you what SQL it generates in the log file.
i have this encryption algorithm written in C++ , but the values that has to be encrypted are being taken input and stored in a file by a python program . Thus how can i call this c++ program from python?
I've got two branches that are fully merged together.
However, after the merge is done, I realise that one file has been messed up by the merge (someone else did an auto-format, gah), and it would just be easier to change to the new version in the other branch, and then re-insert my one line change after bringing it over into my branch.
So what's the easiest way in git to do this?
Actually I have such a code:
NSString *path = [[NSBundle mainBundle] pathForResource: @"connect" ofType: @"xml"];
NSError *error = nil;
NSString *data = [NSString stringWithContentsOfFile: path
encoding: NSUTF8StringEncoding
error: &error];
NSString *message = [NSString stringWithFormat:data, KEY, COUNTRY_ID];
which reads the connect.xml from resources. But on the formating the string (message) APP quits without displaying any errors. How can I read file.xml from resources to NSString with format?
Hey all,
I'm currently using SBT to manage my Lift project. I'd like to deploy it, but when I run 'sbt package' it produces a 60MB war file. This seems pretty large - are there ways I could cut down the size?
Thanks!
hi
i have test file that contain
1,2,3
2,3,4
5,6,7
i need to insert in the first line this: A,B,C
it will be like this:
A,B,C
1,2,3
2,3,4
5,6,7
how i can do it ?
thank's in advance
I must have skipped a page or two by accident during my PDF Tutorials on Python commands and arguments, because I somehow cannot find a way to take user input and shove it into a file. Don't tell me to try and find solutions online, because I did. None made sense to me.
My pattern looks something like
<xxxx location="file path/level1/level2" xxxx some="xxx">
I am only interested in the part in quotes assigned to location. Shouldn't it be as easy as below without the greedy switch? Does not seem to work :(
/.*location="(.*)".*/
So, I have a lot of php files where I use jquery functions. Do I need to create a seperate .js file for all jquery functions or I can put it together with php files or it actually doesn't matter at all?