Doxygen comments not running in Xcode - ios

I read that since Xcode 5 doxygen comments are recognized automatically. I have Xcode 6.3 and not appears these comments.
Have I to enable any option in Xcode??
I commented my methods as:
/**
* bla bla bla
*/
Thanks

You have to add * when you start a new line. For example:
/**
* Description
*
* #param param1 param1 description
* #param param2 param2 description
*
* #return return value description
*/
- (id) myMethodWithParam:(id)param1 andParam:(id)param2
I recommand you to add VVDocumenter-Xcode plugin.
You are right, it works without *. But you need to add the prototype of your method into your header file.

Related

Doxygen anchor inside function

I have a filter which converts actual code into #code/#endcode blocks but I can't figure out a way to create a #ref link to these sections.
Here's a snippet of what I mean:
/**
* Refer to this example: #ref example1
* #param $arg1
* #param $arg2
*/
public function somefunction($arg1, $arg2)
{
/**
* #anchor example1 #code
if (true)
{
$this = 'bollox';
}
* #endcode
**/
}
The output of this looks pretty much like what I want (although I haven't decided on how best to truly indicate the link point...exmple1 springs to mind).
The problem is that the hyperlink for example1 links to the filename.html#example1.
I've checked the source and there is an anchor class being generated.
I understand I'm not really using anchor as documented.
Any suggestions welcome.
Note: I'm not specifically trying to get anchor to work...just want a hyperlink/bookmark to link a \ref (or similar).

Response code Null (0) today, app was working yesterday (API Integration)

I have integrated Asana task lists into my company's website for our development team. All was going well until today - the page I created now errors out with a response code of NULL (or 0). In my very limited experience, this is an issue with the Asana connection, correct? Is this something I can fix on my side or is Asana API currently down (considering this worked up until today)?
We are using the API key, not OAuth, as everyone who has access to this task list is on the same workspace.
Edit:
I have 2 api keys that I am working with - 1 for production, 1 for development. I switch them out when I hand over a branch for my boss to merge in.
Testing API key works just fine.
Production API key does not work - always a response code null when trying to pull back tasks.
I am brand new to API development and I do not know how to use curl to make these calls. I am using a library found here:
https://github.com/ajimix/asana-api-php-class/blob/master/asana.php
More specifically, here is my code:
/*
* We are only interested in the JVZoo workspace
* Unless we are testing, in which we will use Faith In Motion workspace
*/
$JVZ_workspace_id = 18868754507673;
$FIM_workspace_id = 47486153348950;
/*
* Which one are we using right now?
*/
$workspace = $FIM_workspace_id;
/*
* Now lets do the same thing with Projects
* There should only be one project - JVZoo.com
* Unless we are testing - More JVZoo Testing
*
* We do need to dynamically show the project name
* This will help on confusion if we are accidently in the
* wrong project
*
* Then start building an array with these pieces
*/
$JVZ_project = array();
$JVZ_project['id'] = 53244927972665;
$JVZ_project['name'] = "JVZoo.com";
$FIM_project = array();
$FIM_project['id'] = 54787074465868;
$FIM_project['name'] = "More JVZoo Testing";
/*
* Which one are we using?
*/
$project = $FIM_project;
/*
* In order to help reduce load time even more,
* we are not going to return the project name
*
* This way we do not need to ask Asana for the project information
* This does change the layout of the view, however
*
* And finally grab all tasks for each project
* Connection check
*
* Return all tasks from this workspace and hand-filter
* to show both assigned and followed tasks
*/
$tasksJson = $asana->getProjectTasks($project['id']);
if ($asana->responseCode != '200' || is_null($tasksJson))
{
$this->session->set_flashdata('error', 'Error while trying to get tasks from Asana, response code: ' . $asana->responseCode);
redirect_and_continue_processing('/dashboard');
return;
}
FIM is my test environment.
JVZ is my production environment.
/**
* Returns all unarchived tasks of a given project
*
* #param string $projectId
* #param array $opt Array of options to pass
* (#see https://asana.com/developers/documentation/getting-started/input-output-options)
*
* #return string JSON or null
*/
public function getProjectTasks($projectId, array $opts = array())
{
$options = http_build_query($opts);
return $this->askAsana($this->taskUrl . '?project=' . $projectId . '&' . $options);
}
I did a PR on the parameter passed in to line that is returned above. In my FIM environment, I get this:
https://app.asana.com/api/1.0/tasks?project=54787074465868&
For my production environment:
https://app.asana.com/api/1.0/tasks?project=53244927972665&

About the default value issue in UAAppReviewManager

I just wondering where the default value setting?
UAAppReviewManager.h
/*
* Get/Set your Apple generated software id.
* This is the only required setup value. No default.
*/
+ (NSString *)appID;
+ (void)setAppID:(NSString *)appID;
/*
* Get/Set the App Name to use in the prompt
* Default value is your localized display name from the info.plist
*/
+ (NSString *)appName;
+ (void)setAppName:(NSString *)appName;
/*
* Get/Set the title to use on the review prompt.
* Default value is a localized "Rate <appName>"
*/
+ (NSString *)reviewTitle;
+ (void)setReviewTitle:(NSString *)reviewTitle;
/*
* Get/Set the message to use on the review prompt.
* Default value is a localized
* "If you enjoy using <appName>, would you mind taking a moment to rate it? It won't take more than a minute. Thanks for your support!"
*/
Above is a piece of code in UAAppReviewManager.h and it says that default value is your localized display name from the info.plist,
But I didn't find any info.plist including those setting(Default value)
So where's it?
It is referring to your project info .

Drupal 7: Print pdf using dompdf

I need help in installation of dompdf. Where should I place the extracted zip file in the directory? I've followed the INSTALL.txt, and it says "Extract the contents of the downloaded package into one of the supported paths." Does it mean placing into "Modules" folder? if so, an error occurs requesting for ".info". And it's not supplied. Please help, I'm confused! Thanks!
The supported paths are listed in the install.txt file:
supported paths:
* print module lib directory (usually sites/all/modules/print/lib)
* libraries directory (sites/all/libraries)
I prefer the second option, it will keep you from having to do this every time you update the module.
In other words it should look like this sites/all/libraries/dompdf
here's how I loaded it
I moved the folder dompdf-0.5.1 to the /sites/all/libraries folder
I edited dompdf_config.inc.php by replacing the DOMPDF_autoload() function with:
Code:
function DOMPDF_autoload($class) {
/* Add this checking - START */
if (mb_strtolower($class)== 'firephp'){
return;
}
/* Add this checking - END */
$filename = mb_strtolower($class) . ".cls.php";
require_once(DOMPDF_INC_DIR . "/$filename");
}
if ( !function_exists("__autoload") ) {
/**
* Default __autoload() function
*
* #param string $class
*/
function __autoload($class) {
DOMPDF_autoload($class);
}
}
now you should be able use it like so in any other module
Code:
require_once(realpath('.')."/sites/all/libraries/dompdf-0.5.1/dompdf_config.inc.php");
spl_autoload_register('DOMPDF_autoload');
$obj = new DOMPDF();
This worked and I was able to use the DOMPDF object/class.

solr sanitizing query

I am using solr with ruby on rails.
It's all working well, I just need to know if there's any existing code to sanitize user input, like a query starting with ? or *
I don't know any code that does this, but theoretically it could be done by looking at the parsing code in Lucene and searching for throw new ParseException (only 16 matches!).
In practice, I think you're better off just catching any solr exceptions in your code and showing an "invalid query" message or something like that.
EDIT: Here are a couple of "sanitizers":
http://pivotallabs.com/users/zach/blog/articles/937-sanitizing-solr-requests
http://github.com/jvoorhis/lucene_query
http://e-mats.org/2010/01/escaping-characters-in-a-solr-query-solr-url/
If you are using Solarium with PHP then you can use the Solarium_Escape::term() method.
/**
* Escape a term
*
* A term is a single word.
* All characters that have a special meaning in a Solr query are escaped.
*
* If you want to use the input as a phrase please use the {#link phrase()}
* method, because a phrase requires much less escaping.\
*
* #link http://lucene.apache.org/java/docs/queryparsersyntax.html#Escaping%20Special%20Characters
*
* #param string $input
* #return string
*/
static public function term($input)
{
$pattern = '/(\+|-|&&|\|\||!|\(|\)|\{|}|\[|]|\^|"|~|\*|\?|:|\\\)/';
return preg_replace($pattern, '\\\$1', $input);
}

Resources