what is the parameter to ns ? the documentation says something, but it's not clear (to me, at least)
my-new-namespace=> (doc ns)
-------------------------
clojure.core/ns
([name docstring? attr-map? references*])
Macro
Sets *ns* to the namespace named by name (unevaluated), creating it
if needed.
...the rest of the documentatio...
I want a function that reads in a file and returns the sum of ascii values. I have looked at this page:
http://stackoverflow.com/questions/1292630/how-to-open-a-file-and-find-the-longest-length-of-a-line-and-then-print-it-out/1292676#1292676
and the answer to my question was probably starring me in the face, but I cant follow the cod...
I need to process few lines of code over and over in RFT (java) so custom method/function/procedure is the best (and only) solution to this.
I have no java experience so I need some help with that.
The method will receive some parameters and will return no value.
Basically it will be entering new records into a database (web based app...
I currently have an over, out and click event for 8 different objects. The over and out events are identical for each (tween expands object and then shrinks it back for the out state).
I have previously asked for an easy way to declare those events, and now I was looking for an easier way to handle them.
Here's my code:
//-----------G...
Hi
I have this code, what am I doing wrong?
I have a function which I call playing a number of strings into an array. Then at some point I want to reload it after the user has edited the strings. This is the function:
NSMutableArray *lessonsFunc(id a, id b, id c, id d, id e, id f){
monData *mon = [monData sharedData];
return [...
Greetings StackOverflow,
Is it possible to call a function without first fully defining it? When attempting, i get the error: "*function_name* is not defined". I am coming from a c++ background so this issue stumps me.
Declaring the function before works:
def Kerma():
return "energy / mass"
print Kerma()
However, atte...
Hey I have a table like this:
ID BitOne BitTwo BitThree
-- ------ ------ --------
99 NULL 1 NULL
99 1 NULL NULL
And I need a user function that returns the string "BitTwo, BitOne" for the ID: 99 - which would be the input parameter for the function.
Is that possible?
...
Hi.
public function add($child){
return $this->children[]=$child;
}
Btw, this is an excerpt from PHP in Action by Dagfinn Reiersol. According to the book, this returns $child, but shouldn't it return true in case of successful assignment and false otherwise?
Thanks in advance
...
I've written a little Ajax-y page, that displays data rows from an ajax request. Each row has a "delete link" to allow the user to delete the row quickly, also via ajax.
My problem is one with the scope of the function--
The "main" page has a function that looks like this:
<script language="javascript" type="text/javascript">
window.a...
Hi guys,
I have been working on a dynamic way to create a bargraph where the data can be updated and modified over time which will change the appearance of the graph e.g. If I add a new row it will feed that data into the graph.
I have managed to do this successfully when the data is organised vertically e.g. Data column which has the ...
Hi, i have a question about the function call in the following example:
int main()
{
int a, b;
cin >> a >> b >> endl;
cout << *f(a,b);
return 0;
}
So is *f(a,b) a valid function call?
Edit:: sorry for the errors, i fixed them now i'm a little tired
...
What is the fastest way to sum up an array in JavaScript? A quick search turns over a few different methods, but I would like a native solution if possible. This will run under SpiderMonkey.
Thinking very inside-the-box I have been using:
var count = 0;
for(var i = 0; i < array.length; i++)
{
count = count + array[i];
}
I'm sure...
I'm trying to replace the characters < and > onblur with a space when someone enters it into my form.
I've got this at the moment
$(".tbAddress").blur(function()
{
$("<").replaceWith(" ");
$(">").replaceWith(" ");
}
Any help would be much appreciated
thanks
Jamie
...
I'm trying to create a function that goes to a specific directory, and if a single argument is specified add that to the directory string. But no matter what I try I can't get it to work and bash always reports that X is not a directory even though if I copy/paste it to a new command line it works from there.
function projects ()
{
DI...
Making an uno game for a project.
all 108 cards are located in a filled array named cardDeck[108]
the start function pulls 7 cards at random and fills the players hand by adding
them to an array called playerHand[]
I need help on this please.
1) I don't know how to make the cards dissappear out of the cardDeck array when they are pu...
I use Madshi's madCodeHook components to Inject a DLL in a process, and then hook a procedure/function. The problem is each time a new version of the EXE comes out the address of the functions may change. Currently the way I do it is to use Ollydbg and then hard code the address in the DLL that I inject into the process, this is very u...
I am trying to build this project and for some reason the program hangs when I run it.
It works fine if i comment out the data cache lines. but it cannot make a call to makeCache for two different caches i dont know why any C experts know. Im new to c.
/*
* main.c
*
* Created on: Sep 16, 2010
* Author: TJ
*/
#include <std...
Im sure I have seen an implementation of this in PHP somewhere and I am positive if it exists its a PHP 5 thing. Any way I was wondering if it was possible to set and run a function from a string and set the returned value to the value of the string. e.g.
<?php $hi = function(){ return "Hello World"; };
echo $hi(); ?>
It probably is ...
Hello my friends,
After recently answering a couple of questions here on SO that involved utilizing PHP's list function, I wondered, "how in the world does that function actually work under the hood?". I was thinking about something like using func_get_args() and then iterating through the argument list, and that's all nice and peachy, ...