Posts

android - Automated my builds -

i have multiple app , android project want automated in build , release sequence. have ant script build , create apk of app. want have 1 script or ant file start build sequence app. maybe don't konw search, can't find easy documentation on ant. the point of use jenkins ant (or maven, i'm not sure of difference between them now) automated build sequence when people commit on project. any int appreciated maven dependencies (over ant) don't need pass around jars. recommend maven on ant day. syntax , overall process easier understand, @ end of both build tools. if able to, more recommend upgrading gradle. easy create different build types , create them ./gradlew assemble here project jake wharton can see power of gradle. there release , debug build, can make lot more if like. https://github.com/jakewharton/u2020 here android docs gradle http://tools.android.com/tech-docs/new-build-system/user-guide . if can't find looking here, check out main grad...

laravel - Parse error: syntax error, unexpected T_STRING in /var/sites/s/example.co.uk/artisan on line 46 -

i'm trying create (laravel) migration on shell of production shared hosting server. in shell, run following: /usr/bin/php artisan migrate:make mydatabase and receive following error: warning: unexpected character in input: '\' (ascii=92) state=1 in /var/sites/s/example.co.uk/artisan on line 46 parse error: syntax error, unexpected t_string in /var/sites/s/example.co.uk/artisan on line 46 the error references line 46 $artisan = illuminate\console\application::start($app); it doesn't seem backslashes, part of original config? don't understand. furthermore, no matter try artisan /usr/bin/php artisan --version warning: unexpected character in input: '\' (ascii=92) state=1 in /var/sites/s/example.co.uk/artisan on line 46 parse error: syntax error, unexpected t_string in /var/sites/s/example.co.uk/artisan on line 46 what missing? check php version php -v , if it's less 5.3 should update because namespaces introduced in php 5...

html - JSTL c:if statement not working -

i want able send alert if query string exists, dont need know value returns, exists. i tried this, doesnt work: <% request.setattribute("appinfo", request.getparameter("appinfo")); %> <c:if test="${appinfo}"> <script> alert("${appinfo}"); </script> </c:if> i tried (with url being ?appinfo=88) , worked. <% request.setattribute("appinfo", request.getparameter("appinfo")); %> <c:if test="${appinfo == 88}"> <script> alert("${appinfo}"); </script> </c:if> i dont understand why solution 2 works 1 doesnt, ideas? c:if doesn't work javascript if, non-null values regarded "truthy". c:if need result true or false. can do <c:if test="${appinfo != null}"> to check if value there.

import com.google.android.gms.drive.model.File undefined Android -

i want use "webcontentlink" read data of publicly shared file other's google drive. since part of file package imported package in app. eclipse not recognizing import , giving error. added "google-api-java-client" library in eclipse. other package working fine except one(com.google.android.gms.drive.model.file). please me how fix sorry poor english.

jquery - Open lightbox link outside of iframe window -

i have iframe in photo links. i'm trying enable lightbox go parent display photos @ moment confined within iframe itself. i tried using <base target="_parent" works navigating links doesn't seem work lightbox. the lightbox using jquery based. nyromodal v2 :: jquery plugin . i have searched google , found 1 apparent solution on windows-addict.com doesn't work. switched the exact same lightbox using in example in case mistake on end. i'm pretty sure there simple explaination knows lightbox , iframes i've exhausted of ideas @ point! does know solution? edit code: this call in <head> : <!-- lightbox --> <link rel="stylesheet" href="http://static.tumblr.com/wlao44f/cdln5ocfk/nyromodal.css" type="text/css" media="screen" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <scri...

reporting services - Native SSRS user security -

in order allow users run ssrs reports in native mode, must add them users? right now, seems need have access report in ssrs report manager , access ssrs report server (being added user on server). have ad group can run reports, giving adding of them user on server seems overkill, if none of them ever log in. am missing something, or normal? generally, when deploy reports ssrs instance use "reportadmin" user secure password. set projects configurations deploy multiple servers. in setup ssrs servers have 2 window user accounts, "reportadmin" , "reportuser". 2 user added ssrs instances roles, 1 has admin rights , other view rights. clients report consumption use "reportuser" role.

ruby - Trying to reach rails app on shared server via subdomain, how? -

i trying run rails app (rails 4.0.0 , ruby 2.1.2p95) on shared server. app in "~/myapp" folder. had overcome problems runtime js. managed , able start app, without problems. rails s -p 12001 => booting webrick => rails 4.0.0 application starting in development on http://0.0.0.0:12001 => run `rails server -h` more startup options => ctrl-c shutdown server [2014-05-16 09:35:33] info webrick 1.3.1 [2014-05-16 09:35:33] info ruby 2.1.2 (2014-05-08) [x86_64-linux] [2014-05-16 09:35:33] info webrick::httpserver#start: pid=27965 port=12001 i able reach app , see working, if add in ~/public_html/.htaccess file rewriteengine on rewritecond %{http_host} ^mydomain.com$ [or] rewritecond %{http_host} ^www.mydomain.com$ rewriterule ^(.*)$ "http://0.0.0.0:12001%{request_uri}" [p,qsa,l] however redirects whole domain rails app. how subdomain? eg. mysubdomain.mydomain.com thanks :)

windows - what is keyboard shortcut to "select text between the cursor and the beginning of the document" -

for general knowledge: does know following keyboard shortcuts windows machine? learned them long long time @ beginning of learning , has forgotten now. how "select text between cursor , beginning of document" ? and, how "select text between cursor , end of document" ? helps highly appreciated. the keyboard shortcut above 2 be shift + ctrl + home and shift + ctrl + end reference these , many other shortcuts: http://www.w3schools.com/tags/ref_keyboardshortcuts.asp

git - Importing project from Github doesn't work in Aptana -

i try import project github in aptana via import project --> git repository new project . login using github credentials , lists repositories. choose repository import. but hangs on resolving deltas: (6/6), 100% done. i tried download git windows , point aptana git executable, doesn't change anything. edit: i found out similar happens when connect existing project github repo. when pushing or pulling, aptana hangs on launching delegate... . one workaround try first clone repo in command line (with git windows ) , import project in aptana. if clone doesn't work, need investigate (partially cloned), in blog post : check git fsck returns, instance, blog post suggests using git merge , adds in comments: since pack files have been downloaded correctly need interrupt process ctrl+c, git fetch fetch branch information remote repository , checkout master (or other) branch again git checkout master see if there proxy issue (like switching ntlm...

joomla2.5 - How to get full url of a article by it's ID in joomla? -

i have article id, how can valid full url of article? article associated menu might not know, there easy way in php url ? using joomla 3.2 tried following already. $article = controllerlegacy::getinstance('content')->getmodel('article')->getitem($article‌​id); jroute::_(contenthelperroute::getarticleroute($articleid,$article->catid)) you can use $article = jcontrollerlegacy::getinstance('content') ->getmodel('article')->getitem($articleid); $url = jroute::_(contenthelperroute::getarticleroute($articleid, $article->catid, $article->language))

angularjs - Filter in ng-options not working -

i have object maps ids objects. display list of these object , use filter, cannot work. specifically, i'm trying prevent object id 2 appearing in options here's i've got: http://jsfiddle.net/9d2za/ <div ng-app ng-controller="ctrl"> unfiltered: <select ng-model="selectedbidtype" ng-options="bidtype.id bidtype.label (bidtypeid, bidtype) in bidtypes"> </select> <br> filtered: <select ng-model="selectedbidtype" ng-options="bidtype.id bidtype.label (bidtypeid, bidtype) in bidtypes | filter:{id: '!2'}"> </select> </div> please note: cannot change structure of bidtypes object in whatever fix come with. here's angularjs: function ctrl($scope) { $scope.selectedbidtype = 1; // bid type objects indexed id fast lookup (this cannot changed in solution) $scope.bidtypes = { 1: {id: 1, label: "buy"...

python - Reading mixed type binary data with Numpy (characters, floats and integers) -

i trying read binary files mixed types (of varying data structures) numpy arrays. the data organized in *.dat file , *.dict (plain text contains data dictionary). example of data dictionary have following: "name" "s" "50" "project id" "i" "4" "amount" "f" "8" my idea have class i'd instantiate , load data calling f = data_bin() f.load("profit.bin") this code working flawlessly whenever have mix of integers , floats, throw string field in middle, throws me error . "typeerror: float argument required, not numpy.string_" the class wrote bellow. side note, can need data in numpy (for performance , compatibility existing code reasons), can live going python lists , there numpy. i appreciate this! class data_bin: def __init__(self): self.datafile="no file loaded yet" self.dictfile="no file loade...

javascript - D3.js and Drupal - SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data -

this strange ... use drupal , drupal view outputs json file. if access file directly embedded javascript error: syntaxerror: json.parse: unexpected character @ line 1 column 1 of json data however, if copy file output drupal view passes json validation , if paste file produced javascript there no error , script executes correctly. here generated json data: {"nodes":[{"node":{"body":"this short story","category":"heatwave","latitude":43.6689985,"longitude":-79.3155716,"link":"http://crewtoronto.ca/entityform/1"}},{"node":{"body":"this short description of effect of ice storm on our household","category":"ice storm","latitude":43.6689985,"longitude":-79.3155716,"link":"http://crewtoronto.ca/entityform/2"}},{"node":{"body":"the ice storm affected large tree in our backyar...

c# - Unable to update label text in ASCX from event handler -

i've 2 custom asp.net web form controls below: main.ascx account_selection.ascx main contains account_selection. main acx contains event handler drop down lives on account_selection ascx. i show error message on main ascx if there issues on contract selection. message never gets displayed. spent couple of hours never works. event handler definately gets called. i'm wondering if it's update panel or event hanlder. please help, below code snippets: account_selection.acx has below: <asp:updatepanel id="upcontracts" runat="server"> <contenttemplate> <asp:dropdownlist id="dropdown" runat="server" autopostback="true" onselectedindexchanged="ondropoptionselected"> <asp:listitem text="select account" value="0"></asp:listitem> </asp:dropdownlist> </contenttemplate> </asp:updatepanel>...

ios - How to get UISwitch with its tag? -

i have function call each time open controller draw me uiswitch. int y = 0; (int = 0 ; < daysarray.count ; i++) { uiswitch * daysswitch = [[uiswitch alloc]initwithframe:cgrectmake(255, y, 20, 20)]; [daysswitch settag:i]; [daysswitch seton:yes]; [daysswitch addtarget:self action:@selector(switchpressed:) forcontrolevents:uicontroleventvaluechanged]; [self.availabletimesscrollview addsubview:daysswitch]; y = y+ 130; } i trying set of uiswitch on or off according tag. uiswitch * switch = (uiswitch *) [self.view viewwithtag:0] [switch seton:no]; but doesn't change or seem affect it. so if not right answer tag of uiswitch set on or off , how can it? the default tag view 0. you're adding these uiswitch instances self.availabletimesscrollview calling viewwithtag: on self.view . method return nearest ancestor given tag, it's returning self.availabletimesscrollview . assuming vi...

javascript - Is there a way for a form to identify only one required field -

for instance in example; <form> <input type="email" name="email" id="useremail" placeholder="email address" required> <br> <input type="tel" name="phone" id="userphone" placeholder="phone number" maxlength="10" required> <br> <input type="submit" id="sidebarformsubmit" value="submit"> </form> is possible somehow/somewhere able identify user has inputed in either email or phone number field. on submit doesn't show "this required". reword: can @ least 1 of form inputs mandatory, both allowed 1 or other not none. in above example, user needs have @ least 1 form of communication whether phone number or email. can have both however, not none. if so, how go this? is possible somehow/somewhere able identify user has inputed in either email or phone number field. on submit doesn't sho...

html - typeahead not working with lower version of ui bootstrap -

here plunker link if changed version of <script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.4.0.js"></script> ui-bootstrap-tpls-0.6.0.js , works fine need make typeahead in v0.4.0. possible? hello have edited plunkr , here working plunkr the change have made changed version of angular js using. <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.js"></script> if want use ui-bootstrap-0.4.0 have use older version of angular because newer version of angular seems not compatible properly. hope you. thanks.

knockout.js - knockout-kendo.js data binding issue -

i using knockout-kendo.js knockout.js binding kendo grid. if bind object's first level property works fine. here sample - http://jsfiddle.net/rniemeyer/jztg5/ in above example items property defined in viewmodel (i.e. viewmodel.items) however if use object's second level property bind kendo grid, doesn't work. here sample binding doesn't work - http://jsfiddle.net/thakkar/qhf2w/3/ in example, items property not directly defined in viewmodel. instead property of object used in viewmodel. (i.e. viewmodel.obj.items) var item = function(id, name, type) { this.id = id; this.name = ko.observable(name); this.type = type; }; var vm2 = function() { this.items = ko.observablearray([ new item(1, "one", "a"), new item(2, "two", "b"), new item(3, "three", "a") ]); var viewmodel = function() { this.obj = ko.observable(new vm2()) }; ko.applybindings(new viewmodel...

How to calculate the date of next Monday in PHP? -

i'm trying date comes next monday @ night 00:01 am. i'm using following lines: date('y-m-d h:i:s', strtotime(**'next monday, 01:01am'**, strtotime(date("y-m-d h:i:s")))) this gives me proper output: 2014-05-19 01:01:00 but if try write: date('y-m-d h:i:s', strtotime(**'next monday, 00:01am'**, strtotime(date("y-m-d h:i:s")))) i'm getting: 1970-01-01 05:30:00 please tell me wrong here. 00:01 am not correct use 12:01 am try this: date('y-m-d h:i:s', strtotime('next monday, 12:01am', strtotime(date("y-m-d h:i:s")))); it give 2014-05-19 12:01:00 demo

javascript - Can you keep changes made to HTML/CSS with jQuery? -

i keep track of comic book collection online using mass amount of tables. color table cells based on ones have vs. don't have. i'm trying make life easier adding jquery site allow me "click" on cell change color. what don't know how make change permanent. works fine dandy (and i'm going add more functionality cycle through more colors), when refresh page changes made page lost. is there way make changes permanent?? adding "save" button perhaps? not sure how achieve this. simple example of i'm doing: <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> <script> $(document).ready(function() { $('td').click(function() { $(this).css('background-color', '#5f0'); }); }); </script> <table> <tr> <td>#1</td> <td>comic title</td> <td>collected edition</td> <td>omnibus</td> </tr> </table...