Posts

Showing posts from January, 2015

aspectj - What are the option for spring @Advice to communicate with some other service? -

we using spring spring aop . regular spring bean/service/repository (i.e @service , etc) @autowired annotation works well. but, won't work out of box @advice class. my question is: what option @advice communicate @service ? thanks! some example search db (using jpa;hibernate ) within advice raise event in system, using applicationeventpublisher call function defined in x service . i have put simple experiment app: @retention(retentionpolicy.runtime) public @interface injectadvicehere { } @service public class fooservice { public void foo(){ system.out.println("foo"); } } @service public class barservice { @injectadvicehere public void bar(){ system.out.println("bar"); } } @aspect @component public class myaspect { private final fooservice fooservice; @autowired public myaspect(fooservice fooservice) { super(); this.fooservice = fooservice; } @befor

c# - error in convertion raisevent -

hi tried convert using web free tool conversion. problem raisevent , below script converted c# vb. tried run error below first string of code... googlemapforaspnet1.pushpindrag += new googlemapforaspnet.pushpindraghandler(addressof onpushpindrag) 'heres event handler pushpindrag event private sub onpushpindrag(pid string) lblpushpin1.text = "(" + googlemapforaspnet1.googlemapobject.points(pid).latitude.tostring() + "," + googlemapforaspnet1.googlemapobject.points(pid).longitude.tostring() + ")" end sub hoping me scenario convert this: addhandler googlemapforaspnet1.pushpindrag, addressof onpushpindrag documentation

How do I recover data in Alfresco after a data model change -

i hoping has experienced before. i have data model in alfresco defines few types , few aspects. for example type x has mandatory aspects , b. as part of developing application on top, need add new aspect type x. when add new mandatory aspect , deploy amp model, existing data type x no longer show in new queries trying join on aspect x. does know seamless way fix this? ideally script run analyze model, match type names, , apply missing aspects instances of type. way model evolve 1 script evolve data, , of our queries evolve data model in coherent path. here example... so lets have query our type x select p:namespace:aspect.namespace.propertya namespace:typex primary join namespace:aspect p:namespace:aspect on primary.cmis:objectid=p:namespace:aspect.cmis:objectid anytime make object x have aspect applied since mandatory. few weeks later add mandatory aspect2. , need property b it... select p:namespace:aspect.namespace.propertya, p:namespace:aspect2.names

oracle - How to have multiple Select Statements in a Result Set in Java -

the problem running want select column , sum values. want sum column in same table. object take these 2 summed columns , subtract them output. use taking vacation times. every week employee gains hours of vacation. when used in different column. need come total of vacation left can use. have: try { //getting information employee_time_log vacation statement vacationlogstmt = dbconn.createstatement(); resultset vacationlogset = vacationlogstmt.executequery( "(select sum(vacation_gained) employee_time_log employee_id_number = " +userinputidnumber + "), " + "(select sum(vacation_used) employee_time_log employee_id_number = " +userinputidnumber + "), " + "group vacation_gained, vacation_used"); vacationlogset.next(); string strvacationearned = vacationlogset.getstring(1); string strvacationused =

node.js - NPM install via git+https//x-oauth-basic within Docker container fails -

i have node project have stood on host server (ubuntu 14.04), can pull repo , perform npm install without issue on host. package.json includes private repos use https have npm pull in our private dependencies. like in our "dependencies" in our package.json: "local_utils": "git+http://12345:x-oauth-basic@github.com/ourprivateteam/local_utils.git", i'm trying run same application within docker container, on build of our docker image npm install fails on our private repo calls. throws error: failed connect github.com port 443: connection timed out the normal dependencies in npm work fine within container. causing error our private repos? as suspected, outbound access github being blocked server: "yup guessed it, added env http_proxy dockerfile , worked. had configured npm in container use proxy didn't realize needed set container well."

keep user logged in across subdomains asp.net -

for working on localhost in visual studio 2013.(i using individual user authentication) what have done is: i updated <system.web> in web.config as <system.web> <authentication mode="forms"> <forms loginurl="~/account/login" timeout="2880" name=".aspxauth" protection="validation" path="/" domain=".localhost" /> </authentication> <machinekey validationkey="c50b3c89cb21f4f1422ff158a5b42d0e8db8cb5cda1742572a487d9401e3400267682b202b746511891c1baf47f8d25c07f6c39a104696db51f17c529ad3cabe" decryptionkey="8a9be8fd67af6979e7d20198cfea50dd3d3799c77af2b72f" validation="sha1" decryption="auto"/> <compilation debug="true" targetframework="4.5" /> <httpruntime targetframework="4.5" /> </system.web> i updated startup.auth.cs as: app.usecookieauthentication(new cookie

ios - Sqlite.swift live search -

i want live search on db. lets want search companies , have following info on column named companies. facebook fastcompany facebook google microsoft i have textfield has calls function on editchanged. @ibaction func searching(sender: anyobject) { tempstring = "%"+searchbar.text+"%" println(tempstring) user = user.select(name) .filter(like(tempstring, name)) .limit(30, offset: 0) collectionview?.reloaddata() } it kind of works, if start typing " fa " show ( facebook, facebook , fastcompany ) if continue typing " fac " show ( facebook, facebook ) but when delete last character " c " searchbox (leaving in "fa" again) query displays nothing. any ideas on how can solve this. i think issue coming on writing user object each search. fine long move forward, when go backwards did, query messes up. instead, try adding currentquery proper

node.js - Should I SCP my node_modules folder in continuous deployment setup? -

i'm building first continuous deployment setup using codeship.io deploy digital ocean droplet. codeship's documentation suggests using scp clone production files. my question is: should include node_modules folder in clone? or should figure out way npm install on droplet when needed?

custom component - Delphi Xe6 Compont package issue -

i have component pack has been working great few years. trying produce both 32 bit , 64 bit versions. i build debug , release win32 versions no error. i build win64 version no error. but when try build win64 release version "[dcc64 fatal error] fbccomponents.dpk(31): e2202 required package 'rtl' not found" does have idea happening... tia farley first, need divide these apart 2 separate packages - runtime , designtime . design-time package responsible installing ide. now, design-time package works directly ide. delphi ide 32bit only. so, design-time package must 32bit - whereas run-time package should compiled whatever platforms desired.

javascript - popup gets closed automatically -

Image
i have refresh parent window once done changes in popup window, use : <body onunload="opener.location.reload();"> but closes window on event, save, whereas don't want close. want close window clicking window close or clicking close button in jsp "javascript". for closing thru "close" button. js : function closeandrefresh(){ opener.location.reload(true); window.close(); } solved problem js: var myclose = false; function confirmclose() { if (event.clienty < 0) { myclose=true; } } function handleonclose() { if (myclose==true) { opener.location.href = "<%=request.getcontextpath()%>parent_jsp_path"; window.close(); } } html: <body onbeforeunload="confirmclose();" onunload="handleonclose();">

java - Listener within @Autowired class called twice -

this autowired class : @component public class alfrescologinframe extends javax.swing.jframe { private static final long serialversionuid = 6302651813469103752l; @autowired private maincontroller controller; public alfrescologinframe() { initcomponents(); initactions(); } private void initcomponents() { try { uimanager.setlookandfeel("com.jgoodies.looks.windows.windowslookandfeel"); //uimanager.setlookandfeel ( "com.alee.laf.weblookandfeel" ); } catch (classnotfoundexception e) { e.printstacktrace(); } catch (instantiationexception e) { e.printstacktrace(); } catch (illegalaccessexception e) { e.printstacktrace(); } catch (unsupportedlookandfeelexception e) { e.printstacktrace(); } lbl_user_name = new javax.swing.jlabel(); lbl_password = new javax.swing.jlabel(); txt_use

Set dynamic URL on state in AngularJS with Ui-Router -

i have ng-include rendering partials on page nature of ng-include not need state load partials. url update when ng-include updates view analytics track page change. wondering best way this. also using angular-ui-router, makes ng-include irrelevant because of nested states; until 1 comes across situation: have large number of partials loading ng-include, lovely because need provide path partial , not massive number of different states $stateprovider file; there no custom url. such wondering following: can ng-include update page url when loads partial without having state defined partial view or something solve problem altogether: there way add states have url can dynamically updated? like: .state( 'test', { url: function( stateid ){ // stateid somehow passed $stateparams of new state }, templateurl: "templates/views/test.html" }) here setup far ng-include, if have ideas on how url change when ng-include renders different partial ple

android - Strange behaviour of ParseQuery -

code: parsequery<parseobject> query = parsequery.getquery("order"); query.findinbackground(new findcallback<parseobject>() { @override public void done(list<parseobject> list, parseexception e) { if (e == null) { (parseobject object : list) { } } else { e.printstacktrace(); } } }); found parseobjects created current parseuser. it's normal behavior?

php - Get value separated by comma WordPress -

how value separated comma. used explode it. i've tried. $get_item_desc = get_post_meta ($post->id, 'item_description', true); $arr = explode(",", $get_item_desc); $item_string = ''; foreach($arr $val){ echo $get_items = $item_string.trim($val).' '; } sample input: item 1, item 2, item 3 sample output: desc-1: item 1 desc-2: item 2 desc-3: item 3 based on sample input/output, can use: $get_item_desc = get_post_meta($post->id, 'item_description', true); $arr = explode(',', $get_item_desc); $i = 1; foreach($arr $val){ echo 'desc-' . $i . ': ' . trim($val) . ' '; $i++; }

android - Replace Fragment with another on back button -

i'm trying override button because it's closing app when push on, have different fragments: fragment a: index (when press button, it's close app) fragment b (when press button go fragment a) fragment c (when press button go fragment a) and have main activity: manage fragments (for have navigation drawer). i found many posts on can't implement them: on fragment b exemple: @override public void onbackpressed(){ fragmentmanager fm = getsupportfragmentmanager(); fragment f = fm.findfragmentbyid(r.id.fragmentb); // fragment loaded in placeholder object tag = f.gettag(); // handling of tag here // call super method super.onbackpressed(); } it cannot resolve onbackpressed() , getsupportfragmentmanager(), think don't use method correctely, how ? activity: import android.app.alertdialog; import android.content.dialoginterface; import android.graphics.typeface; import android.os.bundle; import android.support.v4.app.fragment; im

for loop - R matrix getting row and column number and actual value -

i have matrix below b = matrix( c(2, 4, 3, 1, 5, 7), nrow=3, ncol=2) b # b has 3 rows , 2 columns # [,1] [,2] #[1,] 2 1 #[2,] 4 5 #[3,] 3 7 i create data.frame 3 columns: row number, column number , actual value above matrix. thinking of writing 2 loops. there more efficient way this? the output want (i showing first 2 rows below) rownum columnnum value 1 1 2 1 2 1 try cbind(c(row(b)), c(col(b)), c(b)) or library(reshape2) melt(b) as per @nicola's comments, output needed may in row-major order. in case, take transpose of matrix , same tb <- t(b) cbind(rownum = c(col(tb)), colnum = c(row(tb)), value = c(tb))

drag and drop - How to get the component out of the DragAndDropWrapper again -

i following this guide in order achieve solution drag , drop scenario. i've component ( slider ) wrapped in " draganddropwrapper ". works pretty well. final slider slider = new slider(title); slider.setvalue(1.0); slider.setwidth("100%"); slider.setmax(4); slider.addstylename("ticks"); final draganddropwrapper sliderwrap = new draganddropwrapper(slider); sliderwrap.setdragstartmode(dragstartmode.component); sliderwrap.setsizeundefined(); ((abstractorderedlayout) this.getcontent()).addcomponent(sliderwrap); okay, simplify things let's assume have button wrapped in such draganddropwrapper . final button button = new button("an absolute button"); final draganddropwrapper buttonwrap = new draganddropwrapper(button); buttonwrap.setdragstartmode(dragstartmode.component); how supposed but

jquery - Setting response image of Ajax Request to img tag -

i have image in response server trying add image tag having problems here code: $.ajax({ type: "get", url: "some_image_url", contenttype: "image/png", success: function (data) { var img = new image(); var url = window.url || window.webkiturl; img.src = url.createobjecturl(data); document.getelementbyid("createthingicon").appendchild(img); }, }); when responded image appended html not showing rather broken image.is there wrong in code? hard coded url can check response $.ajax({ type: "get", url: "your_remote_url", mimetype: "text/plain; charset=x-user-defined", success: function (data) { $image = $('<img />').attr('src', 'data:image/png;base64,' + base64encode(data)); $('#createthingicon').append(

java - Why is this POST request through HttpURLConnection throwing a FileNotFoundException? -

update 3: tried execute request against requestb.in insteaad of blobstore url , same exception occured, looks problem upload method using httpurlconnection , not blobstore specific issue. update 2: added code creating upload url method @ bottom update 1: added code , exact exception below question. hope situation clearer now. files getting uploaded blobstore using post request url provided createuploadurl() method. however, app engine still responds filenotfoundexception upload requests complaining file not found @ https://<app-id>.appspot.com/_ah/upload/<long-random-string> what going on here? upload code: try { multipartutility multipartutility = new multipartutility(blobuploadurl, "utf-8",writelistener); multipartutility.addformfield("key_name", keyname); multipartutility.addfilepart("file", filename, is); multipartutility.finish(); } catch (ioexception e) { } multipartutility class: public class multipa

c# - Implement Single Signon in Windows without Azure -

i working in c# on web application requires login username , password. application made compatible windows , being written in vs 2013. in company's network, computers require user credentials, , in cases user's credentials app same windows logon credentials. therefore trying implement system where, instead of signing onto windows , entering same credentials again in app, app can access windows credentials given current user , attempt sign in automatically those. know there way using active directory azure, time being trying avoid using azure. have tried using windowsidentity.getcurrent() , environment.username far, both of supply username, not password, , need full credentials. wouldn't shock me if cannot done in way security purposes, if there way incredibly helpful. know of way access current user's credentials? thanks you don't need azure accomplish this. application pool needs have windows authentication enabled. not have access password, howeve

Inserting a Image Into Excel Userform and then edit -

i have able add/select image , load userform. wondering if there away load toolbox label(etc) userform when load image userform, have option edit image on userform. thanks in advance this code using upload image userform with application.filedialog(msofiledialogfilepicker) .allowmultiselect = false .buttonname = "submit" .title = "select image file" .filters.add "image", "*.gif; *.jpg; *.jpeg", 1 if .show = -1 ' file has been selected ' e.g. show path in textbox me.textbox1.text = .selecteditems(1) ' e.g. display preview image in image control me.image1.picturesizemode = fmpicturesizemodezoom me.image1.picture = loadpicture(.selecteditems(1)) else ' user aborted dialog end if end

git add - Git documentation: about `revert` subcommand of `git add -i` -

git documentation revert subcommand of git add -i : revert has similar ui update, , staged information selected paths reverted of head version. maybe incorrectly understand text... understand like: revert same git checkout -- file_name . but @ practice see revert removes file staging area. did incorrect translat, or incorrect text in documentation? there difference between subcommand revert (on interactive mode) command revert , command reset . the first 1 opposite of git add , , able use if run git add --interactive the second 1 used revert commits (will add new commit opposite operations of reverted commit). the last 1 git add subcommand revert (first one), mean, undo git add command (unless specify commit, see documentation). so if want reset file have use git checkout -- head filename documentation: git revert git reset git checkout

django - ValueError: "<MODEL MODELOBJECT>" needs to have a value for field "Mrefs" before this many-to-many relationship can be used -

i getting following error when trying add many many relationship. error happens when trying add many many field. same model no data many-many field loads fine. traceback (most recent call last): file "manage.py", line 10, in <module> execute_from_command_line(sys.argv) file "/home/app/.virtualenvs/app/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line utility.execute() file "/home/app/.virtualenvs/app/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute self.fetch_command(subcommand).run_from_argv(self.argv) file "/home/app/.virtualenvs/app/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv self.execute(*args, **options.__dict__) file "/home/app/.virtualenvs/app/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute output =

asp.net web api2 - How to get original exception message to client from web api -

i have asp.net web api method following one [httpget] public ihttpactionresult getalldesignations() { try { designationapplicationservice des = new designationapplicationservice(); list<designation> dslist = des.getalldesignations(); return ok(dslist); } catch (exception ex) { mycustomexception exception = new mycustomexception(ex, "error in loading designations", myenum.exceptiontype.error); return internalservererror(exception); } } i calling api method in c# client application. if exception occurred in api method, have thrown own custom exception. gets "iternal server (500)" error api is there method original exception in client application? enter code here you try setting includeerrordetailpolicy configuration ' always '. see page: http://www.asp.net/w

css - Background video does not play on mobile? -

i've made landing page video plays @ background of form. it's working fine on desktops checked on android device using chrome, background video not play on it. could me fix issue. here link fiddle . html: <p> <video autoplay="" id="video" loop=""><source src="http://www.mygreencity.in/enquiry.mp4" type="video/webm" /> <source src="enquiry.mp4" type="video/mp4" /></video> </p> <form action="" class="form" method="post"> <p><input name="enq_name" placeholder="full name" required="" type="text" autocomplete="off" alt="full name" title="full name"/></p> <p><input name="enq_mobile" placeholder="mobile number" required="" type="number" autocomplete="off" alt="number" t

Could not open the PostgreSQL database in Qt -

could not open postgresql database qt. qdebug()<<qsqldatabase::drivers() qsqldatabase_database=qsqldatabase::adddatabase("qpsql"); qsqldatabase_database.setdatabasename("myapp"); qsqldatabase_database.sethostname("localhost"); qsqldatabase_database.setport(5432); qsqldatabase_database.setusername("postgres"); qsqldatabase_database.setpassword("1"); if(!qsqldatabase_database.open()) { qdebug()<<"could not open database"; qdebug()<<qsqldatabase_database.lasterror().text(); } else { qdebug()<<connected; } output: "qpsql,qpsql7" "could not open database" "driver not loaded driver not loaded" it windows 7 64 bit pc. in pc qt not installed. but in qt(qt 5.4) installed pc(windows 7 32 bit) working perfectly!

c# - Unity Space Shooter tutorial : CS 1526 ,1525 error in unity 5 -

Image
error cs1525 : unexpected symbol ,', expecting ;' error cs1526 : new expression requires () or [] after type using unityengine; using system.collections; public class playercontrol : monobehaviour { public float xmax, xmin, zmax, zmin; public float speed ; void fixedupdate() { float movehorizontal = input.getaxis ("horizontal"); float movevertical = input.getaxis ("vertical"); vector3 movement = new vector3 (movehorizontal, 0.0f, movevertical); getcomponent<rigidbody>().velocity = movement* speed; getcomponent<rigidbody>().position = new vector3 ( mathf(getcomponent.<rigidbody>().position.x, xmax, xmin), 0.0f, mathf(getcomponent.<rigidbody>().position.z, zmax, zmin) ); } } there several issues here. first of there getcomponent.<rigidbody>() . . there wrong. call should be getcomponent<rig

java - Hi Im splitting a list into two and adding it to the main list...so How do i add the left out list data -

hi i'm splitting list m getting two...and adding main list , i'm returning main list....now if have 10 products me..i specifications 10 products , adding 7 main list....now, how can add remaining 3 products specs main list i have tried public static list<list> getspecdata(map<string, string> specifications) { int count=0; list mainlist = new arraylist<list>(); list l = new arraylist<string>(); for(string s : specifications.keyset()) { l.add(specifications.get(s)); if(count==7) { mainlist.add(l); l = new arraylist<string>(); count=0; } count++; } return mainlist; } try adding if condition if (count> 7) , did count ==7.

windows - Libiconv C++ Builder -

i'm trying integrate zbar library application built in c++ builder (xe6). however, zbar library depends on iconv not available in windows, managed static library of iconv windows : "libiconvstatic.lib". then tried import project way (i'm not sure first line necessary though) : #define using_static_libiconv #include <iconv.h> #pragma comment (lib, "libiconvstatic.lib") the functions iconv called in file iconv_open() , iconv() , iconv_close() . i through compilation error linker : [ilink64 error] fatal : invalid object file '/72' i tried both 32bits , 64bits versions of libiconvstatic.lib . do know why .lib not recognized , how solve problem? or other way make use of iconv in windows (and c++ builder) ? thank you. as mentioned in comments: should build library c++builder directly, object file format different between msvc , c++builder. alternatively, build dynamic version of library msvc, , implib libiconv.lib

javascript - Why is my while loop stucked? -

i want replace 2 (or more) line breaks in textarea got stucked in infinty loop here is: var dateinput = document.getelementbyid("date"); var intindexofmatch = dateinput.value.indexof('\n\n'); while (intindexofmatch != -1){ dateinput .value = dateinput .value.replace('\n\n', '\n'); } because haven't changed intindexofmatch var dateinput = document.getelementbyid("date"); var intindexofmatch = dateinput.value.indexof('\n\n'); while (intindexofmatch != -1){ dateinput .value = dateinput .value.replace('\n\n', '\n'); intindexofmatch = dateinput.value.indexof('\n\n'); } better solution though var dateinput = document.getelementbyid("date").value.replace(/\n{2,}/g, '\n'); that replaces whole code, way

put a Button into a frame in python tkinter -

i trying template tkinter application. cant put buttons frames. is frame right control use template? or there different. from tkinter import * root = tk() frame = frame(root, height="200", width="200", bg="green").pack() b = button(frame, text="hell world").pack(padx="10", pady="10") z = label(root, text="outside").pack() root.mainloop() this code. the code runs, button beneath green frame. want have button inside of frame. is possible? frame = frame(root, height="200", width="200", bg="green").pack() after line executes, frame equal none because that's pack() returns. need assign widget , pack on separate lines if want keep reference it. frame = frame(root, height="200", width="200", bg="green") frame.pack() same b , z , never use them don't matter much.

php - Code coverage when not testing protected/private methods with PHPUnit -

i know it's possible test private/protected methods phpunit using reflection or other workarounds. but sources tell me it's not best practice write tests private methods inside of class. you supposed test class if "black box" — test expected behavior comparing inputs outputs disregarding internal mechanics. writing tests classes should notify unused private methods, showing lack of code coverage. when test class , generate html report, shows private methods not covered tests, though lines called absolutely executed/covered. know private methods executed, because if weren't assertions on class not pass. is expected behavior in phpunit? can strive 100% coverage, while still testing private methods indirectly? some simplified example code (using restbundle in symfony2): class apicontroller extends fosrestcontroller { /* * @rest\view() * @rest\get("/api/{codes}") */ public function getcodesaction($codes) { $view = new view(); $vi

How to have these buttons clicked automatically at an interval jquery -

<button class="sitebutton bigbutton" onclick="setcategory('123456');"><span>save</span></button> <button class="sitebutton bigbutton" onclick="setcategory('123455');"><span>save</span></button> <button class="sitebutton bigbutton" onclick="setcategory('123454');"><span>save</span></button> <button class="sitebutton bigbutton" onclick="setcategory('123453');"><span>save</span></button> how click on save button using jquery after interval maybe of 0.5 seconds try using setinterval() var buttons = $('.sitebutton'); var len = buttons.length, = 0; var interv = setinterval(function() { buttons.eq(i++).click(); if (i == len) clearinterval(interv); },1000); function setcategory(v) { alert(v); } <script src="https://ajax

vba - Command Button Visibitly based on Application.Username -

i looking @ creating administration button on user-form. now want against application.username determine whether button visible or not. my current code is: private sub adminbtn() if application.username = "peter.mogford" admincmd.visible = false else admincmd.visible = true end if end sub i have put myself in test , asked visibility false reason still showing. i'm not sure whether has me writing code in user-form instead of module or that. please can offer bit of advise. thanks in advance the practice here in case need update visibility once form shown using form constructor . use this: public class form1 public sub new() initializecomponent() if application.username = "peter.mogford" admincmd.visible = false else admincmd.visible = true end if end sub end class when writing custom form constructor, important call initializecomponent() function, controls initialization, before call of them.

c# - Microsoft.ApplicationInsights.Contracts does not exist in Microsoft.ApplicationInsights -

i wanted have go @ microsoft.applicationinsights telemetry. documentation claims that telemetrycontext supposed in microsoft.applicationinsights.contracts namespace, when grab application insights web nuget (it gets me microsoft.applicationinsights dependency), not seem have contracts in it. microsoft.applicationinsights.contracts nuget search gives no results . i must missing obvious here. the documentation on msdn appears out of date. in 1.1 of application insights sdk (the latest, i'm assuming using), has telemetrycontext in namespace: microsoft.applicationinsights.datacontracts (note datacontracts not contracts). used resharper let find telemetrycontext class , found in namespace in core package (microsoft.applicationinsights). the sdk release notes not mention namespace moving however, https://azure.microsoft.com/en-us/documentation/articles/app-insights-release-notes-dotnet/ .

javascript - how to disable unavilable dates dynamically in datepicker -

i'm trying disable unaviable dates dynamically how can ? if give static value below working fine var unavailabledates = ["10-8-2015","24-7-2015","10-7-2015","09-8-2015","09-7-2015","01-12-2015","01-1-2016","11-8-2015"]; if value dynamically not working how can solve ? my fiddle var unavailabledates = $('#designidunavialble').html(); function unavailable(date) { dmy = date.getdate() + "-" + (date.getmonth() + 1) + "-" + date.getfullyear(); if ($.inarray(dmy, unavailabledates) == -1) { return [true, ""]; } else { return [false, "", "unavailable"]; } } $(function() { $("#idate").datepicker({ defaultdate: new date("7-7-2015"), mindate:0, dateformat: 'dd-mm-yy', beforeshowday: unavailable })

java - Gson deserialize JSON array as Object -

i've got object, need deserialized / unmarshalled json (using gson). problem 1 of properties, in javabean, complex object, needs serialized fron json array of numbers: the json (somewhat similar to): { "name": "john doe", "location": [ 9.560006, 55.719474 ], } the targeted classes (somwaht similar to): class userlocation { private string name; private location location; // ... "zero-args constructor", get'ers , set'ers } class location { private double longitude; private double latitude; // ... "zero-args constructor", get'ers , set'ers } my gsonbuilder configured as: new gsonbuilder() .registertypeadapter(location.class, new locationtypeconverter()) .create(); where locationtypeconverter looks this: public class locationtypeconverter extends typeadapter<location> implements jsonserializer<location>, jsondeserializer<locati

ANDROID STUDIO - how to make a backup copy of the project -

how can make backup copy of project in android studio. tried copy folder of project, had problems assembly of project. application not work properly. build.gradle files: // top-level build file can add configuration options common sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.2.3' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } } apply plugin: 'com.android.application' android { compilesdkversion 22 buildtoolsversion "22.0.1" defaultconfig { applicationid "com.example.ss.new_my_wid" minsdkversion 19 targetsdkversion 22 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false progu

python - Django Form is not visible in Inherited template -

i using template inheritance in django project. used form in base html page , submit button, when inherit base template template form disappeared submit button still there. have below templates. base.html <head> {% load static staticfiles %} <link rel="stylesheet" href="{% static "bootstrap.css" %}"> </script> </head> <body> {% block option %} <div class="row"> <div class="col-lg-3"> <form method = "post" action=""> {% csrf_token %} {{form}} <input type="submit" value="submit" /> </form> </div> </div> {% endblock %} <div class="row"> {% block content %}{% endblock %} </div> </body> chart.html {% extends 'base.html' %} {% block content %} <head> {% load static staticfiles %}

php - Adding a select for foreign key object serverfireteam/panel -

i'm using serverfireteam laravelpanel (which uses zofe/rapyd-laravel ). created crud controller entity. entity has foreign key table. want show autocomplete foreign key shows empty selectbox. my controller code this: public function edit($entity){ parent::edit($entity); $this->edit = \dataedit::source(new \app\regal()); $this->edit->add('bezeichnung', 'bezeichnung','text'); $this->edit->add('nummer', 'nummer','text'); $this->edit->add('maxpaletten', 'max paletten je ebene','text'); $this->edit->add('anzahlebenen', 'anzahl ebenen','text'); $this->edit->add('kunde_id','kunde','select')->options(\app\kunde::lists("name", "id")); return \view::make('regale.editpanel', array( 'title' => $this->entity , 'edit' =>