I recently installed PHP 5 on IIS, however, I am unable to find a PHP syntax highlighting plug-in or extension for VWD. Where can I find a plug-in? I thought there was an official one.
I'm trying to figure how a function I've been given works -- or rather doesn't work. The problematic areas include array notation like this:
$small[$end[$i]{0}]
I think the idea is to append "0" to the value of $end[$i] and use that for the index of $small. But it doesn't work in PHP5.3. Is this a deprecated syntax and is it trying to do what I think it is?
The following code
stringref = "tab_2";
jQuery('.someclass a:not(.someclass #a_someclass_'+stringref+')').css('color', '#000');
gives me this warning in the FF 3.5.5 error console and I can't figure out why:
Warning: Missing closing ')' in negation pseudo-class '#a_someclass_tab_2'.
Is my syntax failing me or has FF gone bonkers ?
I wonder if syntax as follows would be helpful in your opinion as a code readability improvent and self-commenting of code:
std::map<std::string name, std::vector<int> scores> myMap;
In this example it clearly says and no other comment is needed, what for we are using myMap variable.
Looking forward to your opinions.
Hi,
I am working on an application and would like to apply some syntax highlighting to some user entered text. I have looked around and some people are suggesting that this can be done in OS 3.2+ but posts seem to be from before the NDA was lifted. Does anyone have any suggestions as to how to go about doing this?
I would be interested in releasing the code on github if I could get it implemented well, as I have never done so before.
Thanks
I get the following error from the SQL Script I am trying to run:
Msg 102, Level 15, State 1, Line 10
Incorrect syntax near ','.
This is the SQL script:
IF NOT EXISTS (SELECT *
FROM dbo.sysobjects
WHERE id = OBJECT_ID(N'[dbo].HDDB_DataSource]')
AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[HDDB_DataSource](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](255) NOT NULL,
[Type] [nvarchar](50) NOT NULL,
[XmlFileName] [nvarchar](255) NULL,
[ConnectionString] [nvarchar](255) NULL),
CONSTRAINT [PK_DataSource] PRIMARY KEY CLUSTERED
(
[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
I am using SQL Server 2005 if that helps.
Jeff
Hi,
I'm making a blog in PHP and I'd really like to have syntax highlighting on Haskell code.
Are there any tools for that out there?
I've found hscolour but I don't know if it's possible to integrate it in PHP.
I'm using CakePHP if that makes a difference.
Thanks.
Can anyone point to programming language which has python-like syntax, but from the very beginning was designed to generate native code? I'm aware of Boo only, but it uses .net, not native code generation. Well, if nothing else than python-like languages which generate .net/java bytecode are fine too.
var ret = []
,xresult = document.evaluate(exp, rootEl, null,
XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null)
,result = xresult.iterateNext();
while (result) {
ret[ret.length]= result;
result = xresult.iterateNext();
}
can anyone explain me what is the ret = [],..,... syntax? Initializing array?
I have a non-disposable class with Open/Close syntax that I'd like to be able to use, so I'm trying to inherit from it, and work the Open into the new and the Close into Dispose.
The second part is ok, but I can't work out how to do the Open:
type DisposableOpenCloseClass(openargs) =
inherit OpenCloseClass()
//do this.Open(openargs) <-- compiler no like
interface IDisposable
with member this.Dispose() = this.Close()
(cf. this question which I asked a long time ago, but I can't join the dots to this one)
Hello Friends
I have a DSL for which I intend to create a syntax highlighter for editors like vim, gedit and netbeans.
Has anyone tried this before?
Many thanks for any directions.
Ketan
I was reading a blog post and saw a groovy snippet that looked lik
while ( entry = inputStream.nextEntry ) {
// do something
}
In the while loop, is this groovy syntax that will cause the loop to break when entry is null?
I'm using Google prettify for syntax highlighting and I'd like to modify the colors to match my website theme, but I don't understand some of the abbreviations from these:
str = string
atw
kwd = keyword
tag = tag
com = comment
typ = type?
atn
dec = declaration?
lit
pun = punctuation? like colons, braces?
pln
prettyprint
I wonder if syntax as follows would be helpful in your opinion as a code readability improvent and self-commenting of code:
std::map<std::string name, std::vector<int> scores> myMap;
In this example it clearly says and no other comment is needed, what for we are using myMap variable.
Looking forward to your opinions.
Hi,
what the syntax is in Action Mailer Basics rails guide ?
class UserMailer < ActionMailer::Base
def welcome_email(user)
recipients user.email
from "My Awesome Site Notifications <[email protected]>"
subject "Welcome to My Awesome Site"
sent_on Time.now
body {:user => user, :url => "http://example.com/login"}
end
end
How should i understand the construction, like
from "Some text for this field"
Is it an assignment the value to a variable, called "from" ?
Has anyone had the experience of moving a file in tortoise and committing successfully, only to later commit a different change and be told of a tree conflict where:
the file in its original location has been deleted, but in tortoise is marked as missing
the file in its new location is there, but marked as already added.
(I use tortoise SVN, and we have client and server 1.60)
Nobody else changed either the directory or the file (according to svn log).
Why is this happening?
Is there a way to avoid it happening?
If it does happen, is there a more elegant way of fixing the problem than by deleting the whole folder and updating again?
In playing around with C#'s Speech Recognition, I've stumbled across a road block in the creation of an effective GrammerBuilder with Choices (more specifically, Choices of Choices).
IE considering the following logical commands.
One solution would to "hard code" every combination of Speech lines and add them to a GrammarBuilder (ie "SET LEFT COLOR RED" and "SET RIGHT CLEAR", however, this would quickly max out the limit of 1024, especially when dealing with number combinations.
Another solution would to Append all 'columns' as "Choices" (and filter out incorrect paths upon 'recognition', however this seems like it's processor heavy and unnecessary.
The middle ground, seems like the best path - with Choices of Choices - like a tree structure on a GrammarBuilder - however I'm not sure how to proceed.
Any suggestions?
Hi,
If we are looking for line intersections (horizontal and vertical lines only) and we have n lines with half of them vertical and no intersections then
Sorting the list of line end points on y value will take N log N using mergesort
Each insert delete and search of our data structue (assuming its a b-tree) will be < log n
so the total search time will be N log N
What am i missing here, if the time to sort using mergesort takes a time of N log N and insert and delete takes a time of < log n are we dropping the constant factor to give an overal time of N log N. If not then how comes < log n goes missing in total ONotation run time?
Thanks
I am planning to implement a tree structure where every node has two children and a parent along with various other node properties (and I'd want to do this in Java )
Now, the way to it probably is to create the node such that it links to other nodes ( linked list trick ), but I was wondering if there is any good external library to handle all this low level stuff. ( for eg. the ease of stl::vector vs array in C++ ).
I've heard of JDots, but still since i haven't started (and haven't programmed a lot in Java), I'd rather hear out before I begin.
I have a response from remote server like this:
/home/computer/Downloads
|-- /home/computer/Downloads/Apple
| `-- /home/computer/Downloads/Apple/Pad
|-- /home/computer/Downloads/Empty_Folder
`-- /home/computer/Downloads/Subfolder
|-- /home/computer/Downloads/Subfolder/Empty
`-- /home/computer/Downloads/Subfolder/SubSubFolder
`-- /home/computer/Downloads/Subfolder/SubSubFolder/Test
this is the output for command
computer@athome:$ tree -df --noreport -L 5 /home/computer/Downloads/
I would like to parse this string to recursive php array or object, something like this.
I would show only part of result to get the idea.
array(
'title' => '/home/computer/Downloads',
'children' => array(
0 => array(
'title' => '/home/computer/Downloads/Apple',
'children' => array( ...
)
)
);
Response from server can change according to scanned directory. Can someone help me write this function.
Please note that this is response from remote server and php functions can not scan any remote dir.
I'm looking for a well-documented, supported WPF component that provides an API for visualisation of 2D tree diagrams. Ideally something easy to use, customisable (i.e. supports various flavours of nodes and splines) and preferably with automated layout control.
Tools that look good so far are GoXam (http://www.nwoods.com/components/silverlight-wpf/goxam-overview.htm) and yFiles WPF (http://www.yworks.com/en/products_yfileswpf_about.html).
Just wondering if anyone has experience with either of these, or can recommend an alternative?
Thanks!
So this is my first java program, but I've done c++ for a few years. I wrote what I think should work, but in fact it does not. So I had a stipulation of having to write a method for this call:
tree.insertNode(value);
where value is an int.
I wanted to write it recursively, for obvious reasons, so I had to do a work around:
public void insertNode(int key) {
Node temp = new Node(key);
if(root == null) root = temp;
else insertNode(temp);
}
public void insertNode(Node temp) {
if(root == null)
root = temp;
else if(temp.getKey() <= root.getKey())
insertNode(root.getLeft());
else insertNode(root.getRight());
}
Thanks for any advice.