hi all actually when i use link syntax like
<?php echo $html->link('Home', '/notes/index');?>
but when i used
<a href="/cake/cake_startab/notes/index/" alt="Home">Home </a>
its woking why????
Guys,
I was hoping that someone can shed some light on why I am getting this error:
Parse error: syntax error, unexpected '{' in /homepages/22/d223624283/htdocs/drupal_new/includes/install.core.inc on line 74
Could it be something that I missed as far as D& configurations?
Thanks,
Matt
What am I doing wrong here?
$array = array('sky'=>'blue', 'grass'=>'green', 'sun'=>'yellow');
$key = array_search('green', $array);
echo $key;
error: Parse error: syntax error, unexpected T_DOUBLE_ARROW in /Applications/XAMPP/xamppfiles/htdocs/search-array.php on line 2
I'd like to do the equivalent of the following in LINQ, but I can't figure out how:
IEnumerable<Item> items = GetItems();
items.ForEach(i => i.DoStuff());
What is the real syntax?
I could do an endless timer checking IsInetOffline(), but I would prefer a hook callback that tells me when I plug/unplug the ethernet network cable or connect to wireless internet. Is there such a thing in the Windows API?
I want to add an additional value into an array before passing it to json_encode function,
but I can't get the syntax right.
$result = db_query($query);
// $row is a database query result resource
while ($row = db_fetch_object($result)) {
$stack[] = $row;
// I am trying to 'inject' array element here
$stack[]['x'] = "test";
}
echo json_encode($stack);
I have the following dictionary:
sites = {
'stackoverflow': 1,
'superuser': 2,
'meta': 3,
'serverfault': 4,
'mathoverflow': 5
}
To check if there are more than one key available in the above dictionary, I will do something like:
'stackoverflow' in sites and 'serverfault' in sites
The above is maintainable with only 2 key lookups. Is there a better way to handle checking a large number of keys in a very big dictionary?
I am looking for any tool or good solution for handling spell check in the RichTextBox for Silverlight 4. Does anyone know of an existing solution or a good way to implement spell checking support for this control?
I'm doing a bit more statistical analysis on some things lately, and I'm curious if there are any programming languages that are particularly good for this purpose. I know about R, but I'd kind of prefer something a bit more general-purpose (or is R pretty general-purpose?).
What suggestions do you guys have? Are there any languages out there whose syntax/semantics are particularly oriented towards this? Or are there any languages that have exceptionally good libraries?
I've checked out the man pages and did some searching but can't find info on ways to have rsync skip files greater than a certain size. We're doing rsync to an offline location and when someone puts a hug video file, the rsync jobs run into work hours.
I've looked at the 'exclude' syntax and didn't see anything for excluding based on file size.
Can I do it with rsync or should I look for other offline synching alternatives?
i have one image background of table with following syntax
style="background-image(URL)"
the problem is when i print it on printer it did't print.
can you please tell me how to get this
image background also get it printed on paper as watermark.
Thanks
Among the C-syntax family of languages (C, C++, Java, C#, ObjC, JS, AS, ...), which have a preprocessor compatible (to whatever extent) with the C preprocessor?
I have a python script that'll be checking a queue and performing an action on each item:
# checkqueue.py
while True:
check_queue()
do_something()
How do I write a bash script that will check if it's running, and if not, start it. Roughly the following pseudo code (or maybe it should do something like ps | grep?):
# keepalivescript.sh
if processidfile exists:
if processid is running:
exit, all ok
run checkqueue.py
write processid to processidfile
I'll call that from a crontab:
# crontab
*/5 * * * * /path/to/keepalivescript.sh
Thanks in advance.
I'm working on an API library and I'd like to add a few warnings that would appear when another developers builds the app if an optional apikey is not included. It should be buildable w/o the key (since it's optional) so I can't just add a syntax error to force a build error.
I know Xcode supports TODO and FIXME but those aren't really highlighted anywhere major.
Any other thoughts on how to approach this?
I am looking for the syntax to add node fields to the body of an email. Examples I looked at indicate the the format is:
[content_type:content_type_title]
However my email arrives with just the string :
[content_type:content_type_title]
Even better would be a PHP snippet that loads the node and dumps filed title and filed value into the body of the message.
I've always wondered how to write the "A ? B : C" syntax in a C++ compatible language.
I think it works something like: (Pseudo code)
If A > B
C = A
Else
C = B
Will any veteran C++ programmer please help me out?
I hear a lot of Emacs users have their init file under git version control and sync the git repository over Dropbox, when they run Emacs on multiple systems.
Why would you use git in this situation exactly?
Usually checking which system you're on and which things to load and set depending on that can happen in one and the same init file for all systems, right?
So, isn't it simply enough to put your init file in a Dropbox directory and load that one directly from Emacs then?
A popular editor uses highlighting to help programmers avoid using C++ keywords in Java. The following words are displayed using the same colors as a syntax error:
auto delete extern friend inline redeclared register signed sizeof
struct template typedef union unsigned operator
Why would this be considered important?
I am trying to create a multi line string in Groovy. I have a list of strings that I'd like to loop through within the multi line string. I am not sure what the syntax is for this. Something like below...
def html = """\
<ul>
<li>$awaiting.each { it.toPermalink()}</li>
</ul>
"""
I need to get counts to populate charts in Silverlight 4 and I am having a bit of trouble getting data back from my Domain Service mostly because I am not sure how to use aggregate query syntax. Has anyone had any luck populating charts in Silverlight 4 using aggregate (SUM, COUNT, etc) linq queries?
Is there a way to only show the items that are older than a certain date in a php mysql array? I'm using this query method and sorting by lastpost_cl:
$query="SELECT * FROM properties ORDER BY lastpost_cl";
$result=mysql_query($query);
$num = mysql_num_rows ($result);
mysql_close();
and I was thinking the way of checking the time would be:
if (time() <= strtotime($lastpost_cl)) {
}
How can I combine the two and only show lastpost_cl that are older that the current time?
Im trying to think of the best way to handle real time search for a website. The only solution I can come up with is to keep checking the server every few seconds for something new in the database, but that does not seem very practical to me.
A solution created with VS2010 with solution folder. When checking into this solution to TFS, the solution folders are missed on TFS.
How to sync TFS and VS2010 with solution folder?
is there a dictionary i can download for java?
i want to have a program that takes a few random letters and sees if they can be rearanged into a real word by checking them against the dictionary