Rectangle 27 35

Use the Maven Mojo executor by Don Brown of Atlassian fame to run any other arbitrary plugin.

The Mojo Executor provides a way to to execute other Mojos (plugins) within a Maven 2 plugin, allowing you to easily create Maven 2 plugins that are composed of other plugins.

+1 that's cool, never heard of that before!

Maven plugin executing another plugin - Stack Overflow

maven-2 plugins
Rectangle 27 112

Don gave you most of the details above, but here's my two cents from doing really nitty-gritty stateful programs like system daemons in Haskell.

Addendum (extracted from comments; thanks to Lii & liminalisht) more discussion about different ways to slice a large program into monads in a stack:

Ben Kolera gives a great practical intro to this topic, and Brian Hurt discusses solutions to the problem of lifting monadic actions into your custom monad. George Wilson shows how to use mtl to write code that works with any monad that implements the required typeclasses, rather than your custom monad kind. Carlo Hamalainen has written some short, useful notes summarizing George's talk.

Two good points! This answer has the merit of being reasonably concrete, something that the other ones are not. It would be interesting to read more discussion about different ways to slice a large program into monads in a stack. Please post links to such articles if you have any!

@Lii Ben Kolera gives a great practical intro to this topic, and Brian Hurt discusses solutions to the problem of lifting monadic actions into your custom monad. George Wilson shows how to use mtl to write code that works with any monad that implements the required typeclasses, rather than your custom monad kind. Carlo Hamalainen has written some short, useful notes summarizing George's talk.

Large-scale design in Haskell? - Stack Overflow

design haskell functional-programming monads large-scale
Rectangle 27 9

I would echo everything Don said and add a few general bits of advice.

For example, two additional tools and libraries you might want to consider:

  • hlint as an extended version of -Wall

As a coding practice, avoid Lazy IO. If you need streaming IO, then go with one of the iteratee libraries such as enumerator. If you look on Hackage you'll see libraries like http-enumerator that use an enumerator style for http requests.

As for picking libraries on hackage it can sometimes help to look at how many packages depend on something. Easily see the reverse dependencies of a package you can use this website, which mirrors hackage:

If your application ends up doing tight loops, like a web server handling many requests, laziness can be an issue in the form of space leaks. Often this is a matter of adding strictness annotations in the right places. Profiling, experience, and reading core are the main techniques I know of for combating this sort of thing. The best profiling reference I know of is Chapter 25 of Real-World Haskell.

logging - What are the best Haskell libraries to operationalize a prog...

logging haskell metrics
Rectangle 27 3

Don,t Forget to put service in manifest file

<service
        android:name"your package name.GPSTracker"
        android:enabled="true" >
    </service>

java - Get current latitude and longitude android - Stack Overflow

java android gps geolocation location
Rectangle 27 2

echo 'Sorry we don\'t have user "'. $name . '" ';
if(in_array($name, $nameArray))
document.getElementById("underInput").innerHTML = '<span style="color: blue">' + message  + '</span>';

That's because php returns internal server error.but with these edits I think it will work

Thanx a lot :D and sorry for stupid mistakes :(

javascript - Ajax , Cannot read property 'documentElement' of null - S...

javascript php ajax xml
Rectangle 27 4

I don't have the reputation to comment, but in response/addition to Don F's answer:

A second parameter of true needs to be added to the json_decode function in order to properly return an associative array:

$params = json_decode(file_get_contents('php://input'), true);

AngularJs $http.post() does not send data - Stack Overflow

angularjs post angular-http
Rectangle 27 4

Jquery UI 1.9.2, jquery and the later versions don' support IE8

jquery UI 1.7.2
Jquery UI 1.9.2
position: {my: "center",  at: "center", of: $("body"),within: $("body") }

Works perfectly in IE11 with jQueryUI 1.11.4

+1 because of the within param, which allows docking like on appendTo this element, and if using a modal window allows limiting that docking.

How can I position my jQuery dialog to center? - Stack Overflow

jquery jquery-ui dialog jquery-dialog
Rectangle 27 4

I don't have the reputation to comment, but in response/addition to Don F's answer:

A second parameter of true needs to be added to the json_decode function in order to properly return an associative array:

$params = json_decode(file_get_contents('php://input'), true);

AngularJs $http.post() does not send data - Stack Overflow

angularjs post angular-http
Rectangle 27 4

For redirect to another controller action you don create instance from it ..you use from

TempData["Key"]="lol";
or
Session["key"]="lol";
return RedirectToAction("ActionName", "ControllerName");

For session you can store yor data in TemData["key"] Or Session["key"] and get it your another action like

var data=TempData["Key"]; 
Or
var data =Session["key"];

c# - Set session in ASP.Net MVC Controller from another class - Stack ...

c# asp.net asp.net-mvc asp.net-mvc-4
Rectangle 27 16

Ok, so I used the Google search functionality of the internet :p and i found the folowing :This threa don StackOverflow...

mycodes_Button.setOnTouchListener(new OnTouchListener() {

            @Override
            public boolean onTouch(View v, MotionEvent event) {
                mycodes_Button.setPressed(true);
                return true;
            }
        });

But read the comment, it's pretty interesting !

Almost right-just for other's reference, the other button state also needs to be set to false, but I'll accept anyhow because it got me on the right track. Thanks!

keep android button selected state - Stack Overflow

android button
Rectangle 27 12

For those who wonder why you want to use an EditoFor if you don`t want it to be editable, I have an example.

[DataType(DataType.Date)]
    [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0: dd/MM/yyyy}")]
    public DateTime issueDate { get; set; }

and when you want to display that format, the only way it works is with an EditorFor, but I have a jquery datepicker for that "input" so it has to be readonly to avoid the users of writting down wrong dates.

To make it work the way I want I put this in the View...

@Html.EditorFor(m => m.issueDate, new{ @class="inp", @style="width:200px", @MaxLength = "200"})

and this in my ready function...

$('#issueDate').prop('readOnly', true);

Thank you Seichi! This is the real solution to the exact problem!

This is a great answer. It describes what the original question is valid, as well as actually answering the OP. Great job!

Simple straight forward answer thank you very much! Requirements had me jumping back and forth while reviewing a defect I realized my change to editorfor allowed my desired DisplayFormating but I discovered they were no longer read only this was a great find !!!

asp.net mvc 3 - MVC3 EditorFor readOnly - Stack Overflow

asp.net-mvc-3 readonly editorfor
Rectangle 27 3

From my experience: don`t put that file under version control and use svn:ignore on it.

Its a little hard at the beginning, since you cannot ignore a file that is allready under version control, and you cannot remove a file from version control without removing it from hard drive (and from every working copy on next update...). But when you finally manage to set up the repo correctly, it works like charm. Dont forget to add a generic-template in place of your original config file (so that everyone knows about new config variables, and so on).

mkdir config
svn add config
svn propset svn:ignore '*.conf' config

For existing repo: be sure, to have a backup of your config in every working copy, then remove (svn del) config from the repo, commit (please note: the file will be deleted in every working copy on next update! you have to have a backup) and then restore the file and set the ignore property.

Another way is a lock. It guarantees that noone commits the file, but it will result in an error on every commit. not very nice.

And the third way - changesets, a new feature in SVN 1.5 clients. This is neat, but its only related to one working copy, not to a repository globally. And you have to set them up manually, add every new file its hard to maintain.

svn - Subversion: prevent local modifications to one file from being c...

svn
Rectangle 27 3

I don a toga and open a can of socratic method.

The Socratic Method named after the Classical Greek philosopher Socrates, is a form of philosophical inquiry in which the questioner explores the implications of others' positions, to stimulate rational thinking and illuminate ideas. This dialectical method often involves an oppositional discussion in which the defense of one point of view is pitted against another; one participant may lead another to contradict himself in some way, strengthening the inquirer's own point.

The problem with the Socratic method is that no one has the patience for it, nor the willingness to follow along.

coding style - How do you tell someone they're writing bad code? - Sta...

coding-style
Rectangle 27 3

While using laravel 5 use this code as you don`t need headers.

return response()->download($pathToFile);

If you are using Fileentry you can use below function for downloading.

// download file
public function download($fileId){  
    $entry = Fileentry::where('file_id', '=', $fileId)->firstOrFail();
    $pathToFile=storage_path()."/app/".$entry->filename;
    return response()->download($pathToFile);           
}

This answer would be helpful if it left out the unnecessary parts or even just expanded on them below the pure answer. Fileentry is a different feature not needed for this question. Edit answer and I will upvote because the mentioning of LV5s response()->download().

php - Download files in laravel using Response::download - Stack Overf...

php laravel laravel-4 laravel-routing
Rectangle 27 32

Normally the server should be set up to do this automatically, but a lot of shared hosts don t do this (probably to increase client bandwidth usage)

if(extension_loaded("zlib") && (ini_get("output_handler") != "ob_gzhandler"))
   add_action('wp', create_function('', '@ob_end_clean();@ini_set("zlib.output_compression", 1);'));
plugins functions customization admin pluggable
Rectangle 27 3

I don a toga and open a can of socratic method.

The Socratic Method named after the Classical Greek philosopher Socrates, is a form of philosophical inquiry in which the questioner explores the implications of others' positions, to stimulate rational thinking and illuminate ideas. This dialectical method often involves an oppositional discussion in which the defense of one point of view is pitted against another; one participant may lead another to contradict himself in some way, strengthening the inquirer's own point.

The problem with the Socratic method is that no one has the patience for it, nor the willingness to follow along.

coding style - How do you tell someone they're writing bad code? - Sta...

coding-style
Rectangle 27 2

C:\Program Files\Java\jdk1.6.0_20\bin>keytool.exe -list -v -alias androiddebugkey -keystore C:\Users\DON\.android\debug.keystore -storepass android -keypass android 
  Don is  usersystem name

If you want app live means for development.

eclipse->Window ->Preferences ->Android ->Build -> now you get the sha key

android - Error in Keytool command - Stack Overflow

android google-maps
Rectangle 27 24

They won't be the same if item1's type is part of a multiple inheritance and/or is an ancestor of Emp, depending on how the compiler lays out each of the classes that compose item1's type.

@Jim: The "C" tag suggests otherwise

@Jim: Hasturkun is right. I'm working in C. I should have posted that.

Print the Address a Pointer Contains in C - Stack Overflow

c pointers memory-address
Rectangle 27 16

I'm sure Don Box created SOAP as a joke - 'look you can call RPC methods over the web' and today groans when he realises what a bloated nightmare of web standards it has become :-)

REST is good, simple, implemented everywhere (so more a 'standard' than the standards) fast and easy. Use REST.

"I'm sure Don Box created SOAP as a joke - 'look you can call RPC methods over the web'" probably true. +1

xml - SOAP or REST for Web Services? - Stack Overflow

xml web-services rest soap
Rectangle 27 16

I'm sure Don Box created SOAP as a joke - 'look you can call RPC methods over the web' and today groans when he realises what a bloated nightmare of web standards it has become :-)

REST is good, simple, implemented everywhere (so more a 'standard' than the standards) fast and easy. Use REST.

"I'm sure Don Box created SOAP as a joke - 'look you can call RPC methods over the web'" probably true. +1

xml - SOAP or REST for Web Services? - Stack Overflow

xml web-services rest soap